[x86-64] XMOS USB DAC not instantly detected

  • Having set up LibreELEC I decided to add a USB DAC. Its an USB 2.0 XMOS device and worked nicely on previous systems. I shut down the PC, plugged in the DAC and rebooted but the DAC was not detected (not shown on lsusb). I checked the dmsg but nothing showed up.


    I unplugged and replugged and the DAC showed up:

    Code
    Bus 001 Device 005: ID 20b1:0002 XMOS Ltd XMOS USB Audio 2.0

    dmesg showed the following:

    Code
    Nov 06 19:42:36 LibreELEC kernel: usb 1-1: new high-speed USB device number 5 using xhci_hcd
    Nov 06 19:42:37 LibreELEC kernel: mc: Linux media interface: v0.10
    Nov 06 19:42:37 LibreELEC kernel: usbcore: registered new interface driver snd-usb-audio
    Nov 06 19:42:37 LibreELEC (udev-worker)[1556]: controlC2: /usr/lib/udev/rules.d/90-alsa-restore.rules:5 Only network interfaces can be renamed, ignoring
    Nov 06 19:42:37 LibreELEC Boot[1564]: ### Setting up sound card ###

    and kodi picked it up perfectly

    Code
    2025-11-06 19:42:38.199 T:1216     info <general>:     Device 6
    2025-11-06 19:42:38.199 T:1216     info <general>:         m_deviceName      : iec958:CARD=X20,DEV=0
    2025-11-06 19:42:38.199 T:1216     info <general>:         m_displayName     : XMOS USB Audio 2.0
    2025-11-06 19:42:38.199 T:1216     info <general>:         m_displayNameExtra: S/PDIF
    2025-11-06 19:42:38.199 T:1216     info <general>:         m_deviceType      : AE_DEVTYPE_IEC958
    2025-11-06 19:42:38.199 T:1216     info <general>:         m_channels        : FL, FR
    2025-11-06 19:42:38.199 T:1216     info <general>:         m_sampleRates     : 44100,48000,88200,96000,176400,192000,384000
    2025-11-06 19:42:38.199 T:1216     info <general>:         m_dataFormats     : AE_FMT_RAW,AE_FMT_S32NE
    2025-11-06 19:42:38.199 T:1216     info <general>:         m_streamTypes     : STREAM_TYPE_AC3,STREAM_TYPE_DTSHD_CORE,STREAM_TYPE_DTS_1024,STREAM_TYPE_DTS_2048,STREAM_TYPE_DTS_512

    I tried different USB ports but that made no difference. I tried the DAC on another Linux (Mint) system and that picked up the DAC from boot and if hot plugged.

    I am not sure how the diagnose this so I would appreciate any help in how to progress this


    thank you for any help

  • the DAC doesn't appear in the Kodi setting after boot as the DAC isn't detected by the underlying Linux (lsusb doesn't show it). If i unplug and hotplug the DAC it does appear in lsusb and does appear in Kodi

  • Thanks. Please post a complete log for the boot sequence (when the DAC isn't detected).

    Please provide a full debug log.

    How to post a log (wiki)

    1. Enable debugging in Settings>System Settings>Logging
    2. Restart Kodi
    3. Replicate the problem
    4. Generate a log URL (do not post/upload logs to the forum)

    use "Settings > LibreELEC > System > Paste system logs" or run "pastekodi" over SSH, then post the URL link
  • There is no external hub in the way, the DAC is plugged direct into the laptop and the problem is there on all three ports.

    If I understand correctly there is an internal hub within the laptop. Is there firmware loaded by LibreELEC for that hub?

    [BIOS is the latest from Lenovo]

  • I've seen similar issues with ARM SoC boards and the typical solution there is changes to device-tree files to correctly describe the hardware (and how it is powered) but x86_64 hardware doesn't require/use device-tree things at all, so that's not relevant.

    No firmware is required for the internal USB hubs.

    Please update to the latest LE13 nightly and see if the newer kernel etc. in the image randomly fixes anything?

  • A little more digging.

    Although plugging the DAC into another laptop worked as expected with the DAC appearing from boot and after hot plug I decided to check the laptop I am using for Libre ELEC running another Linux.

    I used the Mint installation USB and booted to a live Mint and checked with lsusb: the DAC wasn't there. I unplugged the DAC and hot plugged it - the DAC appeared. I also tried a full Mint (22.2)installation, patched upto date and that also failed, so there is a Linux issue with my specific laptop. Very odd

  • thank you for the suggestion but I am not exactly sure what you mean by "from autostart" but.....

    I looked at dmesg after I hotplugged the DAC:

    Code
    [  285.191496] usb 1-2: new high-speed USB device number 5 using xhci_hcd
    [  285.340212] mc: Linux media interface: v0.10
    [  285.811284] usbcore: registered new interface driver snd-usb-audio

    I then used modprobe to relaod the drivers (I think):

    Code
    modprobe xhci-hcd
    modprobe usbcore
    modprobe snd-usb-audio

    no joy

  • I fell for a bad google: "modprobe xx" does not reinstall the xx driver, it just installs the driver and does nothing if the driver is already installed, the driver must be removed first: "modprobe -r xx". So I retried the above but first removing the driver then installing. no joy.


    A further experiment with a borrowed USB DAC - a much more power hungry device which still work using USB power. That worked perfectly.....a little odd as it is also an XMOS device

    lsusb shows:

    Code
    Bus 001 Device 003: ID 20b1:3078 XMOS Ltd Ustars Audio

    as opposed to

    Code
    Bus 001 Device 005: ID 20b1:0002 XMOS Ltd XMOS USB Audio 2.0

    so still stuck getting my DAC to work


    my DAC is USB powered, its low powered so should be no issue. The other DAC I borrowed is a much beefier device and that worked using USB power.

    However, desperate times. I have dug out a 5v PSU that connects to the DAC and switched it o external power. Exactly the same problem, the DAC does appear from boot. However I disconnected the PSU and reconnected it and it appears, so it behaves like its been hotplugged.

    Edited once, last by klh939: Merged a post created by klh939 into this post. (November 7, 2025 at 5:59 PM).

  • After reading somewhere that udev can make like somethings been hot plugged I experimented with a dedicated rule for my XMOS device putting it in .config/udev.rules.d/ and reloaded. No joy.

    Looking in journalctl for udev messages showed nothing about my device OR my new rule. I tried various udevadm incantations to reload rules and trigger events but nothing. So I hot plugged the device and bingo the device appeared in lsusb as expected BUT there were now udev entries in journalclt:

    Code
    Nov 08 16:56:07 LibreELEC (udev-worker)[2280]: 1-2: Process '/bin/sh -c 'sleep 2; /usr/bin/udevadm trigger --subsystem=usb --attr-match=idVendor=20b1 --attr-match=idProduct=0002'' failed with exit code 1.

    Clearly a fault with my rule [--subsystem=usb should be --subsystem-match=usb] BUT these entries don't exist from boot which to me indicates that the device itself isn't being detected at all from boot and hence no udev matching to a rule.

    I have tried triggering the reload(?) of the specific device

    Code
    udevadm trigger --subsystem-match=usb --attr-match=idVendor=20b1 --attr-match=idProduct=0002

    and just the USB subsystem

    Code
    udevadm trigger --subsystem-match=usb

    but no joy