Power menu appearing without prompt on a laptop

This is an issue that I’ve encountered both on OpenSUSE Tumbleweed and Fedora 40 with Plasma 6. The full screen Power menu with a countdown to shutdown the computer appears sporadically every 5-10 seconds and if left unattended leads to the powering off of my laptop (Lenovo T14s). This doesn’t happen all the time, but I’ve noticed it can be triggered after waking up from sleep. This could of course be a hardware issue, but the laptop is new. Could it be that Alt-Ctrl-Del is somehow triggered? Which logs can I look at?

Turned out this is related to a ThinkPad’s User Presence Sensing. Switching it off in BIOS fixes the issue.

Huh, interesting. I wonder what kind of event is sent by this User Presence Sensing feature to make the logout screen appear. Maybe it produces a power button press, and then the power management service has the logout screen configured as reaction to power button presses?

But I guess if turning it off makes it work as intended for you, that may be the best solution already. I’m just curious (and wondering if other users will be hit by a similar issue in the near future).

2 Likes

For what it’s worth, my HP Pavilion laptop sends the keystrokes for “Airplane Mode” when you open the lid - I assume that the Windows drivers intercept that and either redirect it or ignore it for some other reason, but in Linux I have to redirect those keycodes to nothing.

I imagine it’s the combination of laptop manufacturers trying to do “interesting” things, and working within the limits of existing input standards?

1 Like

Maybe it produces a power button press, and then the power management service has the logout screen configured as reaction to power button presses?

This is exactly what I thought as well. I am a bit lazy right now to unfix this setting, but I’ll try to do it later this week and will report to you.

I imagine it’s the combination of laptop manufacturers trying to do “interesting” things, and working within the limits of existing input standards?

Yes, likely they abuse certain things and work around them in Windows, leaving Linux users wonder what happened :slight_smile:

OK, changing that option in BIOS did not fix this issue as I initially thought, Shut Down menu is still triggered sometimes after I wake up from sleep. Do you know which logs I could look at that would show if power off event (keystroke) is triggered? At this point I am thinking this might be a hardware fault.

Edit: OK, this definitely has nothing to do with KDE, it’s a power off button that gets triggered and this has been reported previously by other Lenovo ThinkPad users.

May 03 systemd-logind[1119]: Power key pressed short.
May 03 systemd[1540]: Started [dbus-:1.2-org.kde.LogoutPrompt@77.service](###). 

I set the action for the power button to do nothing in the Power settings in KDE. Will have to be content with this workaround for now.

1 Like