Search code examples
limitbattery

How hard is it to control laptop's battery charge or to limit?


I wonder if it is possible to write a program which would limit the battery charge of a laptop. I know some manufacturers like Asus, Lenovo etc. have such build-in software, but I am curious if anyone had tried creating a universal software for that and if you would share some starting points. Not sure if that is even possible since I am unable to find such software. Thanks!


Solution

  • There is an almost generic tool for Linux: TLP. You find it's homepage (including a link to the source code) on https://linrunner.de/tlp/. It works as power saving utility and also can adjust the battery charge levels, BUT that feature is only for ThinkPads.

    To my knowledge there is no universal interface to set the charge levels of laptop batteries, so a generic utility would have to know all that vendor specific settings probably.

    A short research showed, that Linux supports more than Lenovo inside some kernel drivers, so maybe that code could help you to also write software for a different OS. My advice would be to research the possibilities for Linux to then think about a generic utility for another operating system.