Skip to content

A Pro Audio Tuning Guide for Arch (and other Arch-based distros)

License

Notifications You must be signed in to change notification settings

chmaha/ArchProAudio

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

55 Commits
 
 
 
 

Repository files navigation

A Pro Audio Tuning Guide for Arch (and other Arch-based distros)

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.

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. 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:

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.

Fundamentals

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...

Pipewire?

December 2024 update: Now we are up to pipewire v1.2.7 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:

yay -Rdd pulseaudio pulseaudio-alsa pulseaudio-jack jack2
yay -S pipewire-alsa pipewire-pulse pipewire-jack

Reboot then check whether pipewire and associated plugins are operational via

inxi -Aa

For IRQ-based scheduling benefits when using ALSA, be sure to use the "Pro Audio" profile for your interface via your sound management tool.

Full In-depth Guide

1. Install Arch (or other favorite Arch-based distro)

Optional: Install yay:

sudo pacman -S --needed git base-devel
git clone https://aur.archlinux.org/yay.git
cd yay
makepkg -si

In other Arch-derived distros, yay might already be installed or available via sudo pacman -S yay.

2. rtcqs (formerly known as realtimeconfigquickscan)

git clone https://codeberg.org/rtcqs/rtcqs.git
cd rtcqs
./src/rtcqs/rtcqs.py

3. Install realtime-privileges

yay -S realtime-privileges

Add user to "realtime" group and "audio" group (to satisfy rtcqs)

sudo usermod -a -G realtime,audio $USER

Log out/in or reboot...

4. Kernel tweak

sudo nano /etc/default/grub

change GRUB_CMDLINE_LINUX="" to GRUB_CMDLINE_LINUX="threadirqs"

sudo update-grub

or if you don't have update-grub installed

sudo grub-mkconfig -o /boot/grub/grub.cfg

Alternatively, if you are using systemd-boot:

sudo nano /boot/loader/entries/arch.conf (or whatever the .conf file is called on your system)

and add threadirqs to the end of the options line.

5. CPU Governor and Sleep/Screeen Lock blocking

You can use your deskop environment to set CPU governor to "performance" and disable sleep and screen locking. E.g on KDE Plasma:

image

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).

6. Swappiness

sudo nano /etc/sysctl.d/99-sysctl.conf

add "vm.swappiness=10"

7. Spectre/Meltdown Mitigations

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

base-devel (as necessary)

yay -S base-devel

8. Install udev-rtirq (ignore if using pipewire "pro audio" profile?)

git clone https://github.com/jhernberg/udev-rtirq.git
cd udev-rtirq
sudo make install
reboot

9. DAW & Plugins

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):

image

Set your desired audio device using your desktop environment.

DAW Install Examples:

REAPER: http://reaper.fm/download.php or,

yay -S reaper

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.

Ardour: https://community.ardour.org/download or,

yay -S ardour

Bitwig Studio: https://www.bitwig.com/download/ (flatpak not compatible with yabridge) or,

yay -S bitwig-studio

Also be sure to check out Qtractor, Tracktion Waveform, Mixbus, LMMS, Rosegarden, Zrythm etc... https://en.wikipedia.org/wiki/List_of_Linux_audio_software#Digital_audio_workstations_(DAWs)

Native plugins (yay -S [pkgname] where appropriate)

10. Wine-staging or Wine-tkg

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).

Wine-staging

yay -S wine-staging

Or, install a particular version that you know is compatible:

yay -S downgrade
sudo DOWNGRADE_FROM_ALA=1 downgrade wine-staging

Check https://github.com/robbert-vdh/yabridge#tested-with for up-to-date info.

OR...for the more adventurous:

Wine-tkg

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-

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)

11. Install yabridge

yay -S yabridge yabridgectl

or for latest git:

yay -S yabridge-git yabridgectl-git

Note: Depending on your distro, you might have to enable the multilib repo first:

sudo nano /etc/pacman.conf

and, uncomment these lines

[multilib]
Include = /etc/pacman.d/mirrorlist

Configure yabridge according to https://github.com/robbert-vdh/yabridge#readme

then, install Windows VST2, VST3 or CLAP plugins!

12. Check volume levels!

Once everything is set up, don't forget to check that volume levels are set correctly. Run

alsamixer

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.

alsamixer

13. Other useful tools (all available via the package manager)

Music Player: strawberry (can produce bit-perfect playback)
image
Tagger: kid3, picard
DDP creation/verification/etc: ddptools
Audio Converter: fre:ac or soundconverter
CD Ripper: asunder or cdrdao
CD Burner: cdrdao, k3b or nerolinux4

About

A Pro Audio Tuning Guide for Arch (and other Arch-based distros)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published