You are not logged in.

#1 2019-03-30 21:55:30

justdanyul
Member
Registered: 2011-09-29
Posts: 130

[solved] PulseAudio and suspend

Hi all,

I'm seeing this exact issue: https://wiki.archlinux.org/index.php/Pu … om_suspend , and well, the issue is pretty much what it says on the tin. If I suspend, I'll wake up to no sound :-)

Unfortunately the proposed solution doesn't help on my machine. I've also tried to manually pulseaudio, and start it back up again using -k and --start, but that seems to break ALSA. in the sense that I no longer have the pulseaudio device available to ALSA, even after running 'alsactl restore'

Any hints on how to proceed?

*** UPDATE ***
Digging into this a bit, it seems what happens is, by default, after booting up, pulse is using the Nvidia HDA sink to send sound through my DP connection. This is what I actually want, as I am using the build in speakers in my monitor.

Now, when resuming after a suspend, it flip the active sink to the Intel HDA sink, representing the sound card on my motherboard. Setting the Nvidia HDA sink as the fallback sink solved the problem.


*** UPDATE 2 ***
I stand corrected, I sporadically still have a related, but separate problem. Sometimes, after resume, the sink representing my Nvidia device disappears altogether, and the onboard soundcard is promoted to the default device. To fix this, I've created a little script containing the following

pulseaudio --kill
pactl set-default-sink 0

so basically, it kills pulseaudio, which then automatically starts back up, and then it flips the default sink back to the appropriate default sink. I created the following systemd service to automate this on resume

[Unit]
Description=Dirty dirty pulseaudio
After=suspend.target

[Service]
Type=simple
ExecStart=/bin/bash /home/myusername/.scripts/fixpulseaudio
User=myusername
Group=myusername
Restart=always
RestartSec=10

[Install]
WantedBy=suspend.target

So far, this seems to have done the job *knocks on wood*

Last edited by justdanyul (2019-03-31 20:49:49)

Offline

Board footer

Powered by FluxBB