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?
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:
It still won't be automated though.
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)
power_cfg = open("/sys/class/power_supply/BAT0/charge_control_end_threshold", "r") print("Current Charge Threshold:") print(power_cfg.read()) power_cfg = open("/sys/class/power_supply/BAT0/charge_control_end_threshold", "w") change_opt = input("Change? y/n: ") if(change_opt == "y"): ch_val = input("Enter New Value: "); power_cfg.write(ch_val);
Please let me know if this works on your machine.