Full width home advertisement

Android

Android ROMs

Post Page Advertisement [Top]

LinuxPC Tricks

How to enable Asus Laptop Battery Health Charging (Charging Threshold) in Linux Based OS?

Asus Battery Health Charging on Linux

 

Most of Asus laptops have a preinstalled program called Asus Battery Health Charging. In recent laptops this feature is integrated in MyAsus application. Using this feature users can set charging threshold to 60% when they use it on AC power. Laptop will maintain 60% charge when connected to AC power. This feature reduces laptop heating and improves performance. But, most important of all, it extends the life of the laptop battery.


Although it's a great feature to have, it is limited to Windows OS only. So, users who want to shift to Linux OS (like Ubuntu, Linux Mint, Elementary OS, Pop OS etc.) for better performance or due to other reasons will face a great disappointment. In a way, it will discourage users to use Linux on their Asus Laptops.


Even though there is no official support by Asus for Linux Operating Systems, there is an easy way to enable Asus Battery Health Charging or in common language battery charging threshold in Linux operating systems. In this post I will be discussing the whole process to enable the same. 


However, a side note, this method will work on most of the Linux based OS's and has been tested on latest versions of Ubuntu and other Ubuntu based OS (Kubuntu, Lubuntu, Xubuntu etc.), Linux Mint, PopOS, Elementary OS and Zorin OS.



Video Tutorial



First Step

Make sure that your system is up to date. If not sure, then try running this command in the terminal:

sudo apt update && sudo apt upgrade -y

(This command will update your system.)


Then,  open file manager and navigate to system partition >> sys/class/power_supply/ and check if you have BAT1 folder or BAT0 folder. (The Asus laptop I tested had 'BAT1' folder.)

Location: sys/class/power_supply


Then open that folder and open the file named 'charge_control_end_threshold'.

Location: sys/class/power_supply/BAT1

charge_control_end_threshold file

You will notice that the 'charge_control_end_threshold' file contains the value '100'. This denotes the charging threshold, which means the battery will charge upto 100% before coming to an equilibrium with the AC power supply.


This is file that tells the system about the charging threshold point. To enable health charging we have to set the charging threshold to 60%, that means we have to change the value of this file from 100 to 60.


We can change the value by simply running the following command in the terminal:

For laptops with BAT0:

echo 60 | sudo tee /sys/class/power_supply/BAT0/charge_control_end_threshold

For laptops with BAT1:
echo 60 | sudo tee /sys/class/power_supply/BAT1/charge_control_end_threshold

Linux terminal 1


This method works but, it is not a permanent solution as it will revert back to it's default value i.e. 100 after reboot. So, you have to run this command every time  the laptop restarts.

So we move to the next step to make it permanent. 😉

Second Step

So, to make it permanent we have to run this command at every startup. To achieve that we have to add this command to the /etc/crontab file. (In linux, using crontab we can run different activities at different instances. In this case we shall run the command at reboot.)

Location: /etc/crontab

To edit the 'crontab' file run the following command in the terminal:

For Linux Mint:
sudo xed /etc/crontab

For other Ubuntu based Operating Systems:
sudo gedit /etc/crontab
Linux terminal 2



Now add the following lines at the end of crontab file:

For BAT0:
# Battery Charge Threshold by OS Busters
@reboot root echo 60 > /sys/class/power_supply/BAT0/charge_control_end_threshold
#

For BAT1:
# Battery Charge Threshold by OS Busters
@reboot root echo 60 > /sys/class/power_supply/BAT1/charge_control_end_threshold
#
Editing crontab


Now save the file and voila we are done!

Now, every time you'll reboot the laptop, Asus Battery Health Charging will be enabled by default. Now you can work on your Linux system without worries. 🙂

If you get stuck in any step let us know in the comment section, we shall try to resolve your issue. Do let everyone know if the method works through your comments.


You May Also Like

3 comments

  1. tee: /sys/class/power_supply/BAT1/charge_control_end_threshold: Permission denied

    ReplyDelete
    Replies
    1. Which operating system are you using? Did it ask sudo password?

      Delete
  2. Thanks for useful post but as ASUS Battery Health Charging docs says "Stops charging when power is above 60% and resumes charging when power is below 58%. This mode is recommended when the Notebook is always powered by AC adapter."

    https://www.asus.com/us/support/FAQ/1032726/

    how we can control resumes charging power level in Ubuntu?

    ReplyDelete

Bottom Ad [Post Page]