Set Battery Notification At Percentage Level
How To Set Low Battery Notification In Ubuntu - By default, Ubuntu will read the battery charge as a percent. For example, the remaining 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 is 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.
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 above 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.
How to Set Battery Notifications At Certain Percentage Ubuntu
To be able to set the percentage value of the battery notification in Ubuntu, we can edit the file UPower.conf. Open a terminal then copy the following command, paste it into the terminal then Enter:
sudo gedit /etc/UPower/UPower.conf
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.
After the percentage value is given, please save the UPower.conf file.
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.