Am 12.04.2011 15:59, schrieb James Robertson: > Package: pm-utils > Version: 1.4.1-7 > Severity: normal > > I am using an Lenovo R500 and if I pull the power out to run on battery > (and visa versa) the scripts under /usr/lib/pm-utils/power.d and > /etc/pm/power.d do not run and power saving options do not start or > stop. > > I am not sure if it has something to do with the system shell as if I > try and execute one of the scripts manually I get this error: > >> /usr/lib/pm-utils/power.d/laptop-mode "true" > ..: 3: : not found >> cat /proc/sys/vm/laptop_mode > 0 > > If I use bash the script runs but with some errors. > >> bash /usr/lib/pm-utils/power.d/laptop-mode true > /usr/lib/pm-utils/power.d/laptop-mode: line 3: : No such file or > directory > /usr/lib/pm-utils/power.d/laptop-mode: line 77: state_exists: command > not found > /usr/lib/pm-utils/power.d/laptop-mode: line 78: savestate: command not > found > Laptop mode enabled. >> cat /proc/sys/vm/laptop_mode
You can't execute scripts directly that way, so this is expected and not a bug. The program to call is pm-powersave true|false, this means, when power is unplugged pm-powersave true must be called and pm-powersave false when you plug it back in. Do you use a program like gnome-power-manager, that does this for you? How do you know btw, that pm-powersave is not run? Michael -- Why is it that all of the instruments seeking intelligent life in the universe are pointed away from Earth?
signature.asc
Description: OpenPGP digital signature