maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Nokia N900 (https://talk.maemo.org/forumdisplay.php?f=44)
-   -   Battery charge always 0% (https://talk.maemo.org/showthread.php?t=74894)

delta.br 2011-07-13 15:42

Battery charge always 0%
 
Hello,

when i turn on my N900 ith any kind of battery it shows me in the statusbar a charge of 0% - even when the battery is fully charged.

When i connect a charger it will show a green led too...

Anybody a idea what's wrong?

colin.stephane 2011-07-13 15:56

Re: Battery charge always 0%
 
Quote:

Originally Posted by delta.br (Post 1050244)
Hello,

when i turn on my N900 ith any kind of battery it shows me in the statusbar a charge of 0% - even when the battery is fully charged.

When i connect a charger it will show a green led too...

Anybody a idea what's wrong?

I think you use power-kernel v47, if so, here is the fix :

Code:

clear && ID=$(id -un) ; if [ ${ID} != "root" ] ; then echo "You are not 'root', please use this command line as 'root' ..." ; else echo "Ok, you are 'root' ..." ; if grep -q "bq27x00_battery" /etc/modprobe.d/blacklist 2>/dev/null ; then echo "Patch already applyed, nothing to be done ..." ; echo "" ; else echo "Applying patch now ..." ; echo "blacklist bq27x00_battery" >>/etc/modprobe.d/blacklist ; echo "" ; echo "DONE, PLEASE REBOOT YOUR DEVICE ..." ; echo "" ; fi ; fi

Apply it and things gona work like expected after that ...

A++

pious_momin 2011-07-13 16:08

Re: Battery charge always 0%
 
Quote:

Originally Posted by colin.stephane (Post 1050252)
I think you use power-kernel v47, if so, here is the fix :

Code:

clear && ID=$(id -un) ; if [ ${ID} != "root" ] ; then echo "You are not 'root', please use this command line as 'root' ..." ; else echo "Ok, you are 'root' ..." ; if grep -q "bq27x00_battery" /etc/modprobe.d/blacklist 2>/dev/null ; then echo "Patch already applyed, nothing to be done ..." ; echo "" ; else echo "Applying patch now ..." ; echo "blacklist bq27x00_battery" >>/etc/modprobe.d/blacklist ; echo "" ; echo "DONE, PLEASE REBOOT YOUR DEVICE ..." ; echo "" ; fi ; fi

Apply it and things gona work like expected after that ...

A++

how to apply it, kindly tel us...

delta.br 2011-07-13 16:09

Re: Battery charge always 0%
 
Patch applied. Finally after a reboot still the same problem.

Quote:

how to apply it, kindly tel us...
I used SSH for doing it... Anyway u can parse it in the shell ith "sudo gainroot", too.

delta.br 2011-07-13 16:33

Re: Battery charge always 0%
 
2 Attachment(s)
Just a quick information: BatteryGraph shows me correct charge of 94%... It's just the status panel which gives wrong information... See attached screenshots...

Strange...

colin.stephane 2011-07-13 18:04

Re: Battery charge always 0%
 
Quote:

Originally Posted by delta.br (Post 1050274)
Just a quick information: BatteryGraph shows me correct charge of 94%... It's just the status panel which gives wrong information... See attached screenshots...

Strange...

From where did you installed this status panel for battery, looked mine, I have not the same (mine doesn't report percentage of charge and time left ...

A++

eefo 2011-07-13 18:08

Re: Battery charge always 0%
 
have you rebooted the device ?
as most of these sorta errors recover after rebooting.

colin.stephane 2011-07-13 18:12

Re: Battery charge always 0%
 
Also, just to be sure, what does this output ? :

Code:

lshal -u /org/freedesktop/Hal/devices/computer_power_supply_battery_bq27200_0 | grep battery.charge_level.percentage | awk '{print "Battery reported by driver b27x00_battery : "$3"%"}' ; lshal -u /org/freedesktop/Hal/devices/bme | grep battery.charge_level.percentage | awk '{print "Battery reported by Nokia bme binary : "$3"%"}'
A++

delta.br 2011-07-13 18:26

Re: Battery charge always 0%
 
Here you go:
Quote:

root@Nokia-N900 ~ # lshal -u /org/freedesktop/Hal/devices/computer_power_supplybattery_bq27200_0 | grep battery.charge_level.percentage | awk '{print "Batteryreported by driver b27x00_battery : "$3"%"}' ; lshal -u /org/freedesktop/Hal/deices/bme | grep battery.charge_level.percentage | awk '{print "Battery reportedby Nokia bme binary : "$3"%"}'
Battery reported by Nokia bme binary : 100%

colin.stephane 2011-07-13 18:33

Re: Battery charge always 0%
 
Quote:

Originally Posted by delta.br (Post 1050331)
Here you go:

Report seem good so.

Seem, the status panel have a bug ...

Why ? I don't really know ...

Have you checked another reboot to see if that fix your problem, like 'eefo' suggested ?

A++

delta.br 2011-07-13 18:46

Re: Battery charge always 0%
 
The device has been rebooted already several times, as i use a external charger and change just the batteries ... I guess i'll have to do a reflash, if i could...

Somebody maybe know if i can uninstall the statusbar package by "apt-get remove" and reinstall it after a reboot? If so, what's the exact name?

eefo 2011-07-13 18:49

Re: Battery charge always 0%
 
you can use app manager for that .
it's pybattery i guess.
check if you have it in appmanager remove app list .

delta.br 2011-07-13 18:57

Re: Battery charge always 0%
 
Couldn't find "pybattery" :-(

eefo 2011-07-13 19:01

Re: Battery charge always 0%
 
Quote:

Originally Posted by delta.br (Post 1050351)
Couldn't find "pybattery" :-(

ammmmm , then you should check the installed app list to confirm that is it pybattery or any other one ?

eefo 2011-07-13 19:02

Re: Battery charge always 0%
 
http://talk.maemo.org/showthread.php?t=24905


check this .

bingbings 2011-07-13 19:10

Re: Battery charge always 0%
 
In the status bar you're using Advanced Power to get all those informations about battery status. If you want to remove by x terminal try by taping "advanced-power".

delta.br 2011-07-13 19:19

Re: Battery charge always 0%
 
Thanks for trying to help... I guess the reflash is the only way to do. Like all the time when a Nokia is ****ed up again...

When i solved the problem with Flashing somehow i'll do that. Guess after that it's working again.

delta.br 2011-07-13 19:22

Re: Battery charge always 0%
 
@bingbings: This package has not been found by apt-get as beeing installed... :-(

eefo 2011-07-13 19:24

Re: Battery charge always 0%
 
Quote:

Originally Posted by delta.br (Post 1050380)
@bingbings: This package has not been found by apt-get as beeing installed... :-(

well i guess you should wait as you have reported a bug in the main thread .
apt-get remove advance-power is the command to remove .
if this isn't working then yeah you should wait for the reply in the main thread of this app.

delta.br 2011-07-13 19:30

Re: Battery charge always 0%
 
I'll need to wait anyway as the flasher driver does not work for me and there seems not to be a solution.

eefo 2011-07-13 19:37

Re: Battery charge always 0%
 
Quote:

Originally Posted by delta.br (Post 1050387)
I'll need to wait anyway as the flasher driver does not work for me and there seems not to be a solution.

you can try any other system ?

Mike Fila 2011-07-13 19:51

Re: Battery charge always 0%
 
Before flashin why not try to reinstall it either thru ham, fap, or try "apt-get install --reinstall" thru xterm

eefo 2011-07-13 20:00

Re: Battery charge always 0%
 
Quote:

Originally Posted by Mike Fila (Post 1050414)
Before flashin why not try to reinstall it either thru ham, fap, or try "apt-get install --reinstall" thru xterm

that's a good idea .

delta.br 2011-07-13 20:52

Re: Battery charge always 0%
 
Quote:

you can try any other system ?
I'd wish so, but actually i can't - lan house is strongly limited and friends ith computers just too far away.
I flashed by Windows XP once... Actually the install cd is broken and i bought a cheap 2003. Headache included ;-)

Quote:

Before flashin why not try to reinstall it either thru ham, fap, or try "apt-get install --reinstall" thru xterm
Actually i prefer flashing cause i have a lot of rubbish over there. Contacts are saved anyway...

Ah i tried, but apt-get seems to be broken anyway on my phone. Reflash it. However. Better than struggeling with that **** more time around ;-)

Estel 2011-07-13 23:18

Re: Battery charge always 0%
 
Quote:

Originally Posted by delta.br (Post 1050450)
Reflash it. However. Better than struggeling with that **** more time around ;-)

Not exactly. This way, You don't have chance to properly debug the problem, then avoid it next time OR help improving community made apps / fix nokia bugs. Debugging need much patience, but fixing something Yourself, or as a cooperative work with other community members, is very rewarding. Trust me.

Anyway, of course, it's always Your decision what to do with Your device.

---

Anyway, You mentioned that You charge Your battery externally. The bq27200 module/chip can't properly detect events such as "new battery", so problem would probably disappear after charging device via USB. Which, obviously, You wasn't able to try, cause broken USB port. BME was reporting correct values, cause it calculates capacity somehow (including guesswork) via battery voltage. BME does NOT use raw bq chip measuring means.

I'm 99% sure, that somehow, colin's command to blacklist b1 module wasn't working for You. Which is no surprise for me, cause blacklisting doesn't work for me also ;) Attention! I don't mean, that it's colin's fault - his command is perfectly fine. I tried every single method to blacklist bq module, checked n times, that my blacklist list is out of typos - to no avail. Only one way for me was to modprobe -r, which result in device restart ~32 minutes after executing.

Doing proper bq learning cycle (letting battery voltage as reported by bq to get under 3248 mV, without device turning off via bme, then charging to full), bq module work fine for me - at least, meaning that it doesn't cause problems (values returned are still somehow wrong, but i think I'm close to developing "user behavior hack" to fix that), so i just let it go.

