Where are Battey Alert thresholds set?

When you are using battery, on a laptop, alerts appear in the notification tray when your battery is getting low. Where is the battery percentage defined that results in those messages?

It has something to do with upower, but I don’t know if it’s configurable. I suppose that it is. For example in a configuration file. But I haven’t looked in detail the documentation.

You need to edit /etc/UPower/UPower.conf file. It contains following variables of your concern

  • PercentageLow: percentage for “battery is low” notification
  • PercentageCritical: percentage for “latptop will hibernate soon” notification
  • PercentageAction: percentage for “laptop is going hibrenate now” notification

@mazharhussain You are AMAZING!!! That file did the trick!

On my laptop, there was time remaining thresholds and some explanation in the .conf file of when to use percentage vs time. I was able to easily modify it and restart upowerd via systemctl and make the modification I needed.

I’ve had one too many incidents where my laptop power cord slipped out and battery ran down right before I was going somehere and was counting on having a full battery for the trip.

Now it always pops up and alerts me that I’ using battery, so I should never be caught with a surprise low charge again!

Thank you so much!

1 Like