Friday, May 3, 2024
24
rated 0 times [  24] [ 0]  / answers: 1 / hits: 23210  / 3 Years ago, wed, july 7, 2021, 6:18:36

I changed my batteries and the battery statistics of the GNOME manager got skewed. Where would the files having the battery statistics be?


More From » power-management

 Answers
6

Edit: Ubuntu now uses freedesktop's UPower power-manager. After looking through the source for UPower it looks like the persistent database where the history is stored is defined as history-%s-%s.dat. I searched through my filesystem and my database names are:



./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


Your file names will obviously be different but they should be in the same directory (/var/lib/upower/)regardless. These four files, despite being ".dat" files are really just human readable text documents with the history. I'd say back up these files, then either delete them or delete their contents and you should be good to go! Let me know how it works.



Original answer:



Good question. One would think that gnome-power-manager would have it's own log file somewhere for storing it--I can't find anything of the sort however.



It looks like most of the information it reads about the battery comes from acpi via /proc/acpi/battery/BAT0/info (my path is "BAT0" yours might be different from yours) For example, here's mine:



present:                 yes
design capacity: 5200 mAh
last full capacity: 3665 mAh
battery technology: rechargeable
design voltage: 11100 mV
design capacity warning: 520 mAh
design capacity low: 157 mAh
cycle count: 0
capacity granularity 1: 52 mAh
capacity granularity 2: 52 mAh
model number: DELL KP4377
serial number: 22096
battery type: LION
OEM info: DP-SDI52


But other than cycle count and last full capacity there isn't a lot of history information here, so there must be another file somewhere that gnome-power-manager is using for the history information. It's possible that rather than storing it in it's own file it is using some larger database that gnome uses for a variety of settings... I suppose it's also possible that ACPI might store the history information somewhere as well, although once again there doesn't seem to be any documentation for this.



If they exist, you might get some more attention for your question by people who know gnome-power-manager better if you add some more specific tags, ie. "gnome-power-manager", "acpi", etc. Sorry I can't help you much, good luck!


[#38284] Thursday, July 8, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
suspengn

Total Points: 477
Total Questions: 104
Total Answers: 100

Location: Rwanda
Member since Thu, Feb 10, 2022
2 Years ago
suspengn questions
;