Can you set charging limits to protect battery health in Ubuntu?

Ubuntu Version:

24.04.2 LTS

Desktop Environment (if applicable):

GNOME or KDE Plasma (undecided)

Problem Description:

On Windows 10 I’m able to limit my laptop to not charge past 60% using the MyASUS app. I notice it’s massively helpful for long-term battery health and would like to be able to do the same thing on Ubuntu. From what I’ve seen, this feature might not be supported out of the box and I’m wondering if anyone has a solution.

Relevant System Information:

I’m running an ASUS ExpertBook B9 with an i7-1165G7.

Screenshots or Error Messages:

N/A

What I’ve Tried:

I’ve read through Ubuntu’s power & battery documentation and couldn’t find any info on setting a charging limit.


1 Like

An initial version of this feature was recently added to GNOME. It looks like it is in GNOME 48, which is the version that will be in the upcoming Ubuntu 25.10 release.

It does require that your computer’s firmware has support since without this it wouldn’t work when your computer is charging while powered off.

4 Likes

Source, please?
First time I’ve ever heard of this.

I’ve seen reference to this since I started riding an electric motorcycle. Keeping a lithium battery at 100% for prolonged periods of time ages the battery faster. The manufacturer (Zero) recommends only charging to 100% if you are starting a long trip and won’t be able to get to a charging station before you run out of charge. For long term storage they recommend the battery be kept no lower than 30% and no higher than 60%. I’ve also observed the lithium battery in my Samsung Galaxy S10 has lasted a LOT longer than previous phones since I no longer keep it in the charger when I’m not using it.

2 Likes

The latest Samsung and Pixel phones allow you to limit charging to 80% for the same reason. The Pixel phones also allow battery bypass, so once the battery has charged to 80%, the phone runs off the power cable and not the battery.

2 Likes

Good find! I’m guessing this means there currently isn’t a way to do it?

Not in 24.02 or even 24.10. I am running plucky (the future version in development that will be 25.04) and it has GNOME 48, but I’m testing it on an ancient Mac that this feature will never support.

1 Like

As others have pointed out, it’s also a feature on Android. I don’t know if there’s actual research on how effective it is but anecdotally I’ve used this on my laptop and phones since it became a thing and notice a massive improvement. In the past my devices’ batteries would degrade over time but now it doesn’t (or if it does, it’s not noticeable) since I’ve limited my charging capacity on new devices.

That’s bad news for EV owners. In fact, the 2nd-hand value of their cars just dropped to zero if using eg, Tesla Superchargers.
I wonder why no one in the EV industry has thought of this.

I’ll store it under “Urban Legend”.
For the developers: I’d place more importance on other issues.

As someone who works for a manufacturer of electric (and non-electric) vehicles (admittedly, bikes), I can tell you that that it a well-known fact that you can maximize the longevity of your lithium-ion battery by always keeping it between 20-80% charged. That does not mean you will brick the thing by exceeding those boundaries, but it will diminish the total lifetime a bit. Many charging systems (and by this, I mean the charging hardware itself, i.e. the thing you plug into the wall) have built in functionality to deal with this. And even if you don’t have one that does, you can get one.

It sounds like kernel access to such limits is rather vendor specific. As mentioned there, you might consider using TLP, but I don’t think you can guarantee coverage across all devices that way. Best bet would be to check your firmware (“BIOS”) settings.

5 Likes

There has been a lot of research. The ideal minimum and maximum points are somewhat contentious, but the industry seems to be moving towards 20% and 80% respectively.

When you charge a lithium ion battery, it creates small crystals that degrade it. Above roughly 80%, and especially closer to 100%, this crystallization increases significantly, which can also cause battery swelling (you might have read about this).

Batteries also don’t like being warm, which is why I remove my phone from its protective case when charging it.

2 Likes

While I get that you’re being sarcastic:

They are well aware. My first EV had a reserved 5% capacity, making it impossible to charge to 100%. This is to protect the battery. The second hand value wasn’t adversely affected by the battery, but way more by other factors.

I’ll take the advice from the manufacturer of my laptop:

Battery longevity is affected by age, the number of charge cycles, amount of time at full charge, and high temperature.
For maximum lifespan when rarely using the battery, set Custom charge thresholds to start charging at 40% capacity and stop at 50%, and keep the ThinkPad cool. The thresholds can be adjusted in the Battery Maintenance settings of Lenovo Power Manager.
If the battery is used somewhat frequently, set the start threshold at around 85% and stop at 90%. This will still give a good lifespan benefit over keeping the battery charged to 100%.

On Linux there’s a GNOME Extension called Thinkpad Battery Threshold Extension which works for achieving this.

My work laptop also does this.

So no, not urban legend.

6 Likes