Ubuntu

PulseAudio Sound Server: Failed to connect: Connection refused

Reported by Mario Vukelic on 2008-03-26
42
This bug affects 3 people
Affects Status Importance Assigned to Milestone
pulseaudio (Fedora)
New
Undecided
Unassigned
pulseaudio (Ubuntu)
Undecided
Unassigned
Nominated for Jaunty by Amr El-Sharnoby
Nominated for Karmic by Amr El-Sharnoby

Bug Description

My sound always worked, including after the pulseaudio transition in Hardy. gstreamer-properties sets the default out- and input to pulseaudio, and has done so, sucessfully, for quite a while. After running a full-upgrade on Monday (I had performed none since Friday morning), I noticed that totem-gstreamer had no sound.

Other video players that support pulseaudio (xine, mplayer) have no sound when using pulseaudio either. When I run the test in gstreamer-properties, I see the error message from the subject. When setting gstreamer to Alsa, the test succeeds; xine and mplayer sound is also fine when using alsa.

There are errors in the logs, grep pulse /var/log/* gives:

/var/log/syslog.0:Mar 25 21:26:57 chronic pulseaudio[16432]: alsa-util.c: Error opening PCM device hw:0: Device or resource busy
/var/log/syslog.0:Mar 25 21:26:57 chronic pulseaudio[16432]: module.c: Failed to load module "module-alsa-sink" (argument: "device_id=0 sink_name=alsa_output.pci_8086_27d8_sound_card_0_alsa_playback_0"): initialization failed.

/var/log/user.log:Mar 25 21:26:57 chronic pulseaudio[16432]: alsa-util.c: Error opening PCM device hw:0: Device or resource busy
/var/log/user.log:Mar 25 21:26:57 chronic pulseaudio[16432]: module.c: Failed to load module "module-alsa-sink" (argument: "device_id=0 sink_name=alsa_output.pci_8086_27d8_sound_card_0_alsa_playback_0"): initialization failed.
/var/log/user.log.0:Mar 19 00:02:07 chronic pulseaudio[6789]: shm.c: shm_open() failed: No such file or directory
/var/log/user.log.0:Mar 19 00:02:07 chronic pulseaudio[6789]: pstream.c: Failed to import memory block.
/var/log/user.log.0:Mar 19 18:34:46 chronic pulseaudio[8145]: shm.c: shm_open() failed: No such file or directory
/var/log/user.log.0:Mar 19 18:34:46 chronic pulseaudio[8145]: pstream.c: Failed to import memory block.

lspci:

00:1b.0 Audio device: Intel Corporation 82801G (ICH7 Family) High Definition Audio Controller (rev 01)

Luke Yelavich (themuso) wrote :

It sounds like something else is using alsa, and PulseAudio can't access the sound device, as pulseaudio talks to the hardware directly, instead of using dmix.

Check that you have no other sound related apps running, excluding the mixer applet. One way to do this is to check whether any device nodes are open in /dev/snd.

Mario Vukelic (mario-vukelic) wrote :

I rebooted into gmd, logged in, and checked immediately:

lsof |grep /dev/snd
mixer_app 9232 mario 19u CHR 116,0 12242 /dev/snd/controlC0

ls -l /dev/snd
total 0
crw-rw----+ 1 root audio 116, 0 2008-03-27 19:05 controlC0
crw-rw----+ 1 root audio 116, 4 2008-03-27 19:05 hwC0D0
crw-rw----+ 1 root audio 116, 5 2008-03-27 19:05 hwC0D1
crw-rw----+ 1 root audio 116, 24 2008-03-27 19:05 pcmC0D0c
crw-rw----+ 1 root audio 116, 16 2008-03-27 19:07 pcmC0D0p
crw-rw----+ 1 root audio 116, 30 2008-03-27 19:05 pcmC0D6c
crw-rw----+ 1 root audio 116, 22 2008-03-27 19:05 pcmC0D6p
crw-rw----+ 1 root audio 116, 1 2008-03-27 19:05 seq
crw-rw----+ 1 root audio 116, 33 2008-03-27 19:05 timer

Luke Yelavich (themuso) wrote :

Have you tried removing any files relating to pulseaudio from your home directory?

Try removing any files to do with pulseaudio, and logging in again.

Mario Vukelic (mario-vukelic) wrote :

As you suggested I removed ~/.pulse/* and ~/.pulse-cookie and logged in again. No improvement :(
BTW, I also checked the applicable parts (AFAICT) of https://wiki.ubuntu.com/DebuggingSoundProblems (most is, sadly, about Alsa). E.g., I am a member of the pulse* groups

Jack Wasey (waster) wrote :

In my beta hardy, I had to edit /etc/defaults/pulseaudio to get the server to run. I had already killed mixer applet.

Jack Wasey (waster) wrote :

are the pulse and pulse-access groups important?

Mario Vukelic (mario-vukelic) wrote :

I dunno about the pulse and pulse-access groups, I would think that they are important.

Thanks for the tip with /etc/default/pulseaudio. I did not enable system mode there as the comment in the file recommends against it. However, the comment also mentioned that esd should be enabled in the Sound preferences, and for some reason it wasn't. Checking the "Enable software mixing (esd)" box on the Sounds tab fixed my problem.

Mario Vukelic (mario-vukelic) wrote :

Setting to Invalid as it was just a settings issue.

Changed in pulseaudio:
status: New → Invalid
Eitan Isaacson (eeejay) wrote :

Enabling pulseaudio system-wide is not the right solution.
I'm stumped as to what is causing this. But I can't seem to get pulseaudio working with the hal autodetect module.

Changed in pulseaudio:
status: Invalid → New
Eitan Isaacson (eeejay) wrote :

It seems like my woes were from speech dispatcher blocking the sound device before pulseaudio could get to it. See bug 213755.

By starting pulseaudio system wide it seems that you temporarily circumvented this by starting pulseaudio before speech dispatcher.

Eli L (flclfan) wrote :

I am getting this in Hardy x64 too. It should be fixed!

lordbeedoo (medabeedaa) wrote :

I report same problem in Fedora 9, KDE 4.1. Pulseaudio was working without any problems till last 2 updates, than started to crash randomly.

with

E: shm.c: shm_open() failed: No such file or directory
W: pstream.c: Failed to import memory block.
Soft CPU time limit exhausted, terminating.
Hard CPU time limit exhausted, terminating forcibly.

Adrian Godoy (adrigodoy) wrote :

I am using Ubuntu 8.04 on a x64 architecture. I get sound no problem. My computer freezes when I am watching a video. After inspection of the /var/log/messages file I see that everytime it happens the last messages were:
pulseaudio[6964]: pstream.c: Failed to import memory block.

I will keep an eye on this one so we can get it fixed.

Roland Giesler (lifeboy) wrote :

It's been more than a month now since the previous comment and this problem is still not resolved as far as I can tell. I'm running a fresh install of Ubuntu Hardy 64 and need sound on the machine. I do not want to upgrade to Intrepid since I need the Ubuntu LTS version in this instance.

Anyone have any news or update on this issue?

I have in this machine an onboard soundcard:
00:1b.0 Audio device: Intel Corporation 82801I (ICH9 Family) HD Audio Controller (rev 02)
as well as the following two cards:
08:00.0 Multimedia audio controller: Creative Labs SB Audigy LS
08:01.0 Multimedia controller: Pinnacle Systems Inc. AV/DV Studio Capture Card

Daniel T Chen (crimsun) wrote :

The actual bug here is largely resolved in jaunty's pulseaudio.

Changed in pulseaudio:
status: New → Triaged
Craig73 (funrun73) wrote :

There is no comment here on this ticket as to why this is a duplicate / regardless, I still see this issue in Jaunty with my machine.

alsa-util.c: Error opening PCM device hw:0: Device or resource busy

(investigating the cause)

Niklas M (niklas-mattisson) wrote :

The /etc/default/pulseaudio helped me also to get my sound back.

Can you be more specific? I don't see anything in /etc/default/pulseaudio
that would seem applicable to this, and I also don't see how this ALSA vs
Pulse conflict has anything to do with 228487's Wine vs ALSA conflict. I
don't even use wine and can reliably invoke this bug simply by running
mplayer plugin within Firefox

On Tue, Aug 11, 2009 at 10:09 AM, Niklas M <email address hidden>wrote:

> *** This bug is a duplicate of bug 228487 ***
> https://bugs.launchpad.net/bugs/228487
>
> The /etc/default/pulseaudio helped me also to get my sound back.
>
>

Niklas M (niklas-mattisson) wrote :

No problem I will try to explain:

The sound problem I had was that after upgrade to version: 1:0.9.16~test4-0ubuntu4

I got Failed to connect: Connection refused.

All the files could play (video and sound files) but no sound since no mixer and/or pulseaudio was not available.

Everything in the pulseaudio mixer was marked as: n/a

lspci -v (as user and as sudo) gave me the same result with the sound card recognized. However no sound in _anything_ but files where playing.

I then tested to change the value:
PULSEAUDIO_SYSTEM_START=0

to be =1 instead and rebooted the machine.

And the sound came back. Mixer and everything came back. The pulseaudio manager now also shows the information for the soundcard and mixer.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers