No Battery low notification on 20.04

I have Ubuntu-Mate 20.04 and I am not getting battery low notification when running on battery on my HP laptop. The computer just shuts down.

Is there a way to enable the notifications when the battery is low?

Welcome @awmhove

I haven't found any particular setting that manages this behavior, and I'm not sure if I've ever seen it, but you could enable showing the percentage. It's not a perfect solution by any means, but it's at least something.

Screenshot at 2021-06-03 19-03-17

Though I wonder if it's possible to query the status of the battery from the command line. If so, one could probably write a Python script that watches the battery and sends a notification accordingly. :thinking:

Welcome, @awmhove, to the Ubuntu MATE Community! :wave: :ubuntu_mate:

For some reason that is beyond me :man_shrugging: (probably oversight on a developer's part), currently the MATE Power Manager does not have an option in the graphical configuration that lets you set the level at which the computer warns you of a low battery :battery: . You can, however, set the level from the terminal (Menu on the top panel -> Terminal) using:

gsettings set org.mate.power-manager percentage-low [percentage]

Replace [percentage] with the percentage of battery power remaining when you want the computer to warn you with a notification. This number is by default 10%.

Please read this note about the percentage notification and battery life: If the system shuts down before you even get to the 10% of battery power remaining mark, this indicates that the battery is on its way out. A HP laptop I used at one time not so long ago started doing exactly that, and within three weeks the battery couldn't accept a single charge anymore. So you can set the notification to warn you at 20% for example, but expect the battery to totally fail before you know it.

There is also the possibility that you simply have notifications turned off. (See Broken popup notifications for a recent example of this.) You can go to the main menu and search for Notifications, click on the entry which reads something like Popup Notifications, and in the dialog that pops up, ensure that the checkbox "Enable Do Not Disturb" is unchecked. This is a common problem and does not suggest stupidity :grin: ; I exhibit this behavior too, and I've heard (unconfirmed) reports that some MATE installations come with the option enabled by default!

I hope these suggestions work. Keep me posted (literally :slight_smile: ).


Hello awmhove

If you enter the following command in a terminal it will provide you with some information that you may find useful:
upower -i /org/freedesktop/UPower/devices/battery_BAT0

It may allow you to estimate if the battery is starting to fail. Note that Lithium batteries fail "all of a sudden" and need to be handled with care. If you choose to replace the battery, I strongly suggest buying an original HP replacement. :slightly_smiling_face: