5

I'm launching my VM as a GPU passthrough, and it works near perfectly, except I'm having a hell of a time passing my Xbox One gamepad to it.

I'm using qemu-system-x86_64, and my output from lsusb for the controller is

Bus 003 Device 022: ID 045e:02ea Microsoft Corp.

and my command for the usb is

-usb -usb-host,vendorid=0x045e,productid=0x02ea

The qemu window keeps showing

libusb: error [udev_hotplug_event] ignoring udev action bind
qemu-system-x86_64: libusb_release_interface: -4 [NO_DEVICE]
qemu-system-x86_64: libusb_release_interface: -4 [NO_DEVICE]
qemu-system-x86_64: libusb_release_interface: -4 [NO_DEVICE]
libusb: error [_get_usbfs_fd] File doesn't exist, wait 10 ms and try again
libusb: error [_get_usbfs_fd] libusb couldn't open USB device
    /dev/bus/usb/003/016: No such file or directory

Within the Win10 VM itself, I can hear the notification for when a new USB device is connected, but then I hear the one for when it's disconnected almost immediately.

Anybody know how to solve these errors?

Update:

I tried pointing at the exact device bus / addr for bus 3, addr 22 but that didn't work. I'm not certain why libusb is targeting a non-existent device file since lsusb Bus and Device numbers are base 10.

Update 2:

A corded Xbox 360 controller works perfectly. Still am confused about the Xbox One controller. The Xbox One controller is a wireless controller, but it's attached to my computer via USB cable.

4
  • Did you find a solution? I have the exact same problem. For some time, I was able to connect the pad via bluetooth (passing through the BT controller to the guest); yesterday, the BT connection mysteriously stopped working, and the USB connection suffers from the problem you mention.
    – Marcus
    Commented Dec 23, 2018 at 12:53
  • I never did. The corded works great so I continue to use that.
    – Raven
    Commented Dec 26, 2018 at 21:15
  • Side note; what you might try, if you have the real-estate for it within your computer, is a pci-usb riser card. My guess is that (and this is just a guess) during pass through, the connection cointinually drops and tries to re-establish if you attempt it via -usb -device. Perhaps this won't happen if the VM isn't tasked with passing individual devices but can instead maintain a continuous connection via PCI-USB riser card
    – Raven
    Commented Dec 26, 2018 at 21:17
  • 1
    I actually managed to fix the BT problem, so I'm using it again via BT. Interestingly, I fixed the problem by disabling the power saving of the BT card, via the windows device manager.
    – Marcus
    Commented Dec 27, 2018 at 22:27

1 Answer 1

4

I was experiencing the same error, but I found a solution that worked for me, if I ban the use of the xpad driver through modprobe.d then the re-initialisation with Qemu works.

This is what I did (on my Fedora system, yours might differ), I added this line to the file /etc/modprobe.d/vfio.conf:

blacklist xpad

You can read more about this technique here: https://wiki.archlinux.org/index.php/Kernel_module#Blacklisting

3
  • 1
    I'll give this a shot, thanks for the suggestion
    – Raven
    Commented Jul 13, 2020 at 18:15
  • @DeepDeadpool Let me know if it works :) Commented Jul 16, 2020 at 23:19
  • 1
    FWIW, this problem also occurs on Virtualbox and the same solution helped. Commented Dec 8, 2020 at 7:21

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .