Created attachment 195341 [details] upower --dump acpi command properly reports adapter online/offline status and the battery remaining time is calculated properly but the battery is always in discharging or charging state. This breaks Gnome UI which reports 89 hours remaining time when the laptop is plugged in and charged fully. When I plugin the charger I see this line appear in the logs, don't know if related or not. kernel: asus_wmi: Unknown key cf pressed I'm not sure what files should I provide so I attached the output of upower --dump with a fully charged battery with the adapter plugged in. I'll gladly provide further files of command output.
(In reply to János Illés from comment #0) > Created attachment 195341 [details] > upower --dump > > acpi command properly reports adapter online/offline status and the battery > remaining time is calculated properly but the battery is always in > discharging or charging state. This breaks Gnome UI which reports 89 hours > remaining time when the laptop is plugged in and charged fully. OK, so the charging state is wrong. Can you please attach dmesg, acpidump too? # dmesg > dmesg # acpidump > acpidump.txt
Created attachment 197291 [details] dmesg
Created attachment 197301 [details] acpidump
This seems to be a BIOS problem to me. On this laptop, ACPI battery driver just reads the IO register to get battery status, which is either charging or discharging. Do you have windows installed? If yes, please check if windows has the same problem. Another way to fix this is to add a new logic in upower, if AC on line { if battery charging return battery status = charging else return battery status = charged /* battery can not be discharging when AC is on */ } But anyway, this is not a kernel bug to me.
I've had a windows installation that I since removed so I cannot check but I'm pretty sure it didn't had this problem.
Well, like I said, the root cause of this problem is that BIOS returns bad Battery status, and there is noway for kernel to fix it. Maybe windows uses the same logic like I proposed for Linus userspace. Could you raise this issue to upower instead? Because I really don't see anything we could do in kernel.
I opened a ticket. https://bugs.freedesktop.org/show_bug.cgi?id=93529
tracked in freedesktop instead.