Comment 123 for bug 531190

Revision history for this message
In , Andreas K. Hüttel (dilfridge) wrote :

From the Gentoo bug report:

--- Comment #8 from Lu Ran <email address hidden> 2011-04-23 19:42:50 UTC ---
I have a W510 with amd64 Gentoo, exactly the same anonying bug, I did some
research and I think it is a bug in the kernel, though upower handle data
differently from hal thus exposed the bug. Here is the problem I find:

When I boot up normally, "cat /sys/.../BAT0/charge_now" gives me something like
this:

7517000

"cat /sys/../BAT0/charge_full" shows

9396000

Use the battery for a while, (I am not sure exactly how to trigger this
reliably though), the number beomes

69350000

and

93960000

Notice the extra "0"! However upower only check charge_full once when it
starts, now it find "energy" calculated from "charge_now" is larger than
"energy_full" calculated from "charge_full", it assume "energe_full" is wrong
and replace the value using "energy" calculated from "charge_now".The battery
capacity become 100% for a while.

Now suspend/resume, the number from "charge_now" and "charge_full" becomes
normal again, but now upower have a cached "energy_full" calculated when
"charge_now" is 10 times larger. The capacity upower calculated will hardly be
larger than 10%.