Linux no sound after sleep

Arch Linux

You are not logged in.

#1 2020-01-09 22:17:49

[SOLVED] No sound after suspend

I never had any sound problem at all. The sound just worked.

And I’m left with dummy output. I didn’t change anything alsa/pulse related. Btw, I’m not using Nvidia hdmi but Realtek.

I could go the route suggested here: https://wiki.archlinux.org/index.php/Pu … leshooting
but I’m wondering what happened, as Suspend/Waking was never a problem for the sound?

Last edited by maboleth (2020-01-17 10:12:52)

#2 2020-01-09 22:27:31

Re: [SOLVED] No sound after suspend

Alright, somehow my pulseaudio in /.config was corrupted so I deleted the whole dir, reinstalled and set volume in gnome settings again. It works now after suspend, normally.

Last edited by maboleth (2020-01-09 22:28:10)

#3 2020-01-13 00:48:23

Re: [SOLVED] No sound after suspend

Actually, no. Still happens after suspend.

— It happens when music was playing and Suspend was pressed or initiated (without previously stopping the music).
— Dummy output is shown after wake, no sound can be heard.
— Sound is working normally if PC was suspended while silent (no music, no online radio streaming).

pacmd list-cards shows 0 cards, no sink.

pulseaudio -k fixes it and after a few secs, pacmd list-cards shows the card and there’s a working sound. However, this is not a desirable fix. I want to get to the root of the problem.

The problem here is that this does not happen all the time! But in 1 out of 3. Enough to be very irritating, but not enough to exactly pinpoint the issue by myself. I tried reinstalling pulseaudio 13, but no avail. Same happens.

P.S. the above mentioned findings in journal were NOT related to this issue. It was about HDMI on Nvidia card, and not on this Realtek.

Last edited by maboleth (2020-01-13 00:50:58)

#4 2020-01-13 01:26:22

Re: [SOLVED] No sound after suspend

pactl list sinks

#5 2020-01-13 01:42:24

Re: [SOLVED] No sound after suspend

I had similar issues for a while. It only started happening with a certain kernel version. It was fixed in a later version.

Maybe your problem is also because of a certain kernel version introducing it? If you can remember when your problem first started showing up, try looking through the pacman log file (it’s in «/var/log/pacman.log»). The following filters the file to just the interesting lines:

While I had those problems, doing «pulseaudio -k» didn’t work for me to fix audio. The way I had to do it was with the following script that first «disconnects» the audio device and then a second later starts it again:

That «0000:00:1b.0» part of the script has to be customized for a different computer. That ID is shown in the output of «lspci -D».

Last edited by Ropid (2020-01-13 01:43:43)

#6 2020-01-13 01:52:20

Re: [SOLVED] No sound after suspend

Thanks Ropid. I don’t remember exactly, but I think it started when 5.4.10 was installed.

Читайте также:  Удаление one drive windows 10

I could be wrong though, because this happens when audio is playing _while_ PC is being suspended. It could be that I suspended my PC before without any sound coming so all seemed good even though I possibly already had this issue (I’m a relatively new linux user)

Further, it does not happen every time, even now (usually some time have to pass between suspend -> wake. If I do it too soon, sound goes on normally).

Last edited by maboleth (2020-01-13 02:09:52)

#7 2020-01-13 02:14:52

Re: [SOLVED] No sound after suspend

Keeping my fingers crossed but sounds seems to be working after commenting this in default.pa

Still early to tell. could be just a coincidence.

Update: Nope, after 6th suspend it gave me Dummy again. argh.

Last edited by maboleth (2020-01-13 02:24:10)

#8 2020-01-13 12:13:11

Re: [SOLVED] No sound after suspend

Hoped newest kernel fixed it, nope.

Can anyone help me, is it possible to explicitly say to pulseaudio not to lose/change/whatever default sink? And that is my realtek chip card.

#9 2020-01-13 13:27:10

Re: [SOLVED] No sound after suspend

Check dmesg after the suspend, for some reason your device doesn’t become available immediately. Look at

Maybe also test a bigger kernel difference, check whether you can reproduce on linux-lts for example. There have been quite a few reports for various suspension issues in the 5.4 series.

Also remove the NOT solved from the title.

Last edited by V1del (2020-01-13 13:31:25)

#10 2020-01-13 13:55:43

Re: [SOLVED] No sound after suspend

I will dmesg after it fails and post findings here and try lts if nothing helps. Thanks!

I do think, somehow, that these commented modules help. While yesterday 6th suspend was deaf again, today I commented one more module and so far so good after numerous wakes.

