Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Halt on button press.
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
zerbet
Tux's lil' helper
Tux's lil' helper


Joined: 25 Jul 2003
Posts: 79

PostPosted: Fri Aug 08, 2003 3:21 pm    Post subject: Halt on button press. Reply with quote

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
View user's profile Send private message
Sven Vermeulen
Retired Dev
Retired Dev


Joined: 29 Aug 2002
Posts: 1345
Location: Mechelen, Belgium

PostPosted: Fri Aug 08, 2003 3:58 pm    Post subject: Reply with quote

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
View user's profile Send private message
Genone
Retired Dev
Retired Dev


Joined: 14 Mar 2003
Posts: 9538
Location: beyond the rim

PostPosted: Fri Aug 08, 2003 5:22 pm    Post subject: Reply with quote

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
View user's profile Send private message
zerbet
Tux's lil' helper
Tux's lil' helper


Joined: 25 Jul 2003
Posts: 79

PostPosted: Sat Aug 09, 2003 1:06 pm    Post subject: Reply with quote

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
View user's profile Send private message
Genone
Retired Dev
Retired Dev


Joined: 14 Mar 2003
Posts: 9538
Location: beyond the rim

PostPosted: Sat Aug 09, 2003 4:22 pm    Post subject: Reply with quote

acpid is a separate package, it is a userspace daemon that watches events caused by the acpi system.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum