Busybox acpid: Difference between revisions
(Blanked the page) Tag: Blanking |
(add power management category) |
||
(3 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
Busybox acpid allows custom mapping and handling of ACPI events via options <code>-M FILE</code> (Map file) and <code>-a FILE</code> (Action file). | |||
== Map file == | |||
A Map file maps ACPI events to descriptions (the last column). For example: | |||
{{cat|/etc/acpi.map|"EV_KEY" 0x01 "KEY_POWER" 116 1 "button/power PWRF 00000080" | |||
"EV_KEY" 0x01 "KEY_POWER" 116 1 "button/power PWRB 00000080" | |||
"EV_KEY" 0x01 "KEY_SLEEP" 142 1 "button/sleep SBTN 00000080" | |||
"EV_KEY" 0x01 "KEY_SUSPEND" 205 1 "button/suspend SUSP 00000080" | |||
"EV_SW" 0x05 "SW_LID" 0 0 "button/lid LID/open 00000080 00000000" | |||
"EV_SW" 0x05 "SW_LID" 0 1 "button/lid LID/close 00000080 00000001" | |||
"EV_SW" 0x05 "SW_TABLET_MODE" 1 0 "video/tabletmode TBLT/off 0000008A 00000000" | |||
"EV_SW" 0x05 "SW_TABLET_MODE" 1 1 "video/tabletmode TBLT/on 0000008A 00000001" | |||
}} | |||
The built-in map file contains only PWRB/PWRF (power button) and LID (lid close). | |||
== Action file == | |||
An Action file maps the event descriptions specified in the Map file to action scripts relative to the Config directory ({{path|/etc/acpi}} by default). It performs a substring match, so typically only the second part of the description is specified in the Action file. If the target path is not a file, but directory, it executes all scripts in the directory via run-parts. For example: | |||
{{cat|/etc/acpid.conf|PWRF power | |||
SBTN sleep | |||
SUSP suspend | |||
LID/open lid/open | |||
LID/close lid/close | |||
TBLT/off tabletmode/off | |||
TBLT/on tabletmode/on | |||
}} | |||
When the power button is pressed, acpid runs script {{path|/etc/acpi/power}}. | |||
== Resources == | |||
* https://oldforum.puppylinux.com/viewtopic.php?p=778500#p778500 | |||
[[Category:Power Management]] |
Latest revision as of 23:55, 24 August 2023
Busybox acpid allows custom mapping and handling of ACPI events via options -M FILE
(Map file) and -a FILE
(Action file).
Map file
A Map file maps ACPI events to descriptions (the last column). For example:
Contents of /etc/acpi.map
The built-in map file contains only PWRB/PWRF (power button) and LID (lid close).
Action file
An Action file maps the event descriptions specified in the Map file to action scripts relative to the Config directory (/etc/acpi by default). It performs a substring match, so typically only the second part of the description is specified in the Action file. If the target path is not a file, but directory, it executes all scripts in the directory via run-parts. For example:
Contents of /etc/acpid.conf
When the power button is pressed, acpid runs script /etc/acpi/power.