maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Nokia N900 (https://talk.maemo.org/forumdisplay.php?f=44)
-   -   Battery consumption analysis (https://talk.maemo.org/showthread.php?t=43748)

Matan 2010-03-12 20:23

Re: Battery consumption analysis
 
Is the bq27200 connected to the OMAP or to another chip? Nokia's kernel does not include the BQ27200 kernel.

low life 2010-03-12 20:41

Re: Battery consumption analysis
 
Quote:

Originally Posted by xav (Post 565028)
This tool is really nice, thanks a lot !
While using it with powertop, I've discovered that my IM accounts were real power suckers. Now I've disconnected them all, and instead of something like 10hrs I run through the whole day with 60% battery left.

So there's a real problem with IM accounts. Too bad, being connected everywhere was the reason for buying an N900 in the first place

Maybe try disabling the IM accounts one by one to find out which of them are so power hungry - I'm using only Pecan MSN and when idling it barely consumes more battery with IM enabled than when offline.

Spotfist 2010-03-12 20:47

Re: Battery consumption analysis
 
I would also like to get some powertop functionality added to battery eye and maybe a step by step guide to geting the data from sqlite into excel, I would love to do some analysis on whats eating what even better would be to get a few weeks worth of data from as many folks as possable...

shadowjk 2010-03-14 02:04

Re: Battery consumption analysis
 
0xAA and 0xAB includes the write byte, I think you should be looking at address 0x55..

blue_led 2010-03-14 20:56

Re: Battery consumption analysis
 
Quote:

Originally Posted by shadowjk (Post 566518)
0xAA and 0xAB includes the write byte, I think you should be looking at address 0x55..

0xAB is device adress ( chip itself ) for read on i2c bus

The bq27200 supports the standard I2C read, incremental read, quick read, and one byte write functions. The
7-bit device address (ADDR) is the most significant 7 bits of the hex address and is fixed as 1010101. The 8-bit
device address is therefore 0xAA or 0xAB for write or read, respectively

mooninite 2010-03-14 21:55

Re: Battery consumption analysis
 
With SmartReflex enabled I've seen an extra day of battery. Up to 3 days without needing a recharge. This is with light usage and only one or two short calls.

Matan 2010-03-14 22:43

Re: Battery consumption analysis
 
Quote:

Originally Posted by blue_led (Post 567141)
0xAB is device adress ( chip itself ) for read on i2c bus

The bq27200 supports the standard I2C read, incremental read, quick read, and one byte write functions. The
7-bit device address (ADDR) is the most significant 7 bits of the hex address and is fixed as 1010101. The 8-bit
device address is therefore 0xAA or 0xAB for write or read, respectively

Is the BQ27200 in the N900 connected to the OMAP? If so, why does the kernel not see it? Why did Nokia not include its driver in their kernel? If it is not connected to the OMAP, that how is this information useful to us?

Konceptz 2010-03-15 00:57

Re: Battery consumption analysis
 
Quote:

Originally Posted by juise- (Post 517502)
(3) My battery doesn't charge to 100%?

Don't blame me, the program just reads the values from HAL as they are. If HAL says 97 percent, then that's what gets recorded and eventually displayed.

I remember reading somewhere that due to internal resistance factors, the charger will never put the battery to 100% unless it's voltage has decreased below a certain point? Maybe someone can clear up some battery myths.




P.S. Thanks for the great program!

blue_led 2010-03-15 07:53

Re: Battery consumption analysis
 
Quote:

Originally Posted by Matan (Post 567207)
Is the BQ27200 in the N900 connected to the OMAP? If so, why does the kernel not see it? Why did Nokia not include its driver in their kernel? If it is not connected to the OMAP, that how is this information useful to us?

Yes this chip is connected on omap i2c bus number 2.
probably his driver is in closed source of nokia drivers or low level driver has minimal implementation . why is not listed in i2c list of drivers i don't figure yet but i keep searching the code

blue_led 2010-03-18 17:54

Re: Battery consumption analysis
 
2 Attachment(s)
according to schematics it is a battery fuel gauge on i2c bus #2
also there is sense resistor to gazoo chip ( twl4030 )

in kernel i find this
"++CONFIG_W1_SLAVE_BQ27000=y
..........
++# CONFIG_BATTERY_BQ27x00 is not set
.........
++CONFIG_TWL4030_BCI_BATTERY=y

"

From datasheet ( tps65950 hard & soft compatible with twl4030 )
.....
The BCI also performs monitoring functions:
• ac charger detection
• VBUS detection
• Battery detection
• ac charger overvoltage detection
• VBUS overvoltage detection
• Battery overvoltage detection
• Battery voltage level detection
• Battery charge current level detection
• Battery temperature out-of-range detection
• Battery end-of-charge detection
• Battery overcurrent detection
• Watchdog

bq27x00 features

* HDQ (bq27000) or I2C (bq27200) Communication
* Reports Accurate Time-to-Empty With Measured Load and Historical Maximum and Standby Loads
* Reports Temperature, Voltage, and Current
* High Accuracy Charge and Discharge Current Integration with Automatic Offset Calibration
* Requires No User Calibration
* Programmable Input/Output Port
* Internal User EEPROM Configuration Memory
* Automatic Capacity Reduction With Age
* Stable Oscillator Without External Components
* Dynamic End-of-Discharge Detection Delay to Allow Use in a High-Dynamic Load Environment
* Automatic Sleep Mode When Communication Lines are Low
* Available in a Small 3 mm x 4 mm QFN Package
* Five Low-Power Operating Modes
o Active: < 90 ľA
o Sleep: < 2.5 ľA
o Ship: < 2 ľA (bq27000 only)
o Hibernate: < 1.5 ľA
o Data Retention: < 20 nA

my opinion :
- it is possible to find bq27200 chip on the board but nokia can choose to not put in future. this chip is not mandatory for n900 running but can do better monitoring . nokia put this on the board but don't have time to write the software, an appendix almost useless until somebody choose it.
- battery can be monitored by software through twl chip
- it is a wrong initialization of driver for bq27200 ( i2dc device 0x55) or driver missing entirely even if it is activated by "CONFIG_W1_SLAVE_BQ27000=y" . bq27x00 chip is made in two bus variants bq27200 for i2c bus and bq27000 for hdq 1wire bus
so something is wrong in software, schematics make sense.

bq27200 chip is near blamed isp1707 usb transceiver chip

xav 2010-03-19 16:29

Re: Battery consumption analysis
 
5 Attachment(s)
Quote:

Originally Posted by low life (Post 565458)
Maybe try disabling the IM accounts one by one to find out which of them are so power hungry - I'm using only Pecan MSN and when idling it barely consumes more battery with IM enabled than when offline.

OK, I've done a some tests over a few days. Apparently MSN Pecan is a power sucker, the only one which works well without obvious effect on the battery life is gmail.

See attached screenshots for more info. In order:
- MSN (Pecan) + All Jabber accounts (gmail+jabber+ovi) + yahoo + skype
- MSN + ALL Jabber
- MSN alone
- gmail alone (note that one is screenshooted a bit earlier so you still see the charging period, ignore it)
- no IM at all

obviously gmail alone works well, the others suck power. AIM and ICQ don't work at all (they always say something like "network error"). Facebook-chat seems broken recently. I don't have accounts to try the other ones.

low life 2010-03-19 17:31

Re: Battery consumption analysis
 
My graph using MSN-Pecan 0.1.0 final (over 2G) looks pretty much the same as your gmail graph.. which pecan version is that? I'm not sure if the final is in extras yet, as mine is from extras-testing. I think there were some problems with battery consumption in the release candidate versions.

xav 2010-03-19 20:25

Re: Battery consumption analysis
 
I'm using 0.1.0-0maemo2. I'm over 3G, for pecan and gmail (and everything else).

b666m 2010-03-24 15:32

Re: Battery consumption analysis
 
something new:

http://img211.imageshack.us/img211/842/powersafe.png

- left side: normal idle battery consumption PR1.1.1

- right side: first red dot -> activated smartreflex, second red dot -> seems to work :D

something about smartreflex: https://bugs.maemo.org/show_bug.cgi?...ltiple&id=7633

zimon 2010-03-24 15:35

Re: Battery consumption analysis
 
Quote:

Originally Posted by mooninite (Post 567181)
With SmartReflex enabled I've seen an extra day of battery. Up to 3 days without needing a recharge. This is with light usage and only one or two short calls.

I just tried that SmartReflex hack yesteday. It worked fine, until today (just one hour ago) N900 crashed and booted.

Code:

$ cat /proc/bootreason
32wd_to

What else (logs) would be helpfull to know if the reason was SamrtReflex or something else?

spanner 2010-03-24 16:01

Re: Battery consumption analysis
 
Quote:

Originally Posted by zimon (Post 580484)
What else (logs) would be helpfull to know if the reason was SamrtReflex or something else?

I don't think there are any, but: you can be pretty sure it was SmartReflex. Many people can't enable SR without getting 32wd_to crashes.

gabby131 2010-03-24 16:03

Re: Battery consumption analysis
 
@b666m

currently searching what "smartreflex" is and do. but if you can tell me it is greatly appreciated. :D:D:D

EDIT: whooops!!! there is a link!!!! sorry, thanks!!

les_garten 2010-03-24 16:05

Re: Battery consumption analysis
 
Quote:

Originally Posted by spanner (Post 580505)
I don't think there are any, but: you can be pretty sure it was SmartReflex. Many people can't enable SR without getting 32wd_to crashes.

I enabled it yesterday and had a reboot within minutes and I never get those, so it's turned back off.

Rob1n 2010-03-24 16:08

Re: Battery consumption analysis
 
Quote:

Originally Posted by spanner (Post 580505)
I don't think there are any, but: you can be pretty sure it was SmartReflex. Many people can't enable SR without getting 32wd_to crashes.

I've had it enabled for several weeks now without a single crash. Guess I'm just lucky :D

zimon 2010-03-24 16:21

Re: Battery consumption analysis
 
Quote:

Originally Posted by spanner (Post 580505)
I don't think there are any, but: you can be pretty sure it was SmartReflex. Many people can't enable SR without getting 32wd_to crashes.

I will try later if I can reproduce the bug.
I had ....well read the report:

https://bugs.maemo.org/show_bug.cgi?id=7633#c31

gabby131 2010-03-24 16:27

Re: Battery consumption analysis
 
Quote:

Originally Posted by Rob1n (Post 580519)
I've had it enabled for several weeks now without a single crash. Guess I'm just lucky :D

hmmmm in what way you enabled it? by changing the values in /etc/pmconfig ? or by the 2 codes?

shadowjk 2010-03-24 16:32

Re: Battery consumption analysis
 
Quote:

Originally Posted by blue_led (Post 572220)
- it is a wrong initialization of driver for bq27200 ( i2dc device 0x55) or driver missing entirely even if it is activated by "CONFIG_W1_SLAVE_BQ27000=y" . bq27x00 chip is made in two bus variants bq27200 for i2c bus and bq27000 for hdq 1wire bus
so something is wrong in software, schematics make sense.

bq27200 chip is near blamed isp1707 usb transceiver chip

It's 0x55, because 0xAB and 0xAA contain the write/read bit, which Linux does not consider a part of the address. The read/write functions in code add the write/read bit so that what goes out on wire is an 8 bit 0xAA or 0xAB.

Rob1n 2010-03-24 16:52

Re: Battery consumption analysis
 
Quote:

Originally Posted by gabby131 (Post 580552)
hmmmm in what way you enabled it? by changing the values in /etc/pmconfig ? or by the 2 codes?

Both - I used the 2 codes first to test it out, then changed /etc/pmconfig to make the change persist across reboots.

gabby131 2010-03-24 17:16

Re: Battery consumption analysis
 
Quote:

Originally Posted by Rob1n (Post 580579)
Both - I used the 2 codes first to test it out, then changed /etc/pmconfig to make the change persist across reboots.

oh, so if i change the values, the power saving will be consistent and active even after reboots???

and is this done in xterm? cant cd to /etc/pmconfig, or im doing it the wrong way?

Rob1n 2010-03-24 18:52

Re: Battery consumption analysis
 
Quote:

Originally Posted by gabby131 (Post 580612)
oh, so if i change the values, the power saving will be consistent and active even after reboots???

and is this done in xterm? cant cd to /etc/pmconfig, or im doing it the wrong way?

If you edit the /etc/pmconfig file then the changes will persist across reboots, yes - you'll need to be root to do this though. The following should do it (if you've got rootsh installed) - make sure you type it in exactly though!:
Code:

sudo gainroot
echo "sr_vdd1_autocomp 1" >> /etc/pmconfig
echo "sr_vdd2_autocomp 1" >> /etc/pmconfig

Alternately, use vi, vim, mc, or leafpad as root to edit the file.

gabby131 2010-03-24 19:07

Re: Battery consumption analysis
 
Quote:

Originally Posted by Rob1n (Post 580806)
If you edit the /etc/pmconfig file then the changes will persist across reboots, yes - you'll need to be root to do this though. The following should do it (if you've got rootsh installed) - make sure you type it in exactly though!:
Code:

