dotfiles icon indicating copy to clipboard operation
dotfiles copied to clipboard

[BUG] Not able to log back in after restore from hibernation

Open feikedonia opened this issue 1 year ago • 10 comments

Describe the bug The other day I sent my system into hibernation, 'cause I wanted to have some sleep. The system went into hibernation fine, but when I tried to restore it in the morning, the system started back up but hang on the lockscreen. I was unable to type in my password, or move my mouse, even trying to switch to another tty didn't succeed.

Prerequirements A system set up for hibernation, that is: having a swap partition (no swap file) greater or equal to the size of your system's total ram capacity.

Steps To Reproduce 0. Have a system set up for hibernation, as mentioned

  1. Click on the Power Menu
  2. Click on the Hibernate option
  3. Wait until the system is fully off, may take some 30 seconds
  4. Turn the system back on again via power switch
  5. Wait until booted up
  6. A hanged system

Steps 1 and 2 can also be done by opening a terminal and executing: systemctl hibernate.

Expected behavior

  1. Click on a hibernation option in a power menu
  2. The system firstly activates a screenlocker, waits until compleet, then executes the systemctl hibernate command.
  3. When powering on the system, being greeted by a lockscreen, which was restored from the hibernate-image.
  4. Entering in your password and volla, back into bizness.

Distribution (please complete the following information):

  • Linux: 6.12.1-arch1-1
  • EndeavourOS
  • Hyprland: 0.45.2
  • ml4w-hyprland: 2.9.7.0-1

Posible Fix Making sure that the screenlocker is fully active before executing the systemctl hibernate command.

Kind Regards, Feike D.

feikedonia avatar Dec 01 '24 12:12 feikedonia

By the way, nice project, I would NOT have done the effort of setting up such a system my self, let alone made a system around it to make it distributable. Frankly, you are a distromaintainer. :-)

feikedonia avatar Dec 01 '24 13:12 feikedonia

By the way, nice project, I would NOT have done the effort of setting up such a system my self, let alone made a system around it to make it distributable. Frankly, you are a distromaintainer. :-)

Thank you. This is how the project has evolved over the last months.

mylinuxforwork avatar Dec 01 '24 14:12 mylinuxforwork

Just read about hibernation on Arch Linux. It is very individual and depends on the setup. I will remove Hibernation from the Power Menu with 2.9.7.1 and leave it on user side to implement it individually.

mylinuxforwork avatar Dec 01 '24 14:12 mylinuxforwork

Great, thank you! There are indeed many moving parts to hibernation!

I can share you my inplanmentation

feikedonia avatar Dec 01 '24 14:12 feikedonia

If you can tell me how to do a merge request, I can maybe contribute to your project

feikedonia avatar Dec 01 '24 14:12 feikedonia

How does the Lock and Suspend work; 'cause that's the way the hibernation should work to.

feikedonia avatar Dec 01 '24 15:12 feikedonia

Just read about hibernation on Arch Linux. It is very individual and depends on the setup. I will remove Hibernation from the Power Menu with 2.9.7.1 and leave it on user side to implement it individually.

If the user hasn't setup the hibernate, systemctl hibernate will return an error.

feikedonia avatar Dec 01 '24 15:12 feikedonia

How does the Lock and Suspend work; 'cause that's the way the hibernation should work to.

https://github.com/mylinuxforwork/dotfiles/blob/main/share/dotfiles/.config/hypr/scripts/power.sh This is my implementation.

mylinuxforwork avatar Dec 01 '24 16:12 mylinuxforwork

Just like my implementation:

suspend #!/bin/bash

swaylock -fFke & sleep 1 systemctl suspend

hibernate #!/bin/bash swaylock -fFke & sleep 1 systemctl hibernate

So I am not sure if it actually is a mylinuxforwork-problem, mayby this is a EndeavourOS-problem. How do I determine?

Because if I execute the standard command for this: systemctl hibernate, it should work!

feikedonia avatar Dec 01 '24 18:12 feikedonia

How is it going with your project? Happy new year, btw

feikedonia avatar Jan 13 '25 10:01 feikedonia

Hi, having this exact same issue here. EndevaourOS. using hibernate works but waiting on idle to hibernate with hyprland breaks the system.

sashistillfrvr avatar May 19 '25 18:05 sashistillfrvr

Hi. Please see https://wiki.hyprland.org/Hypr-Ecosystem/hypridle/

Hypridle requires an individual configuration.

mylinuxforwork avatar May 19 '25 19:05 mylinuxforwork

Just curious: did you add the functionality or did you think it is not needed/won't fix? (I'm not using hyprland anymore, use cosmic instead)

feikedonia avatar May 20 '25 09:05 feikedonia