06-16-2020, 12:55 PM
(This post was last modified: 06-16-2020, 01:01 PM by Der Geist der Maschine.)
Hello Syonyk
Ubuntu's alsa script is unloading and then reloading all sound related drivers. That does not work for me on stock Manjaro 20.06.
Great that the alsa script works for you. I assume ubuntu uses systemd , so you should not run pulseaudio -k, but something along these lines
You can check with lsof if the sound device is in use (maybe there is a better way?)
Your command pulseaudio -k is killing pulseaudio, but systemd monitors it and restarts it. So maybe your alsa command is sometimes too slow. Try my systemd commands. I expect its not necessary to stop playing audio. The systemd commands will take care of it and stop playing audio.
(06-16-2020, 09:05 AM)Syonyk Wrote: I've been able to reset audio (on Ubuntu 20.04, mainline 5.7 kernel) after a deep sleep with the following:
Code:pulseaudio -k && sudo alsa force-reload
I believe it accomplishes similar things. On the other hand, it doesn't work if something is trying to play music, but neither does it crash the kernel.
Ubuntu's alsa script is unloading and then reloading all sound related drivers. That does not work for me on stock Manjaro 20.06.
Great that the alsa script works for you. I assume ubuntu uses systemd , so you should not run pulseaudio -k, but something along these lines
Code:
$ systemctl --user stop pulseaudio.socket
$ sudo alsa force-reload
$ systemctl --user start pulseaudio
You can check with lsof if the sound device is in use (maybe there is a better way?)
Code:
$ lsof /dev/snd/*
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
pulseaudi 73457 manjaro mem CHR 116,2 478461 /dev/snd/pcmC0D0p
pulseaudi 73457 manjaro 20u CHR 116,4 0t0 478465 /dev/snd/controlC0
pulseaudi 73457 manjaro 21r CHR 116,33 0t0 47 /dev/snd/timer
pulseaudi 73457 manjaro 22u CHR 116,2 0t0 478461 /dev/snd/pcmC0D0p
pulseaudi 73457 manjaro 37u CHR 116,4 0t0 478465 /dev/snd/controlC0
Your command pulseaudio -k is killing pulseaudio, but systemd monitors it and restarts it. So maybe your alsa command is sometimes too slow. Try my systemd commands. I expect its not necessary to stop playing audio. The systemd commands will take care of it and stop playing audio.