Huawei

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/95%, 80/75%, and 60/55%.
  • Each preset end threshold value can be customized between 100-80 %, 80-65 %, and 85-50 % respectively.
  • Each preset start threshold value can be customized between is 98-75 %, 83-60 %, and 83-40 % respectively.
  • The difference between end and start threshold cannot be less than 2%.

Dependencies

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

Testing charging threshold using command-line

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


For example:
To apply start threshold value of 55, end threshold value of 60, command would be.

Require root privileges

echo '55 60' | pkexec tee /sys/devices/platform/huawei-wmi/charge_thresholds


sudo also can be used in place of pkexec in the above 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.

cat /sys/devices/platform/huawei-wmi/charge_thresholds


Condition for applying threshold

  • Accepted values for charge_control_end_threshold : 1 - 100
  • Accepted values for charge_control_start_threshold : 0 - 99

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

Quick Settings


Gnome 43 and above Gnome 42

Extension Preferences