My laptop plugged in USB-C cable for the whole day. By default, it will keep 100% charge for battery. Keeping battery at 0% or 100% for a long time is very bad for battery health.
Many laptops have BIOS settings and API to control max battery charge. GNOME even has a nice extension to set limit for many laptops.
- Does Framework have an option in BIOS to set max charge level? I didn’t find it in BIOS.
- Does Framework have Linux API to set a limit? If yes we can add it to that extension.
If we don’t have a charge limit support (since I didn’t find it in BIOS), should we add it? It is good practice if you want to avoid buying new battery every few years (good for ecology).
No, The battery charge level in the BIOS is not OS Dependent.
I run Windows 10 on my main drive Ubuntu 22.04 LTS on an expansion card, and occasionally for giggles and grins Fedora on a USB Flash drive.
My BIOS is set to 85% max charge, and all OS’s respect that.
Since it’s BIOS, it even stops at 85% when shut down.
It’s in the BIOS.
Tab from Main to Advanced tab, look down, second entry from the bottom - Battery Charge Limit. Click the enter key, type a new number, tab to Yes. F10 to save changes and reboot.
@Matt_Hartley thanks!
Any option to do it from Linux (so we can add it to GNOME extension)? It will be nice to avoid reboot for changing the settings.
I prefer to do it in BIOS, however untested by me but should be fine: Battery Care — TLP 1.6 documentation and additional details Battery Care — TLP 1.6 documentation .
@Matt_Hartley Is tlp an option for charge thresholds on the FW yet? I assumed no since the thresholds aren’t exposed in sysfs.
Have not tested or explored this in depth whatsoever. Ideally, BIOS is the recommended official method.
I remembered that TLP had such an option that the op could explore, but it may not do anything if thresholds are not exposed.
So I passed this along for the customer (on their own) to explore if they like. I have not had an opportunity to explore this with tlp at this time.
To get ectool, in GitLab, build section then artifacts, downloaded the last build, unzip the artifacts and place the ectool binary somewhere in PATH such as /usr/local/bin. I could make it work and show information about the computer.
However, ectool battery or ectool chargestate show do not display the charge limit I set in BIOS, I had to look for the source code to see how to manipulate that, here is how:
get charge limit:
$ sudo ectool fwchargelimit
95
Set charge limit
$ sudo ectool fwchargelimit 80
80
1 Like
As of version 1.8, tlp allows setting charge level from within Linux - i.e. not from BIOS. (See this news item.) I get the impression that if one uses this tlp functionality then one is meant to disable any relevant BIOS settings. However, the documentation seems unclear upon that point and indeed upon other stuff. To wit: need one enable some module? I get the impression that the module is meant to be enabled automatically, but the output that I get from # tlp-stat -b suggests that . . it has not been loaded. (I have an ‘August 2024 Batch 3’ F13.)
Compare also this even older thread on this the present forum (a thread that asks whether tlp’s charge limiting can be used on Framework computers).
Gotta test that at some point, with access to tlp fullcharge there really isn’t a downside to running a charge limit anymore. (I know I can do the same thing with ectool allready but it isn’t anywhere near as convenient)
It turns out that there is some bad news. Here is is. tlp can handle charge limits, on AMD Framework laptops that run the latest BIOS (BIOS 3.09 - as against earlier BIOS versions), only with an as-yet-unreleased version of the Linux kernel (viz., 6.17).
That is not that bad news, I have been able to wait for this feature since I got the thing, so I’ll survive a few more months without it. I am just glad things are actually moving. Also ectool does work pretty well but tlp fullcharge just is convenient as hell.
Can you use TLP to enable undervolting without going into BIOS?
I was writing about using tlp to change charging thresholds. tlp allows one to do that - with a sufficiently new Linux kernel, and with the latest BIOS - so long as the BIOS is not set to handle charge levels. So in one sense one can use tlp-without-BIOS to adjust charge thresholds and in another sense one cannot.
But you ask about under-volting. I forget whether tlp does undervolting. You should consult tlp’s documentation. There is a further program - again, a Linux program - called ‘throttled’ that does undervolting - for some hardware and which might (I don’t know) require little or nothing by way of the BIOS.
I was asking if TLP can disable any relevant BIOS settings, what else can it disable aside from battery charging limit