WARNING: This page only exists to show the configs used on computers in the studio. This is not a guide or tutorial. Blindly applying things from this page can & will break your system.
If you’re looking for a setup guide download realtimeconfigquickscan, give it a run, and start googling.
Real Time Kernels
Debian ships with a full RT kernel. You can roll your own by downloading the source and applying the appropriate RT patch.
Low-Latency Kernel
On debian we build our own low-latency kernel because we’re awesome.
PULSE
~/.config/pulse/daemon.conf
default-sample-format = float32le default-sample-rate = 48000 alternate-sample-rate = 44100 default-sample-channels = 2 default-channel-map = front-left,front-right resample-method = speex-float-10 enable-lfe-remixing = no high-priority = yes nice-level = -11 realtime-scheduling = yes realtime-priority = 9 rlimit-rtprio = 9 daemonize = no
RTIRQ
Install the rtirq package from your distro and edit the config in /etc/default/
# # Copyright (C) 2004-2015, rncbc aka Rui Nuno Capela. # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along # with this program; if not, write to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. # # /etc/sysconfig/rtirq # /etc/default/rtirq # # Configuration for IRQ thread tunning, # for realtime-preempt enabled kernels. # # This program is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License version 2 or later. # # IRQ thread service names # (space separated list, from higher to lower priority). # RTIRQ_NAME_LIST="rtc snd usb i8042" # old RTIRQ_NAME_LIST="snd usb rtc enp27s0 xhci i8042" # Highest priority. RTIRQ_PRIO_HIGH=90 # Priority decrease step. RTIRQ_PRIO_DECR=5 # Lowest priority. RTIRQ_PRIO_LOW=51 # Whether to reset all IRQ threads to SCHED_OTHER. RTIRQ_RESET_ALL=0 # On kernel configurations that support it, # which services should be NOT threaded # (space separated list). # RTIRQ_NON_THREADED="rtc snd" # Process names which will be forced to the # highest realtime priority range (99-91) # (space separated list, from highest to lower priority). # RTIRQ_HIGH_LIST="timer"
Edit /etc/default/grub and add “threadirqs”.
GRUB_CMDLINE_LINUX="threadirqs"
Update initramfs.
sudo update-initramfs -u
HARDWARE TIMERS
Edit /etc/udev/rules.d/40-timer-permissions.rules and add.
KERNEL=="rtc0", GROUP="audio" KERNEL=="hpet", GROUP="audio"
MAX USER FREQUENCIES
Edit /etc/sysctl.d/60-max-user-freq.conf and add.
dev.hpet.max-user-freq=3072
Then execute
echo 3072 >/sys/class/rtc/rtc0/max_user_freq
SWAP
Add the following lines to /etc/sysctl.d/99-sysctl.conf
vm.swappiness = 10 fs.inotify.max_user_watches = 524288
RT Priority & Memlock
Edit /etc/security/limits.conf and add the following at the end.
@audio - rtprio 99 @audio - memlock unlimited
AUDIOGROUP
sudo usermod -a -G audio “username”
CPU GOVERNOR
Set your governor to performance and disable frequency scaling if possible.