2007-02-22

udev and evdev: Removing devices

Posted in Geek Stuff at 2:10

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

RSS feed for comments on this post · TrackBack URL

Leave a Comment

By submitting a comment here you grant this site a perpetual license to reproduce your words and name/web site in attribution.

Bad Behavior has blocked 55 access attempts in the last 7 days.