On October 16, 2005 18:12, Frank Hart wrote: > I use the following udev rule to let the Logitech applet change the dpi > from 400 to 800: > > BUS="usb", SYSFS{idVendor}="046d", SYSFS{idProduct}="c025", > PROGRAM="/usr/bin/lmctl -8 --sms" > > This worked with udev 0.068. After I installed 0.070 I have to do a > 'udevstart' after booting and then the rule is applied. Has this > something to do with hotplugs removal?
The problem seems to be that udev runs lmctl before the usbfs entry corresponding to your mouse has been created under /proc/bus/usb. The removal of hotplug probably changed the timings of the whole process of module loading/device node or usbfs entry creation etc., resulting in this problem. I just dealt with this issue when packaging kdebase 3.4.3 for experimental, as kcontrol has a module that can set parameters for Logitech mice. I worked around the issue by borrowing an idea from libsane, namely adding a loop that checks for the existence of the /proc/bus/usb entry before making the necessary changes. Have a look at /etc/udev/logitechmouse.rules and /etc/hotplug/usb/logitechmouse in the kcontrol package from experimental if you'd like. This problem also breaks coldplugging for cameras operated through libgphoto, possibly scanners and libsane (#334068), and likely other packages that manipulate usbfs entries as well. If I understand correctly, 2.6.14 will introduce real device nodes under /dev/bus/usb that will serve as a replacement for usbfs, once udev and libusb are patched accordingly. Since udev is smart, I'm told, about waiting for the existence of device nodes before attempting to apply the changes requested by its rules, this whole problem should disappear at that point, though it will require that packages alter their udev rules yet again, and assume that udev is being run in conjunction with a 2.6.14+ kernel. Cheers, Christopher Martin
pgpnmNZK2JTiW.pgp
Description: PGP signature