Battery Charging Limit Persist

when i go to Setting - Power Management - Advance Setting there I set & apply the charging limit say 80% or 85% and connect the charger it is charging upto the set percent but if I reboot the laptop the charging limit reset back to 100% is there any way to keep the charging limit persist even after rebooting

Operating System: CachyOS Linux
KDE Plasma Version: 6.1.5
KDE Frameworks Version: 6.6.0
Qt Version: 6.7.3
Kernel Version: 6.11.2-5-cachyos (64-bit)
Graphics Platform: Wayland
Processors: 12 × 12th Gen Intel® Core™ i3-1220P
Memory: 15.3 GB of RAM
Graphics Processor: Mesa Intel® Graphics
Manufacturer: ASUSTeK COMPUTER INC.
Product Name: Vivobook_ASUSLaptop X1502ZA_X1502ZA
System Version: 1.0

You need to create a udev rule as described in the Arch linux article Laptop/ASUS - ArchWiki. No need to change any settings anywhere else. Then reboot.

I have successfully used the procedure in arch, endeavour os and cachy os.

(For Huawei laptop users:
I have done it for Huawei laptops too by changing the name of the module to huawei_wmi.)

Sorry for asking as on Fedora Workstation GNOME(recently switched to CachyOS KDE Plasma inspired by A1R4M4X) I used to use battery-charge-control a gnome extension using the GUI to limit the charge so using udev rule is new to me , from what could understood from the wiki i create a file named asus-battery-charge-threshold.rules in the folder /etc/udev/rules.d/ with its content being ACTION=="add", KERNEL=="asus-nb-wmi", RUN+="/bin/bash -c 'echo *value* > /sys/class/power_supply/BAT?/charge_control_end_threshold'"

here i replace *value* to 85 to stop at 85% like

ACTION=="add", KERNEL=="asus-nb-wmi", RUN+="/bin/bash -c 'echo 85 > /sys/class/power_supply/BAT?/charge_control_end_threshold'"

the above worked, i drained the battery to 60% and did a reboot and to my surprise afer loging in i first chek the power management and there charge limit was set ot 85%, the udev rule worked

This is my first proposed solution in this forum and you are my first satisfied customer. :hugs:

I will try to help other fellow members further as per my capacity.

1 Like