From: Ron <ro...@de...> - 2006-04-17 13:24:50
|
Hi, Yes, I'm a little excited, and its always nice to finish on a high note. This time I think I have little but unadulterated Good News. As long ago promised, I've taken another look at the dreaded device node allocation and blacklisting trouble. Things seems to have settled down a little, or at least become sufficiently functional, to make the answer delightfully simple, if not somewhat occulted before tonight. Attached is a set of udev rules, which will create a /dev/input/wacom link to the last attached tablet. This node is suitable for the most usual case, where a user has only a single wacom device attached to their machine. It will also create a /dev/input/<TabletType> node, pointing to the last attached device of that type (in my case graphire3). For users with multiple devices of different types, you may use the name of each tablet without ever needing to worry about where or what order you connect them in. For the case where a user has multiple tablets of the same type, things get just a little harder. There does not seem to be any serial number or similar which we could use to discriminate between them (if there is, making it available may prove useful) -- but this case at present is best handled by rules already present in the default Debian installation, which create /dev/input/by-path/... links. It requires the most user intervention still, and that you identify each tablet by its connection point. Without a unique id for similar tablets, I'm not sure we can do much better than that. I can forward those rules to anyone not using Debian who needs them, as I haven't duplicated them in the wacom specific code. In addition, the rules call a RUN script when any wacom device is attached, which will check if the device has bound to the wacom kernel driver, and if it has not, will try to remedy that. If they don't change it all again, this should work for every tablet with every kernel from 2.6.16 or so on, and we can delist all the devices from the hid_blacklist and be down to just the bleeding edge wacom.c outside of the kernel. It's half tested at present, meaning I don't have a kernel handy which _doesn't_ blacklist my graphire3 from hid-core, but I can manually disconnect and reconnect it to the wacom driver, so disconnecting from any other module should not be a source of too much grief. XOrg7 should be usable in Debian in a few days, and I'll try to have this available for wider testing right after that. In the meantime, I would invite anyone with an interest (especially maintainers from other dists) to consider the names of the links for each device type presented below. It would be really nice if we could all agree to use the same names for them, and coordinate the addition of new ones as the devices become available/supported so that they stay that way. So with no further ado, Ladies and Gentlemen, I give you the missing links (: # udev rules for wacom tablets. # These rules were compiled for the Debian GNU/Linux distribution, # but others may, and indeed are encouraged to, use them also. # # Should you do so, PLEASE CO-ORDINATE ANY CHANGES OR ADDITIONS # of new devices with ro...@de..., so that we can try to # present users with with a standard set of device nodes which # they can rely on across the board. # Convenience link for the common case of a single tablet. KERNEL=="event[0-9]*", SYSFS{idVendor}=="056a", SYMLINK="input/wacom" # Type-named links for multiple tablets. If you want to use multiple # tablets of the _same_ type, you will probably need to use the links # from /dev/input/by-path to identify which is plugged into what usb # port. For different types though, just pick your links from the # list below. KERNEL=="event[0-9]*", SYSFS{idVendor}=="056a", SYSFS{idProduct}=="0000", SYMLINK+="input/penpartner" KERNEL=="event[0-9]*", SYSFS{idVendor}=="056a", SYSFS{idProduct}=="0010", SYMLINK+="input/graphire" KERNEL=="event[0-9]*", SYSFS{idVendor}=="056a", SYSFS{idProduct}=="0011", SYMLINK+="input/graphire2-4x5" KERNEL=="event[0-9]*", SYSFS{idVendor}=="056a", SYSFS{idProduct}=="0012", SYMLINK+="input/graphire2-5x7" KERNEL=="event[0-9]*", SYSFS{idVendor}=="056a", SYSFS{idProduct}=="0013", SYMLINK+="input/graphire3" KERNEL=="event[0-9]*", SYSFS{idVendor}=="056a", SYSFS{idProduct}=="0014", SYMLINK+="input/graphire3-6x8" KERNEL=="event[0-9]*", SYSFS{idVendor}=="056a", SYSFS{idProduct}=="0015", SYMLINK+="input/graphire4-4x5" KERNEL=="event[0-9]*", SYSFS{idVendor}=="056a", SYSFS{idProduct}=="0016", SYMLINK+="input/graphire4-6x8" KERNEL=="event[0-9]*", SYSFS{idVendor}=="056a", SYSFS{idProduct}=="0060", SYMLINK+="input/volito" KERNEL=="event[0-9]*", SYSFS{idVendor}=="056a", SYSFS{idProduct}=="0061", SYMLINK+="input/penstation2" KERNEL=="event[0-9]*", SYSFS{idVendor}=="056a", SYSFS{idProduct}=="0062", SYMLINK+="input/volito2-4x5" KERNEL=="event[0-9]*", SYSFS{idVendor}=="056a", SYSFS{idProduct}=="0063", SYMLINK+="input/volito2-2x3" KERNEL=="event[0-9]*", SYSFS{idVendor}=="056a", SYSFS{idProduct}=="0064", SYMLINK+="input/penpartner2" KERNEL=="event[0-9]*", SYSFS{idVendor}=="056a", SYSFS{idProduct}=="0020", SYMLINK+="input/intuos-4x5" KERNEL=="event[0-9]*", SYSFS{idVendor}=="056a", SYSFS{idProduct}=="0021", SYMLINK+="input/intuos-6x8" KERNEL=="event[0-9]*", SYSFS{idVendor}=="056a", SYSFS{idProduct}=="0022", SYMLINK+="input/intuos-9x12" KERNEL=="event[0-9]*", SYSFS{idVendor}=="056a", SYSFS{idProduct}=="0023", SYMLINK+="input/intuos-12x12" KERNEL=="event[0-9]*", SYSFS{idVendor}=="056a", SYSFS{idProduct}=="0024", SYMLINK+="input/intuos-12x18" KERNEL=="event[0-9]*", SYSFS{idVendor}=="056a", SYSFS{idProduct}=="0030", SYMLINK+="input/pl400" KERNEL=="event[0-9]*", SYSFS{idVendor}=="056a", SYSFS{idProduct}=="0031", SYMLINK+="input/pl500" KERNEL=="event[0-9]*", SYSFS{idVendor}=="056a", SYSFS{idProduct}=="0032", SYMLINK+="input/pl600" KERNEL=="event[0-9]*", SYSFS{idVendor}=="056a", SYSFS{idProduct}=="0033", SYMLINK+="input/pl600sx" KERNEL=="event[0-9]*", SYSFS{idVendor}=="056a", SYSFS{idProduct}=="0034", SYMLINK+="input/pl550" KERNEL=="event[0-9]*", SYSFS{idVendor}=="056a", SYSFS{idProduct}=="0035", SYMLINK+="input/pl800" KERNEL=="event[0-9]*", SYSFS{idVendor}=="056a", SYSFS{idProduct}=="0037", SYMLINK+="input/pl700" KERNEL=="event[0-9]*", SYSFS{idVendor}=="056a", SYSFS{idProduct}=="0038", SYMLINK+="input/pl510" KERNEL=="event[0-9]*", SYSFS{idVendor}=="056a", SYSFS{idProduct}=="0039", SYMLINK+="input/dtu710" KERNEL=="event[0-9]*", SYSFS{idVendor}=="056a", SYSFS{idProduct}=="00C0", SYMLINK+="input/dtf521" KERNEL=="event[0-9]*", SYSFS{idVendor}=="056a", SYSFS{idProduct}=="00C3", SYMLINK+="input/dtf720" KERNEL=="event[0-9]*", SYSFS{idVendor}=="056a", SYSFS{idProduct}=="0003", SYMLINK+="input/cintiq_partner" KERNEL=="event[0-9]*", SYSFS{idVendor}=="056a", SYSFS{idProduct}=="0041", SYMLINK+="input/intuos2-4x5" KERNEL=="event[0-9]*", SYSFS{idVendor}=="056a", SYSFS{idProduct}=="0042", SYMLINK+="input/intuos2-6x8" KERNEL=="event[0-9]*", SYSFS{idVendor}=="056a", SYSFS{idProduct}=="0043", SYMLINK+="input/intuos2-9x12" KERNEL=="event[0-9]*", SYSFS{idVendor}=="056a", SYSFS{idProduct}=="0044", SYMLINK+="input/intuos2-12x12" KERNEL=="event[0-9]*", SYSFS{idVendor}=="056a", SYSFS{idProduct}=="0045", SYMLINK+="input/intuos2-12x18" KERNEL=="event[0-9]*", SYSFS{idVendor}=="056a", SYSFS{idProduct}=="00B0", SYMLINK+="input/intuos3-4x5" KERNEL=="event[0-9]*", SYSFS{idVendor}=="056a", SYSFS{idProduct}=="00B1", SYMLINK+="input/intuos3-6x8" KERNEL=="event[0-9]*", SYSFS{idVendor}=="056a", SYSFS{idProduct}=="00B2", SYMLINK+="input/intuos3-9x12" KERNEL=="event[0-9]*", SYSFS{idVendor}=="056a", SYSFS{idProduct}=="00B3", SYMLINK+="input/intuos3-12x12" KERNEL=="event[0-9]*", SYSFS{idVendor}=="056a", SYSFS{idProduct}=="00B4", SYMLINK+="input/intuos3-12x19" KERNEL=="event[0-9]*", SYSFS{idVendor}=="056a", SYSFS{idProduct}=="00B5", SYMLINK+="input/intuos3-6x11" KERNEL=="event[0-9]*", SYSFS{idVendor}=="056a", SYSFS{idProduct}=="003F", SYMLINK+="input/cintiq21ux" KERNEL=="event[0-9]*", SYSFS{idVendor}=="056a", SYSFS{idProduct}=="0047", SYMLINK+="input/intuos2-6x8a" # Check and repossess the device if a module other than the wacom one # is already bound to it. KERNEL=="event[0-9]*", SYSFS{idVendor}=="056a", ACTION=="add", RUN+="/sbin/check_driver wacom $devpath $env{ID_BUS}" -------------------------------------------------------------------- #!/bin/sh # wanted=$1 devpath=$2 bustype=$3 device=$(basename $(readlink /sys/$devpath/device)) driver=$(basename $(readlink /sys/$devpath/device/driver)) if [ x"$driver" != x"$wanted" ]; then #echo -n "$device" > /sys/$devpath/device/driver/unbind #echo -n "$device" > /sys/bus/$bustype/drivers/$wanted/bind fi ==================================================================== best, Ron |