sudo gainroot
echo "sr_vdd1_autocomp 1" >> /etc/pmconfig
echo "sr_vdd2_autocomp 1" >> /etc/pmconfig

Alternately, use vi, vim, mc, or leafpad as root to edit the file.

thanks very much! you save my life again.

when i performed the codes and hit enter, i just came back at /home/user #,

does this mean it was successful or nothing happened???

EDIT: oh, then i reboot the device (in root, typed "reboot")

Rob1n 2010-03-24 19:18

Re: Battery consumption analysis
 
Quote:

Originally Posted by gabby131 (Post 580832)
thanks very much! you save my life again.

when i performed the codes and hit enter, i just came back at /home/user #,

does this mean it was successful or nothing happened???

EDIT: oh, then i reboot the device (in root, typed "reboot")

Yes, it doesn't output anything - you can do "cat /etc/pmconfig" to check that the file has been edited properly (you should see the sr_vdd.... lines at the bottom). After rebooting you can check that the changes are in place by running (you should get "1" back from each):
Code:

cat /sys/power/sr_vdd1_autocomp
cat /sys/power/sr_vdd2_autocomp


gabby131 2010-03-24 20:22

Re: Battery consumption analysis
 
Quote:

Originally Posted by Rob1n (Post 580855)
Yes, it doesn't output anything - you can do "cat /etc/pmconfig" to check that the file has been edited properly (you should see the sr_vdd.... lines at the bottom). After rebooting you can check that the changes are in place by running (you should get "1" back from each):
Code:

