Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 199507

Summary: media-sound/pulseaudio-0.9.7 esd wrapper doesn't work
Product: Gentoo Linux Reporter: mimmo riccio <muehuehu>
Component: [OLD] GNOMEAssignee: Gentoo Sound Team <sound>
Severity: normal CC: gnome, muehuehu, srrijkers
Priority: High    
Version: unspecified   
Hardware: x86   
OS: Linux   
Package list:
Runtime testing required: ---

Description mimmo riccio 2007-11-18 10:27:45 UTC
Trying to make pulseaudio the default sound server for all the programs that use sound, i found that gnome esd sounds dont work.

Reproducible: Always

Steps to Reproduce:
1.start a pulseaudio server(i prefer system wide, but user can too): 
pulseaudio --log-level=debug --system pulseaudio as default esd wrapper (with eselect or linking /usr/bin/esd to /usr/bin/esdcompat):
#eselect esd list
Available ESounD implementations:
  [1]   ESounD original
  [2]   PulseAudio *
# eselect esd set 2

3.try to play a .wav file with esdplay, e.g. : 
esdplay usr/share/sounds/login.wav

Actual Results:  
output of esdplay /usr/share/sounds/login.wav:
esdplay: pcm_params.c:2351: sndrv_pcm_hw_params: Assertion `err >= 0' failed.

Expected Results:  
It should have played sound.

The server itself works great, only gnome sounds cant be played.
Ekerazha reported this bug on the Pulseaudio website (here's the link ), i just quote the guy to whom the bug was assigned:

"Please report this issue to the gentoo bugzilla: if they decided to patch esd to use a non-standard socket dir, then they should be patching PA the same way too.

I am closing this bug now as this seems to be a configuration error, and very likely specific to Gentoo (or Ubuntu)"

Tanke has uploaded a strace:

Thanks for attention. Be kind to me, it's my first bug submission, feel free to ask more info if needed.
Comment 1 Gilles Dartiguelongue gentoo-dev 2007-11-18 11:04:48 UTC
just a note that esound by itself works perfectly here.
I'll try to see if I can get pulseaudio to work for me but I know that remi got it working.

@remi, shime in please :)
Comment 2 Rémi Cardona gentoo-dev 2007-11-19 07:39:39 UTC
A couple things :

1) Please look at /usr/portage/<category>/<package>/metadata.xml before assigning bugs :) it makes everyone's life easier, and bugs will get fixed faster. Reassigning to sound.

2) I specifically don't use the esd wrapper, in fact I disabled the esd module in my I use gst-plugins-pulse for all gnome applications. As for system sounds (login, logout, ...) I don't use them. Daniel (dang) recently patched nautilus and it now uses gstreamer for sound previews. So that should work without esd.

My advice, try to use native pulseaudio output in your applications whenever possible.

@sound, this one's for you :)

Thanks for your bug report.
Comment 3 srrijkers 2007-12-03 20:53:27 UTC
Have you tried using

load-module module-esound-protocol-unix socket="/tmp/.esd/socket"

to start the esound protocol? It's what debian does, and fixed the problem for me.

Gathering from the debian esound changelog the socket's location has been bumped around between esound releases, with the most recent change being: 

* esound socket has moved back to /tmp/.esd, to be binary compatible with other distributions.

The strace the gentoo user posted at the pulseaudio site shows that esdplay is indeed looking for the socket at /tmp/.esd/socket.

Ubuntu patches esound to use a 'multi-user-friendly' socket dir. See the patch at and the discussion at debian bug #147532.

To summarise my incoherent babbling: pulseaudio seems to create the esound socket at /tmp/.esd-${UID}/socket by default. However, esound applications, by default, expect it to be at /tmp/.esd/socket. This seems to be what causes the problem.
Comment 4 srrijkers 2007-12-03 21:05:18 UTC
Ugh, that should be

Also, please let me add that it seems like the pulseaudio dev is mistaken. For it seems like gentoo *is* in fact using the 'standard' socket dir, just like debian.
Comment 5 mimmo riccio 2007-12-04 18:55:34 UTC
dear Sebastian, i love you! :D
i modified the line in /etc/pulse/
load-module module-esound-protocol-unix

load-module module-esound-protocol-unix socket="/tmp/.esd/socket"

as you suggested. 
Then i restarted the pulseaudio boot script.
Now playing a sound with esdplay works as root.
The error:
esdplay: pcm_params.c:2351: sndrv_pcm_hw_params: Assertion `err >= 0' failed.

still happens for non-root users.

I use pulseaudio as a system wide daemon. Maybe i should try in user mode, shouldn't I? Guess it's a permissions' issue now...

Glad we are getting close to the solution, so sorry if I bother you again but - I love you :D

Comment 6 mimmo riccio 2007-12-04 23:46:18 UTC
My user should be able to connect to esd socket, because:
mimmo@gentoobox ~ $ groups mimmo
wheel audio cdrom video cdrw plugdev pulse-access pulse mimmo

mimmo@gentoobox ~ $ ls -l /tmp/.esd/socket 
srwxrwxrwx 1 pulse pulse 0  4 dic 20:02 /tmp/.esd/socket

but still get the error trying to play a sound on esd wrapper.

mimmo@gentoobox ~ $ esdplay /usr/share/sounds/login.wav 
esdplay: pcm_params.c:2351: sndrv_pcm_hw_params: Assertion `err >= 0' failed.

Any ideas?
Thanks for your time and your patience :)
Comment 7 Jürgen Geuter 2007-12-06 10:07:38 UTC
To access esd you seem to need the file .esd_auth from /var/run/pulse in your home dir. The problem is that that file is -rw-------  1 pulse pulse so you cannot just symlink it (your user needs to be able to read it)
Comment 8 Jürgen Geuter 2007-12-06 10:11:42 UTC
Sorry for the double post but this: is the corresponding website. The .esd_auth file problem only exists for the system-wide daemon, if it's started by the user that problem is solved automatically cause the user owns the .esd_auth file that is then created in his/her ~.
Comment 9 Diego Elio Pettenò (RETIRED) gentoo-dev 2007-12-06 16:40:20 UTC
The ebuild warns you about esound and systemwide. But indeed there is a regression in PulseAudio 0.9.8, I'll take care of it upstream and downstream now, just need to find a way to call the configure switch.

Comment 10 Diego Elio Pettenò (RETIRED) gentoo-dev 2007-12-06 17:36:12 UTC
Fixed on Gentoo, I'll commit upstream after talking with Lennart.

Comment 11 mimmo riccio 2007-12-07 14:39:43 UTC
Thx for advices... i just fixed in this way:

$ ln -sf /var/run/pulse/.esd_auth ~/.esd_auth

but i had to make that file readable by user:
# chmod +r /var/run/pulse/.esd_auth

guess this file is created every boot, isnt it?
thanks anyway, now all works perfectly.