Pulseaudio is blocking normal sound after resume

Bug #202089 reported by Liken Otsoa
380
This bug affects 47 people
Affects Status Importance Assigned to Milestone
PulseAudio
Fix Released
Unknown
gnome-power-manager (Baltix)
Invalid
Undecided
Unassigned
gnome-power-manager (Ubuntu)
Invalid
Undecided
Unassigned
Intrepid
Invalid
Undecided
Unassigned
Jaunty
Invalid
Undecided
Unassigned
pulseaudio (Ubuntu)
Fix Released
Low
Daniel T Chen
Intrepid
Fix Released
Undecided
Daniel T Chen
Jaunty
Won't Fix
Low
Daniel T Chen

Bug Description

jaunty SRU information follows:

Note that this SRU involves two separate bugs, this one and bug 326532.

Impact: Users who experience problems with PulseAudio often kill it (using "pulseaudio -k" or "killall pulseaudio", the latter of which is more reliable). Jaunty's current pm-utils sleep hook looks for the session-invoked command line. Users who invoke pulseaudio manually, after killing it, with "pulseaudio -D" (or other variants) do not have this session-invoked command line, and thus, when they suspend to ram or disk, the pm-utils sleep hook does not suspend their pulseaudio daemons.

Note that the use case of killing the pulseaudio daemon and allowing it to autospawn afterward is unaffected; jaunty's existing pm-utils sleep hook correctly reaps all pulseaudio instances. This SRU only applies to manually invoked "pulseaudio -D", "pulseaudio -vvv", etc.

Resolution: Modify the pm-utils sleep hook to correctly reap all pulseaudio instances regardless of pulseaudio invocation command line.

SRU debdiff: http://launchpadlibrarian.net/25941550/pulseaudio_0.9.14-0ubuntu20.1.debdiff

TEST CASE: Boot into a jaunty install. In a Terminal, issue "killall pulseaudio;pulseaudio -D". Suspend to ram, then resume. Note the inaudible audio from PulseAudio.

Regression potential: No regressions have been identified in production.
--
old intrepid SRU information follows:

Impact: A portion of users with a default or updated (intrepid-updates) Ubuntu 8.10 install experience inaudible audio from PulseAudio after resuming from suspend-to-ram. This symptom is due to the PulseAudio daemon not having received proper notification to suspend clients and release the sound device(s).

Resolution: Configure users' pulseaudio daemons to suspend prior to suspending to ram and to resume after resuming. This sequence is accomplished via a pm-utils sleep hook. The corresponding fixed version (0.9.13-2ubuntu3) is available in jaunty.

SRU debdiff: http://launchpadlibrarian.net/20316781/pulseaudio_0.9.10-2ubuntu9.2.debdiff

TEST CASE: Boot into a default or updated (intrepid-updates) Ubuntu 8.10 install. Suspend to ram, then resume. Note the inaudible audio from PulseAudio.

Regression potential: No regressions have been identified in production.

Background information follows:

Binary package hint: pulseaudio

> aplay squish.au
Sonando Audio Sparc 'squish.au' : Mu-Law, Ratio 8000 Hz, Mono

[Suspend to Ram/Resume]

> aplay squish.au
ALSA lib pcm_dmix.c:874:(snd_pcm_dmix_open) unable to open slave
aplay: main:546: error al abrir audio: Dispositivo ó recurso ocupado

Then you need to killall pulseaudio for apps that use pcm starts working again.
(Question: How you can stop/start/restart pulseudio? In Ubuntu /etc/init.d/pulseaudio script is disabled)

If you need more information, please let me know.

Thx.

----------------------------------
Hardy Uptodate
IBM Thinkpad X41 Tablet
pulseaudio 0.9.9-1ubuntu2

Revision history for this message
zpon (zpon-dk) wrote :

I got here because I had a similar problem (with mocp), it helped to killall pulseaudio - but the I experienced some weird problems with gnome-power-manager, not that it took 100% CPU, but that i used up most my memory (bout 600 MiB), can this relay be on purpose? or is it some kind of memory leak or what ever?
I have attached a screenshot of Systemmanager(? I only know the danish name - "Systemovervågning" - but it kind of does the same as the top command).

So basically i can confirm both that there can be a problem with pulseaudio and that gnome-power-manager has a problem.
I also use a uptodate version of Hardy.
IBM Thinkpad T61
Version: 0.9.9-1ubuntu2

If you need more info just let me know

Revision history for this message
hackel (hackel) wrote :

For me, this is triggered not when I resume (as resuming from suspend *always* causes a hard freeze), but when I unplug my power cable. Pulseaudio starts to use a lot of CPU, so then I kill it, and then gnome-power-manager uses 100% cpu, with the above mentioned memory leak. If I don't kill gnome-power-manager in time, it will take down my whole system.

I've got an ATI Technologies Inc IXP SB400 AC'97 Audio Controller (rev 02) with all the latest hardy packages.

Revision history for this message
akira (akira.spb) wrote :

Skype not play sound.
./skype
ALSA lib pcm_dmix.c:874:(snd_pcm_dmix_open) unable to open slave
ALSA lib pcm_dmix.c:874:(snd_pcm_dmix_open) unable to open slave
ALSA lib pcm_dmix.c:874:(snd_pcm_dmix_open) unable to open slave
ALSA lib pcm_dmix.c:874:(snd_pcm_dmix_open) unable to open slave
ALSA lib pcm_dmix.c:874:(snd_pcm_dmix_open) unable to open slave
ALSA lib pcm_dmix.c:874:(snd_pcm_dmix_open) unable to open slave

Revision history for this message
Gregory Oschwald (osch0001) wrote :

Also I am experiencing this in Skype with the latest version of Hardy.

Revision history for this message
akira (akira.spb) wrote :

PulseAudio is a Evil! =\

Revision history for this message
christooss (matic-ahacic) wrote :

Same problem with PulseAudio. If devs need more info I will be glad to provide it.

Revision history for this message
Kieran Hogg (xerosis) wrote :

Confirming this bug, I see it too. I removed the info about the gnome-power-manager, that should be logged as another bug, this is just for blocking sound after resume.

description: updated
Changed in pulseaudio:
status: New → Confirmed
Revision history for this message
Andy Kniss (akniss) wrote :

Same happens to me. After resuming, I can get sound working with killall pulseaudio. However, when I do, gnome-power-manager starts using large amounts of cpu and memory. After killing pulseaudio, I watched the Memory column in gnome-system-monitor climb quite rapidly. It reached 1.3 GB while I was watching before I killed gnome-power-manager. I'm using Ubuntu amd64 Beta with all updates applied.

Revision history for this message
Andy Kniss (akniss) wrote :

lspci | grep Audio:
00:1b.0 Audio device: Intel Corporation 82801H (ICH8 Family) HD Audio Controller (rev 02)

Dell XPS m1330 laptop

Revision history for this message
Peter Frühberger (peter-fruehberger) wrote :

  PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
11259 fritsch 20 0 1805m 1.5g 9200 S 50 77.9 2:35.84 gnome-power-man

Same bug hitting me - also killing power manager fixes this for me ;-). But this is not really a fix and a regression from gutsy - here sound worked after resume without problems.

Revision history for this message
Dennis Dirdjaja (dcd-ditsch) wrote :

Confirming this bug on a MacbookPro3,1 (Santa Rosa) with an up-to-date Hardy. If there is a need for more information, please ask.

Revision history for this message
Leonardo Prosperi (leo1981) wrote :

I have the same problem.
Is this the same of Bug #198218?

Revision history for this message
zpon (zpon-dk) wrote :

I haven't had any problems with gnome-power-manager for some time now, but today the problem came back, more screenshots attached.

Revision history for this message
zpon (zpon-dk) wrote :
Revision history for this message
Victor Osadci (victor-os) wrote :

#zpon - the g-p-m is a different bug, please subscribe yourself to bug #196688

Revision history for this message
Carl van Schaik (navlrac) wrote :

I get this as well, gnome-power-manager plays suspend chime and somtimes suspend happens before its done. On resume, pulseaudio does not release sound card --- skype etc can't access audio. Other pulse audio apps continue to work however.

Kill and restart gnome-power-manager: this releases pulseaudio and sound in skype etc works again for me.

Revision history for this message
James Hogarth (jameshogarth) wrote :

