[ltp] 100% activity from fingerprint reader even with usbcore.autosuspend=1?

Yves-Alexis Perez linux-thinkpad@linux-thinkpad.org
Wed, 29 Oct 2008 10:45:12 +0100


On Wed, Oct 29, 2008 at 09:48:38AM +0100, Tino Keitel wrote:
> > grep "" /sys/bus/usb/devices/*/power/level

 /sys/bus/usb/devices/1-2/power/level:on

So you were right. Putting "auto" there fix the problem.
> 
> To elaborate (from my understanding): autosuspend only tells the device
> that it may suspend if it needs to. The device may still decide to not
> do that and stay active (leave power/level at "on"). That's why I wrote
> this udev rule:
> 
> SUBSYSTEM=="usb", ACTION=="add", RUN+="/lib/udev/usb-enable-autosuspend"
> 
> This is the /lib/udev/usb-enable-autosuspend script:
> 
> #!/bin/sh
> 
> if test -f /sys/$DEVPATH/power/level ; then
>         echo "auto" > /sys/$DEVPATH/power/level
> fi
> 
> However, it doesn't seem to work 100% reliable, as I still had cases
> where power/level was set to "on". Maybe something changed that after
> the udev add event.

Thanks, will try that. Maybe it breaks when resuming?

Cheers,
-- 
Yves-Alexis