Created attachment 1907929 [details] Kernel dmesg 1. Please describe the problem: Battery percentage gets stuck after the boot. It never increases/decreases. I'm using ASUS TUF A15 FA506II with AMD Ryzen 5 4600H. It uses battery_BAT1. I checked battery energy values with gnome-power-manager software and it reports the same value everytime I check. 2. What is the Version-Release number of the kernel: 5.19.4-200.fc36.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Aug 25 17:42:04 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux 3. Did it work previously in Fedora? If so, what kernel version did the issue *first* appear? Old kernels are available for download at https://koji.fedoraproject.org/koji/packageinfo?packageID=8 : It works with 5.18.19-200.fc36.x86_64 4. Can you reproduce this issue? If so, please provide the steps to reproduce the issue below: 0. Update kernel to 5.19.4 1. Boot the system and check the battery percentage. 2. Use the device for a while at battery power. 3. Check the battery level. 4. It stays the same. Alternatively: 0. Update kernel to 5.19.4 1. Boot the system and check the battery percentage. 2. Plug the device to charger 3. Charge it for a while. 4. Check the battery level. 5. It stays the same. 5. Are you running any modules that not shipped with directly Fedora's kernel?: Nvidia properiety driver modules only. 6. Please attach the kernel logs. You can get the complete kernel log for a boot with ``journalctl --no-hostname -k > dmesg.txt``. If the issue occurred on a previous boot, use the journalctl ``-b`` flag.
I have tried Rawhide kernel (6.0.0-0.rc2.20220826git4c612826bec1.22.fc38) and it didn't work either.
Restarting upower service and reinstalling upower didn't help.
Seems like the issue caused after this commit in upstream: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?h=v6.0-rc3&id=de8fbac5e59e239b00cdac611784b1bc1ff53d14 Blacklisting asus_ec_sensors module helps with the issue. I also think the discussion here can help you finding the root cause: https://bbs.archlinux.org/viewtopic.php?id=278933&p=4
Created attachment 1909318 [details] Kernel logs of user while experiencing this issue
At ask.fedoraproject.org, we have currently at least three cases of the issue, although the symptoms are not equal to Burak. One user has a kernel that is NOT tainted (his `cat /proc/sys/kernel/tainted` = 0) and he provided his kernel logs. I have attached the output of his `journalctl --no-hostname -k > dmesg.txt` he retrieved while experiencing the issue as "Kernel logs of user while experiencing this issue". The user has a erratic battery power percentage and suspend does only work when doing it manually, but not when closing the lid. Blacklisting asus_ec_sensors solves the issues at his machine. The related topic is https://ask.fedoraproject.org/t/battery-indicator-not-working-properly/25946
Good work on figuring out that this is caused by asus_ec_sensors ! Has anyone already reported this to the asus_ec_sensors maintainers? Quoting from the kernel's MAINTAINERS file: ASUS WMI EC HARDWARE MONITOR DRIVER M: Eugene Shalygin <eugene.shalygin> M: Denis Pauk <pauk.denis> L: linux-hwmon.org S: Maintained F: drivers/hwmon/asus_wmi_ec_sensors.c
Ugh, wrong driver, sorry. Here is the MAINTAINERS entry for the right one: ASUS EC HARDWARE MONITOR DRIVER M: Eugene Shalygin <eugene.shalygin> L: linux-hwmon.org S: Maintained F: drivers/hwmon/asus-ec-sensors.c Please report this to: Eugene Shalygin <eugene.shalygin>, with linux-hwmon.org and regressions.dev in the Cc.
I reported it.
https://bugzilla.kernel.org/show_bug.cgi?id=216412
Eugene suggested to try the second patch of https://bugzilla.kernel.org/show_bug.cgi?id=216412 on affected systems to see if it fixes this bug as well.
I don't know if one of the users is willing to test this on their systems (I forwarded the request to the users, see the ask.fedora topic I mentioned above). However, it might be observed if the issue disappears when the patch ends up in the kernel, just in case we cannot test the patch directly.
Same hardware\software versions. Blacklisting asus-ec-sensors fixes the issue.
Upstream kernel discussion: https://lore.kernel.org/all/166ca420-27a0-a86d-8d1d-e20a87d62cd4@my.mail.de/T/ "Common issue" with workaround and explanation for users: https://ask.fedoraproject.org/t/false-output-of-battery-charge-conditions-and-failure-of-automatic-suspending/26119
Kernel 5.19.9 seems to fix the issue. Currently testing it. Thanks for your interest. The fixing commit: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=linux-5.19.y&id=7d40396e6d7374e1c8bfb9dd3a1146f69375b96b I don't know if I should close this bug or it needs other confirmation. Leaving it open for now.
Thank you for reporting that this has been fixed. I don't believe it is very useful to keep this bug open, so lets close this.
I update the workaround in common issues once the kernel is pushed to stable.
(In reply to Christopher Klooz from comment #16) > I update the workaround in common issues once the kernel is pushed to stable. Great, thank you!