Not sure if this is placebo or not, keeping my fingers crossed. again. I only wonder what are the consequences of these commented out modules?

#11 2020-01-13 14:17:04

Re: [SOLVED] No sound after suspend

Should both be placebo, module-rescue-streams is for ensuring you are not completely mute if you remove a device (irrelevant in your case, but if you had e.g. an USB card that doesn’t run into this issue, your audio would at least play from there and move back when the device restores) that one has guaranteed no bearing on this issue.

module-suspend-on-idle «might» have an effect, but if this only when you are suspending with active sound playing, then this also shouldn’t be relevant as your sinks aren’t suspended when actively playing. This might have a slight relevance because pulse keeps the lock on the card and if there’s some interference from another source that might grab the card away from under pulse, pulse should keep it. Incidentally what are you using for playback? It might be that whatever you are using here, sees the card before pulse, continues playback without pulse, pulse can’t query the card when it becomes aware, pulse generates a dummy device.

#12 2020-01-13 16:11:42

Re: [SOLVED] No sound after suspend

Should both be placebo, module-rescue-streams is for ensuring you are not completely mute if you remove a device (irrelevant in your case, but if you had e.g. an USB card that doesn’t run into this issue, your audio would at least play from there and move back when the device restores) that one has guaranteed no bearing on this issue.

module-suspend-on-idle «might» have an effect, but if this only when you are suspending with active sound playing, then this also shouldn’t be relevant as your sinks aren’t suspended when actively playing. This might have a slight relevance because pulse keeps the lock on the card and if there’s some interference from another source that might grab the card away from under pulse, pulse should keep it. Incidentally what are you using for playback? It might be that whatever you are using here, sees the card before pulse, continues playback without pulse, pulse can’t query the card when it becomes aware, pulse generates a dummy device.

Читайте также:  Монитор сам меняет яркость windows

Have to agree with you there. The fact that this doesn’t always help makes it rather dubious. Still, I find the whole issue rather strange, as I cannot say — hey my machine doesn’t have sound after suspend. It’s more like it — sometimes it does, sometimes it does not. And under certain circumstances. That’s why I hoped for some setting rather than kernel bug. I’m no expert in this by any means, but this looks like some timing issue of some sorts.

As for playback, I use Lollypop for my home albums and Firefox for online radios. It happens on both.

I also have HDMI by Nividia that I have disabled it with

Источник

Linux Mint Forums

Welcome to the Linux Mint forums!

[SOLVED] No audio after suspend/resume

[SOLVED] No audio after suspend/resume

Post by Armorelle » Thu Jun 27, 2019 9:51 am

If I put PC to suspend mode and wake it up later, the audio doesn’t work afterwards. I’ve been noticing this problem for years now but i never managed to get around this problem other then restarting PC. Is there any more general solution for this yet? I’ve tried few things that seemed to help others but none of that worked for me.

Kernel: 4.15.0-52-generic
OS: Linux Mint 18.3 Xfce 64-bit
Motherboard: Asus P8Z68-V
Integrated audio: Intel 6 Series/C200 Series Chipset Family High Definition Audio Controller

Re: No audio after suspend/resume

Post by Larry78723 » Thu Jun 27, 2019 10:12 am

Please, post an inxi -Fxz report. This will give us a concise overview on your hardware and on how Mint sees it.

Here is how to generate the report and post it:

• Open a terminal window. Make it fullscreen to avoid unneeded linebreaks or chopped lines.
• Execute the command

exactly as it has been typed here.

• Mark the complete text output which inxi -Fxz will display with your mouse.
• Press the keyboard shortcut C to copy the marked text into the clipboard.
• Enclose the results between the code markers by selecting from the mini toolbar above the textbox where you type your reply then paste V them in your reply.

The results will help us to help you.

Re: No audio after suspend/resume

Post by Armorelle » Thu Jun 27, 2019 2:22 pm

Re: No audio after suspend/resume

Post by MrEen » Thu Jun 27, 2019 3:24 pm

Hi Armorelle, and welcome to the forum.

Running pulseaudio -k in the terminal should get the sound working again. Unfortunately, you’ll probably need to restart most apps that play sounds as well after running that. Give it a test and see if you can live with how it behaves.

Re: No audio after suspend/resume

Post by Armorelle » Thu Jun 27, 2019 7:50 pm

Thank you for the reply. I tried it and it doesn’t help. My procedure was I put PC to sleep, woke it up, closed all apps that i had opened, ran pulseaudio -k but no sound when i tried listening to something afterwards. Even if i close all apps before i put PC to sleep and ran the command it doesn’t help.

