Acpi "Lid" Suspend with Eeepc 900 Not Working
Installed Wheezy-LXDE 32-bit off LXDE flavor ISO via thumb drive to
replace Eeebuntu 3.0 that I installed on it 3 years ago or so. Chose
Base, Desktop GUI and Laptop tasks. Nothing else. All went well and
as far as I can tell everything works, except Suspend (sleep, not
hibernate) when the lid is closed. Don't want hibernate anyway. Instead
of sleeping, the display is shutdown, but the computer itself is still
fully powered and running. (The "sleep" key combo FnF1 works however.)
I installed the eeepc-apci-scripts from the repo thinking that might
solve the problem. It didn't, but fortunately those scripts are
compatible with the others, so no conflicts.
I finally traced the "problem" to lid.sh from the original acpi
scripts. Full script is below. Toward the top, this if-then is not
being triggered. Don't know why.
if [ x$LID_SLEEP = xtrue]; then
pm-suspend
Any answers come to mind?
I did a work-around by having the "lid" event call my own suspend.sh
action directly. It works, sort of: Goes back to sleep after initially
waking up, requiring a second key press, then it sticks.
Thanks.
B
/etc/acpi/lid.sh follows
================= >8 ==============
#!/bin/sh
test -f /usr/share/acpi-support/state-funcs || exit 0
. /usr/share/acpi-support/power-funcs
. /usr/share/acpi-support/policy-funcs
. /etc/default/acpi-support
[ -x /etc/acpi/local/lid.sh.pre ] && /etc/acpi/local/lid.sh.pre
CheckPolicy && exit
grep -q closed /proc/acpi/button/lid/*/state
if [ $? = 0 ]
then
. /usr/share/acpi-support/screenblank
if [ x$LID_SLEEP = xtrue ]; then
pm-suspend
fi
else
d=/tmp/.X11-unix
for x in $d/X*; do
displaynum=${x#$d/X}
getXuser;
if [ x$XAUTHORITY != x ]; then
export DISPLAY=:$displaynum
if [ x$RADEON_LIGHT = xtrue ]; then
[ -x /usr/sbin/radeontool ] && radeontool light on
fi
case "$DISPLAY_DPMS" in
xset)
su $XUSER -s /bin/sh -c "xset dpms force on"
;;
xrandr)
su $XUSER -s /bin/sh -c "xrandr --output LVDS --auto"
;;
vbetool)
/usr/sbin/vbetool dpms on
;;
esac
if pidof xscreensaver > /dev/null; then
if on_ac_power; then
su $XUSER -s /bin/sh -c "xscreensaver-command -unthrottle"
fi
su $XUSER -s /bin/sh -c "xscreensaver-command -deactivate"
fi
else
if [ -x$DISPLAY_DPMS_NO_USER = xtrue ]; then
[ -x /usr/sbin/vbetool ] && /usr/sbin/vbetool dpms on
fi
fi
done
fi
[ -x /etc/acpi/local/lid.sh.post ] && /etc/acpi/local/lid.sh.post
Reply to: