You are not logged in.
Hi all,
Just installed Arch on my laptop, trying to configure the various laptoppy things. I have acpi, acpid and pm-utils installed, and have my laptop set to sleep/suspend when the power button is pressed using /etc/acpi/handler.sh, which is nice.
However, is there also a simple way to turn off the laptop's screen (not suspend, just turn off the monitor) using acpid and handler.sh when the laptop lid is closed, and then have it turn on again when the screen is opened?
Cheers,
Last edited by phlaaj (2010-12-28 23:58:12)
Offline
I believe you can configure this and much more using
https://wiki.archlinux.org/index.php/Laptop_Mode_Tools
Offline
Thanks skunktrader, just installed laptop-mode-tools to check it out, but it does not automatically turn off the screen on lid close, and I don't see anything in the configuration files about how to do so (it seems more designed to dim the screen when on battery power, for example). I'm thinking there has to be a simple command I can put into my acpid handler script to turn off/on the screen, I just don't know what it is :s
Offline
I find it weird that you ask that because I thought that turning off the lcd screen is handled by the hardware.
Offline
Unfortunately this is not automatically handled by my hardware. I think I figured this out however - just copied the following code from the acpid wiki article to the appropriate section in the handler.sh file:
button/lid)
#echo "LID switched!">/dev/tty5
if grep -q open /proc/acpi/button/lid/LID/state
then
XAUTHORITY=/home/tim/.Xauthority /usr/bin/xset -display :0.0 dpms force on
else
XAUTHORITY=/home/tim/.Xauthority /usr/bin/xset -display :0.0 dpms force off
fi
;;
What had me confused was that the wiki article specified putting the code into lm_lid.sh, whereas it works for me in the standard handler.sh. I am not sure whether laptop-mode-tools was required for this to work. Thanks for the help, sorry if I wasted anyone's time
Offline
Hi phlaaj,
try this in your handler.sh:
button/lid)
#echo "LID switched!">/dev/tty5
if grep -q open /proc/acpi/button/lid/LID/state
then
vbetool dpms on
else
vbetool dpms off
fi
;;
hope it helps...
Daniel
EDIT: Here it works without laptop-mode-tools
Last edited by Daniel_F (2010-12-29 00:04:53)
Offline