Power management: Difference between revisions
Prabuanand (talk | contribs) m (Prabuanand moved page Configure action when power-button is pressed to Power management: To consolidate all information related to power management to single page) |
Prabuanand (talk | contribs) (reformatted the page so that more content can be added) |
||
Line 1: | Line 1: | ||
This | [https://en.wikipedia.org/wiki/Power_management Power management] is a feature of computer CPUs, GPUs and peripherals such as monitors and printers, that turns off the power or switches the system to a low-power state when inactive based on a standard called ACPI, which has superseded APM. This page explains how to configure what happens | ||
== Installation == | |||
Install the {{pkg|acpid}} package:{{cmd|# apk add acpid}} | |||
=== Power management utilities === | |||
There are a number of power management utilities available in Alpine Linux. | |||
{{cat|/etc/acpi/PWRF/00000080|#!/bin/sh | * {{pkg|zzz}} | ||
== Service configuration == | |||
Enable and start the {{ic|acpid}} daemon using the [[OpenRC]] commands:{{cmd|# rc-update add acpid && rc-service acpid start}} | |||
== Handling the pressing of power button == | |||
In case of desktop environments, it might be useful to allow for some control on what happens when you press the power button instead of shutting down the computer. This can be done via [[Busybox#acpid]] by creating/modifying the hook in {{path|/etc/acpi/PWRF/00000080}}. | |||
=== Configuring for shutdown === | |||
In a newly installed system this might be already defined, however you can create the hook as follows: {{cat|/etc/acpi/PWRF/00000080|#!/bin/sh | |||
poweroff}} | poweroff}} | ||
=== Configuring for sleep === | === Configuring for sleep === | ||
# | Use one of the [[#Power management utilities|power management utility]], say {{pkg|zzz}} here and Modify the hook as follows: {{cat|/etc/acpi/PWRF/00000080|#!/bin/sh | ||
zzz}} | zzz}} | ||
=== Disabling === | === Disabling === | ||
{{cat|/etc/acpi/PWRF/00000080|#!/bin/sh | To disable simply comment or remove the hook. This is useful to allow desktop environments like [[Gnome]] or [[KDE]] to handle the power button. {{cat|/etc/acpi/PWRF/00000080|#!/bin/sh | ||
#Nothing}} | #Nothing}} | ||
[[Category:Power Management]] | [[Category:Power Management]] | ||
Revision as of 14:06, 2 May 2025
Power management is a feature of computer CPUs, GPUs and peripherals such as monitors and printers, that turns off the power or switches the system to a low-power state when inactive based on a standard called ACPI, which has superseded APM. This page explains how to configure what happens
Installation
Install the acpid package:
# apk add acpid
Power management utilities
There are a number of power management utilities available in Alpine Linux.
Service configuration
Enable and start the acpid
daemon using the OpenRC commands:
# rc-update add acpid && rc-service acpid start
Handling the pressing of power button
In case of desktop environments, it might be useful to allow for some control on what happens when you press the power button instead of shutting down the computer. This can be done via Busybox#acpid by creating/modifying the hook in /etc/acpi/PWRF/00000080.
Configuring for shutdown
In a newly installed system this might be already defined, however you can create the hook as follows:
Contents of /etc/acpi/PWRF/00000080
Configuring for sleep
Use one of the power management utility, say zzz here and Modify the hook as follows:
Contents of /etc/acpi/PWRF/00000080
Disabling
To disable simply comment or remove the hook. This is useful to allow desktop environments like Gnome or KDE to handle the power button.
Contents of /etc/acpi/PWRF/00000080