One of my laptops cannot hibernate properly; when I close the lid or just let it sit for half an hour, I lose the session. The next power-on starts from a fresh boot. This is my son's laptop and he needs it for school. It's a giant pain that he has to start over all the time.
This answer gives ideas to test:
sudo systemctl suspend
works!sudo systemctl hybrid-sleep
works! (from this answer)sudo systemctl hibernate
seems identical to a power off; the laptop switches off immediately and the next power-on starts from a fresh boot. So thesuspend-then-hibernate
choice is not going to work until I can fix the broken hibernate.systemctl suspend
without sudo does not suspend and I get a message "user gdm is logged in on nx. Please retry after closing inhibitors [...]" which is practically Latin to me, but there is a suggestion to usesystemctl suspend -i
which works although I do not understand this.systemctl suspend
without sudo does the same thing; only triggers when adding-i
. But that is still equivalent to a power off and not a hibernate.sudo pm-hibernate
works exactly as it should! This command is taken from https://wiki.ubuntu.com/DebuggingKernelHibernate and required me to installpm-utils
. It is not a solution though; I am not going to ask my son to run a sudo command (and his user account would not have rights anyway).
So why does pm-hibernate
work but systemctl hibernate
does not?
And why is there no "suspend" or even "hibernate" in the GUI?? There is only "restart" and "power off".
- Should I just use
hybrid-sleep
instead of hibernate? - Should I follow this answer to replace the hibernate with
pm-hibernate
?
/etc/systemd/sleep.conf
contains:
HibernateDelaySec=3min
AllowSuspend=yes
AllowHibernation=yes
AllowSuspendThenHibernate=yes
/etc/systemd/logind.conf
contains:
HandlePowerKey=suspend
HandleSuspendKey=suspend
HandleHibernateKey=suspend
HandleLidSwitch=suspend
HandleLidSwitchExternalPower=suspend
HandleLidSwitchDocked=ignore
In Settings > Power > Automatic Suspend the delay is set to 15 minutes. This is the lowest option but I do not know how that correlates to the files listed above. There is no setting for "Hibernate".