[SOLVED] No audio after suspend/resume

Questions about hardware,drivers and peripherals
Forum rules
Before you post please read how to get help
Armorelle
Level 1
Level 1
Posts: 8
Joined: Wed Sep 19, 2018 5:57 am

[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
Last edited by Armorelle on Fri Jun 28, 2019 7:51 am, edited 2 times in total.

User avatar
Larry78723
Level 6
Level 6
Posts: 1403
Joined: Wed Jan 09, 2019 7:01 pm
Location: Jasper County, SC, USA

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

Code: Select all

 inxi -Fxzd 
exactly as it has been typed here.

• Mark the complete text output which inxi -Fxz will display with your mouse.
• Press the keyboard shortcut <Shift><Ctrl>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 <Ctrl>V them in your reply.

The results will help us to help you.

Larry
Image

Armorelle
Level 1
Level 1
Posts: 8
Joined: Wed Sep 19, 2018 5:57 am

Re: No audio after suspend/resume

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

Thank you for the reply. Here is the printout:

Code: Select all

System:    Host: armorelle Kernel: 4.15.0-52-generic x86_64 (64 bit gcc: 5.4.0)
           Desktop: Xfce 4.12.3 (Gtk 2.24.28) Distro: Linux Mint 18.3 Sylvia
Machine:   Mobo: ASUSTeK model: P8Z68-V v: Rev 1.xx Bios: American Megatrends v: 3402 date: 05/07/2012
CPU:       Quad core Intel Core i5-2500K (-MCP-) cache: 6144 KB
           flags: (lm nx sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx) bmips: 26399
           clock speeds: max: 5900 MHz 1: 1602 MHz 2: 1601 MHz 3: 1613 MHz 4: 1602 MHz
Graphics:  Card: Intel 2nd Generation Core Processor Family Integrated Graphics Controller bus-ID: 00:02.0
           Display Server: X.Org 1.18.4 drivers: intel (unloaded: fbdev,vesa) Resolution: 1920x1200@59.95hz
           GLX Renderer: Mesa DRI Intel Sandybridge Desktop GLX Version: 3.0 Mesa 18.0.5 Direct Rendering: Yes
Audio:     Card Intel 6 Series/C200 Series Family High Definition Audio Controller
           driver: snd_hda_intel bus-ID: 00:1b.0
           Sound: Advanced Linux Sound Architecture v: k4.15.0-52-generic
Network:   Card-1: Intel 82579V Gigabit Network Connection driver: e1000e v: 3.2.6-k port: f080 bus-ID: 00:19.0
           IF: eno1 state: up speed: 1000 Mbps duplex: full mac: <filter>
           Card-2: Realtek RTL8169 PCI Gigabit Ethernet Controller
           driver: r8169 v: 2.3LK-NAPI port: d000 bus-ID: 07:01.0
           IF: enp7s1 state: down mac: <filter>
Drives:    HDD Total Size: 120.0GB (50.4% used) ID-1: /dev/sda model: INTEL_SSDSC2CT12 size: 120.0GB
           Optical: No optical drives detected.
Partition: ID-1: / size: 95G used: 42G (47%) fs: ext4 dev: /dev/sda1
           ID-2: swap-1 size: 17.07GB used: 0.00GB (0%) fs: swap dev: /dev/sda5
RAID:      No RAID devices: /proc/mdstat, md_mod kernel module present
Sensors:   System Temperatures: cpu: 29.8C mobo: 32.0C
           Fan Speeds (in rpm): cpu: 0 fan-1: 1454 fan-2: 1009 fan-3: 1201 fan-4: 873 fan-5: 0
Info:      Processes: 212 Uptime: 1:11 Memory: 1110.8/15938.0MB Init: systemd runlevel: 5 Gcc sys: 5.4.0
           Client: Shell (bash 4.3.481) inxi: 2.2.35 

User avatar
MrEen
Level 14
Level 14
Posts: 5090
Joined: Mon Jun 12, 2017 8:39 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.

Armorelle
Level 1
Level 1
Posts: 8
Joined: Wed Sep 19, 2018 5:57 am

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".

User avatar
MrEen
Level 14
Level 14
Posts: 5090
Joined: Mon Jun 12, 2017 8:39 pm

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 ~/ 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.

Armorelle
Level 1
Level 1
Posts: 8
Joined: Wed Sep 19, 2018 5:57 am

Re: No audio after suspend/resume

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

Before suspend - sound is working:
http://alsa-project.org/db/?f=9168b8016 ... 1bbc32a3ce

After wake up - sound is not working:
http://alsa-project.org/db/?f=ca5d548d9 ... 8d33ee4ffe

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

User avatar
MrEen
Level 14
Level 14
Posts: 5090
Joined: Mon Jun 12, 2017 8:39 pm

Re: No audio after suspend/resume

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

Armorelle wrote:
Thu Jun 27, 2019 8:30 pm
Before suspend - sound is working:
http://alsa-project.org/db/?f=9168b8016 ... 1bbc32a3ce

After wake up - sound is not working:
http://alsa-project.org/db/?f=ca5d548d9 ... 8d33ee4ffe

I didn't have any actual audio runing while i did these diagnostics. If it matters i can do them again.
I don't think I'll need any more. I've spotted the issue, but may need some time to figure out how to solve it. The issue is alsa not remembering the card info. I'll show the relevant parts here:
Working:

Code: Select all

!!HDA-Intel Codec information
!!---------------------------
--startcollapse--

Codec: Realtek ALC892
Address: 0
AFG Function Id: 0x1 (unsol 1)
Vendor Id: 0x10ec0892
Subsystem Id: 0x10438436
Revision Id: 0x100302
No Modem Function Group found
Default PCM:
    rates [0x5f0]: 32000 44100 48000 88200 96000 192000
    bits [0xe]: 16 20 24
    formats [0x1]: PCM
Not working:

Code: Select all

!!HDA-Intel Codec information
!!---------------------------
--startcollapse--

Codec: Realtek ALC892
Address: 0
AFG Function Id: 0x1 (unsol 1)
Vendor Id: 0x10ec0892
Subsystem Id: 0x10438436
Revision Id: 0x100302
No Modem Function Group found
Default PCM:
N/A
My first suggestion is to try sudo alsa force-reload in the terminal when it's not working. I'll try to find more info about this.

User avatar
MrEen
Level 14
Level 14
Posts: 5090
Joined: Mon Jun 12, 2017 8:39 pm

Re: No audio after suspend/resume

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

Actually, if force-reload works, we can try something else. While sound is working properly run sudo aslactl store in the terminal. That alone may stop the issue from happening, but if not, see if then sudo alsactl restore brings the sound back.

User avatar
MrEen
Level 14
Level 14
Posts: 5090
Joined: Mon Jun 12, 2017 8:39 pm

Re: No audio after suspend/resume

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

This dmesg output at the bottom is the reason why there's an issue:

Code: Select all

[  539.896145] usb 2-1.5: reset low-speed USB device number 5 using ehci-pci
[  541.552154] snd_hda_intel 0000:00:1b.0: azx_get_response timeout, switching to polling mode: last cmd=0x30170500
[  542.194085] e1000e: eno1 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: Rx/Tx
[  542.556166] snd_hda_intel 0000:00:1b.0: No response from codec, disabling MSI: last cmd=0x30170500
[  543.560180] snd_hda_intel 0000:00:1b.0: azx_get_response timeout, switching to single_cmd mode: last cmd=0x30170500
[  543.599448] snd_hda_codec_hdmi hdaudioC0D3: Unable to sync register 0x4f0d00. -5
[  543.759836] snd_hda_codec_realtek hdaudioC0D0: Unable to sync register 0x2b8000. -5
[  543.759949] snd_hda_codec_realtek hdaudioC0D0: Unable to sync register 0x2b8000. -5
[  543.760927] OOM killer enabled.
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.

Matthew_Wai
Level 4
Level 4
Posts: 425
Joined: Sun Jun 07, 2015 10:42 am
Location: China

Re: No audio after suspend/resume

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

My audio does not work either after Mint wakes up. My solution is to press the "mute" button twice on the keyboard. sudo alsa force-reload does not work at my end.

Armorelle
Level 1
Level 1
Posts: 8
Joined: Wed Sep 19, 2018 5:57 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:

Code: Select all

armorelle@armorelle-pc ~ $ sudo alsactl store
armorelle@armorelle-pc ~ $ sudo alsactl restore
alsactl: set_control:1461: Cannot write control '2:0:0:Surround Playback Switch:0' : Input/output error
alsactl: set_control:1461: Cannot write control '2:0:0:Headphone Playback Volume:0' : Input/output error
alsactl: set_control:1461: Cannot write control '2:0:0:Headphone Playback Switch:0' : Input/output error
armorelle@armorelle-pc ~ $ 
I would prefer simpler approach first with probe_mask. I assume it's simpler? But if that doesn't work I can try updating kernel.

Matthew_Wai
Level 4
Level 4
Posts: 425
Joined: Sun Jun 07, 2015 10:42 am
Location: China

Re: No audio after suspend/resume

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

I just ran amixer -q -D pulse sset Master toggle twice after Mint woke up. Now my audio works.

User avatar
MrEen
Level 14
Level 14
Posts: 5090
Joined: Mon Jun 12, 2017 8:39 pm

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:

Code: Select all

options snd-hda-intel probe_mask=0x01
Save the file then reboot and test.

Armorelle
Level 1
Level 1
Posts: 8
Joined: Wed Sep 19, 2018 5:57 am

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.

Matthew_Wai
Level 4
Level 4
Posts: 425
Joined: Sun Jun 07, 2015 10:42 am
Location: China

Re: No audio after suspend/resume

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

MrEen wrote:
Fri Jun 28, 2019 7:13 am
gksudo xed /etc/modprobe.d/alsa-base.conf
On my Mint, the above does not work; the following does.
sudo xed /etc/modprobe.d/alsa-base.conf

Armorelle
Level 1
Level 1
Posts: 8
Joined: Wed Sep 19, 2018 5:57 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?
Last edited by Armorelle on Fri Jun 28, 2019 8:16 am, edited 2 times in total.

Matthew_Wai
Level 4
Level 4
Posts: 425
Joined: Sun Jun 07, 2015 10:42 am
Location: China

Re: [SOLVED] No audio after suspend/resume

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

Armorelle wrote:
Fri Jun 28, 2019 7:19 am
We probably have different causes for the same problem.
I was wondering whether someone could explain the difference.

Armorelle
Level 1
Level 1
Posts: 8
Joined: Wed Sep 19, 2018 5:57 am

Re: [SOLVED] No audio after suspend/resume

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

I assumed we have different causes. But for explaining it I'm not the right person for that.

User avatar
MrEen
Level 14
Level 14
Posts: 5090
Joined: Mon Jun 12, 2017 8:39 pm

Re: No audio after suspend/resume

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

Armorelle wrote:
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?
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! :D
Matthew_Wai wrote:
Fri Jun 28, 2019 7:40 am
MrEen wrote:
Fri Jun 28, 2019 7:13 am
gksudo xed /etc/modprobe.d/alsa-base.conf
On my Mint, the above does not work; the following does.
sudo xed /etc/modprobe.d/alsa-base.conf
The above instruction was because Armorelle is using an 18.3 version of Mint. If it had involved 19.x, the instruction would have been xed admin:///etc.modprobe.d/alsa-base.conf. You should not use sudo when calling graphical applications (xed in this case) as you'll end up with permissions issues eventually. Your issue is/was completely different that Armorelle's. In Armorelle's case, part of alsa broke during the suspend/resume cycle and I doubt the same fix will prevent you from having to toggle mute to fix yours. If you wish to try to sort it out, I'd suggest starting a new thread as each issue deserves its own thread.

Have fun both of you! :D

Post Reply

Return to “Hardware Support”