Asus

Capability

  • 3 presets: Full Capacity Mode, Balance Mode, and Maximum Life Span mode.
  • Default threshold values of these 3 preset modes are set at 100%, 80%, and 60%.
  • Each preset threshold value can be customized between 100-80 %, 85-65 %, and 85-50 % respectively.

Dependencies

  • No dependencies required.
  • Asus laptop that allows setting charging threshold are supported by mainline linux kernels.

Testing charging threshold using command-line

For asus laptops the battery powersupply name could be BAT0, BAT1, BATC or BATT. Hence charging threshold path could be one of the following and can be check using ls command.
ls -l /sys/class/power_supply/BAT0/charge_control_end_threshold
ls -l /sys/class/power_supply/BAT1/charge_control_end_threshold
ls -l /sys/class/power_supply/BATC/charge_control_end_threshold
ls -l /sys/class/power_supply/BATT/charge_control_end_threshold

Charging mode can be set by using echo command in terminal.

For example:
If the battery power supply name is BAT0, to apply threshold value of 60, the command would be.

Require root privileges

echo '60' | pkexec tee /sys/class/power_supply/BAT0/charge_control_end_threshold


Note sudo also can be used in place of pkexec in the below commands as both sudo and pkexec can be use to run commands in root mode. To make use of polkit rules, the extension uses pkexec.

The current threshold value can also be read using cat command in terminal. For example, the laptops battery name in power supply sysfs is BAT0, command would be.

cat /sys/class/power_supply/BAT0/charge_control_end_threshold


Condition for applying threshold

  • Accepted values for charge_control_end_threshold : 1 - 100

If charging threshold are applied successfully using above commands, the extension is compatible.

Quick Settings


Gnome 43 and above Gnome 42

Extension Preferences



Back to top