![]() if using Power management#Generic service template, enable an instance of the created template using: In order to re-execute the service after hibernation, use one of the methods described in Power management#Sleep hooks.Į.g. While this setting will persist after suspending to RAM, it will be reset when resuming from hibernation. etc/udev/rules.d/les ACTION="add", KERNEL="asus-nb-wmi", RUN+="/bin/bash -c 'echo 60 > /sys/class/power_supply/BAT?/charge_control_end_threshold'" Persist after hibernation Create a udev rule for asus-nb-wmi to set the battery's charge threshold: 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. # echo 60 > /sys/class/power_supply/BAT0/charge_control_end_threshold $ cat /sys/class/power_supply/BAT0/capacity $ cat /sys/class/power_supply/BAT0/status The effect of its change can be demonstrated as follows: īy default this value is set to 100 and reset on every power cycle. Kernel 5.4 brought the ability to set the battery charge threshold for some Asus laptops, by modifying the charge_control_end_threshold variable exposed under /sys/class/power_supply/BAT0/. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |