Seem like udev should be able to detect if power cord is in

published Jun 27, 2013 07:30   by admin ( last modified Jun 27, 2013 07:30 )

Should be worth looking at

 

SUBSYSTEM=="power_supply", ENV{POWER_SUPPLY_ONLINE}=="0", RUN+="/usr/bin/powersave true" SUBSYSTEM=="power_supply", ENV{POWER_SUPPLY_ONLINE}=="1", RUN+="/usr/bin/powersave false"


Read more: Link - Howto: Powersaving tweaks with a udev rule - HOW TO & FAQ Guides - Neowin Forums