I have the same issue although I don't have the debug experience to tell if it is Pulseaudio, alsa or the (in my case) snd-hda-intel driver that is causing issues.

Data are:

1) Linux Wordsworth 2.6.24-14-generic #1 SMP Thu Apr 3 04:49:29 UTC 2008 i686 GNU/Linux

2) Dmesg.log and lspci-vvnn.log attached

The same issue did not occur with Gutsy and the workaround suggested above does not work on my hardware since the module will not "rmmod" despite pulseaudio being killed.

I would see this as a very high priority bug for a lot of users. Anyone disagree?

Revision history for this message
James Hogarth (jameshogarth) wrote :
Revision history for this message
Jerome Lacoste (jerome-lacoste) wrote :

Skype doesn't work for me because of the same reason. But I have a work-around

Problem description:

1. log in
2. open a terminal
3. start skype from terminal

Expected results:

Skype works...

Actual:

"ALSA lib pcm_dmix.c:874:(snd_pcm_dmix_open) unable to open slave"

displayed 4 times, and sound doesn't work in skype (works in rest of desktop).

Work-around:

remove the snd_hda_intel module and reload it. To be able to remove it, I need to close all applications using it, i.e. pulseaudio. Thus I have to close my current session.

Detailed work-around

1- close session (log out)
2- CTRL+ALT+F1 to go to a tty
3- log in
4- sudo rmmod snd_hda_intel
5- sudo modprobe snd_hda_intel
6- CTRL+ALT+F7 and log in again

skype works :)

