2007-02-22
udev and evdev: Removing devices
Yes, there is a legitimate reason for removing devices, and a special way to do it. In my case, I needed to because my cheap USB numpad exported two evdev-compatible devices with the same name. This confused evdev-plug… especially since one of them is completely inert.
The trick is to find the modalias for the troublesome interface in question. That will uniquely identify that evdev interface file leaving the other one untouched. Assuming the device node is /dev/input/event6, this should do the trick:
udevinfo -a -p `udevinfo -q path -n /dev/input/event6` | grep 'ATTRS{modalias}=="usb'
Take the output of that line and substitute it into this udev rule: (See my previous post for details))
BUS=="usb", ATTRS{modalias}=="usb:v1267p0103d0101dc00dsc00dp00ic03isc00ip00", OPTIONS="ignore_device"
It should be pretty self-explanatory.
UPDATE: On a related note, if you are using one of those Mouse+Keyboard USB-to-PS/2 bridges and don’t mind the lack of “Plug and Play”-like flexibility, the simplest way to select one of the two devices is to use something like this:
Driver "evdev" Option "Name" "CHESEN PS2 to USB Converter" Option "Phys" "*/input0"
You can get the values for Name and Phys using
cat /proc/bus/input/devices

The udev and evdev: Removing devices by Stephan Sokolow, unless otherwise expressly stated, is licensed under a Creative Commons Attribution-Share Alike 2.5 Canada License.

