Difference between revisions of "Shutdown Pressing Power Button"

From ArchWiki
Jump to: navigation, search
(Remove HAL as it is depreciated)
(redirect to Power Management as suggested)
(28 intermediate revisions by 10 users not shown)
Line 1: Line 1:
[[Category:Power management (English)]]
#REDIRECT [[Power Management]]
{{i18n|Shutdown Pressing Power Button}}
First of all, make sure that "button" module is loaded (check the output of lsmod). If it's not, load it manually
# modprobe button
or add it to your [[Rc.conf#Hardware|/etc/rc.conf MODULES array]] so that it's automatically loaded at boot time.
# Install acpid.
# If there is no hal in the DAEMONS array in rc.conf, add acpid to the DAEMONS array.
# Edit /etc/acpi/handler.sh (as root):
case "$1" in
        #echo "PowerButton pressed!">/dev/tty5
        case "$2" in
            PWRF)  logger "PowerButton pressed: $2"
            *)      logger "ACPI action undefined: $2" ;;
To be able to test it, make sure the acpid daemon is started.
If you do not have hal, start the acpid daemon yourself:
# /etc/rc.d/acpid start
Otherwise restart hal, it will take care of acpid:
# /etc/rc.d/hal restart

Revision as of 08:17, 27 July 2013

Redirect to: