Bug 413911 - no sound, perhaps because pulseaudio, perhaps because it holds /dev/snd/pcmC0D0p in futex
no sound, perhaps because pulseaudio, perhaps because it holds /dev/snd/pcmC...
Status: CLOSED NOTABUG
Product: Fedora
Classification: Fedora
Component: pulseaudio (Show other bugs)
8
i386 Linux
low Severity low
: ---
: ---
Assigned To: Lennart Poettering
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2007-12-06 08:31 EST by Mads Kiilerich
Modified: 2008-02-29 04:34 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-02-29 04:34:03 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Mads Kiilerich 2007-12-06 08:31:19 EST
Description of problem:
Sound "suddenly" stopped working.

This seems related to bug 395581, and the problems is mentioned briefly on
395581#3. But I just saw it on a un-suspended machine, so it is different.

Version-Release number of selected component (if applicable):
pulseaudio-0.9.7-0.17.svn20071017.fc8

How reproducible:
Seen occasionally

Steps to Reproduce:
1. Run firefox with flash and rhythmbox and be (im)patient...
2.
3.
  
Actual results:
Sound not working in flash, rhythmbox and mplayer
mplayer says 
[AO_ALSA] alsa-lib: pcm_hw.c:1099:(snd_pcm_hw_open) open /dev/snd/pcmC0D0p
failed: Device or resource busy
[AO_ALSA] alsa-lib: pcm_dmix.c:866:(snd_pcm_dmix_open) unable to open slave
[AO_ALSA] Playback open error: Device or resource busy
Could not open/initialize audio device -> no sound.

lsof /dev/snd/pcmC0D0p showed that a pulseaudio binary had opened the file.
strace on the process showed that it was waiting in a futex. (I lost the exact
output...) (I don't understand the exact role of pulseaudio yet...)

getfacl /dev/snd/pcmC0D0p showed the right acls.


Expected results:
Working sound...

Additional info:
kill -9 on the pulseaudio process made sound work again.
Comment 1 Lubomir Kundrak 2007-12-20 06:19:11 EST
mplayer should not have attempted to open the device directly. In case you need
to use the ALSA output, ensure uou have the following in /etc/asound.conf or
/etc/alsa/pulse-default.conf:

# pulseaudio plugin configuration

pcm.!default {
    type pulse
}

ctl.!default {
    type pulse
}

and the package alsa-plugins-pulseaudio installed. For plash, be sure to have
libflashsupport installed. For rhythmbox, pulseaudio gstreamer sink should work:

Please look into System->Preferences->Hardware->Sound to see which output do you
use. If you convigure ALSA as described above, Default and ALSA should, and also
Pulseaudio.

If you are not sure about your setting, please attach the output of
$ gconftool-2 --dump /system/gstreamer/0.10/default

Did the above resolve the situation for you?
Comment 2 Mads Kiilerich 2007-12-20 07:29:58 EST
I am (was) confused by the fact that it "usually" works, but has been seen to
suddenly stop working. That led me to search for a solution other places than
you suggest. 

I did not have alsa-plugins-pulseaudio installed. Installing it gives the
/etc/alsa/pulse-default.conf you mentioned and makes for example mplayer depend
on a running pulseaudio. Does that mean that for F8 all applications that use
ALSA should have a dependency to alsa-plugins-pulseaudio in order to get sound
working the F8 way?

GStreamer Sound playback was set explicitly to my USB sound device. Ok; setting
it to autodetect changes it to work iff pulseaudio is running. 

Apparently the problem came because both ALSA and gstreamer was configured to
NOT use pulse and then pulseaudio had been started somehow, and that stopped sound.

On my machine pulseaudio usually isn't started, even though I have seen it
running, so someone must have started it. What and who is responsible for
starting pulseaudio?

To wrap my problems up:
- Missing alsa-plugins-pulseaudio
- pulseaudio not started
- Incorrect-but-working sound configuration


My questions and confusion shows that I don't understand the new pulse-centered
Fedora sound architecture good enough. Apparently many things can go wrong and
are hard to trace. Together that makes small problems look like bugs. But I hope
this report can help improving the system so that small problems doesn't look
like bugs ;-)
Comment 3 Lubomir Kundrak 2007-12-20 09:32:45 EST
(In reply to comment #2)
> Does that mean that for F8 all applications that use
> ALSA should have a dependency to alsa-plugins-pulseaudio in order to get sound
> working the F8 way?

No. ALSA can be used without pulseaudio. It just needs the user to be more
careful in respect that he understands why is he bypassing pulseaudio.

> On my machine pulseaudio usually isn't started, even though I have seen it
> running, so someone must have started it. What and who is responsible for
> starting pulseaudio?

Do you use gnome? It is by default the part of your session.
(System->Preferences->Personal->Sessions).

> My questions and confusion shows that I don't understand the new pulse-centered
> Fedora sound architecture good enough. Apparently many things can go wrong and
> are hard to trace. Together that makes small problems look like bugs. But I hope
> this report can help improving the system so that small problems doesn't look
> like bugs ;-)

Well, if you don't understand pulseaudio-centric architecture, I wonder how did
you end up without the ALSA plugin. It is there for gstreamer/pulseaudio unaware
ALSA applications to just work.
Comment 4 Mads Kiilerich 2008-01-01 13:33:28 EST
I don't know how I ended up without alsa plugin, but perhaps I can find out.
What should have trigged installation of it? I can't find any rpm dependencies
to it. 

And what should have put pulseaudio in my gnome session?
Comment 5 Mads Kiilerich 2008-01-06 17:57:25 EST
For the reference, in
https://www.redhat.com/archives/fedora-devel-list/2007-December/msg00758.html
and subthread (where Lennart bravely and patiently explains what is going on)
and the referenced bug 425501 I almost got an explanation of how pulseaudio is
started in F8: PulseAudio is started in place of ESD.
AFAICS what is started in session is only pulseaudio-module-x11 "X11 bell and
security modules for the PulseAudio sound server."

The cause of my problems seems to have been that I hadn't run "yum groupinstall
sound-and-video" when upgrading to F8.

It would have been nice if package dependencies alone could have done it, but I
understand that that would have made Fedora very inflexible.

So this is Not-A-Bug, but just a new strong sub-system with a complex
introduction/upgrade path.

Note You need to log in before you can comment on or make changes to this bug.