reset sound after suspend to memory (deep sleep)
#3
Hello Syonyk

(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.
  Reply


Messages In This Thread
RE: reset sound after suspend to memory (deep sleep) - by Der Geist der Maschine - 06-16-2020, 12:55 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Password reset or recovery tessa 2 258 11-11-2024, 04:27 PM
Last Post: tessa
  Sleep and external display - Are there any options? chris88233 7 3,023 09-04-2023, 09:03 PM
Last Post: wdt
  PineBook Pro seems to go to deep sleep, but doesn't wake up pogo 11 7,421 08-31-2023, 04:20 PM
Last Post: TRS-80
  Rkvdec memory leak? Abhinav 2 1,279 06-02-2023, 08:55 AM
Last Post: Abhinav
  Sound on Armbian Bram 1 1,380 04-01-2023, 03:16 PM
Last Post: TRS-80
  Suspend/Resume Broken with Bootloader on SPI Flash xp19375 2 1,638 03-24-2023, 04:25 PM
Last Post: srs5694
  With the help of a friend, I installed a beautiful deep os distribution, but I won't wangyukunshan 0 823 03-03-2023, 10:56 PM
Last Post: wangyukunshan
  Hibernation and Speaker Sound Issues, First Month of PBP kebab 7 4,021 11-02-2022, 02:33 PM
Last Post: kebab
  Resume from suspend not working after flashing Tow-Boot to SPI xp19375 3 2,515 10-31-2022, 10:14 AM
Last Post: wdt
  Loud distorted speaker sound when connecting to power supply myself600 2 1,621 09-21-2022, 12:11 PM
Last Post: myself600

Forum Jump:


Users browsing this thread: 1 Guest(s)