Bug 108411 - ACPI never reports fully-charged status for ASUS Zenbook UX305CA battery - Intel Skylake
Summary: ACPI never reports fully-charged status for ASUS Zenbook UX305CA battery - In...
Status: CLOSED MOVED
Alias: None
Product: ACPI
Classification: Unclassified
Component: BIOS (show other bugs)
Hardware: Intel Linux
: P1 normal
Assignee: Zhang Rui
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-11-24 21:41 UTC by János Illés
Modified: 2016-03-15 07:58 UTC (History)
3 users (show)

See Also:
Kernel Version: 4.4-rc2
Subsystem:
Regression: No
Bisected commit-id:


Attachments
upower --dump (1.81 KB, text/plain)
2015-11-24 21:41 UTC, János Illés
Details
dmesg (124.02 KB, text/plain)
2015-12-14 06:47 UTC, János Illés
Details
acpidump (903.72 KB, application/octet-stream)
2015-12-14 06:48 UTC, János Illés
Details

Description János Illés 2015-11-24 21:41:47 UTC
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.
Comment 1 Aaron Lu 2015-12-14 03:02:28 UTC
(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
Comment 2 János Illés 2015-12-14 06:47:59 UTC
Created attachment 197291 [details]
dmesg
Comment 3 János Illés 2015-12-14 06:48:47 UTC
Created attachment 197301 [details]
acpidump
Comment 4 Zhang Rui 2015-12-28 13:04:27 UTC
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.
Comment 5 János Illés 2015-12-28 20:50:08 UTC
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.
Comment 6 Zhang Rui 2015-12-29 00:16:44 UTC
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.
Comment 7 János Illés 2015-12-29 08:49:55 UTC
I opened a ticket. 

https://bugs.freedesktop.org/show_bug.cgi?id=93529
Comment 8 Zhang Rui 2016-03-15 07:57:57 UTC
tracked in freedesktop instead.

Note You need to log in before you can comment on or make changes to this bug.