NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: how to control battery charge level on a laptop



On Wed, 22 Oct 2025, Michael van Elst wrote:
 1) design capacity is said to be 5.376Ah, but written directly on the
battery is 7.7V, 41Wh (=~5.324Ah) and nominal 5350mAh.  While small, the
battery is being overcharged to 5.376Ah (101%).  Is there a way to
correct the design capacity to 5.324Ah, and force the machine to keep
the charge no higher than 5.324Ah?

No. The value is reported by the battery.

It's also unclear if you can influence the charging process. Some
laptops (like Thinkpads) allow this, others do not. If they do,
they use some vendor-specific methods.


 2) the CritMax and WarnMax entries are blank.  Is there a way to
inform the machine of these parameters, and issue a warning and stop
charging the machine until the issue is resolved?

You can set values, and this notifies powerd to trigger some action.
But you cannot stop the charging process. Best would be to play
an alarm signal telling you to remove the power cord.

If there is real need for this, like a hw bug, I would recommend
to use the opportunity to play building a small usb->gpio + relay
between the barrel jack and the laptop. You can then used powerd
to control the charging of the battery. Is there something like
the MCP221A sopported by netbsd? There are really cheap boards in
aliexpress. But this smells like a cheap or defective (old?) battery.
Batteries come with overcharging protections, the hardware inside
the batteries is more sofisticated than what people usually think.

adr.


Home | Main Index | Thread Index | Old Index