On 08/11/2014 09:34 PM, Zoltan Hidvegi wrote: > > > Blacklisting will work. Try it. It works for me. > > Yes, blacklisting does work, but the problem is that the default > behavior of the system has changed in a very undesirable way, and it's > very hard for a non-expert to figure out how to fix it. On every > optical mouse I've came across (several different manufacturers) the > autosuspend works by turning off the mouse LED. After that the mouse > stays suspended until a button is pressed, which wakes up the mouse > and turns the LED back on but it goes to sleep again after the > prescribed autosuspend delay. This is a new an unexpected behavior, > and although I consider myself an experienced expert user, it took a > long time to find the source of the problem as I also run into the no > longer used usb-autosuspend module that is still there giving you a > false hope that you can fix it there. A possible solution would be to > allow a blacklist based on the product name (found in the product file > in /sys/bus/usb/devices/*/product) and look for something like > *Optical*Mouse* in the product name to blacklist. It would be nice if > optical mice would behave as before, since that's what most people > would prefer and expect. >
Where do you want to draw the line ? Why not the same for USB keyboard ? Or any other device. The reason we leave it to the defaults is so that the user has the flexibility to choose on his own. Will everyone be aware of doing it. Probably not. But is whitelisting it, is the solution ? Giving user the choice is the best solution in my opinion. Certainly we can improve this situation by writing a GUI, or a separate wrapper. But where would you want it ? And not all users want the GUI. Give me your thoughts, which are generic and distro agnostic. > There are also issues in the > /usr/share/laptop-mode-tools/modules/runtime-pm script, it assumes > that the $runtime_device variable does not contain spaces. > Unfortunately, on my system there is a file called > > /sys/bus/platform/devices/Fixed MDIO bus.0 > > Note the spaces in the name. The shell by default does word splitting > on variables. All uses of $runtime_device should be quoted (and not > only that but also any function that takes such a device as an > argument should handle names with spaces), list the blacklisted, > whichlisted, listed_by_id, listed_by_type etc. functions, they all use > unquoted variables at the moment. Unfortunately to support names with > spaces, the script probably needs some more invasive changes. The > current module gives me error messages like: > > sirius /home/hzoli # service laptop-mode reload > /usr/sbin/laptop_mode: 108: [: /sys/bus/platform/devices/Fixed: > unexpected operator > /usr/sbin/laptop_mode: 115: [: /sys/bus/platform/devices/Fixed: > unexpected operator > /usr/sbin/laptop_mode: 118: [: /sys/bus/platform/devices/Fixed: > unexpected operator > [ ok ] Laptop mode disabled, not active. > /usr/sbin/laptop_mode: 108: [: /sys/bus/platform/devices/Fixed: > unexpected operator > /usr/sbin/laptop_mode: 115: [: /sys/bus/platform/devices/Fixed: > unexpected operator > /usr/sbin/laptop_mode: 118: [: /sys/bus/platform/devices/Fixed: > unexpected operator > [ ok ] Laptop mode enabled, not active. > > These come from line 108 of > /usr/share/laptop-mode-tools/modules/runtime-pm not /usr/sbin/laptop_mode > > -Zoltan Hmmm!! I'll look into this some time. -- Ritesh Raj Sarraf RESEARCHUT - http://www.researchut.com "Necessity is the mother of invention."
signature.asc
Description: OpenPGP digital signature

