Suspend/resume breaks sound output until Firefox is restarted

Bug #302276 reported by Chris Conway
56
This bug affects 9 people
Affects Status Importance Assigned to Milestone
ALSA driver
New
Unknown
PulseAudio
Fix Released
Unknown
linux (Ubuntu)
Won't Fix
Medium
Unassigned

Bug Description

Binary package hint: firefox

On my Inspiron 6400, sound output stops working in all applications after suspend/resume if I have any Flash video applets visible in Firefox (note: not necessarily playing, just visible). In addition, closing Firefox normally doesn't work: a zombie process remains, so that trying to open a new instance yields an error stating that Firefox is already running.

Doing "killall -HUP firefox" restore sound in all applications (including Firefox, after a restart). I can also restore sound in all applications BUT Firefox by terminating the stream "ALSA plugin [firefox]" in the PulseAudio Volume Control. After doing this, Flash videos will just freeze up.

$ lsb_release -rd
Description: Ubuntu 8.10
Release: 8.10
$ uname -a
Linux wagstaff 2.6.27-8-generic #1 SMP Thu Nov 6 17:33:54 UTC 2008 i686 GNU/Linux

Packages and versions:
firefox 3.0.4+nobinonly-0ubuntu0.8.10.1
flashplugin-nonfree 10.0.12.36ubuntu1
libao-pulse 0.9.3-1
libasound2 1.0.17a-0ubuntu4
pulseaudio 0.9.10-2ubuntu9.1

Revision history for this message
Chris Conway (cconway) wrote :
Revision history for this message
Chris Conway (cconway) wrote :
Revision history for this message
Chris Conway (cconway) wrote :
Revision history for this message
Chris Conway (cconway) wrote :

Note: this bug has been "forked" from https://bugs.launchpad.net/ubuntu/+bug/296115

Revision history for this message
Chris Conway (cconway) wrote :

What do I need to do to advance this bug? Does it require more information? Any ideas where I can look for a fix? This problem is extremely annoying.

Revision history for this message
Chris Conway (cconway) wrote :

This does not seem to be related to bug #202089 and was not fixed by the pulseaudio 0.9.10-2ubuntu9.2 update. It is also distinct from bug #198453.

Revision history for this message
takeda64 (takeda64) wrote :

I think the pulseaudio update broke my sound even more (now I don't even have sound)

Revision history for this message
serendipity (turboguy) wrote :

I can confirm this bug - I have the same behavior with the same fix. I have to do killall firefox (And close/kill any other application that used sound any time before suspend, e.g. rhythmbox) in order to restore sound. Seems to only happen if I have firefox running, and have watched a flash video before suspending, even if it's no longer visible or on a tab. If any logs are useful, please request...

Revision history for this message
Chris Conway (cconway) wrote :

Another month, another ping. Can anybody please help me advance this bug towards a fix?

The same issue affects Seamonkey and Totem. Seamonkey, like Firefox, gets hung with a "zombie stream" and won't close properly. Totem doesn't hang, but the video starts to skip and sound is gone. In both cases, restarting the application restores sounds fully.

I suspect the issue may be with ALSA. Here's what I get from "pulseaudio -vvv" when I suspend/resume:

D: module-hal-detect.c: dbus: interface=org.freedesktop.Hal.Device, path=/org/freedesktop/Hal/devices/computer_logicaldev_input_4, member=Condition
W: module-alsa-sink.c: Got POLLERR from ALSA
D: module-hal-detect.c: dbus: interface=org.freedesktop.Hal.Device, path=/org/freedesktop/Hal/devices/computer_power_supply_battery_BAT0, member=PropertyModified

I have followed all the instructions at http://ubuntuforums.org/showthread.php?t=789578
I have purged and re-installed the packaɡes alsa-base, alsa-utils, and linux-sound-base.

Just tell me what information I need to provide to make some progress on this and I will happily provide it. Even just a cleaner work-around than killing Firefox would be much appreciated.

Revision history for this message
Chris Conway (cconway) wrote :

I've reported this to the ALSA developers at https://bugtrack.alsa-project.org/alsa-bug/view.php?id=4320

Revision history for this message
Chris Conway (cconway) wrote :

No response yet from ALSA. Reported to PulseAudio: http://pulseaudio.org/ticket/459

Changed in pulseaudio:
status: Unknown → New
Revision history for this message
Chris Conway (cconway) wrote :

This problem disappeared after I wiped my disk and did a fresh OS install (for unrelated reasons). Obviously, it had something to do with bad configuration files. My previous install started as a clean install of dapper in 2006 and had been upgraded to each subsequent release through intrepid. There must have been some strange cruft somewhere in /etc, because Pulse and Flash are working perfectly now, with all the same packages installed.

Revision history for this message
Chris Conway (cconway) wrote :

P.S. I still have backups of my old configuration files, and would be glad to provide any requested information if it would help solve this problem for others.

Revision history for this message
Kerin (cernunnos) wrote :

I can confirm this bug in Debian Lenny, although my workaround - if you can call it that - is $killall -9 firefox-bin.

I'm relatively sure this didn't happen before a recent update to ALSA, too.

Revision history for this message
Alexander Sack (asac) wrote :

not a firefox bug. moving to pulseaudio package.

affects: firefox-3.0 (Ubuntu) → pulseaudio (Ubuntu)
Changed in pulseaudio (Ubuntu):
importance: Undecided → High
status: New → Triaged
Revision history for this message
Daniel T Chen (crimsun) wrote : Re: [Bug 302276] Re: Suspend/resume breaks sound output until Firefox is restarted

See the fixed 01PulseAudio pm-utils script in bug 202089

On Apr 15, 2009 2:20 PM, "Alexander Sack" <email address hidden> wrote:

not a firefox bug. moving to pulseaudio package.

** Package changed: firefox-3.0 (Ubuntu) => pulseaudio (Ubuntu)

** Changed in: pulseaudio (Ubuntu)
  Importance: Undecided => High

** Changed in: pulseaudio (Ubuntu)
      Status: New => Triaged

-- Suspend/resume breaks sound output until Firefox is restarted
https://bugs.launchpad.net/bugs/302276

You received this bug notification because you are a member of Ubuntu Audio
Team, which is subscribe...

Revision history for this message
Eli González (eli.gonzalez) wrote :

Hi, this happend to me too a few days ago well what I did to resolve this problem:

Ubuntu Documentation>Soundtroubleshooting>

Getting ALSA to work after suspend / hibernate

Some soundcards does not work after the computer has been suspended or hibernated. Files in /etc/pm/sleep.d/ are read when the system is entering or leaving suspend mode. Create a file telling the system to restart alsa when the computer is being brought up from suspended mode to make the audio work again.

The command /sbin/alsa force-reload will kill all running programs using the sound driver so the driver itself is able to be restarted.

Código:
sudo nano /etc/pm/sleep.d/50alsa

Código:
case "$1" in
        hibernate|suspend)
                # Stopping is not required
                ;;
        thaw|resume)
                /sbin/alsa force-reload
                ;;
        *) exit $NA
                ;;
