How to limit battery charging to (say) 80%

When I cat /sys/class//power_supply/axp20x-battery/uevent it shows POWER_SUPPLY_ENERGY_FULL = POWER_SUPPLY_ENERGY_FULL_DESIGN. I gather that POWER_SUPPLY_ENERGY_FULL is read-only. (I tried changing it and that didn’t work.) Is there a way to prevent charging from going past (say) 80% full?

I’ve calibrated the batteries – twice – but still when I charge it with the system down until the yellow light goes off I seem to fall into a terrible hole where it won’t boot, won’t charge – eventually I can get it to boot (I’m not sure how, actually …) – but I’d like to have a way of keeping it from charging full. (That’s said to be good for battery life anyway.)

1 Like

I dont know may be the power management of the chip you check the datasheet? Theres repo with the electronic, renetly i need repairs my audio Jack and find the repo

I had the same issue, even with root privileges I couldn’t save changes to those files. The Raspberry Pi family uses a separate settings file for this purpose, called config.txt. I found some good information in Rex’s post at uConsole still often, unpredictably dying at 50% - #4 by Rex

Not sure if will do exactly what you want, but that’s a good place to start.