Click to See Complete Forum and Search --> : ACPI Problems
robpom
07-19-2004, 10:11 PM
I am using Fedora Core 2 and whenever I press my laptop's power button, instead of going into suspend, it shutsdown.
Also, I would like to be able to have the machine go into Suspend whenever I close this lid. Any assistance on how to do this in FC2 or SuSE 9.1 would be greatly appreciated.
bwkaz
07-19-2004, 10:45 PM
It's probably running acpid. I haven't looked at acpid directly, but I've done a bit of Googling, and it looks like its config file(s) tell it to run a command to shut the system down (either init 0, shutdown -h now, or something like that) when the /proc/acpi/event file gets a "button/power" line written to it.
I don't know what command to run to put the system into standby (I think laptops are pointless, personally, but whatever floats your boat ;)), but if you can figure that out, you can make acpid run that command instead of shutting the system down. Basically, you're looking to change whatever runs when button/power is triggered.
For the lid, I think the event to watch for is lid/X, for some X, or something similar -- you should be able to set up acpid to map that event to the same command. To find out what exactly, shut acpid down, cat /proc/acpi/event, and close the lid. The cat process will print something out when the lid is closed -- map the standby command to the part of that line before the first space. You have to shut acpid down so that it doesn't try to do something.
JohnT
07-19-2004, 11:39 PM
http://tuxmobil.org/apm_linux.html
AdamZ
07-20-2004, 12:00 AM
I just finished setting this up on my new laptop. The config files are in /etc/acpi/events/. They have 2 lines in them (at least on my system). the one you are looking for is action. Look at the script the action line points to, and edit that to make it do whatever you want. The lid button is button/lid, the power button is button/power (for the event lines). To learn more, you can try stopping acpid (/etc/init.d/acpid stop on debian), and doing a "cat /proc/acpi/events". Then press all your buttons, and see what gets printed. That is what you put in the event line. Hope this helps.