Getting a Focusrite Scarlett 18i8 (2nd gen) to work on Ubuntu and derivatives

This post has nothing to do with timing!

I have recently been distro hopping around trying to find one that works for me. However, I have a focusrite scarlett 18i8 second generation, which requires some fiddling to make work on linux. This has been a process of trial and error, reading lots of forums and seeing what works. After the fourth time of doing it, I now have a method which works.

I'm assuming you are using nano as your editor here, but feel free to replace with whatever you are using.

Loading the driver correctly
There has been a working driver for this device in the kernel for a little while, but it needs to be setup correctly.
  1. Run - lsusb | grep Focusrite
  2. This should give something like Bus 003 Device 012: ID 1235:8204 Focusrite-Novation Scarlett 18i8 2nd Gen
  3. Note the ID, we'll need this later
  4. Run - sudo nano /etc/modprobe.d/scarlett.conf
  5. Add the following line, substituting vid and pid for the ID parts from stage 2 - options snd_usb_audio vid=0x1235 pid=0x8204 device_setup=1
  6. Save and restart

Making it work with pulse audio
As default, the card will setup as surround sound card. If, like me, you want stereo we need to do the following. You can change the profile for fancy speaker setups, but I just have two, so here goes.

Run sudo nano /lib/udev/rules.d/91-pulseaudio.rules and create the following file.


SUBSYSTEM!="sound", GOTO="pulseaudio1_end"
ACTION!="change", GOTO="pulseaudio1_end"
KERNEL!="card*", GOTO="pulseaudio1_end"

SUBSYSTEMS=="usb", ATTRS{idVendor}=="1235", ATTRS{idProduct}=="8204", ENV{PULSE_PROFILE_SET}="focusrite-18i8.conf"

LABEL="pulseaudio1_end"


Next run sudo nano /usr/share/pulseaudio/alsa-mixer/profile-sets/focusrite-18i8.conf and create the following file.


[General]
auto-profiles = no

[Mapping analog-out]
description = Analog Outputs
device-strings = hw:%f
channel-map = left,right,aux0,aux1,aux2,aux3,aux4,aux5
direction = output

[Mapping analog-in]
description = Analog Inputs
device-strings = hw:%f
channel-map = left,right,aux0,aux1,aux2,aux3,aux4,aux5,aux6,aux7,aux8,aux9,aux10,aux11,aux12,aux13,aux14,aux15
direction = input

[Profile output:analog-out+input:analog-in]
description = Analog Stereo
output-mappings = analog-out
input-mappings = analog-in


With a recent change to alsa, your mixer profiles may also (it varies with distro) be stored at /usr/share/alsa-card-profile/mixer/profile-sets so I suggest you create a focusrite-18i8.conf there.

Then restart - you should now have stereo outputs!

Last bit - making the hardware mixer work
There is a superb project on github to make the hardware mixer work on focusrite devices. 
  1. Run sudo apt-get build-dep x42-plugins ; apt-get install libasound2-dev
  2. Run git clone git://github.com/x42/scarlett-mixer
  3. Run cd scarlett-mixer
  4. Run git submodule init
  5. Run git submodule update
  6. Run make
If make fails it will be down to dependencies - check them at https://github.com/x42/scarlett-mixer

To use the hardware mixer, carry out the following (in the scarlett-mixer directory).
  1. Run alsa-mixer and note down the hw number of the focusrite card
  2. Run ./scarlett-mixer hw:2 replacing the number after hw: with the number of your card

References
  • https://gnar.cool/focusrite-scarlett-driver-debugging/
  • https://askubuntu.com/questions/450489/pulseaudio-card-profile-for-focusrite-scarlett-18i8
  • https://github.com/x42/scarlett-mixer


Comments