Laptop powers down instead of hibernating when battery charge runs out

I have my laptop's "Critical battery action" set to "Hibernate" when running on the battery. The Low and Critical battery levels are default (10% and 5% respectively). The "Low battery action" is "Do nothing".

My battery was running low and I was trying to work right up until the point of hibernation. However, the computer simply shut down rather than hibernating. It was very sudden (no shut down message).

How can I ensure that the laptop hibernates instead of shutting down?

What I tried:

  • I found this SuperUser post, but I know that Hibernation is enabled as I do it manually.

  • The laptop is an HP EliteBook 840 G6 with 12GB RAM and 475GB SDD, of which 238GB is free. I suspect that this is enough disk space for hibernation.

  • The only BIOS information I could find about power management do not include the actions when Critical batter level is reached (image below)

enter image description here

  • I tried a full charge from dead to 100%, full depletion to dead, and a full charge to 100%, but the laptop still shuts down when the charge runs out instead of hibernating

  • I charged it up to 100% again and boosted the Critical battery level from 5% to 10%. The charge indicator is supposed to be properly calibrated after so many full chargings and discharges. Together with the additional 5% headroom, I expected this to leave enough margin to hibernate when the charge runs out. It did not. The laptop still shuts down instead of hibernating when the charge runs out.

  • I charged it up to 100% again and set Critical battery level to 20% to see if the additional margin allows for hibernation. Since Low battery level had to be higher than Critical, I had to set the former to 25%. The discharging battery blew past the Critical level of 20%, reaching 16% at the time of updating this bullet.

Essentially, I can manually hibernate and I can set the Critical battery action to hibernate, but the latter is simply ignored when the charge indicator reaches the Critical battery level.


Solution 1:

The original question-asker has solved the problem for h{er,is} HP laptop, but others might actually have use for the info from the initial answer, so I preserve a (slightly edited) version as a block quote.

There is a finite number of things that could have happened.

  1. The laptop might be shutting down in firmware, you probably have a BIOS setting for that one
  2. You might be running of what Windows thinks is a sufficient space to write to hiberfile.sys
  3. The laptop might be dying from battery power starvation mid-hibernation, and that might be the cause for the interruption message
  4. The underlying BIOS handles the ACPI calls incorrectly or does not [currently] accept the hibernation that OS tries to engage.

The solution for the first problem is to poke at the BIOS and lower the corresponding option. The second one has a rather obvious treatment, to diagnose the third one just and try to lift the hibernate threshold to, like, 15% and see how it goes. You might also want to try and disable all power actions and see how it discharges. The fourth problem could be diagnosed by putting the computer to hibernation manually - if it shutdowns or just errors out, you have to additionally configure stuff.

On HP devices for the OS to be able to properly control hibernations, you have to tick the Power Control option in the BIOS.