3

I have searched relevant questions and nothing seems to be helping.

On ubuntu 20.04, all service packs up to date.

I don't get low battery warning. The battery indicator shows around 30% when laptop suddenly shuts down even if settings says percentage-low 10% to suspend. It does not suspend, it shuts down.

What can I do to get timely low battery warning rather than abruptly shutting down the laptop and loosing all my work?

So far I have got warning only once but that was also less than a minute - hardly time enough to get the power supply from other room.

Experience so far is low power warning is not present and if you get it, its not advance enough to act on it. Suspend or other dconf settings do not help. Laptop just shuts down.

Based on answers attaching the output of upower. I believe it's not looking that bad.

vendor:               Hewlett-Packard
model:                Primary
power supply:         yes
updated:              Sat 12 Jun 2021 05:21:10 PM PDT (90 seconds ago)
has history:          yes
has statistics:       yes
battery
present:             yes
rechargeable:        yes


    state:               fully-charged
    warning-level:       none
    energy:              27.5648 Wh
    energy-empty:        0 Wh
    energy-full:         28.9664 Wh
    energy-full-design:  28.9664 Wh
    energy-rate:         1.2702 W
    voltage:             16.667 V
    percentage:          100%
    capacity:            100%
    technology:          lithium-ion
    icon-name:          'battery-full-charged-symbolic'

2 Answers 2

3

Like Salim says, this is a good indication that your battery may need to be replaced. You can check this either in the "Battery" tab of the Power Statistics application, or using upower in the Terminal. For the sake of this exercise, let's use the latter:

  1. Open Terminal (if it's not already open)
  2. Get a report on your battery:
    upower -i `upower -e | grep 'BAT'`
    
    You will see something similar to this:
    ~$ upower -i `upower -e | grep 'BAT'`
      native-path:          BAT0
      vendor:               LGC
      model:                01AV494
      serial:               58
      power supply:         yes
      updated:              2021年06月13日 06時32分57秒 (64 seconds ago)
      has history:          yes
      has statistics:       yes
      battery
        present:             yes
        rechargeable:        yes
        state:               fully-charged
        warning-level:       none
        energy:              46.86 Wh
        energy-empty:        0 Wh
        energy-full:         49.34 Wh
        energy-full-design:  57 Wh
        energy-rate:         0.00501789 W
        voltage:             12.607 V
        percentage:          94%
        capacity:            86.5614%
        technology:          lithium-polymer
        icon-name:          'battery-full-charged-symbolic'
    
  3. Check the lines that read energy-full-design and energy-full. Ideally these should not be too different. If you see the energy-full value is less than 60% of the energy-full-design value, then there is a good possibility that the battery is on in need of replacement soon.
    Note: Some batteries will do the math for you by offering a capacity value.

As batteries age they are less able to provide a consistent voltage. Some batteries can gracefully decline, allowing an OS to warn people that they're about to lose power. Some batteries simply give up.

4
  • 2
    Additionally, I think OP could adjust the values for PercentageLow and PercentageCritical in /etc/UPower/UPower.conf, (as long as UsePercentageForPolicy=true); would you agree?
    – Levente
    Jun 12, 2021 at 21:49
  • Indeed. The challenge would be to keep up with the degradation. Setting warnings at 50% and actions at 40% might be fine for a week or two. When the machine starts shutting down without warning again, the values can be pushed up. Paying close attention to how hot the battery is when discharging is also important — but harder to work into mental equations — because hot batteries discharge at a different rate and often with less consistency than a room-temperature battery 🤐
    – matigo
    Jun 12, 2021 at 22:25
  • @matigo I have added output of upower. It does not look so bad.
    – user871199
    Jun 13, 2021 at 0:37
  • @Levente, UPower settings were on default. i have tried tinkering with it with higher values. Let's see if it helps.
    – user871199
    Jun 13, 2021 at 0:37
1

If settings are OK, it seems like a battery problem. When batteries run out, they usually tend to shut down abruptly in this way. If it's too old, I suggest you to replace your battery.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .