[hardy] pulseaudio lacking proper access

Bug #175028 reported by Kow
This bug report is a duplicate of:  Bug #83137: pulseaudio not in group pulse-rt. Edit Remove
30
Affects Status Importance Assigned to Milestone
pulseaudio (Ubuntu)
Confirmed
Low
Unassigned

Bug Description

Binary package hint: pulseaudio

It looks like pulseaudio is trying to run in real-time/high-priority. I'm not sure whether it is supposed to be or not but it is definitely specified in the rc5.d init file for pulseaudio. If it is supposed to be then it is not getting proper access from PolicyKit. This renders pulseaudio unusable.
Dec 8 21:56:48 CSC-KDRAKE-002 pulseaudio[7716]: main.c: Called SUID root and real-time/high-priority scheduling was requested in the configuration. However, we lack the necessary priviliges:
Dec 8 21:56:48 CSC-KDRAKE-002 pulseaudio[7716]: main.c: We are not in group 'pulse-rt' and PolicyKit refuse to grant us priviliges. Dropping SUID again.
Dec 8 21:56:48 CSC-KDRAKE-002 pulseaudio[7716]: 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.
Dec 8 21:56:48 CSC-KDRAKE-002 pulseaudio[7716]: pid.c: Daemon already running.
Dec 8 21:56:48 CSC-KDRAKE-002 pulseaudio[7716]: main.c: pa_pid_file_create() failed.

That is just a snippet of the entire syslog. Everytime pulseaudio is utilized this message is dumped into syslog (and pulseaudio doesn't work.) If I try to play anything in System->Preferences->Sounds nothing happens. This started since the 0.9.8 upgrade on the 6th.

Revision history for this message
Kow (kow) wrote :

If I downgrade to 0.9.6 everything is dandy. The init scripts are the same so I'm guessing this is a permissions issue somewhere else.

Revision history for this message
Daniel T Chen (crimsun) wrote :

Please _purge_ all PulseAudio-related packages, then use aptitude to reinstall pulseaudio-esound-compat and pulseaudio-module-gconf. Then, log out of GNOME, and make sure there are no instances of the PulseAudio daemon running. Afterward, remove /tmp/.esd* .

Note that it is recommended that you do _not_ configure PulseAudio to run as a system-wide daemon but instead use the per-user session option by enabling Software sound mixing in GNOME's System> Preferences> Sound menu.

Finally, make sure you're using 0.9.8-1ubuntu3.

As a note, on both dist-upgrades from gutsy and on a clean hardy alpha 1 dist-upgraded to current, I am unable to reproduce your inability to use PulseAudio while not in the 'pulse-rt' group.

Changed in pulseaudio:
importance: Undecided → Low
status: New → Incomplete
Revision history for this message
Warren Uniewski (wrnu) wrote :

I am having the same problem (and sys log entries after running flash video) with one of the symptoms being no sound in flash video. The sound does seem to work with all other applications that I have tried, so this may be that flash-nonfree is not setup to work properly with pulseaudio on Hardy.

Revision history for this message
Kow (kow) wrote :

I did what Daniel mentioned several times already, but this time I also removed libpulse0. There were no .esd* files /tmp/. I reinstalled and still the exact same problem.

Revision history for this message
Kow (kow) wrote :

Okay, still no go. I did find one error with the packaging though: pulseaudio-esound-compat needs to depend on pulseaudio but it does not. You need the pulseaudio package for ESD compatibility to work. :)

Revision history for this message
Kow (kow) wrote :

