Search:  
Gentoo Wiki

TIP_Powerdown_on_shutdown_-h

This article is part of the Tips & Tricks series.
Terminals / Shells Network X Window System Portage System Filesystems Kernel Other

Making your computer power off when you issue the "shutdown -h" command

When you issue the command

shutdown -h now

You may notice that your computer does not power off as you no doubt want it to. Fortunately, there are ways around this. To begin, you need to make sure your board is ACPI compliant. Most motherboards these days are, so you probably don't have anything to worry about there, unless you've got a really old system. You will need to check your kernel config, and make sure that you have compiled in support for ACPI.

Linux Kernel Configuration: 2.6
Power Management options (ACPI, APM) -->
 ACPI (Advanced Configuration and Power Interface) Support -->
  [*] ACPI Support

(hint: if you need acpi support for processor/battery... compile it as modules)

Linux Kernel Configuration: 2.4
General Setup -->
 ACPI Support -->
  [*] ACPI Support

If you have already compiled in ACPI support, you're ready to proceed. If not, select the missing options, and recompile your kernel.

That should take care of everything. If you're so inclined, you can put the following line into your ~/.bashrc:

File: ~/.bashrc
alias poweroff='/sbin/shutdown -h now'

Lastly, you can emerge and setup the sys-power/acpid program, like so:

emerge -av sys-power/acpid
rc-update add acpid default
/etc/init.d/acpid start
Retrieved from "http://www.gentoo-wiki.info/TIP_Powerdown_on_shutdown_-h"

Last modified: Fri, 05 Sep 2008 23:13:00 +0000 Hits: 27,194