Adjust Laptop Battery Charging Limit From OS
This guide has been tested on a DELL Latitude. It might or might not work on yours.
I have a Dell Latitude 7490 and it has this very useful feature in it’s BIOS that is used for adjusting the battery charging limit. I use this to allow it to charge only till 80% as I mostly use my laptop plugged in and by limiting the battery capacity, the wear on battery can be drastically reduced, thus increasing it’s life.
But sometimes I need to have it charged upto 100% to use it without power, and for this reason I have to always go back in the BIOS and flick the charging mode option from Manual to Standard.
This can be very cumbersome if I am in the middle of something important and have to restart the system just to be able charge it till 100%. So I started looking for ways to control this behaviour directly from my OS and came across a tool called smbios-utils which does just this (and even more). But this tool was not present for my OS (Ubuntu 25.10) for reasons unknown.
But but, it is present in the Ubuntu 24.04 (Noble Numbat) repos. So what I did was temporarily load the noble repos in my OS to get the tool.
Steps to install smbios
You can first try to run just
sudo apt install smbios-utilsto see if it already exists in your OS repos. If not, proceed as following.
1) Create a temporary source file:
1
echo "deb [arch=amd64] http://archive.ubuntu.com/ubuntu noble main universe" | sudo tee /etc/apt/sources.list.d/noble-temp.list
2) Update the package lists to include 24.04 packages:
1
sudo apt update
3) Install the smbios-utils package:
1
2
sudo apt -t noble install smbios-utils libsmbios-c2
# The -t flag is used to tell what the source of these packages is
4) Now we can safely remove the temporary source list we had added earlier:
1
2
sudo rm /etc/apt/sources.list.d/noble-temp.list
sudo apt update
By doing these steps, we have successfully installed smbios-utils. Now let’s set the charging limit.
Steps to alter the charging limits
1) Set the charging mode by running this command in the terminal.
1
smbios-battery-ctl --set-charging-mode=custom
Valid choices for the charging mode are: ‘primarily_ac’, ‘adaptive’, ‘custom’, ‘standard’, ‘express’
2) Now we can change the lower and upper limits of charging via:
1
smbios-battery-ctl --set-custom-charge-interval=80 100
That’s it. The limits have been successfully changed from within the OS without having to had rebooted the system.
If in case this doesn’t work for you, you can try using the ‘libsmbios’ package that is made specially by Dell. Here are some more details regarding it: Link.