I’m running a new desktop with one built-in USB controller and one extra USB controller from a PCI card. I passed through the built-in USB controller and plan to use the PCI card for anything other than keyboards and mice.
Unfortunately, I just can’t get my microphone or camera working through the PCI card. I’ve had it randomly work on certain occasions, but 90% of the time it won’t work.
In most case, when I go into my USB qube and run lsusb, I get this output:
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 0627:0001 Adomax Technology Co., Ltd QEMU Tablet
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
If I plug in my microphone, sometimes I’ll get that output, and other times I’ll see this:
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 0627:0001 Adomax Technology Co., Ltd QEMU Tablet
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 002: ID 2109:2822 VIA Labs, Inc. [unknown]
Bus 003 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 002: ID 2109:0822 VIA Labs, Inc. [unknown]
I’ve bolded the two new lines. If I use readlink (readlink /sys/bus/usb/devices/usb2 and readlink /sys/bus/usb/devices/usb3), sure enough they’ve got the same PCI address as the PCI card I’m passing through.
Why isn’t it working? ![]()
On very rare occasions, things will work perfectly and I have no idea why. I managed to get to this state right now after restarting my USB qube (changing no settings in the process). Here’s the output of lsusb:
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 2109:2822 VIA Labs, Inc. [unknown]
Bus 001 Device 003: ID 0c45:6366 Microdia Webcam Vitade AF
Bus 001 Device 004: ID 0d8c:0005 C-Media Electronics, Inc. Blue Snowball
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 002 Device 002: ID 2109:0822 VIA Labs, Inc. [unknown]
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 002: ID 0627:0001 Adomax Technology Co., Ltd QEMU Tablet
See how both my camera and microphone are attached to bus 1? Weird, I’d of thought they’d attach to bus 2 or 3. Here’s the output of readlink for each now:
[user@sys-usb ~]$ readlink /sys/bus/usb/devices/usb1
…/…/…/devices/pci0000:00/0000:00:06.0/usb1
[user@sys-usb ~]$ readlink /sys/bus/usb/devices/usb2
…/…/…/devices/pci0000:00/0000:00:06.0/usb2
[user@sys-usb ~]$ readlink /sys/bus/usb/devices/usb3
…/…/…/devices/pci0000:00/0000:00:05.0/usb3
That 0000:00:06.0 is the PCI address of the PCI card that I’m passing into the USB qube, so that’s what we’d expect:
[user@sys-usb ~]$ lspci
00:00.0 Host bridge: Intel Corporation 440FX - 82441FX PMC [Natoma] (rev 02)
00:01.0 ISA bridge: Intel Corporation 82371SB PIIX3 ISA [Natoma/Triton II]
00:01.1 IDE interface: Intel Corporation 82371SB PIIX3 IDE [Natoma/Triton II]
00:01.3 Bridge: Intel Corporation 82371AB/EB/MB PIIX4 ACPI (rev 03)
00:02.0 Unassigned class [ff80]: XenSource, Inc. Xen Platform Device (rev 01)
00:04.0 VGA compatible controller: Device 1234:1111 (rev 02)
00:05.0 USB controller: Intel Corporation 82801DB/DBM (ICH4/ICH4-M) USB2 EHCI Controller (rev 10)
00:06.0 USB controller: ASMedia Technology Inc. ASM2142/ASM3142 USB 3.1 Host Controller
Why is it working? ![]()
To summarize, Sometimes running lsusb on the USB qube fails to recognize anything is plugged in. Other times, it realizes something changed but can’t recognize it. In either case, I don’t see the new device in dom0, either from running qvm-usb or looking at the Qubes Devices GUI. Rarely, everything will work and I don’t understand why.
Things I’ve tried:
- Removing usbcore.authorized_defaults=0 from the GRUB boot options
- Removing rd.qubes.hide_all_usb from the GRUB boot options
- Removing both of the above
- Setting no strict reset for the PCI card when I pass it through
- Plugging the camera/microphone into different ports
Any advice?