In the interest of improving battery life, I would like to have the battery only charge up to about 80% while plugged in, and bypass the battery (running everything directly off AC) once the threshold is reached.
I know this is possible with Thinkpad devices using tp_smapi, and some Clevo hardware supports this via the Flexicharge option.
Does the Librem hardware support a feature like this? I can’t find anything on the forum so far.
I’m also very interested in that topic, but so far I only protect against gooing too low by letting my KDE/Plasma warn me at 20% instead of the default 10%.
I did not yet play with /sys/class/power_supply/BAT0/* and try to limit voltage, but I think it’s possible.
It should be noted that percentage is a vague concept when it comes to charging levels. 100% percent is what the manufacturer or the driver author defines it to be. Or yourself. After limiting it, I guess 80% is the new 100%. What one wants to limit is the voltage.
Ultimately, what I’d like to see is to be able to define power profiles like
Stationary (40% - 60%)
Mobile (20% - 80%)
Endurance (10% - 90%)
Damn_I_Need_Power_Badly (5% - 100%)
and then conveniently switch between them via the battery icon in my favourite desktop environment.
Thanks for the link. I had seen Uncle_Vova’s post and the replies, but none of them said anything about software-based battery control, so I figured it was worth asking anyway. I would love to see power profiles like the ones you’ve defined, and tools like tp_smapi that work on Librem.
From my reading (see also this link)on it, the /sys/class/power_supply/ contents only serve as a monitor of the battery status, and can’t be used to control it. Battery control tools like tp_smapi need to be supported by firmware.
Hm, that’s a bummer, but I guess it makes sense. Still, according to the files that are present, I would assume that setting custom values is supported by the firmware. So, I guess what we need is some community effort to create such a tool.
(I’d like to contribute, but I’m not sure if I’ll have the time… )
Another idea… From the little booklet that came with the librem, it sounds like you can remove the battery altogether and the laptop will still run when plugged in. Perhaps one can install a killswitch that cuts off the battery from the charging circuit while plugged in? This seems like a simpler option to me, knowing very little about the embedded controller for the battery. It’s just hypothetical, since I don’t think limiting battery charge is worth the effort of cutting into the chassis.
I’m still fairly certain that you can’t control the charging from the power_supply class. If anyone has more information on the battery/charging firmware I’d like to hear it.