How can I run Pd with realtime priority on GNU/Linux?Up to Table of Contents
In Linux, Pd can be run as a real time process by the root user, resulting in far fewer audio drop outs (clicks). Essentially, the operating system gives the Pd process more time to work without being interrupted by other programs.
Running non-system programs as root, however, is considered a security risk and is obviously not an option if the user doesn't have administrator access. Luckily, there is a system config file that accepts options for priority settings.
From theUbuntu Studio wiki.
NOTE: If you have installed JACK, editing /etc/security/limits.conf may not be necessary as newer versions of JACK add the same settings to this file: /etc/security/limits.d/audio.conf. Run the following command to check if the file exists. If you see something printed, you don't need to follow the steps below.
All you need to do is give your "audio" group permissions to access the rtprio, and memlock limits. To do this, you just need to run these commands, which will add some lines to the file /etc/security/limits.conf and add you to the audio user group.:
sudo su -c `echo @audio - rtprio 99 >> /etc/security/limits.conf` sudo su -c `echo @audio - memlock unlimited >> /etc/security/limits.conf` sudo adduser username audioOf course, replace username with your actual user name. Note: There is no audio group by default on versions of Ubuntu Intrepid or greater. You can create an audio group and add yourself to it by running these commands:
sudo addgroup audio sudo addgroup username audio
Restart. Running pd using the real time flag, -rt, should now work and you should see something like "Realtime Priority Enabled" on the pd console. Run it like this (or add -rt to the startup options):