├── license.md └── README.md /license.md: -------------------------------------------------------------------------------- 1 | This work is licensed under the Creative Commons Attribution-ShareAlike 4.0 International License. To view a copy of this license, visit http://creativecommons.org/licenses/by-sa/4.0/ or send a letter to Creative Commons, PO Box 1866, Mountain View, CA 94042, USA. 2 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # A Pro Audio Tuning Guide for Arch (and other Arch-based distros) 2 |

3 | 4 |

5 | 6 | 7 | Following this guide will allow you to get the best possible performance on Linux for professional audio needs. Even though these steps are well-tested, it is wise to research what each step accomplishes and why (the search engine is your friend :P ). See also https://wiki.archlinux.org/title/Professional_audio. 8 | 9 | _**Note for users of other distros**: Much of this guide can be adapted for other distros by simply switching out the package manager commands. For manually adding realtime privileges in other distros see [jackaudio.org](https://jackaudio.org/faq/linux_rt_config.html). In terms of kernels, Arch-based distros add the full preempt patch as part of the kernel config at build time whereas for others you might need to add `preempt=full` as a kernel parameter as part of step 4. From the yabridge documentation:_ 10 | 11 | > If the `uname -a` output contains `PREEMPT_DYNAMIC`, then run either `zgrep PREEMPT /proc/config.gz` or `grep PREEMPT "/boot/config-$(uname -r)"` depending on your distro. If `CONFIG_PREEMPT` is not set, then either add the `preempt=full` kernel parameter or better yet, switch to a kernel that's optimized for low latencies. 12 | 13 | However, for Debian, Ubuntu or Arch, the low-latency [Liquorix kernel](https://liquorix.net/) might be an even better option and is what I use myself. Install via: 14 | 15 | ```shell 16 | curl -s 'https://liquorix.net/install-liquorix.sh' | sudo bash 17 | ``` 18 | 19 | With all other tweaks set identically, the Liquorix kernel performs noticeably better than the Debian kernel on my system. With Liquorix, there is no need to set `preempt=full` but the `threadirqs` parameter is still of great benefit. 20 | 21 | ## Fundamentals 22 | 23 | To get started after installing Arch, you could try just steps 3, 4 and 5 below. If you need to use windows plugins on Linux also follow step 11 (easy: wine-staging, more advanced but potentially more performance: wine-tkg). Based on your individual pro audio needs, workflows, hardware specifications and more, your mileage may vary. If you are still having audio performance issues, try following the full guide... 24 | 25 | ### Pipewire? 26 | 27 | **July 2025 update:** Now we are up to pipewire v1.4.6 and I feel very confident recommending pipewire. Indeed, I'm now running it myself for pro audio work. From a default install it will be part of your regular updates so should be very easy. Here's how to install pipewire if you are still running pulseaudio and jack: 28 | 29 | ```shell 30 | yay -Rdd pulseaudio pulseaudio-alsa pulseaudio-jack jack2 31 | yay -S pipewire-alsa pipewire-pulse pipewire-jack 32 | ``` 33 | Reboot then check whether pipewire and associated plugins are operational via 34 | ```shell 35 | inxi -Aa 36 | ``` 37 | For IRQ-based scheduling benefits when using ALSA, be sure to use the "Pro Audio" profile for your interface via your sound management tool. 38 | 39 | ## Full In-depth Guide 40 | 41 | ### 1. Install Arch (or other favorite Arch-based distro) 42 | 43 | _Optional:_ 44 | Install `yay`: 45 | 46 | ```shell 47 | sudo pacman -S --needed git base-devel 48 | git clone https://aur.archlinux.org/yay.git 49 | cd yay 50 | makepkg -si 51 | ``` 52 | In other Arch-derived distros, `yay` might already be installed or available via `sudo pacman -S yay`. 53 | 54 | ### 2. rtcqs (formerly known as realtimeconfigquickscan) 55 | 56 | ```shell 57 | git clone https://codeberg.org/rtcqs/rtcqs.git 58 | cd rtcqs 59 | ./src/rtcqs/rtcqs.py 60 | ``` 61 | 62 | ### 3. Install realtime-privileges 63 | 64 | ```shell 65 | yay -S realtime-privileges 66 | ``` 67 | 68 | Add user to "realtime" group and "audio" group (to satisfy `rtcqs`) 69 | 70 | ```shell 71 | sudo usermod -a -G realtime,audio $USER 72 | ``` 73 | 74 | Log out/in or reboot... 75 | 76 | ### 4. Kernel tweak 77 | 78 | ```shell 79 | sudo nano /etc/default/grub 80 | ``` 81 | 82 | change 83 | `GRUB_CMDLINE_LINUX=""` to `GRUB_CMDLINE_LINUX="threadirqs"` 84 | 85 | ```shell 86 | sudo update-grub 87 | ``` 88 | 89 | or if you don't have update-grub installed 90 | ```shell 91 | sudo grub-mkconfig -o /boot/grub/grub.cfg 92 | ``` 93 | Alternatively, if you are using systemd-boot: 94 | ```shell 95 | sudo nano /boot/loader/entries/arch.conf (or whatever the .conf file is called on your system) 96 | ``` 97 | and add *threadirqs* to the end of the options line. 98 | 99 | ### 5. CPU Governor and Sleep/Screeen Lock blocking 100 | You can use your deskop environment to set CPU governor to "performance" and disable sleep and screen locking. E.g on KDE Plasma: 101 | 102 | ![image](https://github.com/user-attachments/assets/435a63c6-8b8a-4c20-a106-da249e702685) 103 | 104 | Alternatively, set in the terminal via `sudo cpupower frequency-set -g performance` or add `cpufreq.default_governor=performance` as a kernel parameter (but note that this can be overridden by other power profile tools in your distribution such as Powerdevil). 105 | 106 | ### 6. Swappiness 107 | 108 | ```shell 109 | sudo nano /etc/sysctl.d/99-sysctl.conf 110 | ``` 111 | 112 | add "vm.swappiness=10" 113 | 114 | ### 7. Spectre/Meltdown Mitigations 115 | 116 | If you run `rtcqs.py` and it gives you a warning about Spectre/Meltdown Mitigations, you could add `mitigations=off` to GRUB_CMDLINE_LINUX. Warning: disabling these mitigations will make your machine less secure! https://wiki.linuxaudio.org/wiki/system_configuration#disabling_spectre_and_meltdown_mitigations 117 | 118 | ### base-devel (as necessary) 119 | 120 | ```shell 121 | yay -S base-devel 122 | ``` 123 | 124 | ### 8. Install udev-rtirq (ignore if using pipewire "pro audio" profile?) 125 | 126 | ```shell 127 | git clone https://github.com/jhernberg/udev-rtirq.git 128 | cd udev-rtirq 129 | sudo make install 130 | reboot 131 | ``` 132 | 133 | ### 9. DAW & Plugins 134 | 135 | For regular work in a DAW, it is recommended to set its audio system to ALSA. If you need to listen to other external sources during a session, in REAPER you can change the ALSA input and output devices to "default" (you need to type this): 136 | 137 | ![image](https://github.com/user-attachments/assets/956b4857-741e-4b5f-aba5-b5288e98bb37) 138 | 139 | Set your desired audio device using your desktop environment. 140 | 141 | DAW Install Examples: 142 | 143 | REAPER: 144 | http://reaper.fm/download.php or, 145 | 146 | ```shell 147 | yay -S reaper 148 | ``` 149 | Consider changing the RT priority value to 80 on audio device page. While RT priority numbers are all relative, this value matches the sane default used by Ardour and Mixbus. 150 | 151 | Ardour: 152 | https://community.ardour.org/download or, 153 | 154 | ```shell 155 | yay -S ardour 156 | ``` 157 | 158 | Bitwig Studio: 159 | https://www.bitwig.com/download/ (flatpak not compatible with yabridge) or, 160 | 161 | ```shell 162 | yay -S bitwig-studio 163 | ``` 164 | 165 | Also be sure to check out Qtractor, Tracktion Waveform, Mixbus, LMMS, Rosegarden, Zrythm etc... 166 | https://en.wikipedia.org/wiki/List_of_Linux_audio_software#Digital_audio_workstations_(DAWs) 167 | 168 | #### Native plugins (`yay -S [pkgname]` where appropriate) 169 | 170 | - My JSFX plugin collection (https://forum.cockos.com/showthread.php?t=275301) 171 | - airwindows-git (http://www.airwindows.com/) 172 | - x42-plugins (http://x42-plugins.com/x42/) 173 | - lsp-plugins (https://lsp-plug.in/) 174 | - zam-plugins (http://www.zamaudio.com/?p=976) 175 | - distrho-ports (https://distrho.sourceforge.io/ports.php) 176 | - dpf-plugins (https://distrho.sourceforge.io/plugins.php) 177 | - elephantdsp-roomreverb (https://www.elephantdsp.com/) 178 | - dragonfly-reverb (https://michaelwillis.github.io/dragonfly-reverb/) 179 | - aether.lv2 (https://dougal-s.github.io/Aether/) 180 | - Bertom Denoiser (https://www.bertomaudio.com/denoiser.html) (not in the Arch repos or AUR) 181 | - sfizz / sfizz-git (https://sfz.tools/sfizz/) 182 | - Chowdhury DSP (https://chowdsp.com/products.html) (available via AUR: `yay chow`) 183 | - Auburn Sounds (https://www.auburnsounds.com/) 184 | - TAL Software (https://tal-software.com/) 185 | - Pianoteq (https://www.modartt.com/pianoteq) 186 | - AudioThing (https://www.audiothing.net/) 187 | 188 | ### 10. Wine-staging or Wine-tkg 189 | 190 | **Gentle Warning**: Recent WINE development has made running Windows applications and plugins on Linux problematic. In order to things to work as expected, stick with wine-staging or wine-tkg v9.21. A better approach would be to move entirely to Linux-native applications and plugins. Unless you live by AI-powered mixing plugins, the only area that is currently lacking on Linux is spectral editing (missing equivalents to iZotope RX and Acon Digital Acoustica). 191 | 192 | Perhaps start with vanilla wine-staging and see how you fare in terms of performance. If your workflows rely heavily on VSTi like Kontakt, you may find better performance with wine-tkg (fsync enabled). 193 | 194 | #### Wine-staging 195 | 196 | ```shell 197 | yay -S wine-staging 198 | ``` 199 | 200 | Or, install a particular version that you know is compatible: 201 | 202 | ```shell 203 | yay -S downgrade 204 | sudo DOWNGRADE_FROM_ALA=1 downgrade wine-staging 205 | ``` 206 | followed by adding an IgnorePkg line to /etc/pacman.conf: 207 | 208 | ```shell 209 | IgnorePkg = wine-staging 210 | ``` 211 | Check https://github.com/robbert-vdh/yabridge#tested-with for up-to-date info. 212 | 213 | OR...for the more adventurous: 214 | 215 | #### Wine-tkg 216 | 217 | Follow the instructions to git clone and install latest version: https://github.com/Frogging-Family/wine-tkg-git/tree/master/wine-tkg-git#quick-how-to- 218 | 219 | If using wine-tkg, set the WINEFSYNC environment variable to 1 according to https://github.com/robbert-vdh/yabridge#environment-configuration (depends on your display manager and login shell) 220 | 221 | ### 11. Install yabridge 222 | 223 | ```shell 224 | yay -S yabridge yabridgectl 225 | ``` 226 | 227 | or for latest git: 228 | 229 | ```shell 230 | yay -S yabridge-git yabridgectl-git 231 | ``` 232 | 233 | Note: Depending on your distro, you might have to enable the multilib repo first: 234 | 235 | ```shell 236 | sudo nano /etc/pacman.conf 237 | ``` 238 | 239 | and, uncomment these lines 240 | 241 | ```shell 242 | [multilib] 243 | Include = /etc/pacman.d/mirrorlist 244 | ``` 245 | 246 | Configure yabridge according to https://github.com/robbert-vdh/yabridge#readme 247 | 248 | then, install Windows VST2, VST3 or CLAP plugins! 249 | 250 | ### 12. Check volume levels! 251 | 252 | Once everything is set up, don't forget to check that volume levels are set correctly. Run 253 | ``` 254 | alsamixer 255 | ``` 256 | to check that output is set to 100 (vertical bars) or gain of 0dB (top left of alsamixer). Use F6 to select the correct soundcard. You can also use your desktop environment's volume controls if you have your interface enabled there but note that numbers don't seem to match alsamixer. 257 | 258 | ![alsamixer](https://user-images.githubusercontent.com/120390802/209148828-f5654838-eb25-4dd2-9955-4e0e8db99be2.png) 259 | 260 | ### 13. Other useful tools (all available via the package manager) 261 | 262 | **Music Player**: strawberry (can produce bit-perfect playback)
263 | ![image](https://user-images.githubusercontent.com/120390802/209884991-d9901e4b-c242-4459-8127-060f2e86b9e1.png)
264 | **Tagger**: kid3, picard
265 | **DDP creation/verification/etc**: ddptools
266 | **Audio Converter**: fre:ac or soundconverter
267 | **CD Ripper**: asunder or cdrdao
268 | **CD Burner**: cdrdao, k3b or nerolinux4 269 | 270 | 271 | --------------------------------------------------------------------------------