Here is the error if I run pulseaudio from the terminal (I disabled pulseaudio from starting init'ing).

$pulseaudio
N: main.c: Called SUID root and real-time/high-priority scheduling was requested in the configuration. However, we lack the necessary priviliges:
N: main.c: We are not in group 'pulse-rt' and PolicyKit refuse to grant us priviliges. Dropping SUID again.
N: 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.
W: main.c: setrlimit(RLIMIT_NICE, (31, 31)) failed: Operation not permitted
W: main.c: setrlimit(RLIMIT_RTPRIO, (9, 9)) failed: Operation not permitted
E: module-gconf.c: Unable to read or parse data from client.

Revision history for this message
Kow (kow) wrote :

It works if I run it system-wide but this is not proper:
$sudo pulseaudio --system
W: main.c: setrlimit(RLIMIT_NICE, (31, 31)) failed: Operation not permitted
W: main.c: setrlimit(RLIMIT_RTPRIO, (9, 9)) failed: Operation not permitted

Revision history for this message
Kow (kow) wrote :

pulseaudio --dump-conf
N: main.c: Called SUID root and real-time/high-priority scheduling was requested in the configuration. However, we lack the necessary priviliges:
N: main.c: We are not in group 'pulse-rt' and PolicyKit refuse to grant us priviliges. Dropping SUID again.
N: 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.
### Read from configuration file: /etc/pulse/daemon.conf ###
daemonize = no
fail = yes
high-priority = no
nice-level = -11
realtime-scheduling = no
realtime-priority = 5
disallow-module-loading = no
use-pid-file = yes
system-instance = no
no-cpu-limit = no
disable-shm = no
exit-idle-time = -1
module-idle-time = 20
scache-idle-time = 20
dl-search-path = /usr/lib/pulse-0.9/modules/
default-script-file = /etc/pulse/default.pa
log-target = auto
log-level = notice
resample-method = auto
disable-remixing = no
default-sample-format = s16le
default-sample-rate = 44100
default-sample-channels = 2
default-fragments = 4
default-fragment-size-msec = 25
rlimit-as = -1
rlimit-core = -1
rlimit-data = -1
rlimit-fsize = -1
rlimit-nofile = 256
rlimit-stack = -1
rlimit-nproc = -1
rlimit-memlock = -1
rlimit-nice = -1
rlimit-rtprio = -1

Why is real-time processing trying to be used when the config file says otherwise?

Revision history for this message
Kow (kow) wrote :

Finally, if pulseaudio is not supposed to be run as a system wide daemon then, why in /etc/rc5.d/S25pulseaudio do I see this:

start-stop-daemon -x $DAEMON -p $PIDFILE --start -- --system --daemonize --high-priority --log-target=syslog --disallow-modules-loading=$DISALLOW_MODULE_LOADING

That tells pulseaudio to run system-wide.

Revision history for this message
Kow (kow) wrote :

Okay first of all the reason the sound wasn't working was due to LP #108577 but I'll leave those details to that bug report. However, I was only able to fix this problem by adding me (user) to pulse-rt. I'm still trying to figure out why pulseaudio is trying to run with high-priority and/or realtime when it is specifically disabled in the config. I know when run from the init scripts (going into runlevel5) it runs per command line (see above comment) as high-priority. However, if I try running pulseaudio from the command line I still get the same result. I'll look into this a little more to verify but a program is supposed to obey the configuration unless a command-line parameter specifically says otherwise. Also I'll take this time to ask, why is pulseaudio not being built with PolicyKit support yet? pulseaudio has the policy file @ src/daemon/PulseAudio.policy but from what I can tell pulseaudio is being built without PolicyKit support. I say this because if you run the latest pulseaudio ubuntu version with log-level set to debug I don't see any of the pa_log_info's in src/daemon/main.c around lines 420-430. Maybe PolKit support is being built but pulseaudio is not finding it on the system? I'm not sure if what is happening is happening intentionally but I will point it out just in case this is not supposed to be happening the way it is.

Revision history for this message
marcobra (Marco Braida) (marcobra) wrote :

Same problem here... adding my user to group 'pulse-rt' don't solve this issue...
I add this comment only for infos purpose...

Thank you.

Revision history for this message
Harvey Muller (hlmuller) wrote :

Daniel,

My logs are littered with the same messages Kow initially reported. The pulseaudio version that is installed is the same that you identified above. I am going test your instructions to see if that eliminates the issue naturally. I will report the results later.

All I have done is install hardy desktop amd64 from the 20071218 daily, and applied updates that were available, and have not made any modifications to the sound system as installed.

You commented earlier that pulseaudio should not be configured to run as a system-wide daemon, but I have noticed that this is indeed how the system is starting it. Please see the attachment, /etc/init.d/pulseaudio.

Best regards,

Harvey

Revision history for this message
Harvey Muller (hlmuller) wrote :

Daniel,

The fix appears to be relatively simple. I don't know if it's the best fix, but it is sufficient for me:

https://bugs.launchpad.net/ubuntu/+source/pulseaudio/+bug/108577/comments/11

Best regards,

Harvey

Revision history for this message
Harvey Muller (hlmuller) wrote :

Daniel,

I just realized that I pasted the wrong link. Here's the correct one:

https://bugs.launchpad.net/ubuntu/+source/pulseaudio/+bug/108577/comments/12

If you have additional questions or requests for information, they will be answered promptly.
ey
Harv

Revision history for this message
Fred (frederic-lespez) wrote :

I can confirm this bug on a fresh Hardy Alpha2 install.

Revision history for this message
Tux (peter-hoogkamer) wrote :

I can confirm this bug on a fresh Hardy Alpha 2 install.
Dell Inspiron 6400
Intel dual core processor
Kernel 2.6.24-2
If you want information or tests, I'll be glad to help.

Peter

Revision history for this message
Tux (peter-hoogkamer) wrote :

Adding myself to the pulse-rt group works for me. I have sound, but /var/log/messages gives me:
Dec 28 21:28:17 HK-PH pulseaudio[5974]: main.c: setrlimit(RLIMIT_NICE, (31, 31)) failed: Operation not permitted
Dec 28 21:28:17 HK-PH pulseaudio[5974]: main.c: setrlimit(RLIMIT_RTPRIO, (9, 9)) failed: Operation not permitted

I will try the solution from Harvey.

Peter

Revision history for this message
David Filiatrault (david-filiatrault) wrote :

I too confirm this bug on a fresh Hardy Alpha2 install.

Changed in pulseaudio:
status: Incomplete → New
Revision history for this message
Ralph Wabel (rwabel) wrote :

same here, but sound is good. Therefore it's not a big deal for me. However it floods the log. Hope there will be a patch soon

Fred (frederic-lespez)
Changed in pulseaudio:
status: New → Confirmed
Revision history for this message
Cleber Santz (clebersantz) wrote :

same here, upgrade Gusty to Hardy(2.6.24-2-generic) using "update-manager -d" after that alsamixer PCM is very high (bad sound) and message "We are not in group 'pulse-rt' and PolicyKit refuse to grant us priviliges" appers every time.

Revision history for this message
Daniel T Chen (crimsun) wrote :

Marking as a dupe. After discussion with Sjoerd, I'll work on changing the warnings to notifys and clarify the need for RT/high-prior isn't the common case.

Revision history for this message
Oliver Joos (oliver-joos) wrote :

A solution for 9.10 (Karmic) is comment #12 and #13 of https://bugs.launchpad.net/bugs/265010

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

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.