Release Better battery charging (beta)


pndevmapperd.c

Yeah, blinking is from userspace. Fixing pndevmapperd should be quite straightforward. Just modify the code to check for bq27500 current AND percentage (not just only for percentage).


But I think the bigger question is how much led control we want to do from userspace / from kernel?


I mean with more modes to show there will propably be some sort of conflict to be expected if we control some from kernel and some from userspace :p
 
Oh, I see. I think I disagree with the userspace LED control in this case. Seems a better idea to leverage the existing LED control system, at least to me. I'll have a look.
 
Right, so, since I fail at figuring out kernel patches to get unionfs into the kernel I'm trying to test with, I opted instead to just write a simple executable here.


It tweaks the end of charge sensitivity and sets the restart to what I estimate to be about 95%. All you have to do is run it (with sudo) and it should stop charging shortly after reaching 100% and restart at about 95%. I want to get some further confirmation from others that my numbers are more-or-less correct, and acceptable, then I'll push my kernel patches up to notaz or skeezix to include in the trunk.
 
yeah, it only produces output if something went wrong. I could probably fix that, but I don't intend this to be anything close to a fix, I just want to know if the values I've picked work for everyone else.
 
uh... it doesn't touch anything related to the CPU. It just sends i2c messages to the charge chip. I have no idea. Is it back to normal?
 
It does turn off the LED. 100% doesn't mean the battery is done charging though. Just run the hack and leave it. It should turn off the LED when it really is full, which may be several minutes after it reads 100%. It will take longer if the Pandora is in use: put it into low power mode and it'll detect full charge sooner.
 
EDIT2: it seems to blink only in low power mode
That's the charge chip trying to decide whether it's charged enough or not. It should do that for about 10 or 15 seconds, and then stay off. It's behavior that is not documented anywhere in the spec sheet, but seems to be consistent, at least on mine.


If it stays blinking, that means the "fully charged" value I picked still isn't quite enough. Wikipedia says it should stop at about 2-3% of maximum charge rate, but may be a little higher or lower. I increased it from 1.5% to 3%, but I may bump it to an even 4% if people have problems still.


edit: also, the reason that it may not complete charge while in use is that it doesn't detect full when the voltage reaches a certain level, but detects full when the amount of energy it can keep putting into the battery drops below a certain threshold. If the battery is in use, it may be discharging at a higher value than this threshold, effectively meaning that you are draining the battery at the same rate it is charging. As soon as it draws less power, it'll be able to detect the battery is topped off and stop the charging. This is by design of the chip and shouldn't cause any problems. Unless your Pandora is in use 24 hours a day, it'll detect a full battery eventually.
 
Last edited by a moderator:
It should fall to between 93% and 98%. If you wouldn't mind checking when the charge led comes back on? Takes my Pandora about 2 hours before it drops low enough to start charging again.


Did your Pandora ever automatically stop charging before, or was yours one of the ones that continued to charge forever?
 
c'mon, you lazy bastards! :p

Not testing, sorry. From the looks of it, it goes into low power mode when it gets to 100% - unless I'm mistaken, it's going to seriously interrupt my gaming when that happens.


D.
 
Not testing, sorry. From the looks of it, it goes into low power mode when it gets to 100% - unless I'm mistaken, it's going to seriously interrupt my gaming when that happens.
It doesn't. Issue is that it may not detect that the battery is full if the Pandora is not in low power mode simply because the drain on the battery is higher than the "full battery" threshold. I don't think this will be a problem, you've got to at least close the screen sooner or later, right?

how do i symlink uImage.powertest?
ln -s uImage.powertest uImage


Don't bother though, it's got broken unionfs drivers. The hack application that I posted does basically the same thing, at least enough for testing purposes.
 
Not testing, sorry. From the looks of it, it goes into low power mode when it gets to 100% - unless I'm mistaken, it's going to seriously interrupt my gaming when that happens.
It doesn't. Issue is that it may not detect that the battery is full if the Pandora is not in low power mode simply because the drain on the battery is higher than the "full battery" threshold. I don't think this will be a problem, you've got to at least close the screen sooner or later, right?

Ah, I stand corrected then. I may give this a go... If I might add, my Pandora stays at 100% for about half an hour before dropping to about 95% precipitously - so it may be able to detect a full battery. We shall see.


D.
 
Not testing, sorry. From the looks of it, it goes into low power mode when it gets to 100% - unless I'm mistaken, it's going to seriously interrupt my gaming when that happens.
It doesn't. Issue is that it may not detect that the battery is full if the Pandora is not in low power mode simply because the drain on the battery is higher than the "full battery" threshold. I don't think this will be a problem, you've got to at least close the screen sooner or later, right?

how do i symlink uImage.powertest?
ln -s uImage.powertest uImage


Don't bother though, it's got broken unionfs drivers. The hack application that I posted does basically the same thing, at least enough for testing purposes.

so i just rename uImage.powertest - uImage and replace original uImage?


edit


when i replace original uImage, pandora boots but won't run any PNDs?


so put back original Uimage and so did not have time to check if battery charging works


cheers
 
Last edited by a moderator:
Could you please give step-by-step instructions for how to run this executable? I'm still not used to Linux, or anything except PNDs.


Please tell me where to put the file, and exactly what to type into the terminal.
 
as soon i as woke up, i saw the red light was off, i put it back in normal mode, percentage was 82%, red light turned on again. Bug?
Yes, it is supposed to start charging automatically. Mine starts at 92%. For yours to have fallen to 82% and still not started charging again is a problem, and probably a sign that batteries are not consistent enough for me to blindly choose the values that I have. I'll need to think about this.
 
so i just rename uImage.powertest - uImage and replace original uImage?


edit


when i replace original uImage, pandora boots but won't run any PNDs?


so put back original Uimage and so did not have time to check if battery charging works


cheers
You no longer need to use the uImage from the first post. There is an executable in post #25.

Could you please give step-by-step instructions for how to run this executable? I'm still not used to Linux, or anything except PNDs.


Please tell me where to put the file, and exactly what to type into the terminal.
Save the file to the root of an SD card. On the Pandora, open Thunar (or XFE ;) ), browse to the root of that SD, right click, and open a terminal. Enter this:



Code:
# sudo ./chargeHack1

It will appear to do nothing and just return you to the command line. Going from Stan's posts this means there are no errors and it is running. Beyond that I can't tell you anything - running it for the first time myself now.
 
Back
Top