(or should I say :( as it isn't free)

Revision history for this message
zdzichu (zdzichu-gmail) wrote :

gnome-power-manager issue seems to be related to http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=472637 , which got fixed in recent ubuntu import from debian.

Revision history for this message
Victor Osadci (victor-os) wrote :

This seems to be working for me for some time now. Can anyone confirm ?

Revision history for this message
Kieran Hogg (xerosis) wrote :

Seems to be fixed here too.

Revision history for this message
Dennis Dirdjaja (dcd-ditsch) wrote :

Yes, I did not see this happening any more since one of the last Pulseaudio updates, I think.

Revision history for this message
Gregory Oschwald (osch0001) wrote :

I am still occasionally on my Thinkpad X60s (Intel audio) with an up-to-date Hardy install. In fact, I just had it happen this morning. User apps such as Rhythmbox will not play sound after resume until I kill pulseaudio.

Revision history for this message
asdf (asdf123123-deactivatedaccount-deactivatedaccount) wrote :

still the same problem for me, hardy with latest updates..

Revision history for this message
Lubosz Sarnecki (lubosz) wrote :

i get this when i want to play a flash video in firefox while vlc is playing sound.
the flash video has no sound.
if i play the flash video first / start firefox first, vlc has no sound.
vlc instanced themselfes and flash videos in mulitple tabs can have sound at the same time.
fix this, it came with RC1

Revision history for this message
Matt LaPaglia (mlapaglia) wrote :

If i have rhythmbox open playing something, press pause, open firefox and go to youtube, the video will not play. turning firefox on without rhythmbox on allows youtube to work properly.

Revision history for this message
Victor Osadci (victor-os) wrote :

@lubosz, this is a problem with the non-free flash plugin, and not related to this bug.

PS: try to install libflashsupport

Revision history for this message
Giovanni Mellini (merlos) wrote :

I have the same problem back with last update.

I tried to open youtube video in FireFox, and on console I have lot of the following messages

  ALSA lib pcm_dmix.c:874:(snd_pcm_dmix_open) unable to open slave

and no video sound (while rhythmbox works well); same problem with skype.

Kill the pulseaudio daemon restore the rigth behavior

merlos@merlos-lap:/var/log$ ps axf | grep puls
 7188 ? Sl 0:31 | \_ /usr/bin/pulseaudio --log-target=syslog
 7191 ? S 0:00 | \_ /usr/lib/pulseaudio/pulse/gconf-helper
10592 pts/0 S+ 0:00 \_ grep puls
merlos@merlos-lap:/var/log$ killall pulseaudio
merlos@merlos-lap:/var/log$ ps axf | grep puls
10601 pts/0 S+ 0:00 \_ grep puls
merlos@merlos-lap:/var/log$

tks
Giovanni

Revision history for this message
Giovanni Mellini (merlos) wrote :

@Victor Osadci
I noticed that libflashsupport were removed this morning with the "partial upgrade"

Revision history for this message
Slight Slightly (slight--deactivatedaccount) wrote :

Same problem here, no sound from flash (nonfree), latest up to date Hardy.

Error in console:

ALSA lib pcm_dmix.c:874:(snd_pcm_dmix_open) unable to open slave

Revision history for this message
Tom Wright (twright-tdw) wrote :

libflashsupport should be restored as a dependancy of flash

Revision history for this message
Hans van den Bogert (hbogert) wrote :

I'm still experiencing this bug after resuming.

Revision history for this message
Victor Osadci (victor-os) wrote :

This bug is back for me - clean 8.04 install on the same laptop.

Revision history for this message
dr-phil (philliple01) wrote :

ALSA lib pcm_dmix.c:874:(snd_pcm_dmix_open) unable to open slave

I get this error when i open wc3 and my graphics are completely stuffed but they may be unrelated, not sure yet.

Revision history for this message
Rodrigo Primo (rodrigosprimo) wrote :

I think I have the same problem. I'm running a fresh install of Ubuntu 8.04 64bits on a HP Pavilion DV6338se. If I start, for example, Amarok and after Skype, Skype says it is unable to use the sound device:

"ALSA lib pcm_dmix.c:874:(snd_pcm_dmix_open) unable to open slave"

If I run "killall pulseaudio", Skype starts working.

I've attached the lspci -vvnn and dmesg in case this can be helpful. Please let me know if I can help providing more information or testing.

Revision history for this message
Rodrigo Primo (rodrigosprimo) wrote :

The lspci -vvnn file.

Revision history for this message
zpon (zpon-dk) wrote :

I have earlier had problems with gnome-power-manager (and was told it was do to another bug - https://bugs.launchpad.net/ubuntu/+source/gnome-power-manager/+bug/196688), but yesterday I got a similar problem with pidgin:

The sound suddenly wasn't working, and I did a "killall pulseaudio", this used to help but didn't, so instead I did "ps aux | grep pulseaudio" and "kill -9 xxxx", and in the same moment I got a pidgin sound (like when you receive a message), even though it was at least an hour since I last got one. And then the system got slow, real slow, but i manage to open up gnome-system-monitor, and I saw that pidgin was eating up more that 500MB of my memory. Killing pidgin made the system run normal again.

It might be another bug again, but kind of weird it comes at the same as the gnome-power-manager did.

Revision history for this message
zpon (zpon-dk) wrote :

Pidgin using 625MB memory

Revision history for this message
Jason Sheedy (jason-jmpj) wrote :

I'm receiving the same error when trying to run Neverwinter Nights. The problem has started after I upgraded to Hardy 8.04. I'm also been experiencing problems with flash audio.

ALSA lib pcm_dmix.c:874:(snd_pcm_dmix_open) unable to open slave

Revision history for this message
Steinar Bang (sb-dod) wrote : Re: [Bug 202089] Re: Pulseaudio is blocking normal sound after resume

>>>>> Jason Sheedy <email address hidden>:

> I'm receiving the same error when trying to run Neverwinter Nights. The
> problem has started after I upgraded to Hardy 8.04. I'm also been
> experiencing problems with flash audio.

> ALSA lib pcm_dmix.c:874:(snd_pcm_dmix_open) unable to open slave

I got flash audio working by going to
 System->Preferences->Sound Preferences
and switching all playback to "PulseAudio Sound Server".

But now it's stopped working again.

Revision history for this message
mati (mati-wroc) wrote :

I kind of have this issue, but it has nothing to do with resume on my pc.

I just installed skype, started it, and got no sound with messages in console:

ALSA lib pcm_dmix.c:874:(snd_pcm_dmix_open) unable to open slave

Revision history for this message
Steinar Bang (sb-dod) wrote :

>>>>> Steinar Bang <email address hidden>:

> I got flash audio working by going to
> System-> Preferences->Sound Preferences
> and switching all playback to "PulseAudio Sound Server".

> But now it's stopped working again.

No attempts at
 /etc/init.d/pulseaudio stop
 /etc/init.d/pulseaudio start
made any difference.

But there were some pulsaudio processes running under my own user, so I
did
 killall pulseaudio
and then sound started working on eg. youtube movies again.

Revision history for this message
Srik (maxpower-email) wrote :

ALSA lib pcm_dmix.c:874:(snd_pcm_dmix_open) unable to open slave

I obtain this starting zsnes with the option "-ad pulse". There's no audio in zsnes too.

Revision history for this message
Mark Duncan (eattheapple) wrote :

Same error when trying to run vnc2swf-edit to convert an swf to mpg. I got around it by killall pulseaudio, but vnc2swf-edit doesn't work regardless (yet another program that doesn't run right).

For an LTS release, the Ubuntu devs sure do have their work cut out for them ;-)

Revision history for this message
TheFlyingPengwyn (dcocks) wrote :

I had a similar problem while coding an openAL program. I found a simple fix by using asoundconf

asoundconf set-pulseaudio

This makes alsa go via the long route, through pulseaudio, rather than straight to the sound devices. Works fine so far. I haven't restarted yet, but assume that won't be a problem.

Revision history for this message
Richard Schwarting (aquarichy) wrote :

Hello.

Does anyone working on Ubuntu actually check bug reports? I know they must, but LaunchPad is beginning to depress me. I try to refrain from "me to" noise, but whenever I find an existing bug report that affects me, it usually seems stale and without any comment. I feel as though no one actually looks at these, or cares if it doesn't actually affect them. It makes me want to file a new bug with the summary "LaundPad Bug reporting process hangs for weeks at a time!" :|

Anyway, is there any information I can provide regarding this bug that can help?

Revision history for this message
Götz Christ (g-christ) wrote :

The workaround posted by TheFlyingPengwyn ( https://bugs.launchpad.net/ubuntu/+source/pulseaudio/+bug/202089/comments/46 ) is the solution.

So the affected package can be ALSA, maybe some dev should look at ALSA.

Revision history for this message
Patrick Horgan (phorgan1) wrote :

I haven't used sound for a couple of weeks, so I don't know when it happened, but with Hardy kernel linux 2.6.24-18-generic and Audio device: Intel Corporation 82801H (ICH8 Family) HD Audio Controller (rev 02). I have the same problem after clean powerup. In Rythymbox play doesn't;) and killing pulseaudio makes everything work fine.

Revision history for this message
Kyle M Weller (kylew) wrote :

This bug is horrible, every time a hit a flash site all sound on my pc stops working, I cannot play movies or mp3's I have to alt-ctrl backspace and log back in to listen to music... What is the best way to temp fix this issue?

Revision history for this message
Kyle M Weller (kylew) wrote :

asoundconf set-pulseaudio did not fix the issue, right now I issued the command in terminal and immediately tryed playing an mp3 and it didnt work. Will this prevent this issue from happening after reboot?

Revision history for this message
zdzichu (zdzichu-gmail) wrote :

Kyle: this bug is not about flash. Your issue sounds like not installed libflashsupport package.

Revision history for this message
Klaus Heinrich Kiwi (klauskiwi) wrote :

Still having this issue.. Odd thing is that even video playback is affected after suspending (mplayer, totem, vlc and derivates). kill'ing pulseaudio makes video playback back to normal, but with no sound.

Any workarounds besides killing pulseaudio? I've tried a few times to restart the deamon (without logging out and back in) to no avail.

 -Klaus

Revision history for this message
Mubashir Cheema (cheema) wrote :

To fix this problem I did 2 things:

1. asoundconf set-pulseaudio
2. aptitude install libasound2-plugins

The first creates a .asoundrc.asoundconf in your home directory that tells ALSA to use Pulse Audio. The second step may only be necessary for people on 64-bit systems. I am not sure. I had to do it to get rid of the "Cannot open shared library /usr/lib/alsa-lib/libasound_module_pcm_pulse.so" error.

Now everything is peachy. Hallelujah! Praise be to the Spaghetti monster.

Revision history for this message
ljrossi (ljrossi) wrote :

The solution is trying to convence "ubuntu" to take out pulseaudio !!! from default install distro or updates.

Imagine just all the newbies that are trying ubuntu distro.

They will never be able to run sound , all will just hang up.

I usually ask my friends to swap to linux, that is was ready to go over windows, not any more :-( just for an unsolved sound mess up.

This skype , rhitmbox, flash , I image should came along in test. And pulseaudio should be compatible will all the programs and not the other way around.

Revision history for this message
Eugenia Loli-Queru (eloli) wrote :

Ubuntu devs, can we please have a solution to this? It's been so many months now!
Apparently there is a workaround if you can't fix the source problem in a timely manner: "asoundconf set-pulseaudio" after a resume/reboot. I have no idea where to place this script to get it run automatically, so could you take care of it please?

Revision history for this message
berend (berenddeboer) wrote :

Same here:

  $ skype
  ALSA lib pcm_dmix.c:874:(snd_pcm_dmix_open) unable to open slave
  ALSA lib pcm_dmix.c:874:(snd_pcm_dmix_open) unable to open slave
  ALSA lib pcm_dmix.c:874:(snd_pcm_dmix_open) unable to open slave
  ALSA lib pcm_dmix.c:874:(snd_pcm_dmix_open) unable to open slave

But my resolution was different:

  $ killall gnome-power-manager

which seemed to fix it. As I probably get hit by it more often (sound is more patchy than it used to be in this former LFS system), I might provide some more updates.

Revision history for this message
Alex Muntada (alex.muntada) wrote :

Tried the asoundconf work-around with no luck, but killall gnome-power-manager worked wonders for me too. However there was no resuming issue involved since I never suspended my desktop.

  $ lspci | grep Audio
  00:1b.0 Audio device: Intel Corporation 82801I (ICH9 Family) HD Audio Controller (rev 02)

HTH

Revision history for this message
Eugenia Loli-Queru (eloli) wrote :

You are right. The asoundconf set-pulseaudio doesn't work here either. :(

Revision history for this message
Sayantan Das (sayantan13) wrote :

hi ,
i was having the same problem with skype. i found a way to fix it. i have no idea if my solution affects any underlying program but my skype works fine now
. the solution is to install all the alsa dependencies and the alsa firmware found in the repository. (alsa-firmware-loader, alsa firmware, alsa utilites). i restarted my system and my skype works fine. also , i'm able to play exaile music player and youtube videos or rhythmbox and youtube side by side.
hope this helps

Revision history for this message
Silvio Sisto (sistoviejo) wrote :

I get the problem with flash player nonfree...
When I run firefox through console and try to watch a video on youtube I get this stream of messages:
ALSA lib pcm_dmix.c:874:(snd_pcm_dmix_open) unable to open slave
ALSA lib pcm_dmix.c:874:(snd_pcm_dmix_open) unable to open slave
ALSA lib pcm_dmix.c:874:(snd_pcm_dmix_open) unable to open slave
ALSA lib pcm_dmix.c:874:(snd_pcm_dmix_open) unable to open slave
ALSA lib pcm_dmix.c:874:(snd_pcm_dmix_open) unable to open slave
ALSA lib pcm_dmix.c:874:(snd_pcm_dmix_open) unable to open slave
ALSA lib pcm_dmix.c:874:(snd_pcm_dmix_open) unable to open slave
ALSA lib pcm_dmix.c:874:(snd_pcm_dmix_open) unable to open slave
ALSA lib pcm_dmix.c:874:(snd_pcm_dmix_open) unable to open slave
ALSA lib pcm_dmix.c:874:(snd_pcm_dmix_open) unable to open slave
ALSA lib pcm_dmix.c:874:(snd_pcm_dmix_open) unable to open slave
ALSA lib pcm_dmix.c:874:(snd_pcm_dmix_open) unable to open slave
ALSA lib pcm_dmix.c:874:(snd_pcm_dmix_open) unable to open slave
ALSA lib pcm_dmix.c:874:(snd_pcm_dmix_open) unable to open slave
ALSA lib pcm_dmix.c:874:(snd_pcm_dmix_open) unable to open slave
ALSA lib pcm_dmix.c:874:(snd_pcm_dmix_open) unable to open slave
ALSA lib pcm_dmix.c:874:(snd_pcm_dmix_open) unable to open slave
ALSA lib pcm_dmix.c:874:(snd_pcm_dmix_open) unable to open slave
ALSA lib pcm_dmix.c:874:(snd_pcm_dmix_open) unable to open slave
ALSA lib pcm_dmix.c:874:(snd_pcm_dmix_open) unable to open slave
ALSA lib pcm_dmix.c:874:(snd_pcm_dmix_open) unable to open slave
ALSA lib pcm_dmix.c:874:(snd_pcm_dmix_open) unable to open slave
ALSA lib pcm_dmix.c:874:(snd_pcm_dmix_open) unable to open slave
ALSA lib pcm_dmix.c:874:(snd_pcm_dmix_open) unable to open slave
ALSA lib pcm_dmix.c:874:(snd_pcm_dmix_open) unable to open slave
ALSA lib pcm_dmix.c:874:(snd_pcm_dmix_open) unable to open slave
ALSA lib pcm_dmix.c:874:(snd_pcm_dmix_open) unable to open slave
ALSA lib pcm_dmix.c:874:(snd_pcm_dmix_open) unable to open slave
ALSA lib pcm_dmix.c:874:(snd_pcm_dmix_open) unable to open slave
ALSA lib pcm_dmix.c:874:(snd_pcm_dmix_open) unable to open slave
ALSA lib pcm_dmix.c:874:(snd_pcm_dmix_open) unable to open slave
ALSA lib pcm_dmix.c:874:(snd_pcm_dmix_open) unable to open slave
ALSA lib pcm_dmix.c:874:(snd_pcm_dmix_open) unable to open slave
ALSA lib pcm_dmix.c:874:(snd_pcm_dmix_open) unable to open slave

... goes on and on till I hit pause.

Revision history for this message
staticmem (stewomni) wrote :

Problem I'm having is with Kaffeine and another application that uses SDL sound. I'm using Hardy 8.04.1 LTS

While Kaffeine is running and starting the SDL application I receive this error:
ALSA lib pcm_dmix.c:874:(snd_pcm_dmix_open) unable to open slave

I killed the gnome-power-manager and this appeared to be a work around but I was then unable to shut down the system.
I then tried killall pulseaudio as suggested earlier and this worked after restarting the Kaffeine application.

I wanted a method to disable pulseaudio from starting up, so I tried:
$ sudo /etc/init.d/pulseaudio stop

This did not appear to do anything and disabling in BootUp-Manager also does not appear to help. It appears that pulseaudio is run as a user and not as a root daemon. I ended up with a simple work around (for now) by renaming the pulse audio file to something else and restarted my system. As expected the login prompt tune worked (root level) but logging in as a user the System sounds are no longer heard but my other sound applications seem be working for now.

$ sudo mv /usr/bin/pulseaudio /usr/bin/pulseaudio-renamed

Can pulseaudio be disabled altogether in the system, if so how?

Revision history for this message
Eugenia Loli-Queru (eloli) wrote :

Ok guys, I have an easy workaround that works for me. Create a sound.sh file and type in it:

#!/usr/bin/sh
/etc/init.d/alsa-utils stop
/etc/init.d/alsa-utils start

Then, save that file, and make it executable:
chmod +x sound.sh

Then, copy it to /usr/bin:
sudo mv sound.sh /usr/bin/

You will have to run this little script every time your laptop resumes from sleep or hibernation I am afraid! I tried adding these two lines of start/stop on the /etc/acpi/resume/'s alsa file, but it would NOT make a difference, while running them on a terminal after the resume works! Yes, you get some permission errors trying to run this script as a plain user, but the weird thing is, it works! (honestly, it shouldn't have worked!)

I hope this gives enough info to the ubuntu guys to fix this. I giving this IBM T23 laptop to my little brother in Greece and the only hardware-related bug in the whole system is this sound problem (even the modem works!). I am leaving for Greece in 10 days and when the laptop gets there, it will never get updated again because my bro is in dial-up. So if this doesn't get fixed in 10 days, he will have to stay with broken audio until this laptop dies...

Revision history for this message
Eugenia Loli-Queru (eloli) wrote :

Of course, if
#!/usr/bin/sh
doesn't work for you, try
#!/bin/sh

Revision history for this message
Miguel Ángel Molina (sslapp) wrote :

For SDL sound apps, have you tried to install libsdl1.2debian-pulseaudio package?
It deinstall libsdl1.2debian-alsa but it's ok.

Revision history for this message
Alex Muntada (alex.muntada) wrote :

@Miguel Ángel: libsdl1.2debian-pulseaudio works like charm. Thanks a lot!

Revision history for this message
Patrick Horgan (phorgan1) wrote :

I tried libsdl1.2debian-pulseaudio and got distorted sound for SDL apps. They weren't usable.

Patrick

Revision history for this message
Duncan Hawthorne (duncan.hawthorne) wrote :

please people, read the original posters comment before posting about random other applications not working with pulseaudio. that has absolutely nothing to do with the original bug report, which is only about sound not working after resume.

for reference, the best test case for seeing is this bug exist is to try playing sound in totem or rhythmbox while no other applications are playing. everybody is getting confused because other appliations have completely seperate problems (AT ALL TIMES)

DO NOT report any problems in this bug report if you have problems with any other the following applications:
skype, flash (and therefore firefox in general), aplay, sdl applications (such as neverwinter nights), kde applications, kde4 applications.
instead find the relevant bug reports for each of those applications
do not post any errors talking about not being able to open slave, as this is a seperate issue

DO test this with
totem

look here: http://www.pulseaudio.org/wiki/PerfectSetup
look at this thread i made. http://ubuntuforums.org/showthread.php?t=756290. to diagnose problems you need to install and run pavucontrol. applications that dont appear in pavucontrol are not the scope of this bug (although they may need seperate fixes and/or bug reports filed against them). applications that do appear in pavucontrol are relevant for this bug report

ideally all applications should appear in pavucontrol. this is what ubuntu is working towards

Revision history for this message
Eugenia Loli-Queru (eloli) wrote :

Josh, I installed puvucontrol and it indeed, it shows up the application playing some music/audio after resume (I used the preferences/gnome-sound utility which is even more standard than Totem or Rhythmbox). BUT, you can't hear ANYTHING. You have to restart the alsa daemon to get audio. The bug is real and it happens with these older Thinkpads. It is 100% reproducible. Nothing is muted, nothing is blocked, but you still can't hear a thing. It's just that the speaker is not initialized after sleep resume and you have to restart alsa to get it back (even if alsa IS asked to be re-started in the /events/resume/ ACPI scripts, it requires you to do that as a user too manually).

As for these pulseaudio "perfect setup" ideas, I simply refuse to spend an hour just to make sound work after resume-- and IF it's going to work even after doing all that, you can't guarantee me that it's going to work if I put all that work down --. This is a case where Canonical buys you a second hand Thinkpad and you sit down and you fix it for us. The bug is real, it's been confirmed a hundred times, and it's an embarrassing one if you ask me.

Revision history for this message
Dave Gilbert (ubuntu-treblig) wrote :

I appear to be seeing the resume issue (Intrepid uptodate as of yesterday); Rhythmbox (which I'd left open before I hibernated) was stuck on resume and wouldn't play.

I noticed in the logs:
Oct 3 18:16:31 davros pulseaudio[30216]: module-alsa-sink.c: Got POLLERR from ALSA
Oct 3 18:16:31 davros pulseaudio[30216]: module-alsa-sink.c: Got POLLERR from ALSA

tried:
@davros:~$ pulseaudio --check
W: ltdl-bind-now.c: Failed to find original dlopen loader.
dg@davros:~$ pulseaudio --kill
W: ltdl-bind-now.c: Failed to find original dlopen loader.

davros:~$ pactl stat
Connection failure: Connection refused

restarted pulseaudio from the commandline:
W: ltdl-bind-now.c: Failed to find original dlopen loader.
W: main.c: setrlimit(RLIMIT_NICE, (31, 31)) failed: Operation not permitted
W: main.c: setrlimit(RLIMIT_RTPRIO, (9, 9)) failed: Operation not permitted
W: alsa-util.c: Device front:0 doesn't support 44100 Hz, changed to 48000 Hz.
ALSA lib control.c:909:(snd_ctl_open_noupdate) Invalid CTL front:0
W: alsa-util.c: Device front:0 doesn't support 44100 Hz, changed to 48000 Hz.
ALSA lib control.c:909:(snd_ctl_open_noupdate) Invalid CTL front:0

and it's happy again (I wish it wasn't necessary to restart all the clients on a demon restart).

Dave

Revision history for this message
Dave Gilbert (ubuntu-treblig) wrote :

Hmm I'm finding other times when I come back from hibernate and don't have audio just doing a :

pasuspender /bin/cat

and then exiting the cat (I guess /bin/true would work)

gets it going again - much less painful than having to restart pa - but I guess this is a different underlying bug.

Dave

Revision history for this message
Michael Gratton (mjog) wrote :

From the upstream bug, this might be a problem with ALSA.

Changed in pulseaudio:
status: Unknown → Invalid
Revision history for this message
Duncan Hawthorne (duncan.hawthorne) wrote :

thanks dave giblert. running

pasuspender echo

does indeed give pulseaudio the necessary nudge to get it going again

Revision history for this message
Tom Wright (twright-tdw) wrote :

in that case the fix is to add that command as a resume script (until it can be fixed in alsa).

Daniel T Chen (crimsun)
Changed in pulseaudio:
assignee: nobody → crimsun
importance: Undecided → Low
status: Confirmed → In Progress
Changed in gnome-power-manager:
status: New → Invalid
Revision history for this message
Michael (null-pointer-us) wrote :

Neither of the pasuspender commands fixes my problems, nor does killall pulseaudio. Yet I have the same symptoms: Totem and Rhythmbox work fine until suspend/resume, at which point they appear to play fine, but no sound comes out of the speakers. Also, no volume sliders are muted.

I believe there are multiple bugs that occur with the same set of actions. My hardware uses kernel device snd_hda_intel. I tried the pulseaudio fixes in this thread, but none of them worked for me. The only valid fix for me in this thread was in the following comment:

https://bugs.launchpad.net/ubuntu/+source/pulseaudio/+bug/202089/comments/19

This seems to indicate a kernel bug, or at least something at a lower level than ALSA and PulseAudio.

I did some more checking and found this bug (and recommended fix, which fixes the issue permanently):

https://bugs.launchpad.net/ubuntu/+source/linux/+bug/270593

The problem is that the snd-hda-intel module has a broken model=auto mode that works on bootup but fails during the suspend/resume cycle. People for whom the "pasuspender echo" or "killall pulseaudio" fixes do NOT work should be posting in bug 270593, where I will now be adding more information.

Again, two separate issues with exactly the same symptoms. Hope this clears up some of the confusion. :)

Revision history for this message
Akdo (menoft) wrote :

Same bug on firefox with adobe-flashplugin . If I hear music with rhythmbox flash hasn't sound.

LSA lib pcm_dmix.c:874:(snd_pcm_dmix_open) unable to open slave
ALSA lib pcm_dmix.c:874:(snd_pcm_dmix_open) unable to open slave
ALSA lib pcm_dmix.c:874:(snd_pcm_dmix_open) unable to open slave
ALSA lib pcm_dmix.c:874:(snd_pcm_dmix_open) unable to open slave
ALSA lib pcm_dmix.c:874:(snd_pcm_dmix_open) unable to open slave
ALSA lib pcm_dmix.c:874:(snd_pcm_dmix_open) unable to open slave
ALSA lib pcm_dmix.c:874:(snd_pcm_dmix_open) unable to open slave
ALSA lib pcm_dmix.c:874:(snd_pcm_dmix_open) unable to open slave
ALSA lib pcm_dmix.c:874:(snd_pcm_dmix_open) unable to open slave
ALSA lib pcm_dmix.c:874:(snd_pcm_dmix_open) unable to open slave
ALSA lib pcm_dmix.c:874:(snd_pcm_dmix_open) unable to open slave
ALSA lib pcm_dmix.c:874:(snd_pcm_dmix_open) unable to open slave
ALSA lib pcm_dmix.c:874:(snd_pcm_dmix_open) unable to open slave
ALSA lib pcm_dmix.c:874:(snd_pcm_dmix_open) unable to open slave
ALSA lib pcm_dmix.c:874:(snd_pcm_dmix_open) unable to open slave
ALSA lib pcm_dmix.c:874:(snd_pcm_dmix_open) unable to open slave
ALSA lib pcm_dmix.c:874:(snd_pcm_dmix_open) unable to open slave

To "resolv" problem I close all sound program. And restart firefox...

Revision history for this message
Id2ndR (id2ndr) wrote :

mirage: your problem match bug #198453 and is not related to this bug.

Revision history for this message
Gastón (givanse) wrote :

I get this error when I try to install Timidity

sudo apt-get install timidity
Reading package lists... Done
Building dependency tree
Reading state information... Done
timidity is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 10 not upgraded.
1 not fully installed or removed.
After this operation, 0B of additional disk space will be used.
Setting up timidity (2.13.2-19ubuntu1) ...
 * Starting TiMidity++ ALSA midi emulation...
ALSA lib pcm_dmix.c:874:(snd_pcm_dmix_open) unable to open slave
                                                                                                                      [fail]
invoke-rc.d: initscript timidity, action "start" failed.
dpkg: error processing timidity (--configure):
 subprocess post-installation script returned error exit status 1
Errors were encountered while processing:
 timidity
E: Sub-process /usr/bin/dpkg returned an error code (1)

Revision history for this message
Chow Loong Jin (hyperair) wrote :

Adding the attached file to /etc/pm/sleep.d fixes this issue for me. Keep the file name intact. At least the number anyway.

The original workaround is this: After resuming, run pacmd, and execute the commands "suspend 0" and "suspend 1". That causes all sound to work again.

For now, can we include this into Ubuntu's PulseAudio package?

Revision history for this message
Chow Loong Jin (hyperair) wrote :

On Sat, 2008-11-08 at 03:56 +0000, hyperair wrote:
> Adding the attached file to /etc/pm/sleep.d fixes this issue for me.
> Keep the file name intact. At least the number anyway.
>
> The original workaround is this: After resuming, run pacmd, and execute
> the commands "suspend 0" and "suspend 1". That causes all sound to work
> again.
>
> For now, can we include this into Ubuntu's PulseAudio package?
>
> ** Attachment added: "01PulseAudio"
> http://launchpadlibrarian.net/19479374/01PulseAudio
>
Here's a debdiff including this workaround into the pulseaudio package.
--
Chow Loong Jin

Revision history for this message
Id2ndR (id2ndr) wrote :

Thanks for your work hyperair ! It work for me.

I just noticed a mistake in you debdiff line 42 :
+. "${PM_FUNCTIONS}
which should be :
+. ${PM_FUNCTIONS}

Revision history for this message
Chow Loong Jin (hyperair) wrote :

On Sat, 2008-11-08 at 16:33 +0000, Id2ndR wrote:
> Thanks for your work hyperair ! It work for me.
>
> I just noticed a mistake in you debdiff line 42 :
> +. "${PM_FUNCTIONS}
> which should be :
> +. ${PM_FUNCTIONS}
>
Ah yes. You're right, but it should be '. "${PM_FUNCTIONS}"' Thanks
anyway. While looking through the debdiff again I noticed I put it into
the wrong place--/etc/pm/sleep.d instead of /usr/lib/pm-utils/sleep.d.
I've corrected that as well.

Here's an updated debdiff.
--
Chow Loong Jin

Revision history for this message
Mário Buči (mario-buci) wrote :

Thank you for the solution, hyperair!! I hope this will get into ubuntu's pulseaudio package soon as this is a major problem. Thanks again.

Changed in pulseaudio:
status: Invalid → New
Revision history for this message
str0g (buskol-waw-pl) wrote :

didn't helped for me :( ubuntu 8.10...

Revision history for this message
Jonathan Steinhart (jsteinhart) wrote :

This has been working for me on Intrepid over multiple suspend/resume cycles. I've put the packages in my PPA in case anyone else would like to easily test with hyperair's debdiff applied (no other changes). Just uploaded them -- give them 30 minutes to build.

deb http://ppa.launchpad.net/jsteinhart/ubuntu intrepid main universe multiverse restricted
deb-src http://ppa.launchpad.net/jsteinhart/ubuntu intrepid main universe multiverse restricted

Revision history for this message
akuklev (alexander-kuklev) wrote :

Tha package made by jsteinhart and hyperair works for me. Home the patch will be accepted by Ubuntu soon.

Revision history for this message
Tom Wright (twright-tdw) wrote :

The package works great :-)

