Monday, May 6, 2024
17
rated 0 times [  17] [ 0]  / answers: 1 / hits: 8610  / 3 Years ago, sun, october 10, 2021, 11:29:20

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?


More From » power-management

 Answers
3

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:



./var/lib/upower/history-time-empty-DELL_KP4377-57-22096.dat
./var/lib/upower/history-time-full-DELL_KP4377-57-22096.dat
./var/lib/upower/history-charge-DELL_KP4377-57-22096.dat
./var/lib/upower/history-rate-DELL_KP4377-57-22096.dat


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.


[#39822] Monday, October 11, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
azaaburge

Total Points: 266
Total Questions: 85
Total Answers: 109

Location: Djibouti
Member since Sat, Oct 29, 2022
2 Years ago
;