Set Low Battery Notification Ubuntu Tutorial

Posted on

Set Battery Notification At Percentage Level

How To Set Low Battery Notification In Ubuntu Variant? By default, Ubuntu read the battery charge as percent.

For example is 10% battery power.

So with this value, ubuntu will perform certain actions. One of them is to display a notification or pop up that the battery if only 10% left.

With these conditions, we as users know and can act to connect the charger to the laptop. So that the laptop does not turn off immediately.

Set Low Battery Notification Ubuntu Tutorial

By default, Ubuntu has the following basic rules:

PercentageLow=10

PercentageLow means that Ubuntu will display a notification warning that there is only 10% battery left.

PercentageCritical=3

PercentageCritical means that Ubuntu will display a second warning notification that the battery is running low and there is only 3% left.

PercentageAction=2

When the battery power is 2%, then Ubuntu will perform actions such as shutting down the system.

Some of the rules above, are basic rules if the condition of the battery is still good.

What if the battery condition is exhausted or the laptop battery runs out quickly?

The conditions cannot be equated with the condition of a laptop battery that has been exhausted or the health of the battery can no longer run normally.

Sometimes when the battery is still 30%, the laptop suddenly turns off. All the work suddenly disappeared. This, of course, requires settings so that the laptop to show a notification that the battery will run out at a certain percentage value.

Step to Set Battery Notifications

To be able to set the percentage value of the battery notification in Ubuntu, we can edit the file UPower.conf.

1. Edit UPower.conf File

Open a terminal then copy the following command, paste it into the terminal then Enter:

 sudo gedit /etc/UPower/UPower.conf

2. Change the value

Then look for the line :

PercentageLow=10
PercentageCritical=3
PercentageAction=2

Then, change the value according to the health condition of your laptop battery.

For example, if your laptop habitually turns off suddenly at 30% battery condition, then you can set PercentageLow = 40%, PercentageCritical = 35% and PercentageAction = 31%.

So with settings like this, the laptop will not turn off suddenly, you can still save all your work.

3. Save the file

After the percentage value is given, please save the UPower.conf file.

4. Restart Power Management

Then use the following command again to restart or reload the rules in battery management:

sudo systemctl restart upower

Done. You can see the notification condition of your laptop battery percentage.

I hope this article is useful to you.

Leave a Reply

Your email address will not be published.