maemo.org Bugzilla – Bug 9789
Mugen battery: HAL not getting correct capacity and current states
Last modified: 2010-08-23 20:42:33 UTC
You need to
before you can comment on or make changes to this bug.
(Settings > General > About product)
Linux Nokia-N900-42-11 2.6.28-omap1 #1 PREEMPT Thu Dec 17 09:40:52 EET 2009
lshal version 0.5.12
EXACT STEPS LEADING TO PROBLEM:
(Explain in detail what you do (e.g. tap on OK) and what you see (e.g. message
Connection Failed appears))
1. Install Mugen 2400 mAh battery into N900.
2. Boot N900 up.
3. See "lshal | grep battery" on terminal. Seems to be OK and values also
updating when battery charge is dropping.
4. Reboot N900 without taking the battery out.
5. See battery information from HAL again. They are wrong and not changing
anymore (current, charge_level.current). However battery.voltage.current is OK
and keeps updating.
Get correct battery.charge_level.current and battery.reporting.current values
After (soft) reboot, the mentioned values are wrong.
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:126.96.36.199)
Gecko/20100216 Fedora/3.5.8-1.fc12 Firefox/3.5.8
[url=http://talk.maemo.org/showthread.php?t=38068&page=16]Discussion about the
problem here also.[/url]
Created an attachment (id=2558) [details]
lshal after battery has been removed for a moment and cold boot, and then after
This would be a "bug" in bme, not hal.
Neither outputs are correct anyway.
The design capacity is misread from the battery (or the bug is in the battery
misreporting design capacity), and the problems start from there.
On the mugen "2400mAh" battery I measure 105 kOhm BSI (battery size indicator?)
to GND on a cold battery, and 85kOhm when the battery is warmed up a bit (about
A BP-4L 1500mAh battery at 24C measures exactly 120kOhm. At 30C it still
A BP-5L 1500mAh battery at 23C measures exactly 120kOhm. At 27C it still
Two different BL-5C batteries (1000mAh?) at 23C measure 75kOhm. No tempereature
variation here either.
A third party BL-5C compatible "720mAh" battery measures 68kOhm. No, or very
little, tempereature variation.
To summarize data gathered from other batteries:
1500mAh = 120
1000mAh = 75
720mAh = 68
Mugen = 85 (variable)
Thus, the misread capacity is probably due to design flaw in the mugen battery.
They used a thermistor instead of a resistor. The reported design capacity will
be lower the warmer the battery is, which the reporter is indeed experiencing.
As a result of the design bug in the mugen battery, the battery meter exhibits
the following behaviour:
The measured available capacity battery.reporting.current decreases in the
short term just as fast or faster, under similar load, as with the original
Periodically the charge meter seems to correct itself, either by outright
increasing battery.reporting.current making it look like the device is being
charged, when there's no charger attached, or by just freezing it until it's
closer, percentage-wise, to the truth.
On the whole, though, the battery meter is still performing admirably at its
task of giving the user a warning before system shutdown, and the system as a
whole is able to use the full capacity available from the mugen battery, as
battery low and shutdown thresholds are voltage based and not based on
calculated State of charge.
tl;dr: Resolution: Invalid
This seem to affect Batterygraph as well, possibly also batteryeye (untested by
May I also add that my Mugen battery seemed to be at 100% for three full days,
then dropped to 0% in a matter of minutes! (That was before I installed
Battterygraph, so I have no data about it.)
whatever BME is doing to give estimations about remaining charge, it for sure
doesn't know about mugen and it's quite expected behaviour for batmeter to fail
with mugen battery. The 'bsi' or whatever it's called is not standardized in
any way whatsoever, it used to be a thermistor for sensing cell temperature,
until it became obvious with modern cell chemistry there's no such thing like
cell overheating on normal charging usually. You can't assume there'll be any
relation between battery designed capacity and size of this resistor.
One of the components inside N900 involved in battery management is a bq27200
battery gauge, which has a designed capacity value preprogrammed to eeprom,
this for sure won't meet the mugen.
Also see bug 8163 and bug 7636 which might provide some background here.
One possible kludge solution would to change (somewhere) the battery bars
indicator to monitor voltage output of the battery rather than current it is
Is the default Desktop panel's battery indicator widget in an open source part
of the system?
Or, if one would be brave enough hacker, what is the formula for the resistor's
resistance which a battery with 2400 mAh (3.7 V) capacity should have inside so
current N900 software would see it right?
This non standardized issue is little annoying as the battery indicator level
is for me also full 8 for 1.5 days or 2 days, then suddenly drops to 1 and
there is very little time to recharge it and keep it alive after that.
As written this seems like a bug in the mugen battery. Nokia does not plan to
provide software workarounds for this. Closing as INVALID.