Question:

Set level of battery notification in Loki

Declan: 02 February 2022

By default the notification for low battery is at 10%

enter image description here

The critically low notification is at about 3% and the imminent shutdown notification comes immediately after. I find these levels to be too low.

Can they be changed somehow?

Answer:
Arya: 02 February 2022

According to this answer (https://askubuntu.com/a/800398/47206):

Low and critical battery percentage is now handled by UPower and not by gsettings (more here (https://askubuntu.com/a/92818/47206)). Instead of using gsettings, you should now edit the file /etc/UPower/UPower.conf

Using gedit text editor:

sudo gedit /etc/UPower/UPower.conf

Edit the following lines:

UsePercentageForPolicy=true
PercentageLow=15
PercentageCritical=10
PercentageAction=8

enter image description here

And the rest changed accordingly.

Only the setting for the action after critical level (line CriticalPowerAction=HybridSleep) didn't work (https://elementaryos.stackexchange.com/q/7814/170) until I have created a swap space.