Focusrite Scarlett 2i2 on Linux help!

Talk about your MIDI interfaces, microphones, keyboards...

Moderators: MattKingUSA, khz

CrocoDuck
Established Member
Posts: 1133
Joined: Sat May 05, 2012 6:12 pm
Been thanked: 17 times

Re: Focusrite Scarlett 2i2 on Linux help!

Post by CrocoDuck »

MattKingUSA wrote:I am pretty sure wine will default to pulse audio. So if pulse is using your usb audio then wine will as well. As far as performance I would think it would be terrible. You may as well run a virtual install of windows.
I installed wine few days ago to run Steam for win due to some absolute crazy stuff going on to install the native doom3 Linux version, all thanks to the fact that you can purchase the original game (needed for the .pk4 files) only through Steam and it will download only on win (or Steam through wine)... Go figure... Completely retarded I think.

Anyway, I found that wine was configured to use pulseaudio. You can use winetricks to change that to ALSA (just Google it, it is super easy). Then, open winecfg and set your audio devices there. Best to use the same device in all fields.

However, I think you will need wineasio in order to use win audio apps through jack. I would recommend to do this, as it tends to make things work better. However, it requires to nail down a good system, jack, wine and daw configuration, so expect some sweat. I would start from system and jack: if your system does not do audio alright running wine will just make it worse. So I would try to get some jack app running (guitarix, qtractor) and make sure they run well first. Then, after audio is good on the system side, move to wine, so that you know that if something is not working the problem lies in wine configuration.
Gulliver
Established Member
Posts: 39
Joined: Sun Jan 08, 2017 7:07 pm

Re: Focusrite Scarlett 2i2 on Linux help!

Post by Gulliver »

MattKingUSA wrote:I am pretty sure wine will default to pulse audio. So if pulse is using your usb audio then wine will as well. As far as performance I would think it would be terrible. You may as well run a virtual install of windows.
Yeah, pulse audio is listed as well. So how can I avoid pulse audio and connect 2i2 directly in reaper? Or is this not possible? How could I make reaper see my 2i2?
CrocoDuck
Established Member
Posts: 1133
Joined: Sat May 05, 2012 6:12 pm
Been thanked: 17 times

Re: Focusrite Scarlett 2i2 on Linux help!

Post by CrocoDuck »

Gulliver wrote:
MattKingUSA wrote:I am pretty sure wine will default to pulse audio. So if pulse is using your usb audio then wine will as well. As far as performance I would think it would be terrible. You may as well run a virtual install of windows.
Yeah, pulse audio is listed as well. So how can I avoid pulse audio and connect 2i2 directly in reaper? Or is this not possible? How could I make reaper see my 2i2?
I followed this to make Wine to deal with ALSA. Then, open winecfg (just type winecfg in a terminal), go to the audio tab and select your Scarlett for all fields (if applicable). If the devices listed in the dropdown menus confuse you, try to match what you see with

Code: Select all

aplay -l
arecord -l
This works ok as long as games are concerned, but I am afraid you will need to get wineasio going to get your DAW 100% operational without audio glitches. I cannot assist you for wineasio stuff as it has been way to long back since I last used it, but you should be able to find plenty of support here.
tnovelli
Established Member
Posts: 277
Joined: Wed Apr 20, 2011 4:52 pm

Re: Focusrite Scarlett 2i2 on Linux help!

Post by tnovelli »

asbak wrote:Rather go with a Debian based distro, Ubuntu / Mint is probably the easiest and most developed environments. Perhaps consider something like AVLinux because all the configuration hard work has already been done for you, and it's Debian based. Audio can be made to work on other Linux environments but the configuration, maintenance and frustration factors tend to increase. Probably not the best way for a beginner to get started.
Definitely. AVLinux is the benchmark. If you don't want to use it, at least boot it from a USB stick and try it out. Then you'll know what to aim for when you're setting up some other distro for audio work.

I set up a new studio PC yesterday. Linux Mint 18.1, add KXStudio repositories, install JACK, Cadence, Ardour, Qtractor, Calf plugins, low latency kernel (linux-lowlatency-xenial-lts). Took about an hour, pretty painless.

Cadence solves a lot of problems. Just click the button to bridge PulseAudio to JACK.
Gulliver
Established Member
Posts: 39
Joined: Sun Jan 08, 2017 7:07 pm

Re: Focusrite Scarlett 2i2 on Linux help!

Post by Gulliver »