For jaunty it needs to be combined with the new glitch free version of pulseaudio to prevent sound ugliness (lots of glitches/corruption) on resume

Revision history for this message
Biji (biji) wrote :

yes...... it works ..... thanks hyperair
my reported bug is duplicate with this one
https://bugs.launchpad.net/ubuntu/+source/pulseaudio/+bug/292129

Revision history for this message
mogwai (scruffy-mogwai) wrote :

Confirming.
After resume from suspend I get no audio. Don't get any audio -- just won't play -- no error messages.
`pasuspender echo` gets everything up and going again.

Revision history for this message
Chow Loong Jin (hyperair) wrote :

On Sat, 2008-12-06 at 05:15 +0000, mogwai wrote:
> Confirming.
> After resume from suspend I get no audio. Don't get any audio -- just won't play -- no error messages.
> `pasuspender echo` gets everything up and going again.
>
Then the fix I posted a few posts up should work for you.
--
Chow Loong Jin

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

Luke and I are currently at UDS; we'll add the corresponding hook to jaunty prior to subscribing the appropriate SRU team. Nota bene: argv[0] is different in jaunty (need to use --start instead of -D).

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package pulseaudio - 0.9.13-2ubuntu3

---------------
pulseaudio (0.9.13-2ubuntu3) jaunty; urgency=low

  * Add pm-utils sleep hook to suspend (and resume) users' pulseaudio
    daemons (LP: #202089). Based on a patch by
    Chow Loong Jin <email address hidden>.

 -- Daniel T Chen <email address hidden> Mon, 08 Dec 2008 22:11:32 -0800

Changed in pulseaudio:
status: In Progress → Fix Released
Daniel T Chen (crimsun)
description: updated
Revision history for this message
zdzichu (zdzichu-gmail) wrote :

Interesting. Instead of fixing root cause (ALSA driver having problem with suspend/resume handler), you add workaround by restarting one application, and call it "fix".

Revision history for this message
James Hogarth (jameshogarth) wrote :

unsubscribe jonathangittos

On 10 Dec 2008, at 02:00, Launchpad Bug Tracker wrote:

> This bug was fixed in the package pulseaudio - 0.9.13-2ubuntu3
>
> ---------------
> pulseaudio (0.9.13-2ubuntu3) jaunty; urgency=low
>
> * Add pm-utils sleep hook to suspend (and resume) users' pulseaudio
> daemons (LP: #202089). Based on a patch by
> Chow Loong Jin <email address hidden>.
>
> -- Daniel T Chen <email address hidden> Mon, 08 Dec 2008 22:11:32
> -0800
>
> ** Changed in: pulseaudio (Ubuntu)
> Status: In Progress => Fix Released
>
> --
> Pulseaudio is blocking normal sound after resume
> https://bugs.launchpad.net/bugs/202089
> You received this bug notification because you are a direct subscriber
> of the bug.
>
> Status in PulseAudio sound server: New
> Status in “gnome-power-manager” source package in Ubuntu: Invalid
> Status in “pulseaudio” source package in Ubuntu: Fix Released
>
> Bug description:
> SRU information follows:
>
> Impact: A portion of users with a default or updated (intrepid-
> proposed) Ubuntu 8.10 install experience inaudible audio from
> PulseAudio after resuming from suspend-to-ram.
>
> Resolution: Configure users' pulseaudio daemons to suspend prior to
> suspending to ram and to resume after resuming. This sequence is
> accomplished via a pm-utils sleep hook.
>
> SRU debdiff: http://launchpadlibrarian.net/20316781/pulseaudio_0.9.10-2ubuntu9.2.debdiff
>
> TEST CASE: Boot into a default or updated (intrepid-proposed) Ubuntu
> 8.10 install (e.g., desktop image). Suspend to ram, then resume.
> Note the inaudible audio from PulseAudio.
>
> Regression potential: No regressions have been identified in
> production.
>
> Background information follows:
>
> Binary package hint: pulseaudio
>
>> aplay squish.au
> Sonando Audio Sparc 'squish.au' : Mu-Law, Ratio 8000 Hz, Mono
>
> [Suspend to Ram/Resume]
>
>> aplay squish.au
> ALSA lib pcm_dmix.c:874:(snd_pcm_dmix_open) unable to open slave
> aplay: main:546: error al abrir audio: Dispositivo ó recurso ocupado
>
> Then you need to killall pulseaudio for apps that use pcm starts
> working again.
> (Question: How you can stop/start/restart pulseudio? In Ubuntu /etc/
> init.d/pulseaudio script is disabled)
>
> If you need more information, please let me know.
>
> Thx.
>
> ----------------------------------
> Hardy Uptodate
> IBM Thinkpad X41 Tablet
> pulseaudio 0.9.9-1ubuntu2

Jonathan Gittos
<email address hidden>
13 Milman Road
London
NW6 6EN

Home: +44 (0)208 960 5976
Mobile: +44 (0)7785 117887

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

On 12/10/2008 12:20 AM, zdzichu wrote:
> Interesting. Instead of fixing root cause (ALSA driver having problem
> with suspend/resume handler), you add workaround by restarting one
> application, and call it "fix".

Obviously there's a linux component, too, but fixing the drivers is much
more invasive and not an appropriate task for an _already-released_ (and
thus _frozen_ version). Please recognise that the definition of a
StableReleaseUpdate precludes invasive changes.

There is work in jaunty to fix the PM (including enabling many
non-PM-enabled drivers) as part of the greater "improving PM in Ubuntu"
spec.

Revision history for this message
Martin Pitt (pitti) wrote :

Please go ahead and upload.

Changed in gnome-power-manager:
status: New → Invalid
Changed in pulseaudio:
assignee: nobody → crimsun
status: New → Confirmed
Revision history for this message
erlguta (gonzalomarcote) wrote :

Thank you jsteinhart. That PPA packages solve my problem.
So why this packages are not upload to Intrepid?
Would we wait until Jaunty (as ever)?

Revision history for this message
Martin Pitt (pitti) wrote :

Accepted into intrepid-proposed, please test and give feedback here. Please see https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

Changed in pulseaudio:
status: Confirmed → Fix Committed
Revision history for this message
DFreeze (dfreeze) wrote :

I'm following this bug having seen it on my Hardy install. Any chance this
fix makes it into Hardy as well?

2008/12/17 Martin Pitt <email address hidden>

> Accepted into intrepid-proposed, please test and give feedback here.
> Please see https://wiki.ubuntu.com/Testing/EnableProposed for
> documentation how to enable and use -proposed. Thank you in advance!
>
> ** Changed in: pulseaudio (Ubuntu Intrepid)
> Status: Confirmed => Fix Committed
>
> ** Tags added: verification-needed
>
> --
> Pulseaudio is blocking normal sound after resume
> https://bugs.launchpad.net/bugs/202089
> You received this bug notification because you are a direct subscriber
> of the bug.
>

Revision history for this message
Chow Loong Jin (hyperair) wrote :

On Wed, 2008-12-17 at 07:33 +0000, Martin Pitt wrote:
> Accepted into intrepid-proposed, please test and give feedback here.
> Please see https://wiki.ubuntu.com/Testing/EnableProposed for
> documentation how to enable and use -proposed. Thank you in advance!
>
> ** Changed in: pulseaudio (Ubuntu Intrepid)
> Status: Confirmed => Fix Committed
>
> ** Tags added: verification-needed
>
I've tested the update, and can confirm that it works.
--
Chow Loong Jin

Revision history for this message
rbg (ross-girshick) wrote :

I've tested this using intrepid-proposed and can report that it partially works. With the updated package I no longer have to manually restart pulseaudio, however it doesn't work in the sense that I *do* have to restart firefox in order to make flash applications play audio again (e.g., streaming music via pandora).

Revision history for this message
erlguta (gonzalomarcote) wrote :

I've tested in my 3 machines with the jsteinhart propossed PPA packages
In two it works and in one Dell with Creative Labs SB Audigy LS it does not works:
PC 1:
00:05.0 Audio device: nVidia Corporation MCP61 High Definition Audio (rev a2)
It works sound after suspend

PC 2:
05:00.0 Multimedia audio controller: Creative Labs SB Audigy LS
It still not works after suspend

Laptop Dell Mini 9:
00:1b.0 Audio device: Intel Corporation 82801G (ICH7 Family) High Definition Audio Controller (rev 02)
It works sound after suspend

rbg:
>have to restart firefox in order to make flash applications play audio again

Have you tested youtube for example?
For me it works ok after suspend.

Revision history for this message
rbg (ross-girshick) wrote :

elguta:
> Have you tested youtube for example?
> For me it works ok after suspend.

No sounds from youtube either, until I restart firefox. I'm testing on a lenovo thinkpad z61t with:
00:1b.0 Audio device: Intel Corporation 82801G (ICH7 Family) High Definition Audio Controller (rev 02)

Did you have firefox open before suspending?

Revision history for this message
Chow Loong Jin (hyperair) wrote :

On Fri, 2008-12-19 at 12:32 +0000, rbg wrote:
> elguta:
> > Have you tested youtube for example?
> > For me it works ok after suspend.
>
> No sounds from youtube either, until I restart firefox. I'm testing on a lenovo thinkpad z61t with:
> 00:1b.0 Audio device: Intel Corporation 82801G (ICH7 Family) High Definition Audio Controller (rev 02)
>
> Did you have firefox open before suspending?
>
I have Youtube playing sound before suspending, and upon resuming, the
sound continues. Using flashplugin-nonfree version 10.0.12.36ubuntu1.
--
Chow Loong Jin

Revision history for this message
skflyfish (jpeasley) wrote :

I have a Thinkpad R61 with:

00:1b.0 Audio device: Intel Corporation 82801H (ICH8 Family) HD Audio Controller (rev 03)
flashplugin-nonfree 10.0.15.3ubuntu1~intrepid1

and the last proposed update cured the blocked sound after resume. No need to restart Firefox at all. HTH.

Revision history for this message
rbg (ross-girshick) wrote :

I'm also using flashplugin-nonfree 10.0.15.3ubuntu1~intrepid1. If I run pulseaudio from a terminal using `pulseaudio -vv`, when my system comes back from suspend I see this error message:

module-alsa-sink.c: Got POLLERR from ALSA

Please let me know if there's any additional information that I can add to help. Thanks.

Revision history for this message
Chow Loong Jin (hyperair) wrote :

The 01PulseAudio sleep hook for pm-utils included in pulseaudio
0.9.10-2ubuntu9.2 does not work if PulseAudio was not started using the
full path. In my case, I started PulseAudio manually, after accidentally
killing it, using this command: "pulseaudio -D". The sleep hook fails to
do its job. Specifically, the get_pulse_users() function does not return
my username, eventhough pulseaudio is running under my username, because
it searches the output of "ps aux" for "/usr/bin/pulseaudio -D" as
opposed to just "pulseaudio -D" or "pulseaudio"
--
Chow Loong Jin

Revision history for this message
rbg (ross-girshick) wrote :

I noticed that my user wasn't part of the groups "pulse", "pulse-access", or "pulse-rt". I'm not sure what the correct membership should be, but I tried adding myself to all of those groups. After making that change I have audio from flash applications in firefox after suspending and resuming. Yay!

Revision history for this message
Tom Wright (twright-tdw) wrote :

this seems to be fixed in the glitch free pulseaudio release in openSUSE

Revision history for this message
zorblek (zorblek) wrote :

I, too have been experiencing this bug with Ubuntu Intrepid. Jsteinhart's fix appears to partially fix the problem. Before installing the fix, when I attempted to play a flash video after a suspend cycle it would play for a few seconds then stop, with no sound. When I switched over to a console and back, the video would then resume and sounds would play as normal.

Now that I have installed the fix, flash videos don't stop after a few seconds. They continue to play, but I still don't get any sound from them (or anything else). When I switch back from a console, the video will pause in the middle of playback while all of the audio that i missed plays, then it will resume from where I left off.

In any event, I still don't get any other sounds (with or without the fix) until I switch to and from a console.

If there's any more useful information I can give you, let me know.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package pulseaudio - 0.9.10-2ubuntu9.2

---------------
pulseaudio (0.9.10-2ubuntu9.2) intrepid-proposed; urgency=low

  * Add pm-utils sleep hook to suspend (and resume) users' pulseaudio
    daemons (LP: #202089). Based on a patch by
    Chow Loong Jin <email address hidden>.

 -- Daniel T Chen <email address hidden> Mon, 08 Dec 2008 22:11:32 -0800

Changed in pulseaudio:
status: Fix Committed → Fix Released
Revision history for this message
Dave Gilbert (ubuntu-treblig) wrote :

I still seem to be seeing this on 0.9.10-2ubuntu9.3 which is what is currently installed on my Intrepid box.

This morning I had to do a pasuspender /bin/true to get the sound going again after I woke it up from hibernate.

(Yesterday I had to restart the demon after it had gone completely - but that's rarer)

Dave

Revision history for this message
Nikolaj Sheller (nikolajsheller) wrote :

I'm seeing this on Intrepid with kernel 2.6.27.11 on AMD 64 with pulseaudio 0.9.13-0ubuntu1~ppa2

Just after resume:
Feb 6 20:53:02 AppleCider pulseaudio[6415]: alsa-util.c: Got POLLERR from ALSA
Feb 6 20:53:02 AppleCider pulseaudio[6415]: alsa-util.c: PCM state is SUSPENDED
Feb 6 20:53:02 AppleCider pulseaudio[6415]: alsa-util.c: Got POLLERR from ALSA
Feb 6 20:53:02 AppleCider pulseaudio[6415]: alsa-util.c: PCM state is RUNNING
Feb 6 20:53:02 AppleCider pulseaudio[6415]: alsa-util.c: Got POLLERR from ALSA
Feb 6 20:53:02 AppleCider pulseaudio[6415]: alsa-util.c: PCM state is RUNNING
etc

While this is happening the speaker emits a clicking or buzzing sound.

Revision history for this message
zorblek (zorblek) wrote : Re: [Bug 202089] Re: Pulseaudio is blocking normal sound after resume
Download full text (3.1 KiB)

I'm pretty sure I was still experiencing this bug with the latest update,
but I can't check at the moment because a separate issue is preventing Gnome
from loading.

On Sun, Feb 8, 2009 at 8:24 AM, Nikolaj Sheller
<email address hidden>wrote:

> I'm seeing this on Intrepid with kernel 2.6.27.11 on AMD 64 with
> pulseaudio 0.9.13-0ubuntu1~ppa2
>
> Just after resume:
> Feb 6 20:53:02 AppleCider pulseaudio[6415]: alsa-util.c: Got POLLERR from
> ALSA
> Feb 6 20:53:02 AppleCider pulseaudio[6415]: alsa-util.c: PCM state is
> SUSPENDED
> Feb 6 20:53:02 AppleCider pulseaudio[6415]: alsa-util.c: Got POLLERR from
> ALSA
> Feb 6 20:53:02 AppleCider pulseaudio[6415]: alsa-util.c: PCM state is
> RUNNING
> Feb 6 20:53:02 AppleCider pulseaudio[6415]: alsa-util.c: Got POLLERR from
> ALSA
> Feb 6 20:53:02 AppleCider pulseaudio[6415]: alsa-util.c: PCM state is
> RUNNING
> etc
>
> While this is happening the speaker emits a clicking or buzzing sound.
>
> --
> Pulseaudio is blocking normal sound after resume
> https://bugs.launchpad.net/bugs/202089
> You received this bug notification because you are a direct subscriber
> of the bug.
>
> Status in PulseAudio sound server: New
> Status in "gnome-power-manager" source package in Ubuntu: Invalid
> Status in "pulseaudio" source package in Ubuntu: Fix Released
> Status in gnome-power-manager in Ubuntu Intrepid: Invalid
> Status in pulseaudio in Ubuntu Intrepid: Fix Released
> Status in "gnome-power-manager" source package in Baltix: New
>
> Bug description:
> SRU information follows:
>
> Impact: A portion of users with a default or updated (intrepid-updates)
> Ubuntu 8.10 install experience inaudible audio from PulseAudio after
> resuming from suspend-to-ram. This symptom is due to the PulseAudio daemon
> not having received proper notification to suspend clients and release the
> sound device(s).
>
> Resolution: Configure users' pulseaudio daemons to suspend prior to
> suspending to ram and to resume after resuming. This sequence is
> accomplished via a pm-utils sleep hook. The corresponding fixed version
> (0.9.13-2ubuntu3) is available in jaunty.
>
> SRU debdiff:
> http://launchpadlibrarian.net/20316781/pulseaudio_0.9.10-2ubuntu9.2.debdiff
>
> TEST CASE: Boot into a default or updated (intrepid-updates) Ubuntu 8.10
> install. Suspend to ram, then resume. Note the inaudible audio from
> PulseAudio.
>
> Regression potential: No regressions have been identified in production.
>
> Background information follows:
>
> Binary package hint: pulseaudio
>
> > aplay squish.au
> Sonando Audio Sparc 'squish.au' : Mu-Law, Ratio 8000 Hz, Mono
>
> [Suspend to Ram/Resume]
>
> > aplay squish.au
> ALSA lib pcm_dmix.c:874:(snd_pcm_dmix_open) unable to open slave
> aplay: main:546: error al abrir audio: Dispositivo ó recurso ocupado
>
> Then you need to killall pulseaudio for apps that use pcm starts working
> again.
> (Question: How you can stop/start/restart pulseudio? In Ubuntu
> /etc/init.d/pulseaudio script is disabled)
>
> If you need more information, please let me know.
>
> Thx.
>
> ----------------------------------
> Hardy Uptodate
> IBM Thinkpad X41 Tablet
> pulseaudio 0.9.9...

Read more...

Revision history for this message
Jim Hunziker (landtuna) wrote :

I can confirm Dave Gilbert's report that this is still a problem on Intrepid with pulseaudio-0.9.10-2ubuntu9.3. My sound still disappears after a resume, and pasuspender echo makes my sound start working again.

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

What happens if you modify /usr/lib/pm-utils/sleep.d/01PulseAudio to use sudo -H instead of just sudo?

i.e., http://package-import.ubuntu.com/p/pulseaudio/jaunty/annotate/head%3A/debian/01PulseAudio

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

Note: look only at lines 11 and 17 of the above URL. Don't replace intrepid-updates's version of the file with jaunty's, because the command invocation is different.

Revision history for this message
Owen Williams (ywwg) wrote :

On a Dell 1420n of mine, recently upgraded to Intrepid, the default pulseaudio suspend/resume script doesn't work. If I use that script, I have to do the "pasuspender echo" trick to get sound back.

However, the script in this message does work: http://groups.google.com/group/linux.debian.bugs.dist/browse_thread/thread/bef8342095751302

What is the difference between these scripts that causes the second one to work?

Revision history for this message
Chow Loong Jin (hyperair) wrote :

On Wed, 2009-04-08 at 22:02 +0000, Owen Williams wrote:
> On a Dell 1420n of mine, recently upgraded to Intrepid, the default
> pulseaudio suspend/resume script doesn't work. If I use that script, I
> have to do the "pasuspender echo" trick to get sound back.
>
> However, the script in this message does work:
> http://groups.google.com/group/linux.debian.bugs.dist/browse_thread/thread/bef8342095751302
>
> What is the difference between these scripts that causes the second one
> to work?
>

The reason is that pacmd is flaky. Sometimes it works, sometimes it
doesn't work. I'm reopening this bug so that the fix shown in the link
you've provided can be used instead.

  affects ubuntu/pulseaudio
  status confirmed
--
Chow Loong Jin

Changed in pulseaudio (Ubuntu):
status: Fix Released → Confirmed
Revision history for this message
Chow Loong Jin (hyperair) wrote :

Here's a debdiff for Jaunty's package.
--
Chow Loong Jin

Revision history for this message
Luke Yelavich (themuso) wrote :

Chow, the user checking/sudo code is still needed, since one call to pactl as root will not suspend all sinks for all users. Please re-do the debdiff replacing the echo/pacmd stuff with the pactl call, and still using the for loop with sudo.

Thanks.

Revision history for this message
Chow Loong Jin (hyperair) wrote :

Actually, forget the previous patch. I just checked, and it doesn't work
unless you run pactl under the said user. This said patch includes a
more robust get_pulse_users() function.
--
Chow Loong Jin

Revision history for this message
Chow Loong Jin (hyperair) wrote :

Revised to use suspend-source as well.
--
Chow Loong Jin

Daniel T Chen (crimsun)
Changed in pulseaudio (Ubuntu):
status: Confirmed → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package pulseaudio - 1:0.9.14-0ubuntu20

---------------
pulseaudio (1:0.9.14-0ubuntu20) jaunty; urgency=low

  * debian/01PulseAudio: use pactl instead of pacmd (LP: #202089)

 -- Daniel T Chen <email address hidden> Wed, 08 Apr 2009 18:54:30 -0400

Changed in pulseaudio (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
Daniel T Chen (crimsun) wrote :

reopening for release team approval

Changed in pulseaudio (Ubuntu):
status: Fix Released → Fix Committed
Revision history for this message
Daniel T Chen (crimsun) wrote :

Changes made to debian/01PulseAudio in the previous upload (1:0.9.14-0ubuntu20) work for the common case where the user has not manually killed the pulseaudio daemon. If, however, the user has killed the pulseaudio daemon, the existing check fails to pick up the new autospawned instance. Fix this corner case by harvesting all instances of pulseaudio.

Revision history for this message
Martin Pitt (pitti) wrote :

Please get it uploaded ASAP, so that we can consider it for post-RC. However, chances are that it gets rejected, and that it needs to become an SRU, if the remaining case is important enough.

Revision history for this message
Steve Langasek (vorlon) wrote :

Sorry, yes, rejecting this for jaunty. I think it's unlikely to warrant an SRU, but we can discuss that if you think it's needed.

Changed in pulseaudio (Ubuntu):
status: Fix Committed → Triaged
Revision history for this message
Martin Pitt (pitti) wrote :

Daniel, can you please upload this to jaunty-proposed as an SRU? (Please note that you can already do this, it just won't get accepted until after Jaunty is released).

Revision history for this message
Martin Pitt (pitti) wrote :

The most common case is fixed in Jaunty/intrepid-updates, and the remaining corner case should be fixed in Karmic.

Daniel, I'm happy to sponsor the debdiff to karmic once it opens.

Changed in pulseaudio (Ubuntu Jaunty):
status: Triaged → Won't Fix
Changed in pulseaudio (Ubuntu):
status: Triaged → Fix Committed
Daniel T Chen (crimsun)
Changed in pulseaudio (Ubuntu Jaunty):
status: Won't Fix → Fix Committed
Revision history for this message
Martin Pitt (pitti) wrote :

Daniel, so you think the remaining case is still important enough for an SRU? Can you please update the bug description accordingly? Thanks!

Revision history for this message
Daniel T Chen (crimsun) wrote :
Daniel T Chen (crimsun)
description: updated
tags: removed: verification-done
Revision history for this message
skflyfish (jpeasley) wrote :

FWIW, while this was an issue when Intrepid came out and Daniels patch corrected it. I have not experienced this issue with Jaunty on my Thinkpad R61.

Revision history for this message
Martin Pitt (pitti) wrote :

Accepted into jaunty-proposed, the package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

tags: added: verification-needed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package pulseaudio - 1:0.9.15-1ubuntu2

---------------
pulseaudio (1:0.9.15-1ubuntu2) karmic; urgency=low

  * debian/01PulseAudio: harvest users more robustly. Thanks,
    Chow Loong Jin <email address hidden>! (LP: #202089)
  * debian/control: pulseaudio depends on pulseaudio-module-hal
    to fix LP: #326532

 -- Daniel T Chen <email address hidden> Thu, 09 Apr 2009 17:03:00 -0400

Changed in pulseaudio (Ubuntu):
status: Fix Committed → Fix Released
Changed in gnome-power-manager (Baltix):
status: New → Invalid
Revision history for this message
Kees Cook (kees) wrote :

This SRU needs to be updated since a security update has been published above the unverified -proposed upload for this bug.

Changed in pulseaudio (Ubuntu Jaunty):
status: Fix Committed → Incomplete
Steve Langasek (vorlon)
Changed in pulseaudio (Ubuntu Jaunty):
status: Incomplete → Triaged
Changed in pulseaudio:
status: New → Fix Released
Revision history for this message
Martin Pitt (pitti) wrote :

Not worth an SRU for Jaunty IMHO.

Changed in pulseaudio (Ubuntu Jaunty):
status: Triaged → Won't Fix
Mathew Hodson (mhodson)
tags: removed: verification-needed
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.