Page 1 of 1

Focusrite Scarlett 2i2 on Linux

Posted: Wed Sep 06, 2017 3:01 am
by milo
I just wrote a review and basic tutorial for how to get the Focusrite Scarlett 2i2 USB audio interface working on a Linux home studio: ... me-studio/

It is not overly technical, and is definitely aimed at newbies. Enjoy!

Re: Focusrite Scarlett 2i2 on Linux

Posted: Wed Sep 06, 2017 8:38 pm
by Pablo
Nice review and songs!

A suggestion if you don't have speakers connected to the Focusrite,
so you want to capture with the Focusrite and, at the same time,
hear through the computer speakers.

I have recorded lately in a similar situation. What I do is choosing the
USB card as the Interface in the Parameters tab. Then, in the advanced
tab, I select "Capture only" in the Audio field. No need to define
the input and output device fields as you have already selected the interface
in the other tab.

For the computer speakers to work, I then use "alsa_out" like this:

Setup --> Options tab: Execute script after start up:

alsa_out -dhw:PCH &

Now, jack and ardour will see "alsa out: playback" ports, which are the computer speakers.

For a technical background on this, see:
You mention using solution number 4 but
"this approach will not do any clock drift correction, so as the two devices drift over time, you may get glitches in the audio stream. Nevertheless, it can be an easy if unreliable way to set up JACK so that, for example, it records from a USB microphone and plays back via a builtin audio device".

The solution I described above is the number 1: "If you are using JACK on Linux and want to use additional devices that have ALSA driver support (i.e. most PCI, USB and Bluetooth devices), then this is the best option".

For editing and mixing with the computer speakers, when I don't need the USB card, I prefer to start jack with the interface PCH (the onboard audio card) in "playback only mode" and, of course, disable the "script after startup".

Sure, it is better to connect an amplifier and a pair of speakers to the USB card. In this case, I just start jack the simple way; Interface: hw:USB in Duplex audio mode (again, there is no need for choosing input and output devices separately in the advanced tab)

Regards, Pablo

Re: Focusrite Scarlett 2i2 on Linux

Posted: Tue Sep 12, 2017 4:25 pm
by milo
Thank you for the reference. I will play with that tonight and see if I can get option #1 working. If so then I will revise the article.

But in my case of using the same device as input and output, isn't that using the same clock? How can I get clock drift using my setup?

Re: Focusrite Scarlett 2i2 on Linux

Posted: Wed Sep 13, 2017 6:53 pm
by Pablo
You are right. There is not clock drifting if you use the same device for input and output. That said, just using hw:USB in the interface field (and the default audio dúplex mode) should be enough to get the USB card ready for input and output.

Also, now that I have read your blog post again and understood better, you just need to use alsa_out for your laptop speakers to work. There is no need to restart jack with another configuration. alsa_out will add the laptop speakers as a new jack client.

As a first time test, once your USB device is up and running (input and output, of course), type in a terminal:
alsa_out -dhw:PCH
and then connect ardour master outputs to both system playbacks and alsa_out playbacks

Next time, you can add said command (with an ampersand in the end, just in case) to qjackctl's options

Re: Focusrite Scarlett 2i2 on Linux

Posted: Thu Sep 14, 2017 3:42 am
by milo
The alsa_out command definitely works from the command line, and that will be very useful. Thanks for showing that to me.

Strangely, the "Interface" field on the qjackctl settings window is greyed out. That is why I had to dig deeper and find the Output Device and Input Device settings on the Advanced tab. Maybe it's a configuration issue, but I guess I don't really care as long as my setup is working.

Thanks again for your thoughts!

Re: Focusrite Scarlett 2i2 on Linux

Posted: Thu Jul 09, 2020 11:27 pm
by b4ne1

I've tried this and I can't get it to work. I am a newbie to Linux but am determined to make it work. I will not go back to Windows!
Thanks for any help or replies.

Re: Focusrite Scarlett 2i2 on Linux

Posted: Fri Jul 10, 2020 9:25 pm
by milo
Is this a new device you've recently purchased? The blog post was written about a 2nd gen device, and I haven't tested a 3rd gen device.

What specifically are you trying to do, and at what point are you stuck?