5

TLP: Limiting Battery Charge on LG Gram in Linux

 1 year ago
source link: https://www.lorenzobettini.it/2023/06/tlp-limiting-battery-charge-on-lg-gram-in-linux/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

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:

sudo pacman -S tlp tlp-rdw

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:

+++ Battery Care
Plugin: lg
Supported features: charge threshold
Driver usage:
* vendor (lg_laptop) = active (charge threshold)
Parameter value range:
* STOP_CHARGE_THRESH_BAT0: 80(on), 100(off) -- battery care limit

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):

START_CHARGE_THRESH_BAT0=75
STOP_CHARGE_THRESH_BAT0=80

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

/sys/devices/platform/lg-laptop/battery_care_limit = 80 [%]

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).

Like this:

Loading...

Related


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK