(Updated Feb 2020) So you read Linux Professional Audio Pt 1: What is Linux & Which Version is Best? and understand all about Linux distributions. There are a lot of them, even some that are specially designed for audio like KXStudio and Ubuntu Studio.
I want my computer to be used for many things, and find Fedora to be the best version of Linux for me. If you want to go with another distro you still might want to browse this article as some of the information might be relevant for your distribution too.
I am not going to go into this here as it’s covered in Installing Fedora 28. I am currently using Fedora 29, but previous versions have all been tested using this guide.
You can easily dual boot it with Windows if you like, but Windows will hopefully just be a bad memory for you soon. Once you have Fedora installed successfully lets get onto the important business of setting it up right!
If you are an expert user please have a look at my Fedora Ultimate Installation Script, a lot of what is covered here is automated.
Don’t fear the terminal!
Maybe you have never used a terminal and entered commands into a computer before, well now is the time to sort your life out and become a real computer user!
Open the terminal by pressing the Windows Key on your machine and start to type the word ‘terminal’, as you type you will see the selection of programs that are available start to appear before you, as soon as the Terminal program is first in the list and highlighted, press enter and be transported to the magical world of Mr Robot (or War Games for the older readers.)
Install the RPM Fusion repositories
On Windows you have to hunt the web to find new software (and viruses), on Linux all the software you need lives in special places called repositories. Fedora comes with it’s own official one built in, but you should add these right away to get the very best software that does not come ‘out of the box’ with Fedora.
In the terminal copy and paste this in followed by Enter. NOTE in the terminal the short-cut for paste is Ctrl-Shift-V.
su -c 'dnf install http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm'
Update the system to the latest version of everything
The ISO image you used to install Fedora was out of date as soon as it is was released, things move fast in Linux world! The first thing to type is:
sudo dnf -y --refresh upgrade
and go and get a cup of tea while it does its job.
Let’s understand from the beginning what we are doing:
sudotells the computer that you are a ‘super user’, this basically means you can do anything you want on the computer. It’s part of Linux’s powerful security and beyond the scope of this article.
dnfis Fedora’s command line package manager. On Ubuntu and Mint it’s
apt-get. It’s used for downloading and installing stuff, which is exactly what you are doing now.
-yautomatically answers yes any time you might have been prompted for a response
--refreshsets metadata as expired before running the command, this just seems to be good practice and the official advice on what to do.
upgradeis the command to run an update, in fact you can type
updateif you want instead, but for some strange reason they changed it recently to
upgradeto confuse people 🙂
Make the desktop environment a little more familiar
Now, if you come from Windows you probably like expand and minimize buttons on your windows, so enter:
gsettings set org.gnome.desktop.wm.preferences button-layout 'appmenu:minimize,maximize,close'
I think the screen saver comes on far too soon and is annoying, so delay that onset with:
gsettings set org.gnome.desktop.session idle-delay 900
Do you like your files sorting with the directories on top? I do, if you do too:
gsettings set org.gnome.nautilus.preferences sort-directories-first true
Upgrade font rendering quality
If you have a display that is higher resolution than 1920×1080 then celebrate and skip this section! You don’t need subpixel rendering, your screen is too awesome.
If you want high quality fonts, then do this:
- Make sure you have
tweaksinstalled and change the setting to
- Type this into the terminal:
echo "Xft.lcdfilter: lcddefault" >>"$HOME/.Xresources"
You should see much better font quality on reboot. This works if you are using the Gnome on Xorg setting rather than Wayland. I have not tried wayland.
Install essential applications
As I mentioned earlier, Fedora misses out on lots of essential stuff to avoid the copyright trolls, but we hate those guys so we type:
sudo dnf -y install ffmpeg-libs fuse-exfat
This gives us the multimedia codecs we want and the Microsoft file system to use certain SD cards (the ones used in the majority of cameras.).
I also add the following, these are more of an option:
sudo dnf -y install keepassx vlc chromium
This gives you Chromium, the free version of Google Chrome, KeepassX, the best password manager, and VLC player, all you need to watch films and listen to any music file format you can imagine.
Install audio applications
This is a massive subject that we will cover soon. Which are the best audio applications for Linux?! What plugins can you use? Which hardware is compatible?
Things have improved massively for Linux audio recently, now there is a huge selection of mature professional audio tools at your disposal. The most well known (sort of) free DAW on Linux is probably Ardour. This recently hit version 5 with some big improvements. I say ‘sort of free’ as you can download it from your distribution’s repository, but I strongly recommend you instead buy it from the home site to support the developers. Reaper has a native version that is amazing, it is still marked as an ‘experimental build’ but is 100% stable.
Electronic music makers will probably gravitate to the commercial Bitwig with its Ableton Live like features, or the free LMMS or Qtractor. They will also be thrilled to know that all the u-he plugins are now available for Linux. These include some of the best on the market. Even though they are still officially beta, they have been worked on since Nov 2014 and are perfectly stable. These are the old ‘official’ beta versions, there are brand new ones you should use available from reddit r/UheOnLinux.
Technical problems that still cause headaches for Linux audio
While everything has been all smiles and sunshine until now, unfortunately there is still a dark side to Linux audio. This is mainly due to Linux audio still being a very small market and the fragmented nature of all the distributions. You might be one of the lucky ones and just plug in your audio interface, boot up your DAW and start making music. For many others there will be some very technical issues that need solving to get things working. This is because it’s quite likely nobody has ever used your exact interface with the exact same software on the exact same computer as you before.
The first hurdle you may encounter is that of real-time permissions for the audio driver. Basically, Linux cares a LOT more about security than it does about audio performance. Security settings on a computer are not something people coming from Mac or PC have ever had to deal with, so it can be a bit intimidating. The good news is, you don’t really have to understand this stuff IF you can just get someone to tell you what to do for your specific situation. For Fedora, after a lot of tedious research, I can tell you exactly what to do!
Setting up Fedora audio for real-time priority and increased max locked memory
Check jack is installed, if not, install it
There is a special bit of audio software called jack on Linux that we will talk about in the future. You may or may not need it, but installing it can help you sort out the real issues if you use the other audio driver ALSA too. Depending what software you installed you may have it installed and set up correctly already. Type:
I get the following as my machine is now setup how you want yours to be. NOTE my username is david, you will need to note yours for the next step.
david wheel jackuser
Do you see jackuser there? If so, skip to the next section, otherwise:
sudo dnf install jack-audio-connection-kit qjackctl
sudo usermod -a -G jackuser (your username)
Now do you see jackuser there? Congratulations.
Edit the 95-jack.conf file to enable realtime permissions and change the limit for the maximum amount of locked memory
Go to the terminal and type
ulimit -a , you will see something like the following. Note the parts in bold.
core file size (blocks, -c) 0
data seg size (kbytes, -d) unlimited
scheduling priority (-e) 0
file size (blocks, -f) unlimited
pending signals (-i) 31111
max locked memory (kbytes, -l) 64
max memory size (kbytes, -m) unlimited
open files (-n) 1024
pipe size (512 bytes, -p) 8
POSIX message queues (bytes, -q) 819200
real-time priority (-r) 0
stack size (kbytes, -s) 8192
cpu time (seconds, -t) unlimited
max user processes (-u) 31111
virtual memory (kbytes, -v) unlimited
file locks (-x) unlimited
Fedora did have a bug that meant when we change the settings to enable the kernel permissions we WON’T see that change reflected in the command line. This might have caused you to go mental as you could not have ever known this, but it is now fixed in Fedora >=27!
We need to edit the following file as a ‘super user’ (remember, the user who has total control of the machine). The best way to edit a system text file as a super user is to use a command line text editor such as nano (or vi if you are brave, that is pre-installed), so if you don’t have nano, install it:
sudo dnf install nano
and edit the text file:
sudo nano /etc/security/limits.d/95-jack.conf
and make sure it has these bold values replacing the original ones (these overwrite the settings we just displayed a moment ago):
@jackuser - rtprio 98 corresponds to
real-time priority (-r)
@jackuser - memlock
unlimited corresponds to
max locked memory (kbytes, -l)
or just type
printf "# Default limits for users of jack-audio-connection-kit\n\n@jackuser - rtprio 98\n@jackuser - memlock unlimited\n\n@pulse-rt - rtprio 20\n@pulse-rt - nice -20" | sudo tee /etc/security/limits.d/95-jack.conf
After a reboot, type
ulimit -a and you should see the changes in
max locked memory and
The main test will be when you load up your DAW and see if you get an error report saying no real time kernel access and/or something like “WARNING: Your system has a limit for maximum amount of locked memory!”
Now your machine should be ready to rock!
If you have spotted any errors, have anything to add, or just want to say hello, then please use the comments below!