This is not an question it's an solution.
After upgrading to slackware-current (12.2) my screen didn't turn off when i closed my lid, it worked on terminal but not in X.
I use ati as driver in xorg.conf on my compaq Presario 2800 laptop.
I traced it to xf86-video-ati-6.9.0.
It seems that they stripped that part from the driver and it should now be controlled with acpi.
So how did i get it to work?
The first thing i did was that i made an lid.sh script that i placed in /etc/acpi/ (both the radeontool and vbetool worked but not everyone has an driver that works with radeontool so i added vbetool as an alternativ)
Code:
#!/bin/sh
# /etc/acpi/lid.sh
# Turn off light if closed and turn it on if opened.
if [ `grep closed /proc/acpi/button/lid/*/state | wc -l` -ne 0 ];
then
/usr/sbin/radeontool light off
#/usr/sbin/vbetool dpms off
else
/usr/sbin/radeontool light on
#/usr/sbin/vbetool dpms on
fi
exit 0
Then make it executable 'chmod 755 /etc/acpi/lid.sh'
Now we need to edit /etc/acpi/acpi_handler.sh and add lid to it, right under the power) entry so it looks like this.
Code:
#!/bin/sh
# Default acpi script that takes an entry for all actions
IFS=${IFS}/
set $@
case "$1" in
button)
case "$2" in
power) /sbin/init 0
;;
lid) /etc/acpi/lid.sh
;;
*) logger "ACPI action $2 is not defined"
;;
esac
;;
*)
logger "ACPI group $1 / action $2 is not defined"
;;
esac
Now since we don't want to reboot we send this command
kill -SIGHUP `pidof acpid`
Thats it, i hope it helps someone.