A lot of people face the problem that hibernation does not work on common hardware devices that where designed for other OSes. Imho it is one of the most important issues that should be faced by developers since the lack of hibernation mode can cause serious data loss and hardware damage.
Since there is no software-fix to this problem in sight (as far as I know) I would like to ask you, what my alternatives could be and how to work around the problem of missing hibernation mode.
One of the main problems for me is the "ups-I-forget-my-laptop-was-not-connected-with-the-power-adapter"-moment e.g. when I come back from lunch and the laptop is shutdown because battery reached 0% (and all unsaved data has to be recovered).
I would welcome any pragmatic solutions from "stick a note to your laptop to remind you of your adapter" to existing software or self-made scripts that might alarm me or deliver a workaround (e.g. enter in sleepmode when battery is 15%) or similar. Automatic solutions that don't require my unreliable mental fitness are preferred however.
You can set up your user account to suspend on critical battery level using this terminal command:
Instead of
suspend
, these other actions would also be available:blank
(screen off),shutdown
,hibernate
(if enabled and supported),interactive
(you will get a pop-up asking you what to do),nothing
andlogout
.You find out the currently set critical battery charge percentage using the command
To modify this value, (set to 10% in this example), run a command like that:
You can use "acpitool" to find out the remaining charge percentage:
Another example script to display a warning pop-up dialog on low battery: