Some time ago I have created a simple script that will setup a battery charge limit on my laptop according to documentation.
I even modified crontab, so that it would remain between boots.
However, I think from some short time (maybe a day or two) I have noticed it stopped working. When I try to modify the /sys/class/power_supply/CMB0/charge_control_end_threshold
it just reverts to 0 (does not matter if I run sudoedit or any other method)
I have previously noticed this behavior with different features described in the documenation page, but I just assumed they were not supported in a way.
Any comment or insight would be appreciated.
$ echo 80 | sudo tee /sys/class/power_supply/CMB0/charge_control_end_threshold
[sudo] password for kornel:
80
kornel@kornel-LG:~$ cat /sys/class/power_supply/CMB0/charge_control_end_threshold
0
(as a note I have an LG Gram laptop)
That's a known kernel bug. You need at least kernel version 6.10.7. Refer to: https://github.com/linrunner/TLP/issues/747