How do I run pulseaudio with realtime priority in Ubuntu 9.04?

Sometimes I get choppy sound so I was thinking of running pulseaudio with realtime top priority. Yet when I attempt to do this, Ubuntu simply will not allow 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 belong to pulse - rt team

$ sudo adduser vava 'pulse-rt'
The user `vava' is already a member of `pulse-rt'.

And I'm not exactly sure just how to increate RLIMIT_PRPRIO, I've attempted to place

vava             soft    rtprio          10

right into/ etc/security/limits. conf yet that really did not aid.

So what else should I do to permit myself to run pulseaudio with realtime top priority?

1
2022-06-07 14:36:50
Source Share
Answers: 1

Make certain you have a realtime bit mounted:

dpkg -l | grep linux-rt

If that does not list anything, you'll require to install one:

sudo apt-get install linux-rt linux-headers-rt

Ubuntu Studio makes use of the realtime bit by default ; I'm not exactly sure it makes use of the very same proper databases as typical Ubuntu. If you are running criterion, yet desire several of the attributes of Ubuntu Studio, read through this page. An area on mounting and also setting up Real Time Kernel has to do with midway down the web page. Additionally examine the Real - Time Support area:

After you've obtained the bit you still require to set up actual - time accessibility for your applications.

All you need to provide for this is offer your audio team approvals to access the rtprio, wonderful, and also memlock restrictions. To do this, you simply require to run these commands, which will certainly add some lines to the documents/ etc/security/limits. conf:

sudo su -c 'echo @audio - rtprio 99 >> /etc/security/limits.conf'
sudo su -c 'echo @audio - nice -19 >> /etc/security/limits.conf'
sudo su -c 'echo @audio - memlock unlimited >> /etc/security/limits.conf'
3
2022-06-08 05:33:39
Source