CrocoDuck wrote:
Gulliver wrote:
MattKingUSA wrote:I am pretty sure wine will default to pulse audio. So if pulse is using your usb audio then wine will as well. AHDs far as performance I would think it would be terrible. You may as well run a virtual install of windows.
Yeah, pulse audio is listed as well. So how can I avoid pulse audio and connect 2i2 directly in reaper? Or is this not possible? How could I make reaper see my 2i2?
I followed this to make Wine to deal with ALSA. Then, open winecfg (just type winecfg in a terminal), go to the audio tab and select your Scarlett for all fields (if applicable). If the devices listed in the dropdown menus confuse you, try to match what you see with

Code: Select all

aplay -l
arecord -l
This works ok as long as games are concerned, but I am afraid you will need to get wineasio going to get your DAW 100% operational without audio glitches. I cannot assist you for wineasio stuff as it has been way to long back since I last used it, but you should be able to find plenty of support here.
I just followed your description. Set to ALSA as per the link. In the dropdown these are the options:
(system default)
in: default
in: HDA Inte MID 92HD81B1X5 Analog

No 2i2 listed
Gulliver
Established Member
Posts: 39
Joined: Sun Jan 08, 2017 7:07 pm

Re: Focusrite Scarlett 2i2 on Linux help!

Post by Gulliver »

Just giving Ardour a go. I'm already put off by not being able to start a session. Audio system: ALSA/JACK? I selected Jack. JackCTL was started. It tells me "Jack is already running" Ardour will connect to it and use the existing settings. Click connect to Jack. Click OK. Error: could not create session.

Honestly, I'd just like to pay someone an hour to help me set up my studio and show me how to do it myself. This just sucks.
User avatar
Michael Willis
Established Member
Posts: 1460
Joined: Mon Oct 03, 2016 3:27 pm
Location: Rocky Mountains, North America
Has thanked: 71 times
Been thanked: 169 times
Contact:

Re: Focusrite Scarlett 2i2 on Linux help!

Post by Michael Willis »

Don't give up! Try an ardour session with Alsa and see if you can make any more progress. JACK can be more complicated to set up and manage. It does give you more capabilities than just using Alsa, but even Paul Davis (primary developer of both Jack and Ardour) recommends that people try using just Alsa for Ardour sessions unless they have a good reason to use JACK.
User avatar
Michael Willis
Established Member
Posts: 1460
Joined: Mon Oct 03, 2016 3:27 pm
Location: Rocky Mountains, North America
Has thanked: 71 times
Been thanked: 169 times
Contact:

Re: Focusrite Scarlett 2i2 on Linux help!

Post by Michael Willis »

Also, for immediate help, use Ardour IRC, there is generally a number of friendly and helpful users online during reasonable hours in a variety of time zones. Go to community.ardour.org and click the IRC link at the very bottom.
CrocoDuck
Established Member
Posts: 1133
Joined: Sat May 05, 2012 6:12 pm
Been thanked: 17 times

Re: Focusrite Scarlett 2i2 on Linux help!

Post by CrocoDuck »

Gulliver wrote:This just sucks.
No, it doesn't. You are just not used to it and it works in a very different way with respect what you always did so far. Also, you are trying to start with the hardest thing possible in my opinion: getting Win audio software running on Linux. Bringing the Win mentality to Linux will slow you down.

On Linux, we tend to have system-wise audio setup and having all the software dealing with it. I don't setup Ardour to use my Scarlett, I setup jack to use my Scarlett, then Ardour (and all the rest of the audio software) will deal with Jack and the problem will be sorted.

Please, make sure you read this.

I recommend this approach:
  • Read the article above.
  • Try to get Jack running with your scarlett.
  • After Jack is running, try to get Guitarix going on and have some realtime effects fun. This will make you practice with Jack aware software.
  • Then get Ardour running, see if it is ok for you.
  • After the above is sorted you will know your system audio is good, then move onto wine. For best results you will need wineasio.
As other people suggested, you can start some audio program with ALSA, and it is OK for trying things out. Jack is the de-facto audio server for pro-audio though, and I think it will easily come into play in the future, so you might as well learn it.

Worth to mention that if running Win software is your goal, In my experience the best performance is when using wineasio, which requires Jack anyway (not sure whether this changed recently tho).

To sum up: don't try to jump start into some Win based paradigm, but try to get there by one baby step at a time.

First thing first, let's just make sure your Scarlett is working alright. Plug it, make sure it is on, and then return the outputs of these commands:

Code: Select all

aplay -l
arecord -l
amidi -l
User avatar
Michael Willis
Established Member
Posts: 1460
Joined: Mon Oct 03, 2016 3:27 pm
Location: Rocky Mountains, North America
Has thanked: 71 times
Been thanked: 169 times
Contact:

Re: Focusrite Scarlett 2i2 on Linux help!

Post by Michael Willis »

