You are not logged in.
Pages: 1
Hi!!
I've got Dell Studio 1555 laptop. I want it to react when I'm closing the lid. Now, there isn't any rule, when it works, but it works very very rarely. I've got acpi and acpid installed. ACPID daemon is working. I've tested:
tail -f /proc/acpi/button/lid/LID0/state
during closing/opening lid, but there has been only one line:
state: open
Do I have to add any additional modules?
I really appreciate any help
stefek
Last edited by stefek (2009-09-26 13:51:51)
Offline
uncomment this line in /etc/acpi/handler.sh and look if anything is echoed on tty5 (ALT+CTR+F5)
echo "LID switched!">/dev/tty5
if yes, at a file in /etc/acpi/events/ containig something like
event=button[ /]lid
action=/path/to/your/program %e
"The mind can make a heaven out of hell or a hell out of heaven" -- John Milton
Offline
Here's what I've got in /etc/acpi/handler.sh:
button/lid)
# check if the lid is open or closed, using the /proc file
grep -q closed /proc/acpi/button/lid/*/state
if [ $? = 0 ]; then
# if the lid is now closed, save the network state and suspend to ram
/usr/bin/netcfg all-suspend
/usr/sbin/pm-suspend
#echo -n mem >/sys/power/state
else
# if the lid is now open, restore the network state
/usr/bin/netcfg all-resume
fi
#echo "LID switched!">/dev/tty5
;;
thayer williams ~ cinderwick.ca
Offline
I've tested:
tail -f /proc/acpi/button/lid/LID0/state
afaik, you can't do that since files in /proc are pseudo-files and get truncated and re-populated on each open.
use the ACPI events like eveyone said (you can use acpi_listen to see the ACPI events)
Offline
I've also tested tail -f /var/log/acpid.log and the effect is the same. There is no reaction to closing lid. I've also uncommented echo "LID switched!">/dev/tty5
and the TTY5 is always blank.
Offline
There is a post in a ubuntu-forum (link) which suggests to put 'noacpi' in the kernel-options in /boot/grub/menu.lst and closing the lid slowly.
Last edited by muunleit (2009-09-26 13:20:22)
"The mind can make a heaven out of hell or a hell out of heaven" -- John Milton
Offline
Thanks, but i've added apic, not acpi ;-) and also brightness keys work!!
Offline
Pages: 1