Battery monitor: strange numbers and behavior


nuhrin

Member
Joined
Jun 13, 2011
Messages
65
Hello to all all you lovely people out there! Just got my pandora a week ago and have spend all my free time (which isn't much) testing the waters and exploring. As far as I can tell so far everything is working as expected, except for one thing.


The battery indicator in xfce (and minimenu) doesn't appear to function correctly. I'm not sure if there's some initial calibration process I'm meant to do to make this function right, but I didn't see any reference to this problem on either forum or on the wiki, so I'm assuming this is unusual. Some more details:


When I first got the unit and went through the first boot process, I noticed right away that the battery monitor in the panel said "0% 00:00". I did not have the AC adapter connected, but I had a red light that I now know indicates charging.


I plugged my new pride and joy in and left it plugged in for about 8hrs, using it very occasionally to just play with the desktop. The battery indicator never changed from "0% 00:00". Somewhere during this time I also noticed that the red light was flashing.


I assumed at this point that there was some sort of software problem involved and decided to worry about it later. I unplugged it that (first) night and played a bit lounging on the couch, which I repeated the next day. The red light continued to flash sometimes, sometimes solid, but it was always on. Indicator remained at 0% and I got forgetful and managed to let it drain fully and it just shut off while playing a game.


Then it wouldn't turn back on, but it worked on AC without the battery and figured out how to get it back on battery and charging. And...hooray! The battery indicator started slowly counting up from 0%. That was at like 2am, so I left it charging and went to bed.


At 9am I checked it on my way to work. It was only at like 75%, which surprised me but I figured it was probably normal. I took it with me and played it on the bus, which is when I encountered the next oddity...


The percentage indicator kept going up while on the bus, slowly but surely. I shut it down when I got to work and checked it at lunchtime. 100%.


And it stayed at 100% until, you guessed it, I managed to let it total drain shutdown again. Ack!


This time I got it charging again and left it alone for like 5hrs or so. It was at like 90%. At that point I disconnected it and for the first time saw the red light go away and turn green. Excellent. Except the number kept counting up.


I should say at this point, everything else seems to work perfectly, in terms of hardware and software. Seems to take and hold a charge fine (as far as I can tell, but what do I know). Battery indicator just reports weird numbers and behaviors (leaving aside the earlier led inconsistencies, which seem to be "normal" now).


Last bit of info to report (thanks for reading all that): yesterday I flashed with HotFix 6 Alpha 2 in hopes that either the reflash or the new battery charge logic/code/whatever would fix my problem. It didn't. Still pinned at 100%. Tonight I reflashed again with HotFix 5 due to the broken wifi in 6a2 (and 6a3 apparently). No change.


So, what do guys think? Hardware problem? Simple rookie mistake(s)?
 
Sounds most likely related to the seating of the battery. I heard similar reports of weird counting up unplugged etc along time ago on the old forum IIRC but your the first in ages with that manifestation of odd charging/battery behaviour.


I'd advise removing the battery for awhile, then re-seating it, perhaps using padding down the right side of it to ensure it cant move laterally away from the contacts, although you aren't getting any loss of function by poor contacts. I'm sure they'll be other explanations and things to try aswell as I'm no expert.


Glad to hear your enjoying your Pandora btw :)
 
you could try to make sure the 'instep' in the battery is there by puncturing that 'instep' with a fingernail? then battery should seat properly
 
Thanks for those suggestions. Indeed I am enjoying my Pandora, not least because of this community. I hope with time I'll be able to give back with development and support.


I can confirm that the battery "instep" is/was present and well defined. I traced this with my fingernail as suggested to see what that might yield, but theres nothing to puncture -- the cover is already square and flush and the battery fits into the matching recessed area in the battery compartment.


I tried removing the battery for a few minutes and then reseating, using some bits of business card to try and keep it from moving around once installed.


This gave me a indicator of 17%, which seemed like progress, but the number started increasing again (without AC and without red led on).


I tried again, which gave 63%, and again, 5%, then 7%, then 0%. During one of those attempts the red light started flashing again. For all the rest I just had green.


So, it does seem like the improper seating hypothesis fits.


What's not clear to me is how to tell when I've got it installed correctly. The wildly different percentage values on different attempts leave me a bit baffled as to what result/behavior I can look to to indicate "all is well." Presumably if the number manages to stop increases on battery power and actually goes down, thats got it. But so far the most I've managed is to get the number to jump around (seemingly at random) and count up.


Anyone know of another, lower-level way to check out the battery status?


I poked around the /sys filesystem a bit to see what I could find. Theres a directory in /sys/class/power_supply/b{something}/ (away from my console at the moment) that contains a number of files that seem to be at least partially responsible for the numbers reported by the battery indicator. The 'capacity' file contains a single integer that matches the reported percentage. And there is a file called something like 'time_to_full' which contains a five digit integer that goes slowly down as the percentage increases.


Theres also a file there called something like 'time_to_empty' that always reports an error: "No data is available." This perhaps corresponds to the "00:00" part of the battery indicator report.


I'm starting to suspect that whatever hardware and/or driver is responsible for these numbers thinks that the AC power_supply is always connected, either causing or caused by the battery status not being reported.


So perhaps the punchline in all this is that incomplete or misaligned battery contact with the battery is indeed the culprit -- that there's a clean enough contact to power the system but not enough to allow reporting to function. But I can't help wondering if its possible that there is an additional problem with the battery contacts or some chip or rom containing this logic.


I'd be grateful of any further information about how all this works, and I'll be sure to report any successes or further information I come by.


Happy Fathers Day!
 
Back
Top