Subject: elogind behavior changed: power key turns computer off

From: Ludovic Courtès <[email-masked]>
Date: Mon, 14 Apr 2025 18:46:33 +0200

Hello,

Probably related to the elogind upgrade in
098b5cdf9c6841df0b3c086974eef7e13fd23b36, I noticed today that pressing
the power button on my laptop would turn it off instead of putting it
into software suspend as it used to do:

--8<---------------cut here---------------start------------->8---
2025-04-14 17:59:53 localhost elogind[290]: Power key pressed short.
2025-04-14 17:59:53 localhost elogind[290]: Powering off...
2025-04-14 17:59:53 localhost elogind[290]: System is powering down.
2025-04-14 17:59:54 localhost shepherd[1]: Stopping service root...
2025-04-14 17:59:54 localhost shepherd[1]: Exiting shepherd...
2025-04-14 17:59:54 localhost shepherd[1]: Stopping service swap-/swap...
2025-04-14 17:59:54 localhost shepherd[1]: Service swap-/swap stopped.
2025-04-14 17:59:54 localhost shepherd[1]: Service swap-/swap is now stopped.
--8<---------------cut here---------------end--------------->8---

Previously I had:

--8<---------------cut here---------------start------------->8---
2025-04-08 18:07:51 localhost elogind[282]: Power key pressed short.
2025-04-08 18:07:51 localhost elogind[282]: Suspending...
2025-04-08 18:07:51 localhost NetworkManager[311]: <info>  [1744128471.3311] manager: sleep: sleep requested (sleeping: no  enabled: yes)
2025-04-08 18:07:51 localhost NetworkManager[311]: <info>  [1744128471.3332] manager: NetworkManager state is now ASLEEP
2025-04-08 18:07:51 localhost elogind[282]: Entering sleep state 'suspend'...
2025-04-08 18:07:51 localhost linux: [82930.856145] PM: suspend entry (deep)
--8<---------------cut here---------------end--------------->8---

Yet the config reads this:

--8<---------------cut here---------------start------------->8---
$ grep -i powerkey $(sudo herd configuration elogind)
HandlePowerKey=suspend
PowerKeyIgnoreInhibited=no
--8<---------------cut here---------------end--------------->8---

Thoughts?

Ludo’.