View previous topic :: View next topic |
Author |
Message |
zerbet Tux's lil' helper
Joined: 25 Jul 2003 Posts: 79
|
Posted: Fri Aug 08, 2003 3:21 pm Post subject: Halt on button press. |
|
|
Hi folks,
The only thing any Windows xp station has that linux hasn't is the following:
You can halt and power off the computer normally just by pressing the power button on the computer case. How can I do this for linux?
for rebooting this is already ok because you just need to do ctl+alt+del, but what about halting? I'm tired of typing 'su -c halt' each time
Thanks,
zerbet |
|
Back to top |
|
|
Sven Vermeulen Retired Dev
Joined: 29 Aug 2002 Posts: 1345 Location: Mechelen, Belgium
|
Posted: Fri Aug 08, 2003 3:58 pm Post subject: |
|
|
Activate ACPI support in your kernel (it could be that you need a very recent version of the ACPI patch, or you can try 2.6.0-test* who have fairly recent ACPI support).
Then emerge acpid and setup /etc/acpid/default.sh (or /etc/acpid/events) so that the powerbutton issues a "shutdown -h now" or similar. |
|
Back to top |
|
|
Genone Retired Dev
Joined: 14 Mar 2003 Posts: 9538 Location: beyond the rim
|
Posted: Fri Aug 08, 2003 5:22 pm Post subject: |
|
|
Make sure you use at least acpid-1.0.2-r2, as previos versions had a broken default.sh script. And IIRC it is already configured to shutdown if you press the power button. |
|
Back to top |
|
|
zerbet Tux's lil' helper
Joined: 25 Jul 2003 Posts: 79
|
Posted: Sat Aug 09, 2003 1:06 pm Post subject: |
|
|
Sven:
Quote: | it could be that you need a very recent version of the ACPI patch |
ok. is the gentoo-sources package already patched or must I do it on my own?
Genone:
Quote: | use at least acpid-1.0.2-r2 |
Thanks. but is acpid to be installed after the kernel has been patched? are acpid some userland utilities? I thought the patch would be enough.
Btw, what significant difference/improvement is there between acpi and old apm? I mean, I heard that acpi was under strong development and as such it is marked as experimental. What does it provide that apm doesn't?
Thanks for your help
Zerbet |
|
Back to top |
|
|
Genone Retired Dev
Joined: 14 Mar 2003 Posts: 9538 Location: beyond the rim
|
Posted: Sat Aug 09, 2003 4:22 pm Post subject: |
|
|
acpid is a separate package, it is a userspace daemon that watches events caused by the acpi system. |
|
Back to top |
|
|
|