Power Button for Shutdown
I use Mandrake 9.2 with a kernel I compiled with ACPI and APM support.
The kernel is 2.6.1. Patches for supermount has also been applied.
How to make use of the powerbutton on the cabinet to powerdown my linux system.
You don't I think. Just type halt or reboot as root into any command prompt.
Well I know the other ways to shutdown the conputer. I need to know about this. If it is possible in say, windoze then it "must" be possible in our Linux. A nifty feature for desktop users. Would not mind hibernating my system either. I am waiting for the SWAP "file" implementation of hibernation in Linux 2.6+.
Thanks for the interest.
If you have acpi enabled at boot (acpi=on kernel arguemnt) then all you have to do is get the acpi and acpid services running:
# chkconfig acpid on
# chkconfig acpi on
# service acpid start
# service acpi start
If you don't see any output when you start the acpid service then chances are acpid wasn't enabled at boot. Provided you have the suspend-scripts package then /etc/acpid/events/power should look something like this:
So when you press the power button /sbin/poweroff is run. I haven't tried this with kernel 2.6.x but I have managed to shutdown my box by pressing the power button.
U were right hazza. I just had to enable the services and voila!
Can u trap the reboot button and do a proper reboot with a high priority interrupt or something? It might help when the computer hangs hopelessly(although a lot less for other people. I fiddle around a lot!)
|All times are GMT -5. The time now is 04:16 AM.|