Skip to content

Instantly share code, notes, and snippets.

@timnugent
Last active June 2, 2023 14:28
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save timnugent/ed65a79b2bd6c63788bfada3624756a4 to your computer and use it in GitHub Desktop.
Save timnugent/ed65a79b2bd6c63788bfada3624756a4 to your computer and use it in GitHub Desktop.
udev rule for the Xone 23C; sets configuration to state "2" so this shows up as a 4 input/4 output soundcard - otherwise shows up as only 2 input/2 output. Only tested with the Xone 32C configured for DVS. Put this file in /etc/udev/rules.d/
ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="22f0", ATTR{idProduct}=="0008", ATTR{bConfigurationValue}="2"
@pierregermain
Copy link

pierregermain commented Sep 4, 2021

I tested this udev rule, restarted and still only channel 1 and 2 working.
My kernel is 5.11.0-27
My dmesg:

[  652.039821] usb 1-1: USB disconnect, device number 7
[  657.153856] usb 1-1: new high-speed USB device number 8 using xhci_hcd
[  657.303116] usb 1-1: New USB device found, idVendor=22f0, idProduct=0008, bcdDevice= 2.00
[  657.303120] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[  657.303121] usb 1-1: Product: Xone:23C
[  657.303123] usb 1-1: Manufacturer: Allen&Heath
[  657.303124] usb 1-1: SerialNumber: no serial number
[  657.304562] usb 1-1: 1:2 : UAC_AS_GENERAL descriptor not found
[  657.305164] usb 1-1: 2:2 : UAC_AS_GENERAL descriptor not found

Please note that I did not enable DVS Support in my mixer with the internal cables.

@Be-ing
Copy link

Be-ing commented Sep 4, 2021

Please note that I did not enable DVS Support in my mixer with the internal cables.

Maybe the mixer changes its USB descriptors when this is done? Just a guess. Please post the output of lsusb -v -d 22f0:0008 with the Xone 23 plugged in.

@timnugent
Copy link
Author

timnugent commented Sep 4, 2021 via email

@pierregermain
Copy link

Will report (with both jumpers plugged in) in the next days. Thanks all for the feedback.

@pierregermain
Copy link

pierregermain commented Sep 6, 2021

I have still the same problem when installing the 2 jumpers (Kernel 5.11.0-27)

$ dmesg
[   82.140540] usb 1-2: new high-speed USB device number 8 using xhci_hcd
[   82.289811] usb 1-2: New USB device found, idVendor=22f0, idProduct=0008, bcdDevice= 2.00
[   82.289816] usb 1-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[   82.289817] usb 1-2: Product: Xone:23C
[   82.289819] usb 1-2: Manufacturer: Allen&Heath
[   82.289820] usb 1-2: SerialNumber: no serial number
[   82.325106] usb 1-2: 1:2 : UAC_AS_GENERAL descriptor not found
[   82.326618] usb 1-2: 2:2 : UAC_AS_GENERAL descriptor not found
$ cat /etc/udev/rules.d/69-mixxx-usb-uaccess.rule 
# Allen + Heath Ltd.
SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ATTRS{idVendor}=="22f0", TAG+="uaccess"
# Allen + Heath Xone 23C hardware mixer with USB audio interface
# This is required so all 4 input and all 4 output channels of the audio interface are available.
ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="22f0", ATTR{idProduct}=="0008", ATTR{bConfigurationValue}="2"
# Only some distribuions require the below
KERNEL=="hiddev*", NAME="usb/%k", GROUP="uaccess"
$ lsusb -v -d 22f0:0008

https://gist.github.com/pierregermain/60884fd2f78262a2e7abad6a1492d6a7

@pierregermain
Copy link

pierregermain commented Sep 6, 2021

I downgraded to kernel 5.4.0.33 and now it works perfectly, awesome!

cat /etc/udev/rules.d/69-mixxx-usb-uaccess.rule

