Only Headphone Jack sound after suspend/resume

Bug #468254 reported by schaze
38
This bug affects 6 people
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Won't Fix
Undecided
Unassigned

Bug Description

Binary package hint: pulseaudio

Hi,

since Ubuntu 9.10 my Laptop speakers won't play any sound any more after suspend/resume. I only have sound on the Headphone when I plug them in. This is 100% reproducable by me and was not there in 9.04 (absolutely no sound problems in 9.04).

I am using a completely fresh installed 9.10 and the problem was there from the beginning also in the vanilla installation. (now I have of course installed new applicaitions and so on..)

I was searching launchpad for other sound bugs and some of them sound similar but are just not the same. Please prove me wrong but I was unable to fix it thus far.

Please let me know what you need from me and I will provide you all infos necessary.

Thanks a lot!
/sze

ProblemType: Bug
Architecture: i386
AudioDevicesInUse:
 USER PID ACCESS COMMAND
 /dev/snd/controlC0: schaze 4900 F.... pulseaudio
Card0.Amixer.info:
 Card hw:0 'ICH6'/'Intel ICH6 with AD1981B at irq 21'
   Mixer name : 'Analog Devices AD1981B'
   Components : 'AC97a:41445374'
   Controls : 25
   Simple ctrls : 18
Date: Sun Nov 1 11:24:38 2009
DistroRelease: Ubuntu 9.10
ExecutablePath: /usr/bin/pulseaudio
InstallationMedia: Ubuntu 9.10 "Karmic Koala" - Release i386 (20091028.5)
Package: pulseaudio 1:0.9.19-0ubuntu4
ProcEnviron:
 LANG=en_US.UTF-8
 SHELL=/bin/bash
ProcVersionSignature: Ubuntu 2.6.31-14.48-generic
SourcePackage: pulseaudio
Uname: Linux 2.6.31-14-generic i686
XsessionErrors:
 (gnome-settings-daemon:4915): GLib-CRITICAL **: g_propagate_error: assertion `src != NULL' failed
 (gnome-settings-daemon:4915): GLib-CRITICAL **: g_propagate_error: assertion `src != NULL' failed
 (polkit-gnome-authentication-agent-1:5024): GLib-CRITICAL **: g_once_init_leave: assertion `initialization_value != 0' failed
 (nautilus:5015): Eel-CRITICAL **: eel_preferences_get_boolean: assertion `preferences_is_initialized ()' failed
 (gnome-panel:5014): Gtk-WARNING **: gtk_widget_size_allocate(): attempt to allocate widget with width -12 and height 24

Revision history for this message
schaze (schaze) wrote :
Revision history for this message
Daniel T Chen (crimsun) wrote : Re: [Bug 468254] Re: Only Headphone Jack sound after suspend/resume

Please mute 'Headphone Jack Sense' and 'Line Jack Sense' using
alsamixer in a Terminal.

Revision history for this message
Oleg Kalnichevski (olegk) wrote :

I am having exactly the same problem with my HP 2133. Sounds works just fine until the system is suspended. No sound after resume. Coincidentally, I am also seeing lots and lots of "hda-intel: spurious response" log entries in dmesg. I am not sure those problems are related, though.

There was no problem with sound of what so ever with 9.04. I installed a fresh copy of Ubuntu 9.10 using 'alternative' setup. Faulty upgrade cannot be the cause. To me, this is clearly a regression.

Please let me know if you want to have detailed hardware specs.

Revision history for this message
schaze (schaze) wrote :

@Daniel T Chen: Thanks fort the tipp, but that does not help.
So far the only solution was a reboot. Also restarting any pulseaudio services etc did not help.

/sze

Revision history for this message
Daniel T Chen (crimsun) wrote :

Does using linux-backports-modules-alsa-karmic-generic help?

Revision history for this message
schaze (schaze) wrote :

Hi Daniel,

I installed linux-backports-modules-alsa-generic (there is no package with 'karmic' and 'alsa' in the name) But this did not help either.

/sze

Revision history for this message
schaze (schaze) wrote :

Hi Daniel,

sorry I was not at the laptop this morning and wrote what I remembered. These are the alsa related modules I have installed:

