Linux Audio Survival kit.
A brief guide to have success setting up the audio in Linux.
Getting Super Audio Powers
Linux it's far from perfect , but, it own some features that make the audio production very handy and affordable, mostly of the software and audio applications can be interconnected and sync up through Jack turning our desktop in a super-flexible modular workstation.
Which Linux to use?
There are many Linux flavors and in a general sense is not a big difference between a distribution and another, we can turn whichever Linux flavor in a capable OS to audio production.
According with my personal experience some desktop environments have a better performance, and this is due to how they manage the graphical resources, I highly recommend distributions that use KDE, XFCE or lxde as desktop environment, Gnome could be the worst choice and that is because Gnome uses Compiz or Metacity that make extensive use of memory for graphics processing.
I use Kubuntu, it is a ubuntu flavor that use KDE as desktop environment.
Setup Linux for audio production
In this guide we follow the complete process to set up our Linux on an audio capable operative system.
Installing the low latency kernel
open a terminal and type:
Installing KXStudio repositories:
to install the KXStudio follow the instructions of this link: http://kxstudio.linuxaudio.org/Repositories
Upgrading your system
code:
after a "sudo " command the system will ask the root password, it will be not shown in the screen
Installing Jack
code:
Installing qjackctl
code:
Installing pulseaudio-module-jack
code:
optional Lightweight OSC library
Configuring real time access:
Add your current user to the audio group code:
replace "username" in the code bellow by your computer user name
Give the audio group real time access editing /etc/security/limits.d/audio.conf
Kubuntu code:
Xubuntu code:
Lubuntu code:
Ubuntu code:
change the content of the file to this values:
Reboot your system. code
A quick Checkup of the audio capabilities
All available playback audio devices. code:
The list of available capture/recording audio devices code:
MIDI playback ports devices capabilities code:
the MIDI recording audio ports code:
Configuring Jack
Jack (Jack Audio Connection Kit ) is a professional sound server daemon that allow you to route audio and MIDI between applications and connect hardware with software.
Qjackctl is a simple application to control the Jack sound server, to launch it open a terminal and type:
You can launch the software applications clicking them icon in the application menu.
On the Qjackctl UI hit "setup" , it will open the Jack audio connection kit setup window.
Press in the Driver selection menu and choose alsa, it will be your audio backend interface to use.
Then, in the Interface selection menu choose your sound device, it could be your integrated sound device or a external hardware, in my setup I own a focusrite Scarlett Solo and I choose this option in the list.
The next step is select the ideal values for the Sample Rate, Frames/Period and Period/Buffer it is very important because find the right relationship between this values will have effect the quality and the performance of our system. While the numbers are higher we will have better audio quality, but it is not so easy, because this will have a direct effect on the latency too.
You can swap different values until you find the ideal values, or you can use this guide to find them:
List of ideals Jack frame & period settings for USB interface
Finally you must check the "Realtime" option in the setings window and press "OK", all the changes will take effect the next time that you run the Jack audio server.
A quick checkup
Open a console and type:
It should give you back a list of all available JACK server options of your audio backend.
CPU governor
Mostly of the Linux distribution are setting by default as "powersave" it sets the CPU statically to the lowest frequency within the borders of scaling_min_freq and scaling_max_freq.
To change the mode to "performance" open a console and type: code:
in order to set it back to "powersave" mode, open a terminal and type code:
You can create a script to run in performance mode, open a text editor and type:
Save it in the home directory under the name "performance mode" and you can run it in the console with
Last updated