[ltp] Binding the power switch?
Luke Yelavich
linux-thinkpad@linux-thinkpad.org
Thu, 15 Jul 2004 11:26:27 +1000
On Thu, Jul 15, 2004 at 10:38:00AM EST, Antiphon wrote:
> Question for the list:
>
> Is it possible to use apmd to make it so that the power switch suspends the
> machine instead of shutting it off? It does it by default on a few desktops I
> administer but none of the laptops. My Thinkpads are capable of binding the
> switch in Windows so it shouldn't be a hardware issue.
AFAIK, it is only ACPI that allows this to be done, as ACPI gives the OS direct
control of the hardware in the system, whereas apm is done from the BIOS. Feel
free to correct me if I am wrong :)
As for using the power switch to suspend rather than shut down, this can be
done with acpid, and an event handler in /etc/acpi/events. You may already
have sample events set up there all ready, if you have acpid installed.
It is simply a matter of capturing the power button, and running the command of
your choice, which could suspend the system for you.
hth
Luke