Focusrite Scarlett 2i2 on Linux
Moderators: MattKingUSA, khz
- milo
- Established Member
- Posts: 1242
- Joined: Wed Sep 06, 2017 2:55 am
- Location: Southern Utah, USA
- Has thanked: 275 times
- Been thanked: 218 times
- Contact:
Focusrite Scarlett 2i2 on Linux
It is not overly technical, and is definitely aimed at newbies. Enjoy!
Re: Focusrite Scarlett 2i2 on Linux
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:
http://jackaudio.org/faq/multiple_devices.html
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
- milo
- Established Member
- Posts: 1242
- Joined: Wed Sep 06, 2017 2:55 am
- Location: Southern Utah, USA
- Has thanked: 275 times
- Been thanked: 218 times
- Contact:
Re: Focusrite Scarlett 2i2 on Linux
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
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
- milo
- Established Member
- Posts: 1242
- Joined: Wed Sep 06, 2017 2:55 am
- Location: Southern Utah, USA
- Has thanked: 275 times
- Been thanked: 218 times
- Contact:
Re: Focusrite Scarlett 2i2 on Linux
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
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.
- milo
- Established Member
- Posts: 1242
- Joined: Wed Sep 06, 2017 2:55 am
- Location: Southern Utah, USA
- Has thanked: 275 times
- Been thanked: 218 times
- Contact:
Re: Focusrite Scarlett 2i2 on Linux
What specifically are you trying to do, and at what point are you stuck?
Re: Focusrite Scarlett 2i2 on Linux
73 de kc8oye
--tim
Re: Focusrite Scarlett 2i2 on Linux
one small problem, I'm using the 2nd input for better cable routing.. and under linux, if I set audacity to one channel mono recording, it will only record from the 1st input.. whereas windows will switch to whichever port i'm using.. oh well I can live with that.
- bluebell
- Established Member
- Posts: 1927
- Joined: Sat Sep 15, 2012 11:44 am
- Location: Saarland, Germany
- Has thanked: 113 times
- Been thanked: 122 times
Re: Focusrite Scarlett 2i2 on Linux
You can set up "fixed patch points" with jack_thru where you connect stuff to as you want. Then you can connect Audacity to those points. I use "main", "vocmic", "gitmix", "synth1" fpr Audacity.kc8oye wrote: ↑Sun Mar 14, 2021 3:28 am update: it was a bad USB cable. switched to the original, but too short cable and it worked just fine.
one small problem, I'm using the 2nd input for better cable routing.. and under linux, if I set audacity to one channel mono recording, it will only record from the 1st input.. whereas windows will switch to whichever port i'm using.. oh well I can live with that.
Linux – MOTU UltraLite AVB – Qtractor – http://suedwestlicht.saar.de/
-
- Established Member
- Posts: 5
- Joined: Thu Dec 26, 2019 1:30 pm
- Has thanked: 1 time
Re: Focusrite Scarlett 2i2 on Linux
I'm running Pop! OS 22.04 with Pipewire. When using my LogiTech Logi Zone 750 headset as both input and output, everything works. (In particular, Jamulus and Reaper, but other stuff as well.) The 2i2, on the other hand...
I've enabled the Focusrite ALSA driver in /etc/modprobe.d/alsa_base.conf and dmesg finds it.
I've configured JACK via QJackCtl to use "hw:USB Scarlet 2i2 USB (hw:4)" as the interface.
The mic works great. However, the headphones work for a "while" (sometimes 3 minutes, sometimes longer) and then they just... stop. (Nothing wrong with the headphones. I've tested them on a Yamaha keyboard to verify that they were not the source of trouble.)
I'm not sure where I should look for trouble.
-
- Established Member
- Posts: 405
- Joined: Mon Mar 13, 2017 6:07 am
- Has thanked: 11 times
- Been thanked: 101 times
Re: Focusrite Scarlett 2i2 on Linux
@ubuntourist
However, the headphones work for a "while" (sometimes 3 minutes, sometimes longer) and then they just... stop. (Nothing wrong with the headphones. I've tested them on a Yamaha keyboard to verify that they were not the source of trouble.)
I'm not sure where I should look for trouble.
That is, indeed, odd. I've been using a variety of Focusrite Scarlett interfaces (from the gen1 2i2, to the gen3 solo, to a gen1 18i20), and have never experienced that kind of issue: on the fancier one, I have seen odd behavior where the internal signal routing gets reset on a system restart to some weird state (see my scarlett_yaml script for how I work around it), but that shouldn't obtain for your interface: it doesn't have software-configurable signal routing.
I've never had the headphone jacks quit working after some period of time (with no reboot in play).
- bluebell
- Established Member
- Posts: 1927
- Joined: Sat Sep 15, 2012 11:44 am
- Location: Saarland, Germany
- Has thanked: 113 times
- Been thanked: 122 times
Re: Focusrite Scarlett 2i2 on Linux
ubuntourist wrote: ↑Sun Apr 02, 2023 6:35 pmThe mic works great. However, the headphones work for a "while" (sometimes 3 minutes, sometimes longer) and then they just... stop. (Nothing wrong with the headphones. I've tested them on a Yamaha keyboard to verify that they were not the source of trouble.)
I'm not sure where I should look for trouble.
Is it only the headphones or are the line outputs affected as well?
Linux – MOTU UltraLite AVB – Qtractor – http://suedwestlicht.saar.de/
-
- Established Member
- Posts: 5
- Joined: Thu Dec 26, 2019 1:30 pm
- Has thanked: 1 time
Re: Focusrite Scarlett 2i2 on Linux
bluebell wrote: ↑Mon Apr 10, 2023 7:35 amubuntourist wrote: ↑Sun Apr 02, 2023 6:35 pmThe mic works great. However, the headphones work for a "while" (sometimes 3 minutes, sometimes longer) and then they just... stop. (Nothing wrong with the headphones. I've tested them on a Yamaha keyboard to verify that they were not the source of trouble.)
I'm not sure where I should look for trouble.
Is it only the headphones or are the line outputs affected as well?
Line outputs as well.