cat /sys/power/sr_vdd1_autocomp
cat /sys/power/sr_vdd2_autocomp


yup! thanks!!!! i ran those cat codes and they give me a 1 after hitting enter, and i see sr_vdd1_autocomp 1 and vdd2_autocomp 1 at the bottom after punching the cat /etc/pmconfig.

i also noticed from doing this, my ram usage goes down bout 5-10mb

UPDATE: yey!! so far not experiencing any reboots or issues!

gabby131 2010-03-24 21:30

Re: Battery consumption analysis
 
Quote:

Originally Posted by gabby131 (Post 580943)
UPDATE: yey!! so far not experiencing any reboots or issues!

awww!!! 2 unexpected reboots occurred!!! but i dont care!!! as long as nothing very weird happens on my device that i may worry of, i can take any reboots!! (hopefully not every minute though) :D:D:D

shady 2010-03-24 22:07

Re: Battery consumption analysis
 
yea i changed those settings in January, added to my batt life significantly, with no ill effects on performance, i dont know why it was disabled out of the box. hmm ... but regardless of that fact it worked.

how did your battgraph have the CPU statistics as well, was it in testing/devel? i only DL'd the version that was in the official maemo repo.

gabby131 2010-03-24 22:17

Re: Battery consumption analysis
 
currently, batterygraph was uninstalled when i ran smartreflex. just notice the cpu usage by the system info widget app.

