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

A collection of posts about things that suck, and posts that suck about things that don't suck, and busywork and argle-bargle.


RSS feed

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