Power-Management – Where Does Gnome-Power-Statistics Get Its Data From


Gnome-power-statistics is run when you click on the battery icon in the top panel of a laptop. It shows battery history such as charge and rate, as well as statistics such as discharge profile and discharge accuracy.

gnome power statistics discharge profile

The more you use your laptop, the more data it shows, and the more accurate the battery time-to-empty predictions are.

So, where does gnome-power-statistics get the raw historical data from?
And, if it also saves any data, where does it save it to?

Best Answer

I've just answered a simular question here, but here is the summary:

UPower's historical information is stored in four files in /var/lib/upower/, yours will be different but mine are named:


It appears to compile this data from the information in /sys/devices/LNXSYSTM:00/device:00/PNP0C0A:00/power_supply/BAT0 which I'm guessing is in turn directly taken from acpi's information on the current battery state at /proc/acpi/battery/BAT0/info.

Hope this helps.