site  contact  subhomenews

acpi handling of lid closure and power button press

July 12, 2019 — BarryK

There are various daemons in /etc/init.d that are launched at startup, except if their file attribute is set to non-executable.

EasyOS defaults to /etc/init.d/acpid to not executable, so ACPI events are not handled. Even if it did launch, it is not configured to work properly -- there is a package 'eee-acpi-scripts' which is supposed to specify how the acpid daemon will handle various events, but it does not seem to be properly configured for EasyOS.

It was rufwoof (Puppy Forum nickname) who gave me a start on this:

http://murga-linux.com/puppy/viewtopic.php?p=1025945#1025945

Then by studying how Linux From Scratch does it, and looking in 'eee-acpi-scripts', I have introduced templates/acpid in woof, to provide handlers for lid closure for a laptop, and power-off when press the power button.

In a running Easy, there will now be /etc/acpi/events/lid, /etc/acpi/events/powerbtn, /etc/cpi/lid.sh and /etc/acpi/powerbtn.sh 

/etc/init.d/acpid now has its execute flags set, so will run at startup. 

Tags: easy