Hi Chris, On 03-09-19 01:47, Chris Murphy wrote:
This is an hp spectre running Fedora 30 Workstation. On Fedora 29, there was fairly close agreement between powertop and upower and the time estimates were sane. Something's wonky on Fedora 30 and I'm not sure where to begin troubleshooting, although I posted a message on the upstream powertop list. This is what I'm seeing. https://paste.fedoraproject.org/paste/3M7euUWnqZG07KKJQpRQ-w/raw powertop says 108 hours remaining, upower first says 6.8 hours remaining which is much more plausible, but then merely 4 minutes later battery has gone from 93% to 77%, and to a 22 minute remaining estimate. Really? One says the battery reports 268mW of discharge, the other reports 61W discharge. Neither of those is possible.
What you are likely seeing is the fuel-gauge/BMC chip adjusting its readings all of a sudden, probably based on battery voltage. A fuel-gauge can do 2 things to get a "percentage" full reading: 1) it can measure current going into and out of the battery and keep track of the amount of energy in the battery that way, but that does not include looses, including looses by the battery-cells's self-discharging (which all cells do to some extend). 2) it can use a battery voltage to percent-full table Most fuel-gauges use 1 since it is much more fine grained, combined with 2 to adjust 1 if the 2 get out of sync too much, since 1 collects a cumulative amount of errors over time. I guess that you put this laptop away fully charged and then did not use it for a while? Esp. when charged near 100% the self-discharge is pretty high (for long term storage 50-70% charge is advised), but the self-discharge is not energy consumed by the mainboard of the laptop, it is energy which "disappears" inside the cells itself, so the fuel-gauge does not know about it causing the gauge value reported by method 1 above to be off by a significant amount. So what I think you saw happening with the jump from 93 to 77% is the fuel-gauge correcting the reading based on cell voltage. Some fuel-gauge-s do this gradually, this one clearly does not. As for the 61W discharge rate, Your 2 upower runs with 4 minutes in between, saw a jump of 4.7Wh in capacity 4.7Wh = 4.7 * 3600 Ws = 16920 Ws(econd) 16920 Ws / 4min = 16920 Ws / (4 * 60s) = 70.5W so the math certainly is spot on there. Now if we had enough manpower it would be nice to teach upower to somehow filter out these jumps. But we really do not have anyone to work on that. However if you wait a bit then the readings should normalize again shortly afterwards. As for the POWERTOP reading of 268mW that does sound wrong, powertop uses a moving average for this, did you give it a couple of minutes for the readings to stabilize? Regards, Hans _______________________________________________ devel mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxx To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxx Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/devel@xxxxxxxxxxxxxxxxxxxxxxx