How to shut down Gentoo with the Power Button


Picture:Clock Published on May 22nd, 2006 in Gentoo

Ok, so everyone knows this one from Windows or other Linux distros. You can simply shut down your PC using the Power Button. Well, this feature doesn’t come out of the box with Gentoo, that’s because Gentoo doesn’t tell you how to build your Operating System, it leaves all of the decissions to you. But it’s not such a big hassle to accomplish:

  • First things first: Enable ACPI in your kernel (if it isn’t already), make sure that the “button” option is checked.
  • then emerge acpid & add to the default run-level with “rc-update add acpid default”
  • start it with “/etc/init.d/acpid start”

You’re done! Let’s try it out, push that Power Button and wait a few seconds (or even longer) and see how your gentoo box automatically shuts down. Of course it cleanly unmounts all of your drives just as it does using the normal shutdown process.

Share This

Trackback URL for this post:
http://www.yatblog.com/2006/05/22/how-to-shut-down-gentoo-with-the-power-button/trackback/


2 comments

    JF September 14th, 2006

    Hi!
    I was just searching how to shutdown my little homeserver that has no keyboard nor screen. I think I’ve found it! Thanks for the tip!

    But I think that the command to add acpid to the default runlevel is “rc-update add acpid default” and not “emerge …” ;)

    Bye!
    JF

    Martin September 14th, 2006

    Hey JF, glad you find it a valuable resource. You’re right about the the rc-update instead of emerge command. I’m updating right now. There’s some more Gentoo specific stuff that you might find useful.

    Thanks for the correction!

Shout it out!