Review Request 116481: Calculate remaining battery lifetime considering ALL installed batteries

Joschi Brauchle joschi.brauchle at
Sat Jan 17 21:24:14 GMT 2015

This is an automatically generated e-mail. To reply, visit:

(Updated Jan. 17, 2015, 9:24 p.m.)


This change has been marked as submitted.

Review request for kde-workspace and Kai Uwe Broulik.


Repository: kde-workspace


Currently powerdevil uses the "time-to-empty" property provided by upower to add up battery life for all installed batteries. 
Unfortunately, upower 0.9.x does not provide a "time-to-empty" for fully charged batteries.
Hence, the remaining battery lifetime displayed by powerdevil considers only batteries which are currently being discharged and ignores all fully charged batteries.

The proposed patch is taken from upower 0.99.x and sums up the total energy available in all installed batteries (discharging and charged) and divides it by the current total discharge rate over all batteries (this is for lifetime, similarly for charge time).


  a/powerdevil/daemon/backends/upower/powerdevilupowerbackend.cpp eae5436 



Tested with KDE 4.11.6 on Thinkpad T440s with 
- two batteries installed
- one battery installed


Joschi Brauchle

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the kde-core-devel mailing list