Focusrite Scarlett 2i2 working flawlessly on Ubuntu with JACK

I needed a new sound card for Ubuntu that would allow me to do some recording and playback easily. After a bit of searching and testing, I figured I would go with the Focusrite Scarlett 2i2, which is a USB sound card with 2 XLR + jack inputs, stereo monitor output and a headphone jack. It also supports +48V phantom power if you need to connect a condenser microphone.

In addition it appears to be well-tested on Linux, with several user reporting that the device just works.

Popping trouble

However, the device seemed to have some trouble with PulseAudio, which is the default audio library used in Ubuntu. Everything works, meaning that any audio application was able to output sound, and recording in Audacity gave good sound quality, but whenever I started playback or recording after switching between applications, the sound card would hang for 2 seconds and make 4 popping sounds before returning to normal operation.

The solution: JACK + PulseAudio JACK Sink

If you are going to do any serious recording in Ubuntu, or Linux in general, you should get to know JACK. It is an awesome audio library for Ubuntu that aims to make life easy for musicians, audio engineers or the occasional amateur that wants to do recordings. It runs on top of ALSA, meaning it will support almost any sound card you can think of, but does so in a way that gives you extremely low latency and doesn’t mess with sound quality. The downside? JACK doesn’t allow PulseAudio to play side-by-side with it. And every Ubuntu application tries to play through PulseAudio by default.

The solution is to install the pulseaudio-module-jack package, which will allow applications to connect to JACK, even when they have no support for JACK:

sudo apt-get install pulseaudio-module-jack

In addition, you should install a nice GUI that will allow you to control JACK easily. This is named QjackCtl:

sudo apt-get install qjackctl

After installing, just run QjackCtl from the command line or the Dash and start + connect to the JACK server.

qjackctlAfter this is done, you may check the Connect window to see if PulseAudio JACK Sink is also running, which it should do by default.

pulseaudiojacksinkThen you may open Ubuntu’s Sound Settings and set PulseAudio JACK Sink to be your Output device. From now on, all applications should work even though JACK is running.

ubuntu-soundIf you wish to, you may change QjackCtl’s settings to make JACK start whenever QjackCtl is started, and afterwards add QjackCtl to your Startup Applications in Ubuntu. This way JACK will start whenever you start your computer.

No more popping

After installing PulseAudio JACK Sink and QjackCtl, I no longer experience any popping, and the FocusRite Scarlett 2i2 works flawlessly. The sound quality is great and the latency minimal, so I would definitely recommend this sound card to any Linux user wanting to do some recording at home or on the go.

Even though I wish it would work right out of the box, installing two packages to get everything perfect is that much work, and I assume that someone figures out a good solution to merge PulseAudio and JACK in a way similar to the one I use by default sometime in the future.

Published by

Svenn-Arne Dragly

I'm a physicist and programmer, writing about the stuff I figure out as I go.

5 thoughts on “Focusrite Scarlett 2i2 working flawlessly on Ubuntu with JACK”

  1. Hi there,

    I have Ubuntu/i5/8GB with 2i2 and I’m expiriencing clipping and xruns. I use the 2i2 only for playback not recording and is very annoying the clipping. For example in the last 40 minutes the QJack reports about 19 (63). As far as i can see in your images yours are 11 (21).
    Do you know how can I eliminate or at least reduce clipping?

    1. Sorry. I haven’t experienced any clipping, so I don’t know of anyu way to reduce it. I assume that you have also selected the “Jack sink” as the output in Ubuntu’s sound settings? Otherwise you might still be using Pulseaudio directly.

  2. For me, Scarlett 2i2 works out of box on my Linux Mint 17.1 64 bit(kernel 3.15.0-25) machine. I’ve checked only playback as I’m using this interface as external soundcard.

  3. I’m having a devil of a time trying to install 2i2. I use ubuntu 15.10 and am a novice at recording. I use Audacity but cannot get it to recognize my 2i2. Checking my Synaptic Package Mgr., I find pre-installed pulseaudio-module-jack and QjackCtl.

    When I try to open Jack, I get:

    Cannot connect to server socket err = No such file or directory
    Cannot connect to server request channel
    jack server is not running or cannot be started
    14:26:40.222 ALSA connection graph change.
    14:26:59.951 D-BUS: JACK server could not be started. Sorry
    Cannot connect to server socket err = No such file or directory
    Cannot connect to server request channel
    jack server is not running or cannot be started

    (And a whole lot more)

    Does anyone have a solution for me?

Leave a Reply