I have an Asus ROG GL503 laptop, which came pre-installed with Asus Battery Health Charging software. This software gives me the option to limit my battery charging level to 60% to prolong the overall battery lifespan. Whenever I boot using Ubuntu(18.04), my battery keeps charging until it reaches 100%. Is there any method by which I can limit my battery charging up to a certain level?
I have written a short python script to make switching the thresholds easier on my ROG laptop. (ROG STRIX G731GU).
Please run the script as admin. (e.g.
sudo python3 scriptname.py
)Please let me know if this works on your machine.
AFAIK there's no software triggered hardware switch to turn off power after reaching certain point in general purpose laptops or notebooks.
However, you may run a background script that can inform/alert you when you reach a desired battery level percentage.
Refer this link for knowing how to listen to Battery Levels:
How to write a script to "listen" to battery status and alert me when it's above 60% or below 40%?
It still won't be automated though.
Bat a Github solution only for ASUS laptop
You can use now the utility bat that has the same behaviour as the original ASUS utility link:
Installing this precompiled binary I set a threshold to charge my laptop battery only at 60 % but anyway you can choose the thresold you prefer.
I 'm succesfully using Bat in my Asus vivobook pro 15 N580GD with ubuntu 20.04.
This is the GIT link: https://github.com/leveson/bat
Precompiled binaries (Linux x86-64) are available from the GitHub releases page, the latest of which can be downloaded from here.
In my case I've only downloaded the precompiled binary and copied this to the dir
so then you ' ll be able to use it from your command line from any path in your system and set the battery threshold as you prefer (see below in Commands)
Requirements
Linux kernel version later than 5.4 which is the earliest version to expose the battery charging threshold variable. Is required also systemd at least version 244, and Bash which are bundled with most Linux distribution.
Commands
Check current threshold
set threshold to the value you prefer ( I suggest 60% )
makes modified threshold persistant
makes current threshold valid only for current session
shows current level of charge
Shows current charging status
I have an Asus TUF working fine with TLP (limited battery charge to 70%) and TLPUI. Try this:
Then, use "tlpui" in your applications to setup this.