Systemd ACPI events

Created at 2025-12-24 10:35
Last edited at 2025-12-24 09:44

Change the power key behaviour

Create logind drop-in configuration

Default values can be found in /etc/systemd/logind.conf. Create directory /etc/systemd/logind.conf.d and a file inside it, e.g. powerkey.conf. Content:

[Login]
HandlePowerKey=suspend
HandlePowerKeyLongPress=poweroff

Reload the logind service

systemctl reload systemd-logind.service