Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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.

share|improve this question
    
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 Answer 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?

share|improve this answer
    
ignore_device was removed a while back, that won't work. –  Lekensteyn Jun 4 '13 at 20:47

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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