Tuesday, 8 December 2020

Restrict ASUS laptop charge to 60% in Linux

 Dual booting my ASUS TUF laptop between Windows and Ubuntu 10.

The tools supplied by ASUS with Windows allows the battery charge to be limited to a specified %, the most agressive being 60%, in a bid to preserve battery life. Most laptops that are docked keep the battery at 100% and this kills the battery.

Found a good answer here:

https://askubuntu.com/questions/1006778/set-battery-thresholds-on-ubuntu-asus/1230442#1230442

I didn't have enough reputation on the site to leave a like or comment so I'm showing my appreciation here.

I did install tlp using "sudo apt install tlp" but not certain this is required.

After issuing the command "echo 60 | sudo tee /sys/class/power_supply/BAT1/charge_control_end_threshold" and adding the line "@reboot root echo 60 > /sys/class/power_supply/BAT1/charge_control_end_threshold"  to /etc/crontab, the output of "sudo tlp-stat -b" showed the charge at 78% and that the charge now was 0mA. It still shows as charging in the system tray but the % remains unchanging.

The reason I am not certain that TLP is required is because all the kernal modules listed in "tlp-stat -b" are showing as inactive and laptop not supported.

I've just unplogged my laptop and will let the percentage drop to below 60%, reconnect to the mains and see if the charging stops as hoped.

1 comment:

  1. Checking out my laptop this morning I find this wored great:

    karl@Ubuntu2010:~$ sudo tlp-stat -b
    --- TLP 1.3.1 --------------------------------------------

    +++ Battery Features: Charge Thresholds and Recalibrate
    natacpi = inactive (laptop not supported)
    tpacpi-bat = inactive (laptop not supported)
    tp-smapi = inactive (laptop not supported)

    +++ Battery Status: BAT1
    /sys/class/power_supply/BAT1/manufacturer = ASUS
    /sys/class/power_supply/BAT1/model_name = A32-K55
    /sys/class/power_supply/BAT1/cycle_count = (not supported)
    /sys/class/power_supply/BAT1/charge_full_design = 4110 [mAh]
    /sys/class/power_supply/BAT1/charge_full = 3724 [mAh]
    /sys/class/power_supply/BAT1/charge_now = 2238 [mAh]
    /sys/class/power_supply/BAT1/current_now = 0 [mA]
    /sys/class/power_supply/BAT1/status = Unknown

    Charge = 60.1 [%]
    Capacity = 90.6 [%]

    ReplyDelete