[pulseaudio-discuss] RtKit help
launchpad.web at epost.diwic.se
Tue Jan 5 20:53:30 PST 2010
> On Tue, 05.01.10 07:39, David Henningsson (launchpad.web at epost.diwic.se)
>> I'm trying to get RtKit for my application up and running, and in the
>> of an rtkit mailing list I'm using this one as the closest I could find
>> I'm using the reference implementation almost unmodified and end up with
>> an "org.freedesktop.DBus.Error.AccessDenied" - "Operation not permitted"
>> error. It's the dbus_connection_send_with_reply_and_block that fails and
>> I'm not sure whether it is coming from rtkit or from D-Bus itself. If
>> done something wrong with setrlimit or sched_reset_on_fork, is that the
>> error to expect?
>> I know from the PulseAudio verbose log that PulseAudio itself manages to
>> use RealTimeKit, it's just my app that fails.
> Hmm, maybe its a PK policy issue?
> Have you checked syslog? afair dbus-daemon writes something to syslog
> if it denies access.
> Does the example "rtkit-test" work?
Thanks for the pointers, they were most helpful.
First, RtKit version is 0.4-0ubuntu2, OS is Ubuntu 10.04 (the development
version). If that matters.
I had trouble getting rtkit-test succeeding at first, and a long story
short, I was likely affected by this bug:
...so I had to try an bleeding edge kernel, in which rtkit-test works.
After some additional debugging, I found that my original problem was that
the rt-priority I requested was too high for rtkit to accept. So the
permission problem comes from rtkit, the process_set_realtime() call
returns -EPERM. So an additional question: would it be possible to either
detect that highest value rtkit can deliver, or say "hey, I want x, but if
you only can give me y, do that instead of failing"? In worst case, I
could do a binary search, but I'm glad if that could be avoided :-)
The same would be nice for the maximum value of RLIMIT_RTTIME.
This is one of the things I love most about Linux/FOSS, the ability to
debug wherever you want. I ended up inserting some debug prints in
rtkit-daemon to nail the problem down - had rtkit been a Windows system
service delivered by Microsoft, I'd probably still be stuck!
More information about the pulseaudio-discuss