Bug 442961

Summary: PULSEAUDIO: Unable to connect: Connection refused
Product: [Fedora] Fedora Reporter: Suman Chakrabarty <chakrabarty.suman>
Component: alsa-libAssignee: Jaroslav Kysela <jkysela>
Status: CLOSED WONTFIX QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: low    
Version: 8CC: pierre-bugzilla
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-09-29 06:45:33 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Screen output of 'pulseaudio -vvv' followed by Ctrl-C
none
Output of 'strace pulseaudio -vvv' followed by Ctrl-C none

Description Suman Chakrabarty 2008-04-17 21:13:36 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.8.1.13) Gecko/20080325 Fedora/2.0.0.13-1.fc8 Firefox/2.0.0.13

Description of problem:
When I try to use any audio/video player, e.g. xine, I get the following error message:

*** PULSEAUDIO: Unable to connect: Connection refused

The video works fine. Somehow Amarok generates sound (xine engine), but shows the same error in terminal!

Sound Card detection works fine.

gnome-sound-properties works only with OSS. With PulseAudio, it gives following error message:

sound-properties-Message: Error running pipeline 'audiotestsrc wave=sine freq=512 ! audioconvert ! audioresample ! gconfaudiosink': Internal GStreamer error: state change failed.  Please file a bug at http://bugzilla.gnome.org/enter_bug.cgi?product=GStreamer. [gstswitchsink.c(155): gst_switch_commit_new_kid (): /pipeline1/gconfaudiosink1:
Failed to set state on new child.]

Version-Release number of selected component (if applicable):
pulseaudio-0.9.8-5.fc8

How reproducible:
Always


Steps to Reproduce:
1. Try to connect to pulse audio using any audio device.


Actual Results:


Expected Results:


Additional info:

Comment 1 Lubomir Kundrak 2008-04-18 07:36:26 UTC
http://fedoraproject.org/wiki/LubomirKundrak/SoundTroubleshooting

Seems like pulseaudio sound server is not running. Please try to launch it
manually. Do you use Gnome?

Comment 2 Suman Chakrabarty 2008-04-18 11:33:14 UTC
Yes, I am using Gnome. But I can reproduce the problem in KDE as well. I find
that pulseaudio server is running using:  ps aux |grep pulseaudio

Output:
suman     7975  0.0  0.2 219944  4452 ?        Sl   15:55   0:02
/usr/bin/pulseaudio --log-target=syslog

There are some error messages in: grep pulseaudio /var/log/messages

