https://bugs.kde.org/show_bug.cgi?id=523791
Bug ID: 523791
Summary: Powerdevil acts on a spurious ACPI power-button event
firing with lid-open, causing unintended poweroff and
loss of unsaved data. Regression appeared with
powerdevil 6.7.2→6.7.3 (paired with systemd
258.9→258.10); not present on 6.7.2.
Classification: Plasma
Product: plasmashell
Version First 6.7.3
Reported In:
Platform: Other
OS: Linux
Status: REPORTED
Severity: major
Priority: NOR
Component: Power management & brightness
Assignee: [email protected]
Reporter: [email protected]
Target Milestone: 1.0
***Environment
Hardware: Lenovo ThinkPad T14s Gen 6 (AMD), Ryzen AI 7 PRO 350
OS: Fedora Linux 43 (KDE Plasma spin)
Plasma version: 6.7.3 (bug NOT present under 6.7.2)
Powerdevil version: 6.7.3-2.fc43 (working fine under 6.7.2-1.fc43)
systemd version: 258.10-1.fc43 (paired update; previous was 258.9-1.fc43)
Kernel: confirmed NOT the cause — bug reproduces identically under both kernel
7.1.5-101.fc43 and kernel 7.1.3-101.fc43 (rolled back specifically to test
this)
Desktop: Wayland session
Steps to Reproduce
Close the laptop lid (system suspends normally)
Reopen the lid within a few seconds to ~15 seconds
Observe: system sometimes powers off completely within ~1-10 seconds of the lid
reopening, instead of simply resuming
Root Cause Analysis
Journal logs show that on affected resumes, the following two lines appear
simultaneously (same timestamp):
systemd-logind[PID]: Lid opened.
systemd-logind[PID]: Power key pressed short.
This indicates the laptop's ACPI firmware occasionally cross-fires a
power-button GPE at the same moment as the lid-switch GPE (a known class of
firmware/ACPI quirk, e.g. see LKML thread "[REGRESSION 4.17] Spurious wakeup /
reboot with power button", https://lkml.rescloud.iu.edu/1807.0/04601.html, and
kernel bugzilla
#192231, "ACPI: button: The lid device is not compliant to SW_LID").
Approximately 8-14 seconds after this spurious power-key event, the following
occurs:
systemd-logind[PID]: The system will power off now!
systemd-logind[PID]: System is powering down.
Why this is a Powerdevil regression, not a logind or kernel issue
Setting HandlePowerKey=ignore in /etc/systemd/logind.conf.d/ (confirmed active
via busctl get-property org.freedesktop.login1 /org/freedesktop/login1
org.freedesktop.login1.Manager HandlePowerKey → returns "ignore") does not stop
the poweroff. This means the poweroff is not being triggered by logind's own
HandlePowerKey policy, but by something else acting on the same button event —
i.e., Powerdevil, which typically takes an inhibitor lock to handle these
events itself at the desktop-session level.
Rolling back the kernel from 7.1.5 to 7.1.3 (via grubby --set-default) does not
stop the poweroff — confirmed identical behavior/log signature on both kernels.
This rules out a kernel-level ACPI driver regression as the sole cause.
Examining ~/.config/powerdevilrc showed PowerButtonAction=8 set in the
[AC][SuspendAndShutdown], [Battery][SuspendAndShutdown], and
[LowBattery][SuspendAndShutdown] groups. Changing this value to 0 ("Do
nothing") via System Settings → Power Management, for all three profiles, and
restarting plasma-powerdevil.service, fully resolves the issue — the spurious
"Power key pressed short" event still occurs in the logs, but no longer
triggers a shutdown.
This strongly suggests one of the following regressed between powerdevil 6.7.2
and 6.7.3:
The default/effective value of PowerButtonAction changed in a way that now
results in an actual shutdown action where it previously did not, or
Powerdevil's inhibitor-lock interaction with logind changed (possibly related
to the systemd 258.10 inhibitor semantics changes referenced in
linuxmint/Cinnamon issue #13219, which describes systemd 257+ changing how
"block" mode inhibitors interact with desktop environment power settings),
causing Powerdevil to now act on power-button events that it previously
deferred/suppressed correctly.
Expected Behavior
A single short, spurious power-button ACPI event (especially one firing
concurrently with a lid-open event, which the OS should reasonably interpret as
ambiguous/untrustworthy signal) should not immediately trigger a full poweroff
without at least a confirmation dialog — particularly right after a
resume-from-suspend, where GPE cross-talk of this nature is a known, documented
hardware/firmware behavior class on various laptops (see also systemd issue
#28353, "logind: apply HoldoffTimeoutSec to buttons," which explicitly requests
a holdoff window for button events after resume, currently only implemented for
lid events).
Actual Behavior
A single short power-button press signal (potentially
spurious/hardware-generated) results in an immediate, unconfirmed full system
poweroff, risking data loss for any unsaved work.
Workaround
Set PowerButtonAction=0 (Do nothing) in all three profiles (AC, Battery,
LowBattery) via System Settings → Power Management → [profile tab] → "When
power button pressed" → "Do nothing", then restart plasma-powerdevil.service
(or reboot). This does not fix the underlying spurious ACPI event but prevents
Powerdevil from acting on it.
Additional Notes
Kernel-level ACPI oddity also present (logged separately): ACPI: button: The
lid device is not compliant to SW_LID. This is a known, generally-benign
firmware compliance warning (see kernel bugzilla
#192231) and does not appear to be the root cause of the poweroff behavior on
its own — it is included here only because it co-occurs and may be a related
symptom of the same underlying lid/button GPE signaling quirk on this hardware.
--
You are receiving this mail because:
You are watching all bug changes.