Spying on People with Guns


Eee PC: Don't suspend when closing lid with power plugged in

February 3, 2008 · File under Technical argle-bargle

Edit /etc/acpi/lidbtn.sh (as root) to contain:

#!/bin/sh
LID_STATE=`cat /proc/acpi/button/lid/LID/state | awk '{print $2 }'`
AC_STATE=`cat /proc/acpi/ac_adapter/AC0/state | awk '{print $2 }'`

if [ $LID_STATE = "closed" ] && [ $AC_STATE = "off-line" ] ; then
        /etc/acpi/suspend2ram.sh
fi
exit 0

Archive

Categories

Found
Things that suck
Unsolicited advice
Adventure time
Generative art
Fun and games
Electronics
Kids
Technical argle-bargle
Sheet music
Apropos of nothing

A collection of posts about things that suck, and posts that suck about things that don't suck.


RSS feed

@efredricksen
@efred
efredricksen
grumdrig (gh)
grumdrig (bb)
efredricksen
©2022 Eric Fredricksen