Sleep vs hibernate -- the abstraction, oh god, the abstraction!

KDE seems to be following the microsoft example with heavy handed levels of abstraction regarding the suspend/resume cycle and how to control it.

Even the help page that still comes up in plasma 6.1 talks about all the different modes but the drop down in my power management settings gives me sleep or shutdown… that’s it.

my observation is that when the computer is sleeping the ram still has power (LEDs are on) so this would appear to be “standby” mode with the desktop still in RAM and no suspend to disk taking place even tho i’ve set aside a generously sized partition exactly for this.

short of writing suspend scripts which are beyond most users skill set (including mine), i would like to have control back in the settings for how my system goes down.

from the (now outdated) help center, this would be my preferred mode:

Standby, then hibernate
Enter standby mode initially, then hibernate after a period of inactivity. If the system only sleeps for a while, this sleep mode provides the quick wake-up times and storage drive longevity benefits of regular standby. If the system remains inactive for a longer amount of time, hibernation reduces power consumption even further and ensures that unsaved data is not lost. The amount of time until hibernation is defined by your low-level system configuration. Also known as “Suspend, then hibernate”.

is the current dumbing down of the settings deliberate or will these controls eventually return?

btw going into Advanced Power Settings… does not offer any more control.

also under Other Settings there is a control for changing the power profile (assumed to kick in when suspend rules take effect), but the options don’t seem to have any connection to the what it says in the help center either about battery states (i have a desktop).

does “power saving” mean it will suspend to disk after a time, as i would prefer? or am i being too optimistic?

To be able to hibernate, the system needs to achieve some requirements: a swap file/partition (size greater or equal to RAM) and other settings. By default, some distributions don’t configure hibernation at installation stage (e.g. Ubuntu). It is probably why you don’t have this option. It is a pity, I think hibernation is very useful.
The hybrid sleep/hibernate mode you describe seems to be very relevant. I don’t know if it is implemented under the linux kernel. If not, this functionality is not in the scope of the KDE Plasma Project.

so this is a kubuntu thing?

seems like it was there in 22.04, or maybe i was forcing it with all the stuff i had to do get the old nvidia card to work… but i def remember a setting for “hibernate after some time” that is no longer there in 24.10.

Your distro installer has to set up hibernation, or you have to do it yourself, yes. Annoyingly there’s no nice tool that does it automatically for you, or that we could include a GUI for.

Once it’s set up and systemd considers hibernation supported, Plasma will automatically show a button for it as well.

3 Likes

my searching has not turned up a guide on how to do this.

any suggestions on where to look or what search terms to use (beyond the obvious)?

i get lots of articles from years ago but nothing relevant to kubuntu 24.10

This is what I used, worked for me - How to set up suspend-then-hibernate on a KDE Neon Laptop – Jay Tuckey’s Blog

2 Likes

i went thru all that and applied the changes it details but still no joy.

the power management page in settings is unchanged (no additional menu items or check boxes)

the page does however look much different than what is shown in the link, so i’m wondering if the revamp of the power management page (plasma 6 thing?) has made this method to enable hibernation obsolete…

while looking thru the source cited in your link i found a comment by meven (Méven Car) that suggested running this check to see if your machine can hibernate.

You can check if your system supports it once you have systemd >= 239 and the following command returns true :

qdbus org.freedesktop.PowerManagement /org/freedesktop/PowerManagement CanSuspendThenHibernate

Or this one should have the same result :

qdbus org.freedesktop.PowerManagement /org/freedesktop/PowerManagement CanHibernate

so i did that, but only after installing both qtchooser and qdbus-qt5 on my system

the answer i get to both queries is false

yet if i execute sudo systemctl hibernate from a command line it will turn off the machine.

and when i press the power button it will boot up with a message on the boot splash that it is resuming from the UUID of my swap partition… everything comes back up just as i left it.

including text in this window unsaved, altho there is a flash of the desktop before the SSDM screen kicks in, so that’s troubling.