maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Nokia N900 (https://talk.maemo.org/forumdisplay.php?f=44)
-   -   High power drain when disconnected from charger (https://talk.maemo.org/showthread.php?t=77492)

knoxy420 2011-09-23 18:03

High power drain when disconnected from charger
 
So, My n900 eats batteries in 3-4 hours. Even when idle the thing warms my pocket quite nicely.

I've checked top and the cpu is at about 3-4% while idle.

I found powerscript and have been running it to profile the system's power consumption.

When on the charger, it reports 0-10mA power draw when idle.
As soon as I yank the charger it jumps up to ~375mA, and stays at that level while running on battery. So with a 1300mAh battery, that'll get me < 4 hours. As soon as I plug it back in the power usage drops back to <10mA.

Am I interpreting the powerscript output correctly? Should it give vastly different readings when plugged into the charger or not?

I've got the power kernel, CSSU, and a few apps installed. CPU stays around 3-4%.

I've tried with gprs, wifi, bt, & gps turned off. No change.

Any suggestions of where else to look?

Thanks!

tuxsavvy 2011-09-24 05:50

Re: High power drain when disconnected from charger
 
I have never used powerscript so I cannot make much sense out of the information you have mentioned along with the report that I'm getting when I just tried that script on my device.

I am guessing that when you took your device off the charger your CPU would state somewhere around 50-100% CPU usage? The best idea is to run top (as root) and unplug the device whilst top is still running. I am assuming there is a possible case of a stuck process somewhere that is using up large chunks of CPU somewhere.. and/or thrashing I/O.

Also has your device ever been overclocked?

randomdood 2011-09-24 05:54

Re: High power drain when disconnected from charger
 
what battery are you using? stock battery or one of eBay (some batteries say their much more than what they actually are)

knoxy420 2011-09-24 14:20

Re: High power drain when disconnected from charger
 
@tuxsavvy - That's the weird thing, top shows CPU at less that 10% CUP usage. Just X and hildon stuff show up but only at a few percent each. No processes appear to be out of control. CPU use doesn't change when I disconnect the charger, just the power consumption.

I recently reflashed and installed only the power kernel as well as the batterypatch. It is overclocked to 750MHz.



@randomdood - I've got 2 BL-5J batteries. One came with the phone, the other I got on Amazon. They both report over 1200mAh after charge.

I'm gonna try a complete reflash and will test again with stock PR1.3.

knoxy420 2011-09-26 17:11

Re: High power drain when disconnected from charger
 
I haven't tested after a complete reflash yet, but I have noticed that even after turning off the device, it stays warm and will drain the battery while "off".

Wondering if I have a "hardware issue"? :(

knoxy420 2011-09-27 18:50

Re: High power drain when disconnected from charger
 
Just some more data til I find a fix. This was all captured while logged in via ssh over wifi with the phone locked. GPS, bluetooth, FM all off.

Here's powerscript output while on the charger. (note the mA readings):

Code:

Tue Sep 27 14:16:21 EDT 2011 3mA 119 total events, 23.752 events/sec
Tue Sep 27 14:16:26 EDT 2011 4mA 136 total events, 27.156 events/sec
Tue Sep 27 14:16:31 EDT 2011 3mA 124 total events, 24.755 events/sec
Tue Sep 27 14:16:36 EDT 2011 3mA 128 total events, 25.564 events/sec
Tue Sep 27 14:16:41 EDT 2011 5mA 134 total events, 26.751 events/sec
Tue Sep 27 14:16:46 EDT 2011 2mA 129 total events, 25.748 events/sec
Tue Sep 27 14:16:51 EDT 2011 3mA 125 total events, 24.945 events/sec
Tue Sep 27 14:16:56 EDT 2011 4mA 120 total events, 23.961 events/sec
Tue Sep 27 14:17:01 EDT 2011 4mA 124 total events, 24.755 events/sec
Tue Sep 27 14:17:06 EDT 2011 3mA 118 total events, 23.567 events/sec
Tue Sep 27 14:17:11 EDT 2011 3mA 130 total events, 25.963 events/sec

Watch the mA jump way TFU as soon as I disconnect the charger:

Code:

Tue Sep 27 14:17:16 EDT 2011 189mA 429 total events, 85.662 events/sec
Tue Sep 27 14:17:21 EDT 2011 591mA 202 total events, 40.335 events/sec
Tue Sep 27 14:17:26 EDT 2011 575mA 219 total events, 43.730 events/sec
Tue Sep 27 14:17:31 EDT 2011 579mA 210 total events, 41.949 events/sec
Tue Sep 27 14:17:36 EDT 2011 574mA 211 total events, 42.132 events/sec
Tue Sep 27 14:17:41 EDT 2011 574mA 219 total events, 43.730 events/sec
Tue Sep 27 14:17:46 EDT 2011 570mA 486 total events, 97.064 events/sec
Tue Sep 27 14:17:51 EDT 2011 615mA 386 total events, 77.092 events/sec
Tue Sep 27 14:17:56 EDT 2011 582mA 205 total events, 40.909 events/sec
Tue Sep 27 14:18:01 EDT 2011 487mA 162 total events, 32.309 events/sec
Tue Sep 27 14:18:06 EDT 2011 492mA 139 total events, 27.711 events/sec
Tue Sep 27 14:18:11 EDT 2011 485mA 152 total events, 30.303 events/sec

And here's a snapshot from top:

Code:

Mem: 224300K used, 13012K free, 0K shrd, 9772K buff, 71920K cached
CPU:  0.3% usr  3.6% sys  0.0% nic 95.7% idle  0.0% io  0.0% irq  0.1% sirq
Load average: 0.36 0.25 0.18 1/191 22437
  PID  PPID USER    STAT  RSS %MEM %CPU COMMAND
  10    2 root    SW      0  0.0  1.6 [omap2_mcspi]
22437 20307 root    R      716  0.3  1.2 top
20295 20293 user    S    1360  0.5  0.9 {sshd} sshd: user@pts/1
  546    2 root    SW      0  0.0  0.3 [wl12xx]

Not much going on there. So it seems to be sucking down power doing a whole lot of nothing.

Here's powertop output while on the charger:

Code:

Nokia-N900:~# powertop
Powertop 1.13.3
status: Unknown job: pmtrackerdaemon
Sleeping for 11 seconds before sampling
Collecting data for 30 seconds
Sample interval was 00m 30s 16754us

C#      | Ratio  | Avg/dura | Frequency | Ratio
--------+--------+----------+-----------+--------+
    C0 |  7.5% |          |  1150 MHz |  nan% |
    C1 |  0.0% |    0.1ms |
    C2 |  11.9% |    7.7ms |
    C3 |  37.8% |  79.9ms |
    C4 |  42.8% |  87.9ms |

IRQ#    | Activity  | Type          | Name
--------+------------+----------------+---------------------------
    12 |      3575 |          INTC | DMA
    56 |      2820 |          INTC | i2c_omap
    11 |        636 |          INTC | prcm
    37 |        543 |          INTC | gp
    202 |        302 |          GPIO | wl1251
    57 |        97 |          INTC | i2c_omap
    225 |          3 |          GPIO | omap2-onenand

PID#    | Activity  | Name          | Function Entry (Expire)
--------+------------+----------------+---------------------------
      0 |        14 |  <kernel core> | tick_nohz_restart_sched_tick (tick_sched_timer)
    546 |          6 |        wl12xx | schedule_timeout (process_timeout)
  23499 |          5D|  kernel-config | cpufreq_governor_dbs (delayed_work_timer_fn)
      0 |          5 |  <kernel core> | hrtimer_start (tick_sched_timer)
  1474 |          2 |qtbatterywidget | schedule_hrtimeout_range (hrtimer_wakeup)
  20293 |          1 |          sshd | sk_reset_timer (tcp_write_timer)
    666 |          1 |          dsme | __enqueue_rt_entity (sched_rt_period_timer)
  23571 |          1 |      powertop | do_nanosleep (hrtimer_wakeup)

Power domain activity breakdown
Domain  | % of time spent in states
--------+---------+---------+---------+---------+----------
usbhost |OFF: 100%|RET:  0%|INA:  0%| ON:  0%| now:(OFF)
    sgx |OFF: 100%|RET:  0%|INA:  0%| ON:  0%| now:(OFF)
    per |OFF:  80%|RET:  11%|INA:  0%| ON:  7%| now:(ON)
    dss |OFF: 100%|RET:  0%|INA:  0%| ON:  0%| now:(OFF)
    cam |OFF: 100%|RET:  0%|INA:  0%| ON:  0%| now:(OFF)
  core |OFF:  42%|RET:  37%|INA:  11%| ON:  7%| now:(ON)
  neon |OFF:  42%|RET:  37%|INA:  11%| ON:  7%| now:(ON)
    mpu |OFF:  42%|RET:  37%|INA:  11%| ON:  7%| now:(ON)
  iva2 |OFF: 100%|RET:  0%|INA:  0%| ON:  0%| now:(OFF)

Clock activity breakdown at end of period
Domain  | Active clocks
--------+---------------+---------------+------------------
  core |          SDRC | HSOTGUSB_IDLE |      OMAPCTRL
        |    MAILBOXES |
  wkup |          GPT1 |      32KSYNC |        GPIO1
        |          WDT1 |          SR1 |          SR2
        |
  ckgen |          CORE |          PERI |          96M
        |          48M |          12M |          54M
        |      EMU_CORE |
    per |        GPIO2 |        GPIO3 |        GPIO4
        |        GPIO5 |        GPIO6 |

Total wakeups  8011, 267.0/s | IRQ 7976, 265.9/s | Timers  35,  1.2/s
HW wakeups      124,  4.1/s |    Real gp_timers expired  31,  1.0/s

And here's powertop output while on battery:
Code:

Nokia-N900:~# powertop
Powertop 1.13.3
status: Unknown job: pmtrackerdaemon
Sleeping for 11 seconds before sampling
Collecting data for 30 seconds
Sample interval was 00m 30s 16327us

C#      | Ratio  | Avg/dura | Frequency | Ratio
--------+--------+----------+-----------+--------+
    C0 |  3.6% |          |  1150 MHz |  nan% |
    C1 |  0.0% |    0.4ms |
    C2 |  12.0% |  10.0ms |
    C3 |  32.1% |  78.2ms |
    C4 |  52.3% |  84.8ms |

IRQ#    | Activity  | Type          | Name
--------+------------+----------------+---------------------------
    12 |      3582 |          INTC | DMA
    11 |        645 |          INTC | prcm
    37 |        422 |          INTC | gp
    202 |        301 |          GPIO | wl1251
    56 |        90 |          INTC | i2c_omap
    57 |        76 |          INTC | i2c_omap
    67 |        16 |          INTC | ssi_p1_mpu_irq0
    71 |        12 |          INTC | ssi_gdd
    311 |          6 |          GPIO | ssi_p1_cawake_gpio

PID#    | Activity  | Name          | Function Entry (Expire)
--------+------------+----------------+---------------------------
      0 |          9 |  <kernel core> | tick_nohz_restart_sched_tick (tick_sched_timer)
      0 |          9 |  <kernel core> | hrtimer_start (tick_sched_timer)
  23499 |          8D|  kernel-config | cpufreq_governor_dbs (delayed_work_timer_fn)
    546 |          8 |        wl12xx | schedule_timeout (process_timeout)
  20293 |          1 |          sshd | sk_reset_timer (tcp_write_timer)
    666 |          1 |          dsme | __enqueue_rt_entity (sched_rt_period_timer)
  23733 |          1 |      powertop | do_nanosleep (hrtimer_wakeup)

Power domain activity breakdown
Domain  | % of time spent in states
--------+---------+---------+---------+---------+----------
usbhost |OFF: 100%|RET:  0%|INA:  0%| ON:  0%| now:(OFF)
    sgx |OFF: 100%|RET:  0%|INA:  0%| ON:  0%| now:(OFF)
    per |OFF:  84%|RET:  11%|INA:  0%| ON:  3%| now:(ON)
    dss |OFF: 100%|RET:  0%|INA:  0%| ON:  0%| now:(OFF)
    cam |OFF: 100%|RET:  0%|INA:  0%| ON:  0%| now:(OFF)
  core |OFF:  52%|RET:  32%|INA:  11%| ON:  3%| now:(ON)
  neon |OFF:  52%|RET:  32%|INA:  11%| ON:  3%| now:(ON)
    mpu |OFF:  52%|RET:  32%|INA:  11%| ON:  3%| now:(ON)
  iva2 |OFF: 100%|RET:  0%|INA:  0%| ON:  0%| now:(OFF)

Clock activity breakdown at end of period
Domain  | Active clocks
--------+---------------+---------------+------------------
  core |          SDRC | HSOTGUSB_IDLE |      OMAPCTRL
        |    MAILBOXES |
  wkup |          GPT1 |      32KSYNC |        GPIO1
        |          WDT1 |          SR1 |          SR2
        |
  ckgen |          CORE |          PERI |          96M
        |          48M |          12M |          54M
        |      EMU_CORE |
    per |        GPIO2 |        GPIO3 |        GPIO4
        |        GPIO5 |        GPIO6 |

Total wakeups  5187, 172.9/s | IRQ 5150, 171.7/s | Timers  37,  1.2/s
HW wakeups      133,  4.4/s |    Real gp_timers expired  166,  5.5/s

Not a huge difference there. Whether charging or not, it seems to spend most time in the C3 & C4 states.

knoxy420 2011-09-29 14:47

Re: High power drain when disconnected from charger
 
Update...

I did a complete reflash of my n900 (eMMC & FIASCO) to PR1.3. Fully charged it, turned off wifi, gps, bluetooth & let it sit idle. Battery was dead in a few hours.

Then I installed only i2c-tools to get power measurements from powerscript.

The problem remains:

On charger, system pulls 0-50mA. As soon as charger is disconnected, it constantly pulls ~350mA and stays nice & warm.

If left idle, according to top, CPU use stays at less than 5% in both cases, 0% io, 0% irq. Batteries still drain in <4hours.

I tried installing the batterypatch for the non-power kernel, but it had no effect.

meh... is this just something I have to accept?

stlpaul 2011-09-29 15:28

Re: High power drain when disconnected from charger
 
Did you try removing or replacing the SIM card with a different one? I remember reading some reports when N900 first came out about people with a flaky SIM card that caused battery drain. It would be interesting to try. Also try removing your SD card if you have one inserted. How it would be related to charging, I have no idea... grasping at straws.

Also try Offline mode, if you haven't already. It should normally last several days idling in Offline mode (but of course it's no fun...)

knoxy420 2011-09-29 16:22

Re: High power drain when disconnected from charger
 
I haven't tried without the sim yet. My sim is several years old and has been used in a few phones. I'll give it a try.

I only added an sd card last night to back stuff up before reflashing. The problem existed before and after that so I doubt its the sd card. I tried offline mode & tablet mode but it didn't help.

I'll yank the sim & report back.

knoxy420 2011-09-29 16:50

Re: High power drain when disconnected from charger
 
No luck with the sim removed. :( All the contacts looked fine.

I mentioned earlier that it stays warm and drains the battery when powered off (either via gui or by holding the power button for ~10secs).
It seem to be in a lame sleep mode since when I power it on, it sometimes boot up in a couple secs skipping the hands startup screen.

If I yank the battery and put it back in, it stays off. But once I turn it on, it (the charger/power supply) seems to latch on and suck juice.



I'm leaning toward a "hardware" issue a this point.


Other than the high discharge rate when off the charger the phone works flawlessly, just have too leave it plugged in all the time. argh.


All times are GMT. The time now is 03:38.

vBulletin® Version 3.8.8