Sometimes I get choppy sound so I was thinking about running pulseaudio with realtime priority. But when I try to do this, Ubuntu just won't let me.
$ pulseaudio -vvv --start --realtime=1
D: main.c: Started as real root: no, suid root: yes
I: main.c: PolicyKit refuses acquire-high-priority privilege.
I: main.c: PolicyKit refuses acquire-real-time privilege.
I: main.c: Called SUID root and real-time and/or high-priority scheduling
was requested in the configuration. However, we lack the necessary privileges:
I: main.c: We are not in group 'pulse-rt', PolicyKit refuse to grant us the
requested privileges and we have no increase RLIMIT_NICE/RLIMIT_RTPRIO
resource limits.
I: main.c: For enabling real-time/high-priority scheduling please acquire
the appropriate PolicyKit privileges, or become a member of 'pulse-rt',
or increase the RLIMIT_NICE/RLIMIT_RTPRIO resource limits for this user.
I: main.c: setrlimit(RLIMIT_NICE, (31, 31)) failed: Operation not permitted
I: main.c: setrlimit(RLIMIT_RTPRIO, (9, 9)) failed: Operation not permitted
D: main.c: Can realtime: no, can high-priority: no
D: main.c: Can realtime: no, can high-priority: no
I: main.c: Daemon startup successful.
I am a member of pulse-rt group
$ sudo adduser vava 'pulse-rt'
The user `vava' is already a member of `pulse-rt'.
And I'm not sure how to increate RLIMIT_PRPRIO, I've tried to put
vava soft rtprio 10
into /etc/security/limits.conf but that didn't help.
So what else should I do to allow myself to run pulseaudio with realtime priority?