Netbook performs hard shutdown without warning on low battery power

When a battery reaches to the point of time to take critical action taking level , Ubuntu won't warn you about this, instead it just perform the action required (such as suspend, hibernate, shutdown etc, based on your choice). This is the setting and it can't be changed. But Ubuntu should give you a warning, when battery reach low level and critical level.

By default, Ubuntu uses time remaining as a trigger of it's pre-defined action.

  • You will be given a low battery warning, before 1200 seconds (20 minutes) to be empty.
  • You will be given a critical battery warning, when it reaches 300 seconds (5 minutes) remaining
  • Battery critical action is performed when only 120 seconds (2 minutes) remaining.

The power statistics from your output suggests a bad/damaged battery. In these cases, it is hard for Ubuntu to measure actual time remaining data. Also the battery drains quickly between from 300 seconds to 120 seconds, so just try to shut down the PC which is configured in the settings.

I suggest you to do this,

  • First change the policy of trigger from time to percentage.

    gsettings set org.gnome.settings-daemon.plugins.power use-time-for-policy false
    
  • Then raise the percentage required to give you a warning, the default is 10%. Change it to 30%.

    gsettings set org.gnome.settings-daemon.plugins.power percentage-low 30
    
  • Then raise the percentage required to be considered as critical to 20%, default is 3%.

    gsettings set org.gnome.settings-daemon.plugins.power percentage-critical 20
    
  • Then raise the percentage required to take the critical action, it is now 2%. change it to 15%

    gsettings set org.gnome.settings-daemon.plugins.power percentage-action 15
    
  • Then change the critical action to be taken to hibernate, instead of shutdown. You need to first enable the hibernate option.

    • How to enable hibernation?

    Then use this command to change it to hibernate.

    gsettings set org.gnome.settings-daemon.plugins.power critical-battery-action hibernate
    

I think, this should solve your problem. If you still have problems with level, raise the levels even higher.


Try using percentage instead of time based notifications. This helped fix a similar issue on my Asus Eee PC 1000.

See the following post: How to change critically low battery value?

The important point in my case was changing the 'use-time-for-policy' option to false.

I also found this post, which suggests the same fix:

http://ubuntuforums.org/showpost.php?p=11377274&postcount=6


The personnel implementing power management in 12.04 did not do it correctly.

Power management is fully functional in all aspects in Ubuntu 10.04.

The volume of anecdotal information on the net about the issue of critical battery function provides no real insight or explanation as to WHY there is this systemic failure of power management in 12.04.

Obtaining correct power parameter values and with the proper metrics is fundamental to proper power management.

These metrics are "wonky" in 12.04 but accurate in 10.04.

Regardless, on critical low battery the system will suspend correctly in 10.04.

12.04 does not correctly suspend (or hibernate) using either:

gsettings set  org.gnome.settings-daemon.plugins.power   use-time-for-policy    false

or:

gsettings set  org.gnome.settings-daemon.plugins.power   use-time-for-policy     true

with

gsettings set  org.gnome.settings-daemon.plugins.power   percentage-low           20
gsettings set  org.gnome.settings-daemon.plugins.power   percentage-critical      10
gsettings set  org.gnome.settings-daemon.plugins.power   percentage-action         5
gsettings set  org.gnome.settings-daemon.plugins.power   time-low                2400
gsettings set  org.gnome.settings-daemon.plugins.power   time-critical           1200
gsettings set  org.gnome.settings-daemon.plugins.power   time-action              600
gsettings set  org.gnome.settings-daemon.plugins.power   critical-battery-action suspend

The percentages 20, 10, 5 are excessive. The equivalent times are 40, 20 and 10 minutes. (my battery performance is 100% ~ 3.5 hrs. > 200 mins. or 12000 secs.) For 10.04 the effective settings are equivalent to the %'s 8, 5 and 3. Even with 3% battery capacity the machine can stay in suspension for at least 12 hours before the battery is drained.

The real issue seems to be that the hardware ACPI interfacing metrics used in 12.04 are incorrectly programmed. This is seen with "wonky" times when booting 12,04 with a half dead battery. The capacity metrics are all over the place as either incorrect time remaining or % left. Rebooting into 10.04 the battery metrics are quiescent and stable with "reasonable" values.

Notes:

  • The following, invoked manually in 12.04 are both functional:

    pm-hibernate
    pm-suspend

  • It is the power management implementation of the ACPI battery metrics to trigger their automatic invocation that is faulty in 12.04.

  • The 12.04 power manager indicator (version?) and power & brightness and lock settings interface do not accurately reflect the org.gnome.settings-daemon.plugins.power values above. Interfacing, not only to hardware but also to soft tissue is faulty.