esac

So this work prefectly to me bye bye good luck!

Revision history for this message
Luke Schlather (luke2760) wrote :

The above is a less than ideal hack.

I've been trying to isolate the issue, and I've come up with this list:

What works:
firefox + flash + no add-ons

What doesn't work:
suspend, with or without firefox or rhythmbox open (Though on occasion I suspend and resume and it works fine.)
firefox-3.5 + flash + no add-ons (other than Ubuntu mods) hangs, and I get the same output that I get when running firefox after a suspend, i.e. a stream of:

ALSA lib pulse.c:272:(pulse_connect) PulseAudio: Unable to connect: Connection refused.

This is not a sound card issue, as it is new since an update in the past month or two, and I've had no issues on this box for over 2 years. This is in 9.04.

Attached is the output from sudo alsa force-reload.

Revision history for this message
YenTheFirst (yenthefirst) wrote :

I don't know if it's the same bug or not, but my problem might be relevant:

I'm experiencing similar problems.
I have kubuntu 8.04, firefox 3.5, and adobe-flashplugin. Flash sound works fine, but if I suspend, then resume, it doesn't work. An already open video will have screeching, loud, and looping sound, and play at double speed. new videos will play at regular speed with no sound.
Other system sounds work normally, and restarting firefox fixes the problem.

I agree with chris, I suspect the problem is Alsa, not pulseaudio. This is definitely true in my case, at least, I don't have pulseaudio!

(If I need to add more info, or should open a new bug, please let me know. I searched, and this bug seemed closest to my problem)

Revision history for this message
alsuren (alsuren) wrote :

Okay, so I have a work-around and some more info. This may isolate the bug a bit too.

On suspend, kde pops up a notification, and makes a sound, which gets halfway through and then gets interrupted by the powerdown. On startup, I guess it's just hanging or something. This may be what's causing the bug to show its head.

Anyway. For me, if you fire up pavucontrol, and terminate the knotify4 stream, it restarts itself, makes a load of dings and tings, and everything is forgiven. I guess all we need for an automated workaround is a script that gets run on resume and terminates a few streams.

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

Please test with current karmic.

affects: pulseaudio (Ubuntu) → linux (Ubuntu)
Changed in linux (Ubuntu):
importance: High → Medium
Revision history for this message
DenisP (denisp) wrote :

I also have the same problem in ubuntu 9.04 and I have only alsa I had this problem in hardy also. It happens always with firefox and flash. I think the adobe flash plugin causes this problem but I am not sure.

Changed in pulseaudio:
status: New → Fix Released
Revision history for this message
nfsd (in4mer+launchpad) wrote :

Hilariously, sound has stopped working on my laptop & desktop after suspend/resume. Sound from flash in firefox, which freezes up the video after a few seconds.

Just upgraded to Karmic. Everything is stock.

Bug is definitely still out there.

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

On Wed, Dec 9, 2009 at 10:51 PM, nfsd <email address hidden> wrote:
> Hilariously, sound has stopped working on my laptop & desktop after
> suspend/resume.  Sound from flash in firefox, which freezes up the video
> after a few seconds.

After resuming and experiencing this symptom, please attach output
from the following command in a Terminal/Konsole/xterm:

sudo fuser -v /dev/dsp* /dev/snd/* /dev/seq*

Revision history for this message
nfsd (in4mer+launchpad) wrote :

                     USER PID ACCESS COMMAND
/dev/snd/controlC0: in4mer 17205 F.... pulseaudio
/dev/snd/controlC1: in4mer 17205 F.... pulseaudio

Changed in alsa-driver:
status: Unknown → New
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: Triaged → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.