Return to site

Asus battery health charging buttons disabled

broken image
broken image

Create a udev rule for asus-nb-wmi to set the battery's charge threshold:

broken image

It is added to the sysfs(5) directory by the asus-nb-wmi kernel module. The battery's charge_control_end_threshold power supply class attribute does not initially exist. Note: As of, this is the only functional workaround as neither path-based activation or systemd-tmpfiles were working. The combination of those two options allows unlimited restart of the service for DefaultStartLimitIntervalSec (set to 10 seconds by default in /etc/systemd/nf), leaving enough time for the sysfs path to become available and writable and thus ensuring the fastest execution of the service. This error is due to the service being started before asus-wmi could be loaded by the kernel (noted as kernel: battery: new extension: ASUS Battery Extension in the journal), making it impossible to write there. Restart=on-failure and StartLimitBurst=0 are used to work around the service failing with a /bin/bash: /sys/class/power_supply/BAT0/charge_control_end_threshold: Permission denied error. etc/systemd/system/rvice ĭescription=Set the battery charge thresholdĮxecStart=/bin/bash -c 'echo value > /sys/class/power_supply/BAT0/charge_control_end_threshold' In order to automatically change the value at boot, create the following systemd service: Adjust accordingly or use the single character wildcard ( ?), e.g. Note: As of, the following battery device names are recognized: BAT0, BAT1, BATC and BATT.

broken image