I changed my batteries and the battery statistics of the GNOME manager got skewed. Where would the files having the battery statistics be?
|
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
Your file names will obviously be different but they should be in the same directory ( 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
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! |
|||||||||||||||||||||
|
|
Just tried the delete-files approach. I assumed that since upowerd was still running, these files would be automatically regenerated, but they weren't – nor were they there immediately after rebooting. Initially, after deleting /var/lib/upower/*.dat, gnome-power-statistics just ran as a blank GUI window with no content, but returned to its usual self after the reboot. Strangely enough, it was showing a couple of minutes of battery history from since the reboot without anything having recreated the /var/lib/upower data files, and I couldn't find anywhere else in the filesystem where it could have been storing the data (there were no file descriptors for upowerd or gnome-power-statistics pointing to anywhere on the filesystem, just kernel sockets). I assume that something other than upower must have a short-term log of this data, which is what was being displayed in gnome-power-statistics. Running "upower -d" also outputs history points for charge and discharge rate when the data files don't exist, so presumably it can also access the same data source that is independent of the /var/lib/upower history files. upowerd appears to recreate the data files after about ten minutes post-deletion, so perhaps these are required to store data points over a longer period of time. |
|||||||||||||||||
|
|
Harry, your right. Don't you remember Ubuntu asking you to plug in the charger before installing? That's because it's taking a snapshot at how much the battery can hold. If you want to reset the power-manager, I presume you're going to need to re-install Ubuntu or try a power-cycle. In other words, let your battery die out and then turn it on at the same moment you plug in the charger, and keep it on until it hits the 100%. |
|||||
|