Last part of the output:
Apr 18 15:55:52 matrix pulseaudio[7975]: polkit.c: Failed to show grant dialog:
Unable to lookup exe for caller
Apr 18 15:55:52 matrix pulseaudio[7975]: polkit.c: PolicyKit responded with
'auth_admin_keep_always'
Apr 18 15:55:52 matrix pulseaudio[7975]: main.c: Called SUID root and
real-time/high-priority scheduling was requested in the configuration. However,
we lack the necessary priviliges:
Apr 18 15:55:52 matrix pulseaudio[7975]: main.c: We are not in group 'pulse-rt'
and PolicyKit refuse to grant us priviliges. Dropping SUID again.
Apr 18 15:55:52 matrix pulseaudio[7975]: main.c: For enabling real-time
scheduling please acquire the appropriate PolicyKit priviliges, or become a
member of 'pulse-rt', or increase the RLIMIT_NICE/RLIMIT_RTPRIO resource limits
for this user.
Apr 18 15:55:52 matrix pulseaudio[7975]: main.c: setrlimit(RLIMIT_NICE, (31,
31)) failed: Operation not permitted
Apr 18 15:55:52 matrix pulseaudio[7975]: main.c: setrlimit(RLIMIT_RTPRIO, (9,
9)) failed: Operation not permitted
Apr 18 15:55:52 matrix pulseaudio[7975]: alsa-util.c: Error opening PCM device
hw:0: No such file or directory
Apr 18 15:55:52 matrix pulseaudio[7975]: module.c: Failed to load  module
"module-alsa-sink" (argument: "device_id=0
sink_name=alsa_output.pci_8086_293e_alsa_playback_0"): initialization failed.


Is it any problem due to SELinux? What do you suggest me to look at?

Comment 3 Suman Chakrabarty 2008-04-18 11:39:59 UTC
By the way, the user (suman) is not a local user. The machine shares users with
a YP server (NIS). Can that be a source for this permission problem? How to
rectify it then?

Comment 4 Lubomir Kundrak 2008-04-18 13:57:27 UTC
NIS-users are de-facto local users. Do you log at the machine remotely, or you
are an active console user?
(Hint: Look at the document linked above for ck-list-sessions)

Comment 5 Suman Chakrabarty 2008-04-18 21:40:11 UTC
Created attachment 302943 [details]
Screen output of 'pulseaudio -vvv' followed by Ctrl-C

Comment 6 Suman Chakrabarty 2008-04-18 21:40:53 UTC
Yes, I am an active console user. Here are some of the outputs:
============================================================================
[suman@matrix ~]$ getfacl /dev/snd/pcmC0D0c
getfacl: Removing leading '/' from absolute path names
# file: dev/snd/pcmC0D0c
# owner: root
# group: root
user::rw-
user:suman:rw-
group::rw-
mask::rw-
other::---
=============================================================================
[suman@matrix ~]$ ck-list-sessions
Session1:
        uid = '507'
        realname = ''
        seat = 'Seat1'
        session-type = ''
        active = TRUE
        x11-display = ':0'
        x11-display-device = '/dev/tty7'
        display-device = ''
        remote-host-name = ''
        is-local = TRUE
        on-since = '2008-04-18T10:25:50Z'
=============================================================================
[suman@matrix ~]$ aplay -D hw:0 /usr/share/sounds/startup3.wav 
aplay: main:546: audio open error: No such file or directory
=============================================================================
The screen output of pulseaudio -vvv is being added as attachment
(pulseaudio.log). I had to use Ctrl-C to stop since it hanged.
=============================================================================
[root@matrix ~]# grep pulseaudio /var/log/messages

(last few lines ...)

Apr 18 15:55:52 matrix pulseaudio[7975]: polkit.c: Failed to show grant dialog:
Unable to lookup exe for caller
Apr 18 15:55:52 matrix pulseaudio[7975]: polkit.c: PolicyKit responded with
'auth_admin_keep_always'
Apr 18 15:55:52 matrix pulseaudio[7975]: main.c: Called SUID root and
real-time/high-priority scheduling was requested in the configuration. However,
we lack the necessary priviliges:
Apr 18 15:55:52 matrix pulseaudio[7975]: main.c: We are not in group 'pulse-rt'
and PolicyKit refuse to grant us priviliges. Dropping SUID again.
Apr 18 15:55:52 matrix pulseaudio[7975]: main.c: For enabling real-time
scheduling please acquire the appropriate PolicyKit priviliges, or become a
member of 'pulse-rt', or increase the RLIMIT_NICE/RLIMIT_RTPRIO resource limits
for this user.
Apr 18 15:55:52 matrix pulseaudio[7975]: main.c: setrlimit(RLIMIT_NICE, (31,
31)) failed: Operation not permitted
Apr 18 15:55:52 matrix pulseaudio[7975]: main.c: setrlimit(RLIMIT_RTPRIO, (9,
9)) failed: Operation not permitted
Apr 18 15:55:52 matrix pulseaudio[7975]: alsa-util.c: Error opening PCM device
hw:0: No such file or directory
Apr 18 15:55:52 matrix pulseaudio[7975]: module.c: Failed to load  module
"module-alsa-sink" (argument: "device_id=0
sink_name=alsa_output.pci_8086_293e_alsa_playback_0"): initialization failed.
================================================================================

Comment 7 Lubomir Kundrak 2008-04-18 21:50:43 UTC
Apr 18 15:55:52 matrix pulseaudio[7975]: alsa-util.c: Error opening PCM device
hw:0: No such file or directory

I am wondering if you can strace pulseaudio -vvv and attach the output here?

Comment 8 Suman Chakrabarty 2008-04-18 22:06:26 UTC
Created attachment 302949 [details]
Output of 'strace pulseaudio -vvv' followed by Ctrl-C

Comment 9 Lennart Poettering 2008-06-04 12:05:24 UTC
open("/dev/snd/pcmC0D2p", O_RDWR|O_NONBLOCK) = -1 ENOENT (No such file or directory)


Hmm, seems to be some alsa problem when we try to open hw:0. Reassigning.


Comment 10 Martin Stransky 2008-06-04 12:18:57 UTC
Please try "aplay -D hw:0,0 /usr/share/sounds/startup3.wav"

/dev/snd/pcmC0D2p is hw:0,2 (maybe a digital output?)

Comment 11 Martin Stransky 2008-06-04 12:21:11 UTC
anyway, please attach output of "aplay -l"

Comment 12 Jaroslav Kysela 2008-09-29 06:45:33 UTC
No response from reporter.