Pulseaudio must die! (How I killed it)

I’ve never got on with pulseaudio, although I’ve tried because it’s “the future”.

Some weeks ago, I noticed MPlayer complaining with either a waitpid() error or not being able to find /etc/alsa-pulse.conf, thus:

E: context.c: waitpid(): No child processes 

[AO_ALSA] alsa-lib: conf.c:3009:(snd_config_update_r) Cannot access file /etc/alsa-pulse.conf
[AO_ALSA] alsa-lib: pcm.c:2205:(snd_pcm_open_noupdate) Unknown PCM default                   
[AO_ALSA] Playback open error: No such file or directory 

So I installed pulseaudio to fix it. Since then, my sound has had random mutes, pops, clicks, thuds. I tried uninstalling pulseaudio, and building MPlayer from SVN with --disable-pulse, but the original complaints from MPlayer reappeared.

To cut a long story short, look in here

PulseAudio - openSUSE

To make all applications that support alsa but not pulseaudio to play sound via pulseaudio you need to install alsa-plugins-pulse (as well as the 32bit package if you are on 64bit) and set the following environment variable:

 export ALSA_CONFIG_PATH=/etc/alsa-pulse.conf

**In a GNOME session this variable is set by default.**

Yes, I use Gnome, unset ALSA_CONFIG_PATH and my alsa audio works in MPlayer without pulseaudio.

I’m posting this advice to tempt fate.

The culprit is /usr/bin/gnome

# TODO: look for a better fix for 11.1
export SDL_AUDIODRIVER=pulse
if test -f /etc/alsa-pulse.conf ; then
  export ALSA_CONFIG_PATH=/etc/alsa-pulse.conf
fi

The TODO is a dead giveaway.

It forces SDL to use pulse whether or not pulse is running, which is naughty.

If a user disables pulseaudio by uninstalling, and removes /etc/alsa-pulse.conf, MPlayer barfs because the environment variable remains set.

It doesn’t help that the file is installed with the alsa plugins rpm, because when it’s present without pulseaudio, weird things happen too.

Never mind, I’ve done worse things myself. It’s good to know why things go wrong though.

On Mon, 21 Sep 2009 17:46:01 GMT, KJ44
<KJ44@no-mx.forums.opensuse.org> wrote:

>
>The culprit is /usr/bin/gnome
>
>
>Code:
>--------------------
> # TODO: look for a better fix for 11.1
> export SDL_AUDIODRIVER=pulse
> if test -f /etc/alsa-pulse.conf ; then
> export ALSA_CONFIG_PATH=/etc/alsa-pulse.conf
> fi
>
>--------------------
>
>
>The TODO is a dead giveaway.
>
>It forces SDL to use pulse whether or not pulse is running, which is
>naughty.
>
>If a user disables pulseaudio by uninstalling, and removes
>/etc/alsa-pulse.conf, MPlayer barfs because the environment variable
>remains set.
>
>It doesn’t help that the file is installed with the alsa plugins rpm,
>because when it’s present without pulseaudio, weird things happen too.
>
>Never mind, I’ve done worse things myself. It’s good to know why things
>go wrong though.

It has been pretty clear for months that pulse audio is NOT ready for
prime time. Pulling stunts like this in order to get the bug reports
that they could have prevented by doing proper source inspection and
other methods makes clear the kind of personalities we are dealing
with.

+1

I had nightmares with Pulseaudio when I first had openSUSE 11.0 on the desktop. The simplest solution is to bar it from ever touching your system. Is it really supposed to be the future??

To be fair, my reading of the comments in the file are that these changes were added by openSUSE people, not the pulseaudio people, because the comments (visible in an earlier post) mention 11.1 - which I read to mean openSUSE.

I’m critical of those changes, but let’s not point the finger of blame unfairly. Making allegation about “personalities” seems to me to be harsh and unfounded.