because of 2 reboots, kinda hard to determine improvements, reboot eats a considerable battery power.

les_garten 2010-03-24 22:20

Re: Battery consumption analysis
 
Quote:

Originally Posted by shady (Post 581099)
yea i changed those settings in January, added to my batt life significantly, with no ill effects on performance, i dont know why it was disabled out of the box. hmm ... but regardless of that fact it worked.

how did your battgraph have the CPU statistics as well, was it in testing/devel? i only DL'd the version that was in the official maemo repo.

The reason, it is obviously unstable.

jwittema 2010-03-25 08:58

Re: Battery consumption analysis
 
Quote:

Originally Posted by shady (Post 581099)
how did your battgraph have the CPU statistics as well, was it in testing/devel? i only DL'd the version that was in the official maemo repo.

BatteryGraph version 0.3.0 does also monitor the average CPU load. It is currently in extras-testing (and will soon be in Extras)

gabby131 2010-03-25 14:10

Re: Battery consumption analysis
 
UPDATE: upon changing the values on /etc/pmconfig (smartreflex)

men that was exciting! after enabling smartreflex, 3 reboots ocuured on my device, on the last one, the n900 just turn off. With the usual response to this, i switch on the device, the device did not reboot. i removed the battery and install, the device did not boot up.

i waited for an hour, did the same thing, but still the n900 did not boot.
then i just said, "uh oh!"