# Allen + Heath Ltd.
SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ATTRS{idVendor}=="22f0", TAG+="uaccess"
# Allen + Heath Xone 23C hardware mixer with USB audio interface
# This is required so all 4 input and all 4 output channels of the audio interface are available.
ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="22f0", ATTR{idProduct}=="0008", ATTR{bConfigurationValue}="2"
# Only some distribuions require the below
KERNEL=="hiddev*", NAME="usb/%k", GROUP="uaccess"
dmesg

[  108.918527] usb 1-1: new high-speed USB device number 7 using xhci_hcd
[  108.940110] usb 1-1: New USB device found, idVendor=22f0, idProduct=0008, bcdDevice= 2.00
[  108.940111] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[  108.940112] usb 1-1: Product: Xone:23C
[  108.940113] usb 1-1: Manufacturer: Allen&Heath
[  108.940114] usb 1-1: SerialNumber: no serial number
[  108.974774] usb 1-1: 1:2 : UAC_AS_GENERAL descriptor not found
[  108.976281] usb 1-1: 2:2 : UAC_AS_GENERAL descriptor not found
lsusb -v -d 22f0:0008

https://gist.github.com/pierregermain/795102f6b0b733c59bf180e368c1fdee

@pierregermain
Copy link

pierregermain commented Sep 6, 2021

Update: In kernel 5.4.0.33 without using the rule it also works.

@pierregermain
Copy link

pierregermain commented Sep 6, 2021

@timnugent

I'm fairly certain I did enable DVS support. Away from my machine until Wednesday but will run that command and report back then.

Sorry for all my spam, but I think it can help to figure this thing out. Can you please double check if you are still using kernel 5.4.0-33 ?

@Be-ing
Copy link

Be-ing commented Sep 7, 2021

Thanks for digging into this. So there has been a regression in Linux affecting this device. Please report the bug upstream.

@pierregermain
Copy link

Thanks for the link Be-ing. I will wait for now to see which version of the kernel Timnugent is using.

@Be-ing
Copy link

Be-ing commented Sep 7, 2021

If you are able to test different kernel versions and identify the first broken version that would be helpful to include in the bug report.

@pierregermain
Copy link

OK. Will do that in the couple of days.

@pierregermain
Copy link

pierregermain commented Sep 11, 2021

In kernel 5.4.0.37 with and without using the rule it does not work.
In kernel 5.4.0.84 with and without using the rule it does not work.

lsusb:
https://gist.github.com/pierregermain/1cfa77e9dcf53a479451bb8f60351920

@pierregermain
Copy link

If you are able to test different kernel versions and identify the first broken version that would be helpful to include in the bug report.

I am using Linux Mint and using the UI I am only capable of testing 5.4.0.37 and 5.4.0.33. How would you test 5.4.0.33-generic and 5.4.0.34-generic in a simple way ?

@molli1312
Copy link

hello.maybe you can help me.with udev entry i can't get my xone 23 c with 4/4 in-/output to run on my rpi4

@pierregermain
Copy link

Sorry, I need more experience to test different kernels.

@molli1312
Copy link

I opened a issus by https://bugzilla.kernel.org/show_bug.cgi?id=217089 . I think is a good way. but we need more help

@pierregermain
Copy link

Thank you @molli1312 , let me know here if you need something from my part.

@molli1312
Copy link

We need dsmeg lsusb -v data from an earlier kernel where the udev rule still worked. Maybe someone will get the information

@pierregermain
Copy link

Hello, I will try tonight from my personal computer.

@molli1312
Copy link

thx

@pierregermain
Copy link

pierregermain commented Feb 27, 2023

I have updated the issue on kernel.org @molli1312 whith the desired information.

@pierregermain
Copy link

We have good news thanks to the issue posted at https://bugzilla.kernel.org/show_bug.cgi?id=217089, for now a workaround to make the device function is executing the following command as root:

echo Y >/sys/module/usbcore/parameters/old_scheme_first

If I get more information I will keep you informed in this thread.

@molli1312
Copy link

@pierregermain nice to see that there is progress. I won't be back home until Friday to test it. Thank you for your support