Then, pyBattery (which is excellent piece of code, all-together with advanced-power-monitor by the way), always use bq data, when it's present. That's why Your applet always thought that battery is 0%. No big deal, mind You - bq module perform read only, so this was only visual mismatch, no risk of loosing anything, and certainly, didn't deserve reflashing device.

Hope it helps, at least for other people that may come here, searching for solution ;)

delta.br 2011-07-15 10:46

Re: Battery charge always 0%
 
Quote:

battery", so problem would probably disappear after charging device via USB. Which, obviously, You wasn't able to try, cause broken USB port.
Actually even when i charged by USB (yes, it's fixed) does not help :-(

Finally funny was what it worked a lot of times ago (yes, even by seperate recharge), i use the nokia dt-33 for that. I guess it could be some update of libraries
so that the error could appear. However, finally i killed apt-get by deleting too much files so i'm not even able to reinstall it by dpkg ...

Estel 2011-07-15 16:18

Re: Battery charge always 0%
 
Can You please execute:

cat /sys/class/power_supply/bq27200-0/capacity

And post Your output here?

tuxsavvy 2011-07-29 08:06

Re: Battery charge always 0%
 
There might be a workaround solution with broken microUSB port:
http://talk.maemo.org/showthread.php?t=75318

If you're handy with soldering tools and have the necessary equipment, you might be able to get alternative USB port to work and maybe even better, flash mode.


All times are GMT. The time now is 13:08.

vBulletin® Version 3.8.8