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

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

For the Debian-based guide see https://github.com/chmaha/DebianProAudio.

Fundamentals

To get started after installing Arch, you could try just steps 3 and 4 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 2023 update: Now we are up to pipewire v1.0+ I feel more confident about 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 reinstall if you followed the older advice:

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.

Older advice before the availability of pipewire 1.0+ and for those wanting to stay with Pulse/Jack: To get an ALSA + Pulseaudio + JACK system from an install that defaulted to pipewire audio:

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

Reboot then check whether pulseaudio is operational via

inxi -Aa

inxi-pulseaudio

Full In-depth Guide

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

Optional: Install yay:

sudo pacman -S yay

Or, build from source:

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

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 tweaks

sudo nano /etc/default/grub

change GRUB_CMDLINE_LINUX="" to GRUB_CMDLINE_LINUX="threadirqs cpufreq.default_governor=performance"

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 cpufreq.default_governor=performance to the end of the options line.

5. Swappiness

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

add "vm.swappiness=10"

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

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

8. Jack2 + Jack D-Bus (ignore if using pipewire)

yay -S qjackctl jack2-dbus

Enable Jack D-Bus interface:
image

Select your audio interface:
image

To record system audio (say from a browser), 1) make sure JACK is started, 2) start the browser playback, 3) open pavucontrol and select "JACK Sink" as the output under the "playback" tab 4) Connect the relevant cables in qjackctl's graph window being careful to ensure that you are not hearing output twice i.e. delete the cables from the sink direct to the playback and only route to your DAW inputs:

image

9. DAW & Plugins

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