This script is used to set the battery charging limit for ASUS laptops (tested with ASUS ZenBook 14 UX425EA
and ASUS Zephyrus G14 GA401QC
).
Step 1:
Download the asus-battery-health-charging.sh script.
Step 2:
Grant executable permission to the script file.
chmod +x asus-battery-health-charging.sh
Step 3:
Execute the script, passing the desired charging limit value (1 - 100) as a command-line argument.
sudo sh asus-battery-health-charging.sh 60
Note:
This will set the battery charging limit to 60%. The setting will persist even after restarting. To change the limit, follow Step 3 and pass the desired value.
Step 1:
Download the asus-battery-health-charging.ps1 script.
Step 2:
Grant executable permission to the script file. (Press Y upon prompt).
Set-ExecutionPolicy RemoteSigned
Step 3:
Execute the script, passing the desired charging limit value (1 - 100) upon prompt.
.\asus-battery-health-charging.ps1
Alternate Step:
If you have difficulty running the script, simple copy the code to administrator PowerShell and set the limit.
Note:
The setting will persist even after restarting. To change the limit, follow Step 3 and pass the desired value. If you want to check limit status:
powercfg -q 381b4222-f694-41f0-9685-ff5bb260df2e SUB_BATTERY
Pinaki Pritam Singha |
Alik Agarwala |
Avik Agarwala |