FS#73996 - [linux] Battery charging limit is reset to 100% on every reboot/power cycle on ASUS laptop(s)

Attached to Project: Arch Linux
Opened by Mthw (jari_45) - Tuesday, 01 March 2022, 08:17 GMT
Last edited by Jelle van der Waa (jelly) - Thursday, 14 September 2023, 17:54 GMT
Task Type Bug Report
Category Kernel
Status Closed
Assigned To Jan Alexander Steffens (heftig)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:
I have an ASUS TUF laptop that allows setting a battery charge limit. But, one has to re-set this value on every reboot for it to be used.
This causes tools like Powerdevil in KDE Plasma to not work correctly since they assume, that once the value is set, it is remembered until a change happens.
This issue was originally reported on KDE bug tracker (https://bugs.kde.org/show_bug.cgi?id=450551).
There I was told to report it to kernel bug tracker, which redirected me here.
This commit is likely the culprit https://github.com/torvalds/linux/commit/7973353e92ee1e7ca3b2eb361a4b7cb66c92abee#diff-38095ba4871836b9eeaa6e1904739d398da72cda890e5ef932daec2995579db3R429-R434 as it says that the value is reset on every reboot.
I do use linux-zen kernel but every kernel version is affected so I am reporting it here.

Additional info:
* Originally reported on 5.16.10 but applies to every version
* links for better readability:
KDE: https://bugs.kde.org/show_bug.cgi?id=450551
bad commit?: https://github.com/torvalds/linux/commit/7973353e92ee1e7ca3b2eb361a4b7cb66c92abee#diff-38095ba4871836b9eeaa6e1904739d398da72cda890e5ef932daec2995579db3R429-R434
Arch Wiki: https://wiki.archlinux.org/title/Laptop/ASUS#Battery_charge_threshold

Steps to reproduce:
0. Have an ASUS laptop
1. echo 60 > /sys/class/power_supply/BAT0/charge_control_end_threshold
2. reboot
3. the value is reset to 100
This task depends upon

Closed by  Jelle van der Waa (jelly)
Thursday, 14 September 2023, 17:54 GMT
Reason for closing:  Deferred
Additional comments about closing:  Old kernel, please retry with the latest
Comment by Jan Alexander Steffens (heftig) - Tuesday, 01 March 2022, 22:41 GMT
Can't really do anything here; this needs to be fixed upstream.
Comment by Mthw (jari_45) - Wednesday, 02 March 2022, 07:07 GMT
So should I create a bug report there? In that case, does this belong to ACPI/Power-Battery?
Comment by Mthw (jari_45) - Wednesday, 02 March 2022, 07:18 GMT Comment by Adam Kürthy (adee) - Wednesday, 02 March 2022, 10:47 GMT
For my ASUS the charge limit is reset immediately when the UEFI loads on reboot (before the kernel and even the bootloader, can be seen when charging stopped at the limit and then reboot). That means it is not the kernel that resets it but the EC/firmware.
Comment by Jim (jimbo2150) - Sunday, 29 May 2022, 11:43 GMT
Same issue with Asus ZenBook Flip 15 with kernels 5.17 and 5.18.

Loading...