well i am a jolly guy, instead of being pissed, i think of another way.

i tried charging the device. the n900 lit up the nokia logo, but did not boot. this is telling me, that the n900 is not dead, so i went to the wiki page and re-read all of the flashing of n900 documentation.

after 4-10mins, my n900 is factory new! and shining sparkly too! :D:D:D

im currently reinstalling all my apps, and found out that "battery eye" is OPT!! weeeeeee!!!!!

in posting this, i am not saying that smartflex is not a good idea, actually its effective, im just so lucky this day that instead of getting unexpected reboots, i got an unexpected re-flash!!! :D:D:D LOL!!

im totally happy that my n900 is fully operational again.

so.....is anyone still with me on changing the values or enabling smartrefles??? :D:D:D

shady 2010-03-25 18:31

Re: Battery consumption analysis
 
i dont know if its smartreflex itself causing these issues. but i have had no problems with it being activated on my device. the only time i had a reboot was with firefox and that was the last time i used it ... i do have the nightly fennec builds instead of FF1.0. however i have had no problems with SR. it may be an app that is having trouble and may need the CPU to stay more active than necessary.

zimon 2010-03-25 19:16

Re: Battery consumption analysis
 
Quote:

Originally Posted by gabby131 (Post 581894)
UPDATE: upon changing the values on /etc/pmconfig (smartreflex)

...
then i just said, "uh oh!"
...

Everyone should first test few days, or even weeks with those "echo" manual instructions before trying to make it permanent to /etc/pmconfig. If SmartFlex is really causing problems in some devices, that can happen (gabby131) and a device cannot even boot up anymore.

silver2789 2010-04-02 08:18

Re: Battery consumption analysis
 
which is the better app?
battery eye or battery graph

silver2789 2010-04-02 09:08

Re: Battery consumption analysis
 
do you prefer battery eye or battery graph

Robb 2010-04-02 10:05

Re: Battery consumption analysis
 
Just noticed something with WIFI-switcher:
If I activate WIFI-switcher, my battery drains quicker.

Currently it's only an initial theory, but has anyone noticed this as well?

I activated WIFI-switcher overnight (to disable WIFI+lib), and noticed a ~5% drop for ~5 hours.

Currently after disabling WIFI-switcher (only WIFI disabled) after nearly ~1,5 hours it still hasn't dropped even 1%.

This still isn't conclusive, I will test it again today overnight.

zimon 2010-04-02 10:22

Re: Battery consumption analysis
 
Quote:

Originally Posted by silver2789 (Post 592339)
do you prefer battery eye or battery graph

I prefer BatteryGraph.
Much more features.
One very convenient feature is to export even 21 days worth of graph as a PNG image file, like here.


All times are GMT. The time now is 02:32.

vBulletin® Version 3.8.8