TLP: Limiting Battery Charge on LG Gram in Linux

I had already blogged on how to limit battery charge on LG Gram in Linux. In that post, you had to manually set the threshold “80” in the file “/sys/devices/platform/lg-laptop/battery_care_limit”.

With TLP, the procedure is easier and more automatic.

First, you must install tlp (remember that tlp conflicts with power-profiles-daemon, so you have to disable the latter first or uninstall it). In Arch-based distros:

Ensure that the tlp service is enabled on boot and the first time you should start it (“sudo systemctl start tlp”).

By running “sudo tlp-stat”, you should see near the end this line:

Edit the file “/etc/tlp.conf” and uncomment the following lines (note there’s one also for the start of charging, but that option doesn’t seem to be supported in this laptop):

Restart the service (“sudo systemctl restart tlp.service”), and it should be already active (run “tlp-stat” again):

That’s all. This will persist on reboot. However, this will not persist if you hibernate and return from hibernation (unless you restart the tlp service as shown above).

8 thoughts on “TLP: Limiting Battery Charge on LG Gram in Linux

  1. Nahuel

    In KDE 5.27 you can set this through “System preferences > Energy settings > Advanced energy settings”. There’s an option “Charge limit” which you can set to 80% instead of the default 100%. Setting any other value will set the default 100%.

    I just found out about this option, so I still have to experiment what the starting charge threshold would be, but my first guess is that it’s 79% or even 80% by default. Anyway, as it’s mentioned in the post, the start charge threshold probably doesn’t do anything for this laptop.

    Reply
    1. Lorenzo Bettini Post author

      Hi. KDE has had that setting for a long time, but it was not available for this laptop until a few months ago, if I remember correctly. Yes, you can set the charge limit also with that KDE setting 🙂
      However, TLP sets that automatically be default, while KDE forgets about that setting if you reboot. At least, that’s what happened the last time I tried.

      Reply
        1. Lorenzo Bettini Post author

          I think that the Arch wiki shows a systemd service that you can enable at boot time so that it sets that value automatically.

          Reply

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.