So I just learned a bit more about pm-powersave, but couldn't find if it automatically kicks in if you're running battery power. Does somebody know if it does this? And if not, is there a way to make pm-powersave automatically activate once I am running on battery?

  • pm-powersave writes a log to the file/var/log/pm-powersave.log. What is the output of sudo tail -f /var/log/pm-powersave.log ? – user533208 May 3 '16 at 20:12
up vote 2 down vote accepted
+50

It does not run on my system when I plug and unplug my power adapter. You can check whether it is run or not by looking at /var/log/pm-powersave.log. Type tail -f /var/log/pm-powersave.log and then plug/unplug your power adapter, it will shows what scripts are run and their output. If you got nothing, then it means nothing is run.

You can create a new udev rules file to make scripts in /usr/lib/pm-utils/power.d/ and /etc/pm/power.d run. As root, create /etc/udev/rules.d/99-powersave.rules, and put the following content into this file:

SUBSYSTEM=="power_supply", ATTR{online}=="0", RUN+="/usr/sbin/pm-powersave true"
SUBSYSTEM=="power_supply", ATTR{online}=="1", RUN+="/usr/sbin/pm-powersave false"

Now try to put your system into battery mode and you should be able to see output in /var/log/pm-powersave.log, which means the scripts have been executed.

  • That seems to work. :) Thanks! – Gladen May 11 '16 at 11:23

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.