View Full Version : ACPID question

25th August 2004, 04:19 PM
ok...so I read the manual for ACPID....and I understand it for the most part....

but I'm still not too sure how to set up events and actions......

for example: I want to run a script when the lid closes.

but what is the event value for the lid switch....?? here is the ACPI details from dmesg (if that helps):

ACPI: AC Adapter [ACAD] (on-line)
ACPI: Battery Slot [BAT1] (battery present)
ACPI: Power Button (FF) [PWRF]
ACPI: Lid Switch [LID]

can anyone just give me a little help on this one?

my main goal is to lock the screen when the lid closes

thanks a lot,


28th August 2004, 02:00 AM
For my Dell D600 you can read the state by;
cat /proc/acpi/button/lid/LID/state

The only way, I can think of (please by all means tell me another way!!) is to poll this file and then do something. - like lock the screen, turn off the backlight, spin down hardrives etc..

12th September 2004, 02:22 AM
you can see events real time in /var/log/acpid , try 'tail -f /var/log/acpid' and use those events.

[Sat Sep 11 21:16:39 2004] completed event "button/lid LID 00000080 00000006"

If yours gives the same message you can use



event=button/lid LID

I use /proc/acpi/button/lid/LID/state to test whether it's open or closed.

Ain Abid Photos - Bilaspur Travel Photos - Ciudad Fernandez Instagram Photos