Latest driver development code for Focusrite Scarlett on Linux

Overview

Development

To actually try modifying the driver source code, and build your modification against your current running kernel, do this (don't worry - the outcome stays in this directory):

make -C /lib/modules/`uname -r`/build M=`pwd`/sound/usb clean
make -C /lib/modules/`uname -r`/build M=`pwd`/sound/usb modules

Untested Something like this would install the newly built modules in your system against your current kernel. You might want to do make -n to see where the command put the modules:

make -C /lib/modules/`uname -r`/build M=`pwd`/sound/usb modules_install

The linux kernel prefers to load modules under /lib/modules/*/updates and /lib/modules/*/extra over elsewhere under /lib/modules/*, so it is safer to manually copy new *.ko into those directories, and run depmod -a to let the kernel rescan them, rather than doing make ... modules_install.

The v5.12-sound-master branch tracks the linux kernel sound maintainer Takashi's tree. The v5.12-dev branch tracks Vladimir / sadko4u 's. The v5.12-scarlett-gen3 branch tracks Geoffrey Bennett's scarlett-gen3 development. They can be accessed by the instructions below, replacing v5.12-sound-master by v5.12-dev or v5.12-scarlett-gen3:

git clone -b v5.12-sound-master https://github.com/Focusrite-Scarlett-on-Linux/sound-usb-kernel-module.git
cd sound-usb-kernel-module
make -C /lib/modules/`uname -r`/build M=`pwd`/sound/usb clean
make -C /lib/modules/`uname -r`/build M=`pwd`/sound/usb modules
# copy all the *.ko from under sound/usb into /lib/modules/`uname -r`/updates ; see the README
depmod -a

depmod -v -a (with -v) gives rather verbose messages about kernel modules. You should find those new ones being processed.

Also remember to create a /etc/modprobe.d/scarlett.conf with device_setup=1 option for the device as in the detailed instruction, duplicated further below.

After reboot, if you run dmesg, you should see Focusrite Scarlett Gen 2/3 Mixer Driver enabled [sadko4u mod] ... for one, and Focusrite Scarlett Gen 2/3 Mixer Driver enabled v5.12.9s1 ... for the other.

If your kernel has CONFIG_MMODULE_SIG_FORCE=y (most secure-boot distribution kernels are), you will need to have a pair of certs/signing_key.pem and certs/signing_key.x509, acceptable to your current BIOS, to sign the kernel modules.

Add a single line #define DEBUG 1 to the top of sound/usb/mixer_scarlett_gen2.c, to enable some rather noisy debug messaging code, if needed.

Enabling new functionality at load time

You need to enable the driver at module load time with the device_setup=1 option to insmod/modprobe. Create a new file /etc/modprobe.d/scarlett.conf, with the following one-line content:

Gen 2:

  • 6i6: options snd_usb_audio vid=0x1235 pid=0x8203 device_setup=1
  • 18i8: options snd_usb_audio vid=0x1235 pid=0x8204 device_setup=1
  • 18i20: options snd_usb_audio vid=0x1235 pid=0x8201 device_setup=1

Gen 3:

  • Solo: options snd_usb_audio vid=0x1235 pid=0x8211 device_setup=1
  • 2i2: options snd_usb_audio vid=0x1235 pid=0x8210 device_setup=1
  • 4i4: options snd_usb_audio vid=0x1235 pid=0x8212 device_setup=1
  • 8i6: options snd_usb_audio vid=0x1235 pid=0x8213 device_setup=1
  • 18i8: options snd_usb_audio vid=0x1235 pid=0x8214 device_setup=1
  • 18i20: options snd_usb_audio vid=0x1235 pid=0x8215 device_setup=1

Or you can use the sledgehammer: options snd_usb_audio device_setup=1,1,1,1 to pass that option to the first 4 USB audio devices.

Issues
  • 18i8 Scarlett - This card can't output sound. But, the proprietary options apears and works for Alsamixer

    18i8 Scarlett - This card can't output sound. But, the proprietary options apears and works for Alsamixer

    I'm able to install the driver without issue. I use the branch v5.11-scarlett-gen3 and I configure the module with those options :

    options snd_usb_audio device_setup=1,1,1,1
    options snd_usb_audio vid=0x1235 pid=0x8210 device_setup=1
    options snd_usb_audio vid=0x1235 pid=0x8211 device_setup=1
    options snd_usb_audio vid=0x1235 pid=0x8212 device_setup=1
    options snd_usb_audio vid=0x1235 pid=0x8213 device_setup=1
    options snd_usb_audio vid=0x1235 pid=0x8214 device_setup=1
    options snd_usb_audio vid=0x1235 pid=0x8215 device_setup=1
    

    Without this driver, it works perfectly after configuring the sound card using Windows 10 + VMWARE then after using the device under Linux.

    With the patched module, I also tried to configure the sound card under windows with a basic configuration under Linux using Jack and it doesn't work.

    My kernel version : Linux pop-os 5.11.0-7614-generic #15~1618626693~21.04~ecb25cd-Ubuntu SMP Thu Apr 22 15:59:53 UTC x86_64 x86_64 x86_64 GNU/Linux

    The git hash used for this module : b8023785a39bb8f47066bc1fbc4b2b57ce4ff15a Branch : v5.11-scarlett-gen3

    Here is my alsa config if it could be usefull :

    Screenshot from 2021-05-16 13-03-23

    Here is my Jack configuration : Screenshot from 2021-05-16 13-05-47

    opened by mikefaille 33
  • Pipewire - suspended -> error (Start error: Invalid argument)

    Pipewire - suspended -> error (Start error: Invalid argument)

    When I use pipewire and I try to connect directly 2 interface, I have this error :

    ct 02 17:52:51 pop-os pipewire[19565]: spa.alsa: Broken configuration: no configurations available: Invalid argument
    Oct 02 17:52:51 pop-os pipewire[19565]: spa.alsa: Broken configuration: no configurations available: Invalid argument
    Oct 02 17:52:51 pop-os pipewire[19565]: spa.alsa: Broken configuration for playback: no configurations available: Invalid argument
    Oct 02 17:52:51 pop-os pipewire[19565]: pw.node: (alsa_input.usb-Focusrite_Scarlett_18i8_USB_F96G6XP1283E26-00.pro-input-0-69) suspended -> error (Start error: Invalid argument)
    Oct 02 17:52:54 pop-os pipewire[19565]: spa.alsa: Broken configuration: no configurations available: Invalid argument
    Oct 02 17:52:54 pop-os pipewire[19565]: spa.alsa: Broken configuration: no configurations available: Invalid argument
    Oct 02 17:52:54 pop-os pipewire[19565]: spa.alsa: Broken configuration for playback: no configurations available: Invalid argument
    Oct 02 17:52:54 pop-os pipewire[19565]: pw.node: (alsa_input.usb-Focusrite_Scarlett_18i8_USB_F96G6XP1283E26-00.pro-input-0-69) suspended -> error (Start error: Invalid argument)
    Oct 02 17:52:57 pop-os pipewire[19565]: spa.alsa: Broken configuration: no configurations available: Invalid argument
    Oct 02 17:52:57 pop-os pipewire[19565]: spa.alsa: Broken configuration: no configurations available: Invalid argument
    Oct 02 17:52:57 pop-os pipewire[19565]: spa.alsa: Broken configuration for playback: no configurations available: Invalid argument
    Oct 02 17:52:57 pop-os pipewire[19565]: pw.node: (alsa_input.usb-Focusrite_Scarlett_18i8_USB_F96G6XP1283E26-00.pro-input-0-69) suspended -> error (Start error: Invalid argument)
    
    

    Can it be an issue at driver side ? I documented the error on Pipewire side too : https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/1995

    opened by mikefaille 11
  • 5.10 kernel compatibility

    5.10 kernel compatibility

    Thanks very much for your work on this.

    I tried making a 5.10.46 kernel (for raspberry pi) using the files from branch v5.12-sound-master (I simply replaced all the files under sound/usb/ with the ones here.

    The kernel build succeeded, and qasmixer presented the controls (for 6i6 gen2 and 18i20 gen3).

    However, jack audio was not able to open an alsa driver for scarlett devices (it could to other devices). So it seems that there is something in the 5.12 scarlett code that is incompatible with 5,10. Or maybe I need to replace more files than just the ones under sound/usb.

    Do you have any suggestions as to what needs to change to backport to 5.10? or best way to debug?

    Thanks, Kevin

    Jul  5 04:09:24 jambox jackdrc[1217]: creating alsa driver ...hw:CARD=USB,DEV=0|hw:CARD=USB,DEV=0|64|4|48000|0|0|nomon|swmeter|-|16bit
    Jul  5 04:09:24 jambox jackdrc[1217]: ALSA: Cannot open PCM device alsa_pcm for playback. Falling back to capture-only mode
    Jul  5 04:09:24 jambox jackdrc[1217]: Jack: JackDriver::Close
    
    opened by kdoren 6
  • Nothing happens after depmod -a

    Nothing happens after depmod -a

    Hi, im trying to install this driver, followed all steps, copied the 2 .ko in /lib/modules/uname -r/updates but i dont get any message after depmod -a . Im sure im doing something wrong but idk what. About the certs part, i dont really know if my kernel has CONFIG_MMODULE_SIG_FORCE=y , probably yes. but i don't know how to create the certs , this is pretty advanced to me, so i will be grateful if u can help me. My distro is Arch and i have a scarlett 18i8 gen3.

    opened by mycroftsnm 5
  • usb 1-1.1: Incompatible EP setup for 0x81

    usb 1-1.1: Incompatible EP setup for 0x81

    I followed the steps in the README and after reboot dmesg says: usb 1-1.1: Incompatible EP setup for 0x81 (for 20 times because I have a sarlett 18i8)

    [ 1365.452880] usb 1-1.1: Incompatible EP setup for 0x81
    [ 1365.452944] usb 1-1.1: Incompatible EP setup for 0x81
    [ 1365.452989] usb 1-1.1: Incompatible EP setup for 0x81
    [ 1365.453033] usb 1-1.1: Incompatible EP setup for 0x81
    [ 1365.453076] usb 1-1.1: Incompatible EP setup for 0x81
    [ 1365.453444] usb 1-1.1: Incompatible EP setup for 0x81
    [ 1365.453495] usb 1-1.1: Incompatible EP setup for 0x81
    [ 1365.453539] usb 1-1.1: Incompatible EP setup for 0x81
    [ 1365.453583] usb 1-1.1: Incompatible EP setup for 0x81
    [ 1365.453627] usb 1-1.1: Incompatible EP setup for 0x81
    [ 1365.454086] usb 1-1.1: Incompatible EP setup for 0x81
    [ 1365.454184] usb 1-1.1: Incompatible EP setup for 0x81
    [ 1365.454270] usb 1-1.1: Incompatible EP setup for 0x81
    [ 1365.454358] usb 1-1.1: Incompatible EP setup for 0x81
    [ 1365.454443] usb 1-1.1: Incompatible EP setup for 0x81
    [ 1365.455070] usb 1-1.1: Incompatible EP setup for 0x81
    [ 1365.455199] usb 1-1.1: Incompatible EP setup for 0x81
    [ 1365.455317] usb 1-1.1: Incompatible EP setup for 0x81
    [ 1365.455433] usb 1-1.1: Incompatible EP setup for 0x81
    [ 1365.455546] usb 1-1.1: Incompatible EP setup for 0x81
    
    ...
    
    [ 1631.016624] usb 1-1.1: Product: Scarlett 18i8 USB
    [ 1631.016628] usb 1-1.1: Manufacturer: Focusrite
    [ 1631.016631] usb 1-1.1: SerialNumber: (serial number)
    [ 1634.656791] usb 1-1.1: Focusrite Scarlett Gen 2/3 Mixer Driver enabled pid=0x8214
    
    

    I found online this discussion on endevourOs: https://forum.endeavouros.com/t/solved-focusrite-saffire-6-usb-audio-input-causes-system-to-lock-up/23806

    I'm running Ubuntu right now, maybe this is the problem? I was wondering if there was a solution similar to the one proposed on the forum but for Ubuntu since the problem is the same one.

    opened by andeledea 4
  • include debug code

    include debug code

    I haven't looked, but the content of https://github.com/sadko4u/focusrite-scarlett-backports/blob/master/debug-drv/mixer_scarlett_gen2.c should be included as a compile-time or runtime option. Mentioned in https://github.com/HinTak/sound-usb-dkms/issues/4

    opened by HinTak 1
  • issue from sound-usb-dkms

    issue from sound-usb-dkms

    This issue https://github.com/HinTak/sound-usb-dkms/issues/4 belongs here - github does not seems to allow transfering issue across personal/org accounts.

    opened by HinTak 1
  • Sound output stops after a couple seconds for 3rd Gen Solo

    Sound output stops after a couple seconds for 3rd Gen Solo

    I'm having this problem on the default drivers and tried this module to see whether that fixes it, but unfortunately it does not.

    Whenever I plug in my Focusrite with headphones and pipe sound to it, the sound just stops after a couple seconds, depending on the USB port I used. This happens with two different hardware configurations, but on my desktop it's not as severe and only happens maybe zero to two times per hour. On my laptop, however, I can only reach a couple seconds at most. Note that sound input works throughout this entire period.

    My setup is as follow:

    • Lenovo Thinkpad T470p (with a ThinkPad Ultra Dock 40A2)
    • Focusrite Scarlett Solo 3rd Gen
    • Arch Linux, kernel 5.13.9
    • Pipewire (happens with Pulseaudio as well)
    • v5.12-scarlett-gen3 branch of this repo (happens without as well)

    After following the instructions in the README and rebooting, I see the following line on dmesg:

    [    0.993659] usb 1-1: new high-speed USB device number 2 using xhci_hcd
    [    1.134793] usb 1-1: New USB device found, idVendor=1235, idProduct=8211, bcdDevice= 6.45
    [    1.134805] usb 1-1: New USB device strings: Mfr=1, Product=3, SerialNumber=2
    [    1.134810] usb 1-1: Product: Scarlett Solo USB
    [    1.134814] usb 1-1: Manufacturer: Focusrite
    …
    [    9.280356] usb 1-1: Focusrite Scarlett Gen 2/3 Mixer Driver enabled pid=0x8211
    

    It doesn't match the README exactly, but I presume this is the expected output when the drivers were loaded. depmod -v -a certainly listed them.

    When plugging it into a USB port on the dock:

    [  606.240244] usb 1-3.4.3: new high-speed USB device number 11 using xhci_hcd
    [  606.334050] usb 1-3.4.3: New USB device found, idVendor=1235, idProduct=8211, bcdDevice= 6.45
    [  606.334063] usb 1-3.4.3: New USB device strings: Mfr=1, Product=3, SerialNumber=2
    [  606.334069] usb 1-3.4.3: Product: Scarlett Solo USB
    [  606.334074] usb 1-3.4.3: Manufacturer: Focusrite
    [  606.334077] usb 1-3.4.3: SerialNumber: Y77R9F80B6C053
    [  606.362898] usb 1-3.4.3: Focusrite Scarlett Gen 2/3 Mixer Driver enabled pid=0x8211
    

    Is this a known issue? Is this something that this driver version can even address?

    opened by FichteFoll 9
Linux 4.19 + PS4 patches + Latest security patches

Linux kernel ============ There are several guides for kernel developers and users. These guides can be rendered in a number of formats, like HTML an

kquote03 1 Oct 12, 2021
Linux v4.14 with the latest security patches and PS4 patches.

Patches are from https://github.com/Ps3itaTeam/ps4-linux Linux kernel ============ This file was moved to Documentation/admin-guide/README.rst Plea

kquote03 2 Oct 12, 2021
i10 implementation for kernel 5.10.73 (latest longterm)

TCP ≈ RDMA: CPU-efficient Remote Storage Access with i10 i10 is a new in-kernel remote storage I/O stack for high-performance network and storage hard

null 2 Apr 7, 2022
Latest spark library rationalised for a single device

SparkIO3 Latest spark library rationalised for a single device With changes to the interface Connect to devices: connect_to_all(); Start the Spark li

null 4 Feb 17, 2022
A updated linora source with special exploits, always be updated to latest update

Fortnite-Bulletp-Internal A working vehicle Bullettp internal, will be always updated to latest fn update! my old github got termed LMAO If i see you

NotSimcraftLOL 28 Jun 11, 2022
InfinityHookPro Win7 -> Win10 latest

InfinityHookPro InfinityHookPro Win7 -> Win10 latest 最近来了兴致,拿起了InfinityHook,原始的版本有点小问题,后来改了支持Win7到Win10 1909的,后来就没有然后了 今天参考了网上大佬发出来的各种版本,最终出了这份代码,理论上支

华仔 224 Jun 27, 2022
RC External cheat updated to latest version

Rogue-Company-External-Cheat RC External cheat updated to latest version This cheat will be regularly updated to every update This Cheat won't work on

null 15 Jun 11, 2022
To simplify the development of ESP32 in ESP-IDF, Easyio provides a complete driver library

Easyio 开源驱动库 Easyio 是一款适配于ESP-IDF框架的开源驱动库,以支持ESP32的简便开发。目的是简化乐鑫ESP-IDF开发框架的使用难度。(真要方便的话,有现成的Arduino和Platform可以用,不过实在迫于工作要求,有的开源东西不让用,同时便于对接FAE,于是就有了 E

null 161 Jun 21, 2022
x64 Windows kernel driver mapper, inject unsigned driver using anycall

anymapper x64 Windows kernel driver mapper, inject unsigned driver using anycall This project is WIP. Todo Fix: Can't make API calls from IAT nor func

Kento Oki 68 Jun 22, 2022
Driver leap - Self-sustainable fork of SteamVR driver for Leap Motion controller with updated vendor libraries

Driver Leap Self-sustainable fork of SteamVR driver for Leap Motion controller with updated vendor libraries Installation (for users) Install Ultralea

null 42 Jun 17, 2022
Hygieia, a vulnerable driver traces scanner written in C++ as an x64 Windows kernel driver.

Hygieia The Greek goddess of health, her name is the source for the word "hygiene". Hygieia is a windows driver that works similarly to how pagewalkr

Deputation 67 Jun 19, 2022
SinMapper - usermode driver mapper that forcefully loads any signed kernel driver

usermode driver mapper that forcefully loads any signed kernel driver (legit cert) with a big enough section (example: .data, .rdata) to map your driver over. the main focus of this project is to prevent modern anti-cheats (BattlEye, EAC) from finding your driver and having the power to hook anything due to being inside of legit memory (signed legit driver).

null 95 Jun 19, 2022
Linux USB driver for the MOTU AVB series interfaces

motu-avb Linux USB driver for the MOTU AVB series interfaces Kernel parameters: samplerate: set the samplerate (its currently fixed at module load) de

null 41 Jun 17, 2022
Linux HWMON sensors driver for ASUS motherboards to get sensor readings from the embedded controller

asus-wmi-ec-sensors Linux HWMON sensors driver for ASUS motherboards to read sensors from the embedded controller Many ASUS motherboards do not publis

Eugene Shalygin 4 Dec 7, 2021
This is a Linux userspace driver for the AverMedia LGX2 (GC551)

LGX2 Userspace driver This software is little more than a POC and no guarantees of functionality are given and it may even be dangerous to use this so

Chris Sawczuk 12 Jun 3, 2022
WinChipHead CH341 linux driver for I2C / SPI and GPIO mode

WinChipHead (沁恒) CH341 linux driver for I2C / SPI and GPIO mode The CH341 is declined in several flavors, and may support one or more of UART, SPI, I2

Frank Zago 11 Jun 27, 2022
New linux driver and tools for RME HDSPe sound cards and extension modules

snd-hdspe New linux kernel ALSA driver for RME HDSPe MADI / AES / RayDAT / AIO and AIO Pro sound cards and extension modules. In addition to the funct

Philippe Bekaert 20 Jun 29, 2022
Linux Driver for USB WiFi Adapters that are based on the RTL8811AU and RTL8821AU Chipsets

Click for USB WiFi Adapter Information for Linux 8821au ( 8821au.ko ) ?? Linux Driver for USB WiFi Adapters that are based on the RTL8811AU and RTL882

Nick 89 Jun 24, 2022
Linux Driver for USB WiFi Adapters that are based on the RTL8812BU and RTL8822BU Chipsets

Click for USB WiFi Adapter Information for Linux 88x2bu ( 88x2bu.ko ) ?? Linux Driver for USB WiFi Adapters that are based on the RTL8812BU and RTL882

Nick 206 Jun 24, 2022