I’m really confused, because polkit tells me I can be granted permission, and I’m in the proper groups, but pulseaudio tells me I can’t get permission…hmm. I wanted to see if anybody else had this problem / knew of a solution / isolate whether it is a pulseaudio, policykit, whatever problem, before I post a bug upstream.
[Sun 07:25 AM] ~ $ rpm -qi pulseaudio | awk '/Version|Release/ {print $1$2$3}'
Version:0.9.13
Release:3.4
[Sun 07:25 AM] ~ $ groups
users wheel dialout audio video pulse pulse-rt pulse-access
[Sun 07:26 AM] ~ $ polkit-auth --grant org.pulseaudio.acquire-real-time
[Sun 07:26 AM] ~ $ echo $?
0
[Sun 07:26 AM] ~ $ polkit-auth --grant org.pulseaudio.acquire-high-priority
[Sun 07:26 AM] ~ $ echo $?
0
[Sun 07:26 AM] ~ $ pulseaudio -vvv
D: main.c: Started as real root: no, suid root: no
I: main.c: setrlimit(RLIMIT_NICE, (31, 31)) failed: Operation not permitted
I: main.c: setrlimit(RLIMIT_RTPRIO, (9, 9)) failed: Operation not permitted
W: main.c: **High-priority scheduling enabled in configuration but not allowed by policy.**
W: core-util.c: **setpriority(): Permission denied**
W: main.c: **Real-time scheduling enabled in configuration but not allowed by policy.**
D: main.c: Can realtime: no, can high-priority: no
...
W: core-util.c: **pthread_setschedparam(): Operation not permitted**
...
NB: I’m using pulseaudio from Build Service (home:/rodrigomoya:/pulseaudio/openSUSE_Factory), but get the exact same behavior if I use pulseaudio from openSUSE-11.1-Oss (or openSUSE-11.0-Oss).
OK, looking into this a bit more, it seems that the warnings about policy not allowing permission, actually have nothing to do with policykit, and are just related to system resource limits. In core-util.c, both pa_can_realtime and pa_can_high_priority (which are called by main.c and generate the warnings about policy in the above output) are preceded by the comment:
/* This is merely used for giving the user a hint. This is not correct
* for anything security related */
So evidently the problem is something to do with permissions. Since I’m in the correct groups, I’m not sure what the problem is.
But I just stuck the following in /etc/security/limits.conf (some site on jack recommended it for realtime priority for jackd–I just added the pulse-rt group):
D: main.c: Started as real root: no, suid root: no
I: core-util.c: Successfully gained nice level -11.
D: main.c: Can realtime: yes, can high-priority: yes
Worked for me too. Thanks for this suggestion. Been looking for a way to have pulseaudio working. Now I have my equalizer working fine without crashing pulse.