[nmglug] dell laptop screen not lighting on lid open - acpi fix

js at jasonschaefer.com js at jasonschaefer.com
Sun Apr 17 19:17:09 PDT 2005


Hi all

I thought I would share my findings with my dell latitude d505 with
debian. I had used ubuntu on it previously and did not have this
problem. I took the ubuntu scripts and boiled them down to the following.

Problem: When I close the lid and then open it I can't get back into X.
The only way I can get back is ctrl+alt+f1-7 (in sequence starting at f1
ending at f7).

Solution: Get acpi to do the right thing when the lid is closed by
placeing the below code. /etc/acpi/events/lidbtn and /etc/acpi/lid.sh
and restarting acpi (/etc/init.d/acpid restart). If you have this
problem let me know if it worked.


#BEGIN /etc/acpi/events/lidbtn
# Called when the user closes or opens the lid

event=button[ /]lid
action=/etc/acpi/lid.sh
#END /etc/acpi/events/lidbtn


#BEGIN /etc/acpi/lid.sh
#!/bin/sh

LIDSTATE='/var/log/acpi-lidstate'
user=`who| grep " :0" | awk '{print $1}'`
export XAUTHORITY=/home/$user/.Xauthority
export DISPLAY=:0

grep -q closed /proc/acpi/button/lid/*/state
if [ $? = 0 ]
then
    xset dpms force off
    echo `fgconsole` > $LIDSTATE
# comment chvt 12 out if when you open the lid
# you want user interaction (mouse) to light the display.
# This is due to the behavior of 'xset dpms force off' above
    chvt 12
else
    chvt `cat $LIDSTATE`
fi
#END /etc/acpi/lid.sh


-Jason


-- 

su -c "rm -fr /"





More information about the nmglug mailing list