News for hackers. Stuff that matters.
Re:Linux Kernel Fastboot [pdf] by Filligree on Saturday September 14, 2019 @10:10PM (#20975136)
I used Powertop on Linux, yes.

For Windows, I simply let the laptop run until it had used 50% of the battery. Watts = Joules / second.

On Linux, I used the same methodo to calibrate against powertop. (But found less than 5% of discrepancy anyway.)

Re:Linux Kernel Fastboot [pdf] by ComputerGuru on Saturday September 14, 2019 @11:23PM (#20975373)
The only valid approach is to remove the battery and plug it into a kill-a-watt or similar.
Re:Linux Kernel Fastboot [pdf] by tjoff on Sunday September 15, 2019 @09:55AM (#20977208)
Performance and power saving features are vastly different between battery and AC so I don't feel that is relevant at all.

If we are talking about battery-life at least.

Re:Linux Kernel Fastboot [pdf] by ComputerGuru on Monday September 16, 2019 @07:04PM (#20989444)
Yes, and that would be accounting for the wrong thing. Battery life can be stretched out with user hostile things like lowering the brightness to two-digit nits and disabling all background tasks, none of which really help gauge the efficiency.

In fact, what mobile device manufacturers have learned is that the best way to save power is to ramp up power to complete a non-IO task in as little time as possible then go back to a lower TDP as that is where peak efficiency (rather than minimal consumption) lies.

Re:Linux Kernel Fastboot [pdf] by tjoff on Tuesday September 17, 2019 @06:26AM (#20993445)
Accounting the wrong thing?

I think most people are interested in their battery life when they are measuring their battery life.

Numbers you get while plugged in won't have any relevance to battery life or performance. That even applies to mobile devices, despite their learnings.

Re:Linux Kernel Fastboot [pdf] by swiley on Sunday September 15, 2019 @12:37AM (#20975592)
Many laptops aren’t stable at full speed without a battery.
Re:Linux Kernel Fastboot [pdf] by ComputerGuru on Sunday September 15, 2019 @12:43AM (#20975606)
I’m not aware of anything other than a MacBook or some micro ultra books that do that because they try to keep the power brick size down. Any device with a user-removable battery should be able to do that, provided you’re using an adapter that provides sufficient current.
Re:Linux Kernel Fastboot [pdf] by lonelappde on Saturday September 14, 2019 @10:13PM (#20975150)
That's a good way to estimate but not appropriate for comparing to powertop, due to overhead. Also "50%" of energy is an estimate based on voltage, not actually energy usage. That's why Apple has stopped showing percentages in their OSes.

You should use the same methodology for both.

Re:Linux Kernel Fastboot [pdf] by aidenn0 on Saturday September 14, 2019 @11:03PM (#20975313)
I thought most laptop batteries use coulomb counting rather than voltage for estimating battery level?
Re:Linux Kernel Fastboot [pdf] by BeeOnRope on Sunday September 15, 2019 @12:37AM (#20975589)
Yes, any decent laptop for sure uses coulomb counting, not a simple voltage measurement.
Re:Linux Kernel Fastboot [pdf] by jimmaswell on Saturday September 14, 2019 @10:17PM (#20975170)
I'd assume the voltage->percentage function was worked out and the percentage displayed was thus accurate. It would be weird if that wasn't the case.
Re:Linux Kernel Fastboot [pdf] by konstmonst on Sunday September 15, 2019 @05:11AM (#20976308)
It us not. I programmed Accu controller. The best way is to track the enery coming in and out. Using only voltage is imprecise bevause the voltage/charge graph look a bit logarihmic, so the more charge you have, the more presision you need to have while measuring charge.This graph as well as total possible energy capacity and ability to Charge depend on Temperature. Also you normally have multiple cells that age differently.
Re:Linux Kernel Fastboot [pdf] by rabidrat on Saturday September 14, 2019 @10:27PM (#20975198)
I think it varies with the age of the battery and the operating temperature (probably other things too). Although if they were clever they could probably incorporate those parameters as well..
Re:Linux Kernel Fastboot [pdf] by Filligree on Sunday September 15, 2019 @12:39PM (#20978040)
They use coulomb counting, along with an estimate of how much safely-usable energy is left in the battery.

That estimate is usually accurate, but it can drift a bit over time if you never fully recharge or discharge the battery. Also, when the battery gets old it starts having trouble delivering full current when mostly discharged, which is why you'll sometimes see shutdowns at 5-15% remaining.