Command didn’t print anything on console after i ran it.

I don’t know if this makes any difference but when i have no sound and I play an audio file I can still see volume bar moving if i click on speaker icon in the bottom right corner and select «Sound Settings».

Re: No audio after suspend/resume

Post by MrEen » Thu Jun 27, 2019 8:01 pm

Wow, that’s weird.

The command shouldn’t output anything, unless it produces an error.

I think the best thing to do is get a complete diagnostic while sound is working then another after resume. In the terminal run cd

/ followed by wget http://www.alsa-project.org/alsa-info.sh -O alsa-info.sh && bash alsa-info.sh

The script will ask to upload or save locally, the choice is yours.

Let’s assume sound was working when you ran that. On the next resume, run cd

Читайте также:  Логотип mac os что это

/ followed by bash alsa-info.sh

Paste the results (or URLs) of both runs of the script once you have them. Be aware the outputs can be rather large. It make take some time to digest all the output to determine the next course of action.

Re: No audio after suspend/resume

Post by Armorelle » Thu Jun 27, 2019 8:30 pm

I didn’t have any actual audio runing while i did these diagnostics. If it matters i can do them again.

Re: No audio after suspend/resume

Post by MrEen » Thu Jun 27, 2019 9:25 pm

I didn’t have any actual audio runing while i did these diagnostics. If it matters i can do them again.

Re: No audio after suspend/resume

Post by MrEen » Thu Jun 27, 2019 9:30 pm

Re: No audio after suspend/resume

Post by MrEen » Thu Jun 27, 2019 10:06 pm

I found a very recent bug report with the same issue here: https://bugzilla.kernel.org/show_bug.cgi?id=203623

I’m mostly clueless on those bug reports, but it looks like they’re talking about backporting some fixes, but now idea how far back they’ll go (or went) so you might want to try the 5.x kernel to see if that resolves the issue as well. If that sounds scary, we can try the probe_mask option mentioned in Comment #5 to see if that solves it for you.

Re: No audio after suspend/resume

Post by Matthew_Wai » Fri Jun 28, 2019 2:31 am

Re: No audio after suspend/resume

Post by Armorelle » Fri Jun 28, 2019 5:47 am

I ran sudo alsa force-reload when the sound wasn’t working. It didn’t help.

I ran sudo alsactl store when the sound was working. After wake up there was no sound. So i ran sudo alsactl restore next. Still no sound. There was an error output after last command:

Re: No audio after suspend/resume

Post by Matthew_Wai » Fri Jun 28, 2019 6:16 am

Re: No audio after suspend/resume

Post by MrEen » Fri Jun 28, 2019 7:13 am

I rather doubt the mute toggle will help, but there’s no harm in trying.

To set the probe_mask option, in the terminal run gksudo xed /etc/modprobe.d/alsa-base.conf then enter your password and ignore the warnings the terminal will spit out. Scroll to the bottom of the file and add this new line:

Re: No audio after suspend/resume

Post by Armorelle » Fri Jun 28, 2019 7:19 am

Thank you for suggesting amixer -q -D pulse sset Master toggle but it didn’t help in my case. We probably have different causes for the same problem.

Mute/unmute doesn’t help either.

Re: No audio after suspend/resume

Post by Matthew_Wai » Fri Jun 28, 2019 7:40 am

Re: No audio after suspend/resume

Post by Armorelle » Fri Jun 28, 2019 7:49 am

Wow! Setting probe_mask option works! I tried it a few times. Sound was working every time after PC waking up.

Thank you so much for taking the time and helping me with this!

By the way. Will this change affect anything or can I leave it like that?

Re: [SOLVED] No audio after suspend/resume

Post by Matthew_Wai » Fri Jun 28, 2019 8:00 am

Re: [SOLVED] No audio after suspend/resume

Post by Armorelle » Fri Jun 28, 2019 8:26 am

Re: No audio after suspend/resume

Post by MrEen » Fri Jun 28, 2019 2:20 pm

Wow! Setting probe_mask option works! I tried it a few times. Sound was working every time after PC waking up.

Thank you so much for taking the time and helping me with this!

By the way. Will this change affect anything or can I leave it like that?

This change won’t affect anything else at all with the possible exception of HDMI audio. I’m relieved that worked as I was suspecting you’d have to wait for those kernel patches to be backported. Sometime down the road that fix won’t be necessary, but you wont notice any difference with your setup when that happens so there wont be any urgency to undo it.

Glad I could help you get it sorted out!

Источник

Оцените статью