Strange problem when hibernating using the power button

Hi all,

I’m not sure if this is a distribution-specific or a Plasma problem. However, maybe, somebody could give me a hint on how to debug this.

I just did a fresh Artix Linux installation on a new Lenovo ThinkPad E14. I configured and set up Suspend to Disk, and it works as expected: The notebook goes to sleep and wakes up as it should when being powered on again. On my old ThinkPad, I configured hibernation to happen when the power button is pressed. I wanted to do this for the new one, too.

Now, something quite strange happens:

The default Power Management setting is to show the Logout Screen when the power button is pressed. If I choose “Hibernate” there, everything works: The power LED flashes for a few seconds, then, it stays on a short time, and then, the system turns off completely – as it should. After pressing the power button again, it starts to boot, and then wakes up as it should. Same as when I choose “Hibernate” from the start menu.

But when I change the power button press action from “Show logout screen” to “Hibernate” in the Power Management settings and press the button, the process does not work when actually pressing the button: The power LED flashes for a few seconds, then turns on again – and stays on. The system does not turn off. It stays on and becomes unresponsive: I can’t wake it up again. Nothing happens. Screen off, but system on. Only way is to keep the power button pressed to hard-reset the system. After that, it reboots again, and repairs orphan inodes (due to the power loss).

What’s wrong here? How can directly invoking hibernation through the power button even yield a different behavior than hibernating through a mouse click?!

I have no idea how to debug this. Thanks in advance for all hints and all help!

Cheers, Tobias

1 Like

no idea, since my energy management settings don’t offer hibernate i can’t test it.

examine your cat /proc/acpi/wakeup to see which S4 modes are enabled

mine shows

AWAC S4 *enabled platform:ACPI000E:00

and i can still hibernate with secure boot turned off in the bios, but i need to use a script to do it that calls sudo systemctl suspend-then-hibernate instead of using the plasma GUI.

using the “sleep” option as shown above does work tho without having to click on the logout screen.

The strange thing is that hibernation works – but only if I click on hibernate. I would have supposed that triggering the action by pressing the power button does the very same thing?!

I experienced pretty the same using a X13 Gen. 6 with MANJARO KDE, ref here.

BUT: I never used the power button for that, nor clicked on hibernate. My procedures were th wait for the defined time or closed the lid. Would you please try this and report your expereience here?

Thanks for the ref! But again: Hibernate does work – it only does, weirdly enough, behave differently (or better said: it does not work at all), depending on how it’s triggered.

So I suppose this could be a Plasma/KDE issue?!

I only have no idea on how to debug this … can I get some output/log/whatever info, to track down what’s different when it’s invoked through the power button?!

On LENOvo community, an issue is opened on this. Please support by:

- confirm what BIOS and EC you are using, and if the BIOS settings have been changed please.

  • Making sure you're not a bot! - issue is on a different platform but was related to disabling the TPM. Can you confirm if you’ve changed the setting?

-go into your BIOS settings and confirm the settings:
Security Chip Selection - Discrete TPM 2.0
Security Chip - On
Physical Presence for Clear - On
Microsoft Pluton Processor Control - On

The issue on the Lenovo forums is about other hardware. However, my BIOS settings were not changed, and IIRC, all this TPM stuff is on.

But still: Hibernate works without a problem here – if I trigger it by clicking on „Hibernate“, either via the start menu or via the logout screen that can be triggered by pressing the power button.

The problem only emerges if I bind hibernating directly to the power button. I still suppose this is some Plasma problem. Not a hardware issue. Otherwise, hibernation would not work at all, as described in the linked post, no?!

I have the exact same issue on an Asus laptop. I was confused for days because I got hibernation working, and then I did a few tweaks… and it broke, I tried to undo all the tweaks I could remember, but after hours of trial and error, it was still broken.

Then I noticed that if I press Hibernate from the system menu, it works.
At first I thought it was just random, maybe it works sometimes?
But after testing more, it was consistent: It always succeeded if I pressed the Hibernate GUI button, and it always failed if I pressed the keyboard Power button.

That’s when I remembered that I had changed the behavior for the Power button from Show Logout Screen, to directly Hibernate. I just never thought that could be the issue so it never occurred to me to try and revert it.

…after searching around for a bit, I got this suggestion for cause, but I’m not knowledgeable enough to verify it it’s correct or just speculation:

“PowerDevil receives the button press and initiates a “Lock & Hibernate” sequence.
The Screen Locker (kscreenlocker) attempts to lock the session simultaneously. This could create a conflict where the driver tries to save VRAM while the screen locker is trying to redraw the UI.”

Skimming through the logs does indeed show Nvidia failures and wakeup events, followed by repeated systemd memory dump attempts and other failures.

It’s 100% reproducible, and it only happens if I configure System Settings > Power Management > When power button is pressed > Hibernate. As long as I leave it on the default value “Show logout screen” everything works smoothly as it should.

1 Like

Thanks for confirming that I’m not the only one :slight_smile:

This looks like a bug then. At least two users can confirm this exact behavior, which happens every time. Maybe some race condition, timing problem or whatever. Interesting thing is also that I use OpenRC and you use Systemd, and the very same thing happens.

I think I’ll file a bug report and reference this forum post.

Just FYI: I now filed a bug about this: https://bugs.kde.org/show_bug.cgi?id=515527