Hello,
I’m trying to control now the battery charges with the recently merged kernel patches from @Thomas_Weissschuh , and can’t get it to behave similarly to the bios setting.
Setting the battery limit in bios to, say, 80%, causes the laptop to charge up to that level and stay there, with reported charge/discharge current of 0. All I want for now is to be able to change this limit without reboots/GUIs/etc.
There are 2 relevant charge_behaviour
modes, but neither does that “out of the box”.
auto
allows setting thecharge_control_{start,end}_threshold
values to some percentages (the start/end values must differ). Then the battery charge cycles between those thresholds, as if charger is physically plugged when the battery drained to the “start” level, and physically unplugged at the “end” level. With my limited knowledge this doesn’t seem helpful at all in extending the battery life.inhibit-charge
is much closer: the battery level stays the same, reported charge/discharge current is zero. 2 problems, however:- there is no way to tell it to charge the battery to the given level, and only then go to the “inhibit” mode, as the bios setting does
- the state is silently ignored after replugging the cable: the behaviour reads as
inhubit-charge
, but the battery charges at maximum possible rate up until the limit previously set in bios.
Am I missing something? Is there a bug (I suspect the replug case is)?
PS:
I understand that it’s trivial to make a small script that will monitor battery level, and go to the inhibit mode at certain level, but
- doing this in userspace doesn’t feel reliable enough
- it won’t work when the laptop is off/sleeping