You are not logged in.
Hey guys, I'm using acpid’s scripts to set some system settings when ac power is plugged in or out, but this obviously doesn’t work when the machine is sleeping. So, when I set my netbook into sleep mode, plug/unplug ac connection and wake it up again, it doesn’t notice the change and the acpid scripts aren’t executed as I they should.
Is there an easy way to detect ac changes right after waking up from sleep mode and run the acpid scripts accordingly or do I have to implement this myself somehow?
Offline
Create a script and put it in /lib/systemd/system-sleep for sleep/wake, and I just create a small script and service file to determine its status at boot.
Check out /sys/class/power_supply/AC/online (your machine might label your ac adapter differently, so it may not be 'AC')
Last edited by WonderWoofy (2012-09-22 15:19:55)
Offline