gnome-shell-extension-hibernate-status
gnome-shell-extension-hibernate-status copied to clipboard
Suspend then hibernate should be a "battery only" feature(?)
This is just a recommendation. But here's why:
First of all we have now plenty features via your plugin. It is an arsenal. But even well informed users do mistakes sometimes. And losing data can be painful. The problem with this function is that this is not a reversed hybrid sleep/suspend or something like that. It is designed to rely on battery presence. Even if a system has no battery the suspend state will going to work which can misleading for inexperienced desktop users. But it cannot save from data loss like hybrid sleep do if blackout happens.
How suspend then hibernate works:
- Suspends the system
- Then waits till the battery charge reaches the critical level
- Hibernates the system when the critical level reached, otherwise it does nothing just keep suspended
But desktop machines never reaches the critical level. So they stay only suspended which is pretty unfortunate if a random blackout happens. Of course the exact state can be opted out in the settings but it will remains as a risk for those who don't know the difference between these states and/or not as experienced.
The related documentation: https://www.freedesktop.org/software/systemd/man/latest/systemd-sleep.conf.html#suspend-then-hibernate
To me, suspend then hibernate could be seen as an extension of suspend which shares the same issues on systems without a battery and as far as I know the option still appears to suspend - is this correct?
One option would be to change the settings schema so that suspend-then-hibernate is disabled by default and needs to be opted in to
Of course it is up to you. I just wanted to warn you that this feature is hardly ever used and tbh it is not a safe and the riskiest. Even I who eager for many years now to setup hibernation and suspension correctly on any of my Linux machines was a surprise that state is an existing one. Never seen a distro or an extension before which used in any way.
It may be a bit off-topic, but how is it risky on a laptop? I was initially looking for an explanation of what "Suspend then hibernate" did, and now that I read yours, I think it can be a great feature. Before configuring my swap space, I used to suspend my PC, not knowing when I would take it up again, and when I tried to resume too late, I had lost my work. (And this is exactly why I finally created a swap space.)
With this feature, whenever I did not know if I would work again soon or not, I could have chosen this option, right?
It may be a bit off-topic, but how is it risky on a laptop? I was initially looking for an explanation of what "Suspend then hibernate" did, and now that I read yours, I think it can be a great feature. Before configuring my swap space, I used to suspend my PC, not knowing when I would take it up again, and when I tried to resume too late, I had lost my work. (And this is exactly why I finally created a swap space.)
With this feature, whenever I did not know if I would work again soon or not, I could have chosen this option, right?
I believe the risk is on desktop - suspend then hibernate will never hibernate so acts like regular suspend giving a false sense of security in the event of a loss of power.
Ok, that is what I understood. Thank you
It may be a bit off-topic, but how is it risky on a laptop? I was initially looking for an explanation of what "Suspend then hibernate" did, and now that I read yours, I think it can be a great feature. Before configuring my swap space, I used to suspend my PC, not knowing when I would take it up again, and when I tried to resume too late, I had lost my work. (And this is exactly why I finally created a swap space.)
With this feature, whenever I did not know if I would work again soon or not, I could have chosen this option, right?
It is not risky on a laptop, because you have a working battery which keeps "alive" your machine when the battery capacity reaches the critical level. So it can hibernate safely. Of course if you have a dead battery and you live in an area where blackouts are not rare, then it might be risky.
I believe the risk is on desktop - suspend then hibernate will never hibernate so acts like regular suspend giving a false sense of security in the event of a loss of power.
From the man page:
If the system has no battery, it would be hibernated after HibernateDelaySec= has passed. If not set, then defaults to "2h".