Archive for February, 2008

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

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

Comments