@molli1312
Copy link

@pierregermain I'm curious and can't wait for Friday. runs with the command the mixer on the rpi4 with mixxx-pi-gen?

@pierregermain
Copy link

Just to let you know @molli1312 : I have tested this on a Dell Laptop.

@TiBeN
Copy link

TiBeN commented May 11, 2023

Hi, i just acquired this great mixer and i have this exact same issue. But the trick to change "old_scheme_first" does not works for me.
I'm on ArchLinux with kernel 6.3.1. Despite "cat [...]/old_scheme_first" reports now correctly 'Y', bNumConfigurations for the Xone reports 1 in lsusb -v, even after unplug/plug again the usb cable.

If i "echo 2 > /sys/bus/usb/devices/3-8/bConfigurationValue" its returns "bash: echo: write error: Invalid argument". In journalctl i can see the udev rule from mixxx applied when plugin the mixer but it fails the same way.

According to the bug report on the kernel bugzilla it seems Ubuntu could have been "patched" its kernel in some way to workaround this.

Any idea ?

@molli1312
Copy link

molli1312 commented May 11, 2023

turn the power of mixer off and on again

@fhchl
Copy link

fhchl commented May 11, 2023

Changing the scheme worked like a charm for me. I made the change permanent by following this StackExchange answer. Thanks @pierregermain !

@TiBeN
Copy link

TiBeN commented May 12, 2023

@molli1312 All right, after a "reboot" of the mixer it now works as expected, i see correctly 4 channels in Mixxx.

Thank you man!

As a side note, in my setup at least, it is important to unplug the USB cable as well then reconnect only after the mixer is on. If the USB cable stay connected, the device is not recognized at all:

May 12 11:19:58 dellxps13 kernel: usb 3-8: new high-speed USB device number 6 using xhci_hcd
May 12 11:19:58 dellxps13 kernel: usb 3-8: New USB device found, idVendor=22f0, idProduct=0008, bcdDevice= 2.00
May 12 11:19:58 dellxps13 kernel: usb 3-8: New USB device strings: Mfr=1, Product=2, SerialNumber=3
May 12 11:19:58 dellxps13 kernel: usb 3-8: Product: Xone:23C
May 12 11:19:58 dellxps13 kernel: usb 3-8: Manufacturer: Allen&Heath
May 12 11:19:58 dellxps13 kernel: usb 3-8: SerialNumber: no serial number
May 12 11:19:58 dellxps13 kernel: usb 3-8: 1:2 : UAC_AS_GENERAL descriptor not found
May 12 11:19:58 dellxps13 kernel: usb 3-8: 2:2 : UAC_AS_GENERAL descriptor not found
May 12 11:19:58 dellxps13 mtp-probe[3020]: checking bus 3, device 6: "/sys/devices/pci0000:00/0000:00:14.0/usb3/3-8"
May 12 11:19:58 dellxps13 mtp-probe[3020]: bus: 3, device: 6 was not an MTP device
May 12 11:19:58 dellxps13 (udev-worker)[3040]: controlC1: /usr/lib/udev/rules.d/78-sound-card.rules:5 Failed to write ATTR{/sys/devices/pci0000:00/0000:00:14.0/usb3/3-8/3-8:1.0/sound/card1/controlC1/../uevent}, ignoring: No such file or directory
May 12 11:19:58 dellxps13 mtp-probe[3042]: checking bus 3, device 6: "/sys/devices/pci0000:00/0000:00:14.0/usb3/3-8"
May 12 11:19:58 dellxps13 mtp-probe[3042]: bus: 3, device: 6 was not an MTP device
May 12 11:20:02 dellxps13 kernel: usb 3-8: USB disconnect, device number 6

It seems an udev rule related to sound card initialization fails.
Once the system fall into this issue, whatever i do (unplug, replug, reboot the mixer) the device is not recognized. The only solution i found is to reboot the kernel. I'll look more further at this issue then report here if i find something interresting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment