Update: I seem to have solved the problem tweaking the udev commands as
follows:

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

this way pm-powersave is executed every time a power source change
happens, allowing the if/else statement i put in the custom script to
take care of the rest.

I don't know whether this is a long-term solution, but it seems to be
working so far.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1461386

Title:
  pm-powersave is not triggered when unplugging charger

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/pm-utils/+bug/1461386/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to