On Wed, May 30, 2012 at 8:15 PM, Robert Connolly
<[email protected]> wrote:
> Is there any way to configure an ACPI event, such as closing the lid of a
> laptop, to run a script, like 'apm -C' and screensaver?
>
> apm(8) and sensorsd(8) don't seem to do anything like this.

acpibtn(4) doesn't provide a sensor for the lid status, so there's no
generic support for arbitrary actions on lid close.  The
machdep.lidsuspend sysctl(8) can be set to enable automatic
suspend-on-lid-close, which should work on most ACPI systems.

If your box attaches the aps(4) device, it should provide a lid sensor
there which you can monitor from userspace, but that's thinkpad-only.


Philip Guenther

Reply via email to