CrocoDuck wrote:As other people suggested, you can start some audio program with ALSA, and it is OK for trying things out. Jack is the de-facto audio server for pro-audio though, and I think it will easily come into play in the future, so you might as well learn it.
It depends on what you are doing. As I said, using JACK certainly gives you capabilities that you just don't have with ALSA, but ALSA may be enough for some uses. For example, if you are working on a project in which you can put all of your audio and midi into Ardour tracks, and all of your effects and processing and such can be loaded into Ardour as plugins, then using ALSA as Ardour's back end will work just fine. On the other hand, if you want multiple separate apps talking to each other (e.g. Ardour, Hydrogen, Rakarrack, etc.) then you have to use JACK.
CrocoDuck
Established Member
Posts: 1133
Joined: Sat May 05, 2012 6:12 pm
Been thanked: 17 times

Re: Focusrite Scarlett 2i2 on Linux help!

Post by CrocoDuck »

Michael Willis wrote:
CrocoDuck wrote:As other people suggested, you can start some audio program with ALSA, and it is OK for trying things out. Jack is the de-facto audio server for pro-audio though, and I think it will easily come into play in the future, so you might as well learn it.
It depends on what you are doing. As I said, using JACK certainly gives you capabilities that you just don't have with ALSA, but ALSA may be enough for some uses. For example, if you are working on a project in which you can put all of your audio and midi into Ardour tracks, and all of your effects and processing and such can be loaded into Ardour as plugins, then using ALSA as Ardour's back end will work just fine. On the other hand, if you want multiple separate apps talking to each other (e.g. Ardour, Hydrogen, Rakarrack, etc.) then you have to use JACK.
Good points. Just to clarify for Gulliver:
CrocoDuck wrote:First thing first, let's just make sure your Scarlett is working alright. Plug it, make sure it is on, and then return the outputs of these commands:

Code: Select all

aplay -l
arecord -l
amidi -l
These will tell us whether ALSA recognizes your Scarlett. This is the first troubleshooting step, as any audio software (either through wine, Jack or PulseAudio) need to get through ALSA at some point: ALSA is the actual device driver provider for Linux. These should help troubleshooting this also:
Gulliver wrote:
I just followed your description. Set to ALSA as per the link. In the dropdown these are the options:
(system default)
in: default
in: HDA Inte MID 92HD81B1X5 Analog

No 2i2 listed
But let's cross that bridge when we get there.
User avatar
Michael Willis
Established Member
Posts: 1460
Joined: Mon Oct 03, 2016 3:27 pm
Location: Rocky Mountains, North America
Has thanked: 71 times
Been thanked: 169 times
Contact:

Re: Focusrite Scarlett 2i2 on Linux help!

Post by Michael Willis »


First thing first, let's just make sure your Scarlett is working alright. Plug it, make sure it is on, and then return the outputs of these commands:

Code: Select all

aplay -l
arecord -l
amidi -l
Indeed, that is a good idea regardless of what workflow will follow. I think that the amidi command won't show the scarlett 2i2, since it doesn't have midi (2i4 has midi), but it should be listed by the other two commands.
Gulliver
Established Member
Posts: 39
Joined: Sun Jan 08, 2017 7:07 pm

Re: Focusrite Scarlett 2i2 on Linux help!

Post by Gulliver »

CrocoDuck wrote:

Code: Select all

aplay -l
arecord -l
amidi -l

Code: Select all

fg@fg-pc:~$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: MID [HDA Intel MID], device 0: 92HD81B1X5 Analog [92HD81B1X5 Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: MID [HDA Intel MID], device 3: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: USB [Scarlett 2i2 USB], device 0: USB Audio [USB Audio]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
fg@fg-pc:~$ arecord -l
**** List of CAPTURE Hardware Devices ****
card 0: MID [HDA Intel MID], device 0: 92HD81B1X5 Analog [92HD81B1X5 Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: USB [Scarlett 2i2 USB], device 0: USB Audio [USB Audio]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
fg@fg-pc:~$ amidi -l
User avatar
wjl
Established Member
Posts: 224
Joined: Fri Mar 17, 2017 12:27 pm
Location: near Frankfurt, Germany
Has thanked: 48 times
Been thanked: 26 times
Contact:

Re: Focusrite Scarlett 2i2 on Linux help!

Post by wjl »

There's your information for all relevant programs (like QJackCTL for instance):

1,0 (card, device)
more about me on my blog
Gulliver
Established Member
Posts: 39
Joined: Sun Jan 08, 2017 7:07 pm

Re: Focusrite Scarlett 2i2 on Linux help!

Post by Gulliver »

CrocoDuck wrote: Please, make sure you read this.
I just read it halfway and doing the steps as I read. Set up qjackctl and wanted to start an ardour session with jack but I got the same error. It can't create the session. I tried to create the session with ALSA and it worked.
Post Reply