5

I have a setup with two Logitech Unifying receivers, each receiver has a keyboard bound to it. One of the receiver is to be used by the physical machine to which the devices are connected, the other one has to be passed to a QEMU virtual machine.

I am able to manually unbind one receiver following the instructions in How to use Linux kernel driver bind/unbind interface for USB-HID devices?. This method has some disadvantages:

  • I have to determine the device identifier manually by looking at dmesg.
  • Each time the virtual machine is closed, and on every reboot, the unbinding process has to be repeated.

I then tried to find kernel module options that prevents the USB driver from binding it at all and found the quirks option for usbhid. Unfortunately, this parameter cannot be used since I have two identical receivers with the same vendor and device ID.

The two devices are distinguishable by their separate buses. That is, lsusb looks like:

Bus 001 Device 003: ID 046d:c52b Logitech, Inc. Unifying Receiver
Bus 002 Device 002: ID 046d:c52b Logitech, Inc. Unifying Receiver

Is there a way to prevent hid-logitech-dj (or usbhid) from binding a USB device on a certain bus?

The target machine is running Arch Linux 64-bit with a Linux 3.9 kernel.

  • Interestingly, QEMU takes over the USB device without me having to do anything. For example, pressing Alt+Tab has only effect in QEMU, it is not registered by the host anymore. I do not know whether this is guaranteed behavior though. – Lekensteyn Jun 4 '13 at 20:49
1

Within UDEV it is possible to add a rule to search for the specific bus and set the OPTIONS to "ignore_device". Did you mention your Kernel version or OS?

  • 1
    ignore_device was removed a while back, that won't work. – Lekensteyn Jun 4 '13 at 20:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.