#>sudo aptitude search alsa | grep ^i
i alsa-base - ALSA driver configuration files
i alsa-utils - ALSA utilities
i bluez-alsa - Bluetooth audio support
i gstreamer0.10-alsa - GStreamer plugin for ALSA
i libesd-alsa0 - Enlightened Sound Daemon (ALSA) - Shared l
i libsdl1.2debian-alsa - Simple DirectMedia Layer (with X11 and ALS
i A linux-backports-modules-alsa-2.6.31-14-generic - Ubuntu supplied Linux modules for version
i linux-backports-modules-alsa-karmic-generic - Backported drivers for alsa-driver snapsho

Those were already installed when I opened the bug. This means the problem is not solved.

/sze

Revision history for this message
schaze (schaze) wrote :

Hi Guys,

anyone has another idea where this may be coming from? It is quite annoying as I can't really use suspend any more.

Thank you for your support,
schaze

Revision history for this message
Daniel T Chen (crimsun) wrote :

First, there is no PulseAudio "service" (I.e., system-wide daemon by default
-- it's per-user). Second, please see
https://wiki.ubuntu.com/ALSA/JackSense. We need codec state prior to
suspend and after resume has completed.

On Nov 6, 2009 2:35 AM, "schaze" <email address hidden> wrote:

Hi Guys,

anyone has another idea where this may be coming from? It is quite
annoying as I can't really use suspend any more.

Thank you for your support,
schaze

-- Only Headphone Jack sound after suspend/resume
https://bugs.launchpad.net/bugs/468254 You recei...

Revision history for this message
schaze (schaze) wrote :

Hi Daniel,

thanks for coming back :)

Ok, here is what I did:

Reboot the laptop.
=========================

Test sound with Rhythmbox (just to make sure) --> works fine

schaze@neptune:~$ echo autospawn = no >> ~/.pulse/client.conf
schaze@neptune:~$ killall pulseaudio
schaze@neptune:~$ ps -ef | grep pulseaudio
schaze 2460 2361 0 16:45 pts/0 00:00:00 grep --color=auto pulseaudio

All good no pulseaudio running.

Open 2nd terminal

1st round without headphones:
-------------------------------------------

1st terminal
schaze@neptune:~$ speaker-test -c2 -l3 -Dplug:front:0

2nd terminal: (during the speaker test)
cat /proc/asound/card*/codec*/* > ~/codec.no_hp.txt

--> Please notice I had to change the command and add the "/*" to the end as it would show me the following error otherwise: "cat: /proc/asound/card0/codec97#0: Is a directory"
If this is wrong please advise.

2nd round with headphones:
-------------------------------------------

1st terminal
schaze@neptune:~$ speaker-test -c2 -l3 -Dplug:front:0

2nd terminal: (during the speaker test)
cat /proc/asound/card*/codec*/* > ~/codec.hp.txt

--> during the test with the headphones the sound was still coming out of the speakers not the headphones. But I guess this is ok as front:0 is selected for test

The only difference in the files is the following:

schaze@neptune:~$ diff codec.no_hp.txt codec.hp.txt
88c88
< 0:72 = 0004
---
> 0:72 = 000c

Suspend/Resume the laptop
======================

Test sound with Rhythmbox (just to make sure) --> not working

schaze@neptune:~$ ps -ef | grep pulseaudio
schaze 2829 2361 0 17:00 pts/0 00:00:00 grep --color=auto pulseaudio

-->All good no pulseaudio running.

1st round without headphones:
-------------------------------------------

1st terminal
schaze@neptune:~$ speaker-test -c2 -l3 -Dplug:front:0

2nd terminal: (during the speaker test)
cat /proc/asound/card*/codec*/* > ~/codec.no_hp_resumed.txt

--> there was no sound during the speaker test

2nd round with headphones:
-------------------------------------------

1st terminal
schaze@neptune:~$ speaker-test -c2 -l3 -Dplug:front:0

2nd terminal: (during the speaker test)
cat /proc/asound/card*/codec*/* > ~/codec.hp_resumed.txt

--> sound through headphones during speakertest (!!this is different than before resume!!)

The only difference in the files is the following:

schaze@neptune:~$ diff ~/codec.no_hp_resumed.txt ~/codec.hp_resumed.txt
88c88
< 0:72 = 0004
---
> 0:72 = 000c

Files are attached.

Thank you very much for you help!!!

Best regards,
schaze

Revision history for this message
schaze (schaze) wrote :

Hi Guys,

is there any news on this topic? Will you need more information from my side to continue?

greets,
schaze

Revision history for this message
nxThron (nxthron) wrote :

Hey,

I just wanted to mention that I am facing the exact same issues and would also be interested into a solution.

many thanks already to all the great support people here!

Revision history for this message
Daniel T Chen (crimsun) wrote :

At this point my recommendation is to try a current daily snapshot of
alsa-driver stable, e.g., 20091110.

Revision history for this message
schaze (schaze) wrote :

Hi Daniel,

thanks for the recommendation.

Here is what I did today:
=======================

updated to newest proposed updates (there was a new backported alsa karmic)

rebooted

tested --> problem still there

downloaded: ftp://ftp.kernel.org/pub/linux/kernel/people/tiwai/snapshot/alsa-driver-20091110.tar.gz

unpacked

#> ./configure --enable-dynamic-minors
#> make
#> sudo make install

rebooted

tested

tested --> problem still there

Unfortunately no solution yet.

There has to be another approach than just to try installing the newest versions. We have to find out where the problem originates. Any idea how this can be done? What is with the codec state test + files, is there any findings in these?

Many thanks for your help and best regards,
schaze

Revision history for this message
Daniel T Chen (crimsun) wrote :

On Tue, Nov 10, 2009 at 8:44 AM, schaze <email address hidden> wrote:
> downloaded: ftp://ftp.kernel.org/pub/linux/kernel/people/tiwai/snapshot
> /alsa-driver-20091110.tar.gz
>
> unpacked
>
> #> ./configure --enable-dynamic-minors
> #> make
> #> sudo make install
>
> rebooted
>
> tested
>
> tested --> problem still there

Please attach before-suspend and after-suspend copies of
/proc/asound/card0/codec*

> There has to be another approach than just to try installing the newest versions. We have to find out where the problem originates. Any idea how this can be done? What is with the codec state test + files, is there any findings in these?

The reason you need the newest alsa-driver stable snapshot is that you
have to verify that the driver is functioning correctly: if the codec
isn't being reset properly between suspend/resume, then no amount of
PulseAudio debugging is really going to help.

Revision history for this message
prash (prash) wrote :

I have the same issue on my HP ProBook 4410s.

Revision history for this message
schaze (schaze) wrote :

Hi Guys,

thanks for all the effort so far. how do we move forward on this? What will be the next step?

/schaze

Revision history for this message
samikk (sami-keskikasari) wrote :

I am having same problem in my HP2133.
Here is /proc/asound/card0/codec* prints before and after suspend

Revision history for this message
samikk (sami-keskikasari) wrote :
Revision history for this message
schaze (schaze) wrote :

Hi,

this bug is now 3 weeks old and still new/undecided. Can we push this and at least assign low or medium? I cannot see any progress yet and there is not even a workaround (at least not besides a reboot).
As now at least 4-5 people have this problem I think it should be worth going forward with this.

thanks a lot,
schaze

Revision history for this message
Richard Mena (rmendoza85) wrote :

well, if it is just 4-5 people, well... i'm number 5 or 6... and i know at least 50 more people facing the same problem...

Daniel T Chen (crimsun)
Changed in pulseaudio (Ubuntu):
status: New → Confirmed
Revision history for this message
Daniel T Chen (crimsun) wrote :

Folks, I don't hack on sound full-time. I'm not employed by Canonical, and only on the weekends do I get any quality time to look at bug reports. So please, let's be constructive here.

Firstly, we haven't even determined that PulseAudio is involved. According to the provided information (codec dumps and logs) we need to look at linux/linux-backports-modules-2.6.31, which means everyone experiencing this issue needs to:

1) Disable PA autospawn by doing:
echo autospawn = no|tee -a ~/.pulse/client.conf

2) Purge linux-backports-modules-alsa-$(uname -r) if you have installed it

3) Compile and install http://kernel.org/pub/linux/kernel/people/tiwai/snapshot/alsa-driver-20091121.tar.bz2

4) Reboot, login to GNOME, open a Terminal, and killall pulseaudio

5) In a Terminal, use speaker-test -Dplug:front -c2 -l2 -twav
Verify that sound is audible through your speakers

6) Suspend-to-ram/disk, then resume

7) Rerun the same speaker-test command from step (5) to again verify that sound is audible through your speakers

Secondly, if you haven't already, please provide your sound hardware information. You can either use http://www.alsa-project.org/alsa-info.sh (note that it's a bash script and needs to be invoked explicitly using bash) or apport-collect -p alsa-base 468254

Thanks!

Revision history for this message
schaze (schaze) wrote : apport-collect data

Architecture: i386
AudioDevicesInUse: Error: command ['fuser', '-v', '/dev/dsp', '/dev/snd/pcmC0D3c', '/dev/snd/pcmC0D4p', '/dev/snd/by-path', '/dev/snd/controlC0', '/dev/snd/pcmC0D0c', '/dev/snd/pcmC0D0p', '/dev/snd/pcmC0D1c', '/dev/snd/pcmC0D2c', '/dev/snd/seq', '/dev/snd/timer', '/dev/sequencer', '/dev/sequencer2'] failed with exit code 1:
Card0.Amixer.info:
 Card hw:0 'ICH6'/'Intel ICH6 with AD1981B at irq 21'
   Mixer name : 'Analog Devices AD1981B'
   Components : 'AC97a:41445374'
   Controls : 25
   Simple ctrls : 18
DistroRelease: Ubuntu 9.10
InstallationMedia: Ubuntu 9.10 "Karmic Koala" - Release i386 (20091028.5)
Package: alsa-base 1.0.20+dfsg-1ubuntu5
PackageArchitecture: all
ProcEnviron:
 SHELL=/bin/bash
 LANG=en_US.UTF-8
ProcVersionSignature: Ubuntu 2.6.31-15.50-generic
Uname: Linux 2.6.31-15-generic i686
UserGroups: adm admin cdrom dialout lpadmin mythtv plugdev sambashare

Revision history for this message
schaze (schaze) wrote : AlsaDevices.txt
Revision history for this message
schaze (schaze) wrote : AplayDevices.txt
Revision history for this message
schaze (schaze) wrote : ArecordDevices.txt
Revision history for this message
schaze (schaze) wrote : BootDmesg.txt
Revision history for this message
schaze (schaze) wrote : Card0.Amixer.values.txt
Revision history for this message
schaze (schaze) wrote : Card0.Codecs.codec97.0.ac97.0.0.txt
Revision history for this message
schaze (schaze) wrote : Card0.Codecs.codec97.0.ac97.0.0.regs.txt
Revision history for this message
schaze (schaze) wrote : CurrentDmesg.txt
Revision history for this message
schaze (schaze) wrote : Dependencies.txt
Revision history for this message
schaze (schaze) wrote : PciMultimedia.txt
Revision history for this message
schaze (schaze) wrote : XsessionErrors.txt
tags: added: apport-collected
Revision history for this message
schaze (schaze) wrote :

Hello Daniel,

I did not want to complain but simply point out that this seems to be a problem that affects several people and should be dealt with.
I appreciate very much that you take care of this problem in your free time, it is people like you who make the open source community so successfull. Many thanks for that!

I have followed all steps described by you. The problem is still the same after the suspend/resume without pulseaudio. So this means it is probably an alsa issue, right?

I have executed the apport command you posted (see the new attachments) after the suspend/resume with the new alsa build linked by you.

Many thanks again for your support!
schaze

Revision history for this message
Daniel T Chen (crimsun) wrote :

@schaze
Yes, it's an alsa-driver (linux) issue. Now, assuming that you still have PA autospawn disabled, can you verify that a "sudo alsa force-reload" makes speaker output audible again post-resume?

affects: pulseaudio (Ubuntu) → linux (Ubuntu)
Revision history for this message
schaze (schaze) wrote :

@Daniel

Ahh, that did it.
If I do the alsa force reload after the suspend/resume the speaker test works again.
If I restart pulse all sound is back to normal again.

that's and finally a quick workaround besides the restart!

Thanks a lot!

So what will happen now? Will you take care of it or do you only do pulseaudio?

/schaze

Revision history for this message
schaze (schaze) wrote :

For all others looking for an automatic workaraound, there is a possibility to execute this alsa reload after each resume.
You can add a script in /etc/acpi/resume.d/ that does it. But please be aware that this will reset all volume settings (e.g. mute) after the resume - but at least you will have sound again.

A simply way to do it would be the following:

Open a terminal
execute the following:

cat > 90-reload_alsa.sh
#!/bin/bash
alsa force-reload

--> Press CTRL-D

To ensure the resume.d folder does exist execute:
sudo mkdir /etc/acpi/resume.d

Install the script:
sudo install 90-reload_alsa.sh /etc/acpi/resume.d/

Delete the local script as it was copied in the resume.d folder:
rm 90-reload_alsa.sh

That's it. At least this did the trick for me.
Now we need to wait until the bug is fixed itself to have a normal running system again.

/schaze

Revision history for this message
prash (prash) wrote :

Hi Daniel,
Thanks for isolating the problem. I was able to force-reload alsa after I disabled autospawn. However, I notice that I need to run force-reload twice for this to work. The first time I run it, it exits with status 1. The second time, it exits with status 0.

I can probably use a script like the one that schaze uses. I would also do a 'pulseaudio --start' in the same script.

Thank you!
Prash

Revision history for this message
Brad Figg (brad-figg) wrote : Unsupported series, setting status to "Won't Fix".

This bug was filed against a series that is no longer supported and so is being marked as Won't Fix. If this issue still exists in a supported series, please file a new bug.

This change has been made by an automated script, maintained by the Ubuntu Kernel Team.

Changed in linux (Ubuntu):
status: Confirmed → Won't Fix
To post a comment you must log in.