Problems after switching from Ubuntu Studio 24.04 to 26.04

Hello Sir,

So I applied those changes. Switched all the USB and Audio stuff to bad…Restarted Pipewire..Checked to see that the changes were still there in the script (they were)…But the problem is still there. I play audio through the DAW and it works..I put the laptop to sleep…wake it up and there is no audio…until I restart pipewire…I tried turning the screen locking after sleep back on but it didn’t make a difference…Now I will try the alsa scarlett suggestion made by eeikmayer and report back..Restarting pipewire is an ok workaround in the meantime…

But I’ve noticed that sometimes the DAW does play audio after sleep…I don’t know how I got it to do that…I think I just opened PAVU…But then after restart it goes back to not working after sleep…

But I can, if it’s really something that can be fixed that way; assuming you’re talking about the powertop stuff.

1 Like

Yeah, Well I tried your suggestion and it didn’t work. Installed alsa-scarlett-gui but that just seems to do what I can press with my fingers on the interface itself..no obvious setting.

Again, it worked on 24.04 so it must be possible to fix…I can’t do much without help because I haven’t got much of a clue…However, I can nail the solo off Sweet Child ‘O mine.

Then we need to keep looking.

Have you checked that powertop shows the same output after a suspend/resume?

I am half suspecting this needs some driver module un-/load on suspend/resume. The only question is which one. I have cobbled together a systemd service template for just that purpose in another thread.

That’s why this forum exists and I, as well as many others, am happy to help, where I can.

I like the Guns N’ Roses version of it. :smiling_face_with_sunglasses:

Hello, yes your help is fantastic. I really appreciate it. I have to focus on my hateful dayjob now but I will come back and follow your instructions when I get a chance.

powertop shows identical output in the ‘tunables’ tab before sleep and after sleep

I will now look at your systemd service template thread

I have noticed that after losing audio in the DAW, it doesn’t matter if I restart the DAW..there is still no audio..However, I open firefox and start playing a stream, there is audio and when I go back to the DAW the audio is also back…

So, if I restart the laptop..and open the DAW..the audio plays. If I put the laptop to sleep and re-awake, there is no audio..and it doesn’t matter if I restart the DAW.

If, however, I open up Firefox and start watching a stream, there is audio, and, there is also audio back in the DAW…and this audio stays even after going into sleep mode. Until the next restart of the computer.

But all the USB devices and Audio codec PM settings are “Good”, which is bad, b/c that means power management can put them to sleep. I am half suspecting that unknown USB device 3-10 (0cf3:e007) to be your DAW.

You do need to make those changes again after a reboot, b/c they don’t stick, unless we make them stick by means of sysfsutils, for instance.

Yeah, I know. I was just giving you the readout before and after sleep without having made any changes (I thought that was what you were asking for). I will set everything to ‘bad’ and compare before and after also. But I already tried setting it all to ‘bad’ and it didn’t help. I will try again tomorrow morning (too tired now) just to make sure.

Oh, if that is the case, don’t bother; must have missed it in your previous comments. :innocent: We should rather search for the proper module name.

Sorry for being so dim to not realize this sooner, but I think you have found the solution already; you just need a way to automate it.

Systemd magic to the rescue

That should be fixed by this little system service:

sudo tee /etc/systemd/system/restart-pipewire@.service 2>/dev/null <<EOF
[Unit]
Description=Restart the PipeWire service of %I
After=sleep.target

[Service]
Type=oneshot
ExecStart=systemctl --user --machine=%I@.host restart pipewire.service

[Install]
WantedBy=sleep.target
EOF

sudo systemctl daemon-reload

sudo systemctl enable restart-pipewire@$(whoami)

You should be able to copy this by clicking the little clipboard icon in the top right corner of the code block. Then paste it into a terminal by pressing CtrlShift V and hit Enter.
(Update: we do need a system service that acts on the user’s systemd session, contrary to the initial idea.)

What this does

It restarts the pipewire user service whenever the system returns from sleep.

This also shows off the power of systemd service templates, b/c one can just run the last command (sudo systemctl enable restart-pipewire@$(whoami)) as another user, if one uses multiple accounts on the same machine.

Caveats

You may need to restart/reattach already running audio apps after this, because they get disconnected and may not try to reconnect on their own. For instance, mpv just switches to no-audio and I have to manually switch the audio track from now 0 to 1.
There may also be implications for PulseAudio clients, but I hope the inter-dependencies between pipewire-pulse and the base service unit take care of that. I haven’t tested that hypothesis, though, so keep an eye out for that, and we’ll cross that bridge when we get there. Do take a :hammer: to this, please!

There’s a chance that the above can be avoided by reloading the appropriate sound driver. But this should be the next best thing.

1 Like

To me this sounds like there is something not properly configured within system sound settings and/or Digital Audio Workstation sound settings. Maybe I missed it but which DAW are you using?

Yeah, I’ve toggled everything to bad and it didn’t help.

Ok, could be the fix. However I have noticed that if I fire up the laptop and watch a stream on Firefox and put the laptop to sleep, the audio is fine. It’s only when the DAW gets involved that the problem starts. Open the DAW, play audio, all good. Put laptop to sleep, wake it up, no audio in DAW and also no audio then in Firefox either. If I close the DAW and close Firefox and then just reopen Firefox, the audio is back.

Hello. Thanks for chipping in and trying to help. As I wrtoe avove:

I have noticed that if I fire up the laptop and watch a stream on Firefox and put the laptop to sleep, the audio is fine upon waking. It’s only when the DAW gets involved that the problem starts. Open the DAW, play audio, all good. Put laptop to sleep, wake it up, no audio in DAW and also no audio then in Firefox either. If I close the DAW and close Firefox and then just reopen Firefox, the audio is back.

I am using Tracktion Waveform and I think I’ve got it set up right. Same way I always have done. Again, I didn’t have this problem with 24.04..So something has changed. I’d like to keep digging..Maybe display the qpwgraph?

Sorry, I don’t quite seem to follow, what do you mean by “open the DAW”? How does the audio play before that? I thought that was the only device. Can you explain a little more about your setup?

I am not an audio studio guy, so must have missed something.

DAW is software (Digital Audio Workstation), not hardware. (Hardware device is Focusrite Scarlett interface)

1 Like

When I open my Digital Audio Workstation (DAW), the audio from the DAW plays (the music I am working on). But if I put the laptop to sleep, and wake it back up again and try to go back to work in the DAW (which remained open before and after sleep)..there is no longer and audio coming from the DAW…

However, if I just use Firefox and do not open the DAW, and listen to something thru Firefox and then put the laptop to sleep and wake it back up again, there is still audio thru Firefox…

If I open the DAW and put the laptop to sleep and re-awaken it - as I’ve said above - there is no audio…and if I then open Firefox, there is also no audio from Firefox. If I then close down the DAW, close Firefox and reopen Firefox, then the audio comes back to Firefox (and also comes back to the DAW as well). It’s like some conflict where pipewire is not correctly serving everything like it did in 24.04

Maybe I should remove the snap version of Firefox and install it as Flatpak…I dunno, clutching at straws now.