Comment # 10 on bug 1012325 from
acpid can run custom scripts on acpi events.
In the good old times���, there was a config file for the power button:

----
event=button/power
action=shutdown -h now
----
(or similar), but nowadays, all acpi events are fed into the input layer, like
every other keypress, and systemd-logind listens for the power/sleep/lid-button
events and acts upon them. Once a desktop session is started, a service can
request to take over the button handling from logind.

acpid still can run the scripts on ACPI events. I run it to still use my old
thinkpad script which acts upon Fn-F1 (switch bluetooth on and off):
----
susi:~ # cat /etc/acpi/events/thinkpad_seife
# forward acpi events to the thinkpad handler (bluetooth etc.)
event=button/fnf.*
action=/usr/lib/acpid/thinkpad_handler_seife "%e"
----
thinkpad_handler_seife is like this:
----
#!/bin/bash
HOTKEY=$1
set $HOTKEY
EVENT=$1   # "ibm/hotkey"
ACPI=$2    # "HOTK"
WHAT=$3    # "00000080"
SERIAL=$4  # "0000100c" Fn+F12
if [ "$WHAT" = "00000080" -a "$SERIAL" = "00001001" ] || \
   [ "$EVENT" = "button/fnf1" ]; then
    toggle bluetooth
fi
----
(the drivers changed somewhen, the script can handle both versions).

But that's the only thing acpid is doing on this machine. Shutdown etc. is not
handled by acpid, as you can see from the non-existence of config files in
/etc/acpid/events

Even on x86, acpid is pretty obsolete nowadays.
So whatever problem you are trying to solve, acpid is probably not part of the
solution.
The only reason acpid could help would be if on ARM, acpi events were not fed
into the input layer, but then the drivers certainly should be fixed.


You are receiving this mail because: