Mailinglist Archive: opensuse (878 mails)

< Previous Next >
[opensuse] Re: Battery Widget in KDE
On 9/12/2013 4:42 PM, John Andersen wrote:
Where does this thing get its battery state measurements?

The widget in the taskbar as well as the plasma thingie on the desktop
32% while the battery level in KSysGuard indicates 68%.

Why would two utilities from the same release of KDE differ about the state
of the
same battery?

Answering my own question....

For the Google Spiders: (Pardon my pedantry)

KSysGuard appears to be calculating its capacity based on last full charge

The Widget is basing its charge on the Design Capacity.

On an older battery, there will be a significant difference between the two.
An old battery will never charge to its design capacity.

KSysGuard's calculation is more accurate for any given age of battery.

Example: (from my Aging Dell Inspiron 9400)

poulsbo:~ # cat /proc/acpi/battery/BAT0/info
present: yes
design capacity: 4800 mAh <------- Full Capacity when new
last full capacity: 2388 mAh <------- Full capacity today.
battery technology: rechargeable
design voltage: 11100 mV
design capacity warning: 480 mAh
design capacity low: 145 mAh
cycle count: 0
capacity granularity 1: 48 mAh
capacity granularity 2: 48 mAh
model number: DELL F51336
serial number: 883
battery type: LION
OEM info: Sanyo

Today, the charge circuitry shut down when the battery reached 2388 mAh.

This "Full charge" occurs when the battery reaches the voltage threshold and the
current drops to three percent of the rated current. (The charging current
drops as the battery gets closer to a full charge due to increasing battery
resistance) A battery is also considered fully charged if the current levels
off and cannot go down further.

Old Batteries will simply not charge to their design capacity.

KSysGuard reports your battery percent full by measuring the current
remaining charge compared to the last known "Full Charge".
So it is reporting the percent of battery life in your battery compared
to a "Full Charge" given your battery's capabilities as the are today
not as they were when the battery was new.

So after a "Full Charge", my ancient dell battery reports this
as soon as I start using the battery

poulsbo:~ # cat /proc/acpi/battery/BAT0/state
present: yes
capacity state: ok
charging state: discharging
present rate: 3047 mA
remaining capacity: 2226 mAh <-------- This is all I can expect these
present voltage: 11906 mV

KSysGuard reports that as 93% capacity. (2226 / 2388 * 100)

The Battery Widget on the other hand reports that as 46% capacity
based on original "factory full charge" 2226 / 4800 * 100.

So BOTH KSysGuard and the Widget are correct, they are
just measuring different things.

The widget's calculation method is use by the power management
settings to decide when the computer should sleep, or shut down
or hibernate, because this gives a more consistent expectation
of battery capacity (minutes) remaining, allowing for a proper shutdown.

2% of design life is consistently mappable to minutes.
2% of current life is a shrinking window.

Ricardo: You were closer to right than you realized. ;-)

---This space for rent---
To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: opensuse+owner@xxxxxxxxxxxx

< Previous Next >