N900 Hardware Power Consumption

(Some preliminary numbers using the battery monitor chip.)
m (2x bash infinite loops, by frequency: rypo)
 
(8 intermediate revisions not shown)
Line 18: Line 18:
These numbers are biased, and represent best cases. Some have had outliers which may be normal and unavoidable current spikes removed. This is under the assumption that the minimal power represents the minimum power achievable, and it should long-term be possible to - possibly with software patches - achieve these. +x indicates the measurement is for that element only. A raw measurement has no + (marked "T"), and is a total consumption of whole device, when operated in that state. Unless otherwise mentioned, numbers are for the idle locked case, with screen off, battery voltage "full" = 4.0 to 4.1V.
These numbers are biased, and represent best cases. Some have had outliers which may be normal and unavoidable current spikes removed. This is under the assumption that the minimal power represents the minimum power achievable, and it should long-term be possible to - possibly with software patches - achieve these. +x indicates the measurement is for that element only. A raw measurement has no + (marked "T"), and is a total consumption of whole device, when operated in that state. Unless otherwise mentioned, numbers are for the idle locked case, with screen off, battery voltage "full" = 4.0 to 4.1V.
Assume  
Assume  
-
* Suspend (echo mem >/sys/power/state), wifi and GSM off. 2 mA T
+
* Suspend (echo mem >/sys/power/state), wifi and GSM off. 2 mA T *)
-
* Suspend, GSM on, connected to 3G (2 bars) 5 mA T
+
* Suspend, GSM on, connected to 3G (2 bars) 5 mA T *)
-
* Suspend, GSM on, connected to 2G. (2 bars) 3.6 mA T
+
* Suspend, GSM on, connected to 2G. (2 bars) 3.6 mA T *) 
 +
    *): states not recommended, used for test purposes only
* Idle, no SIM, wlan off 7 mA@4.1 V T
* Idle, no SIM, wlan off 7 mA@4.1 V T
* Wifi on with maximum powersaving. +~2 mA
* Wifi on with maximum powersaving. +~2 mA
Line 29: Line 30:
* Backlight on max +150 mA, +40mA on 4 of 5 steps in simple brightness applet & low ambient (/sys/class/backlight/acx565akm/brightness = 63)
* Backlight on max +150 mA, +40mA on 4 of 5 steps in simple brightness applet & low ambient (/sys/class/backlight/acx565akm/brightness = 63)
* Media player playing MP3, one step above mute. 110 mA T
* Media player playing MP3, one step above mute. 110 mA T
-
* More media player measurements (ssh over wifi, gsm off, same file)
 
-
those values are moot - for the first 2 it's irrelevant which process is *idle* since the CPU should zeroclock anyway, alas here it's at fixed clock-freq which is NOT recommended. For the rest the only useful audio source to run those tests is a pink noise at 0dB. See `man sox` for how to create such file. Or to set volume to 1 step above zero, see above - so the whole music content becomes irrelevant. For arbitrary music the amplifier will introduce random "noise" up to 2000mW to the figures. The BQ24150 can't average out that noise. Further there's "GUI on" which means "backlight" and that's very random and even depending on ambient light, see 3 bullets above --[[User:joerg_rw|joerg_rw]] 12:52, 13 May 2015 (UTC)
 
-
Not fixed, it's ondemand w/ bottom freqs allowed as specified.
 
-
I restarted the same track every time, so the comparison should be quite  adequate, tho a noise would be better, yep. Also, where did you get the information regarding the bq24150 performance? Such spikes (if there are any) would be smoothed by the capacitors on the power lanes and then detected by bq24150, no? I didn't get any numbers on it from the datasheets tho.
 
-
No backlight ofc.
 
-
[[User:l29ah|l29ah]] 22:53, 14 May 2015 (UTC)
 
-
** idle @125MHz: 45mW T
 
-
** idle @250MHz: 76mW T
 
-
** mediaplayer mp3 playback, max volume, speakers: 415mW T
 
-
** mediaplayer mp3 playback, max volume, headphones: 262mW T
 
-
** openmediaplayer mp3 playback, max volume, headphones: 230mW T
 
-
** mediabox mp3 playback, max volume, speakers: 463mW T
 
-
** mediabox mp3 playback, max volume, headphones: 324mW T
 
-
** oscp mp3 playback, 99% volume, gui on, speakers: 434mW T
 
-
** oscp mp3 playback, 99% volume, gui on, headphones: 301mW T
 
-
** oscp mp3 playback, 99% volume, gui off, headphones: 273mW T
 
-
** oscp mp3 playback, ALSA, PA's mixer setup, 99% softvol, gui off, headphones: 195mW T
 
* Vibrator at max +120 mA
* Vibrator at max +120 mA
* md5sum /dev/zero 250 mA T
* md5sum /dev/zero 250 mA T
Line 54: Line 38:
* 3G connected, good signal, no data or other activity +8 mA.
* 3G connected, good signal, no data or other activity +8 mA.
* 2G connected, good signal, no data or other activity +5 mA
* 2G connected, good signal, no data or other activity +5 mA
-
 
-
===2x bash infinite loops, by frequency===
 
-
* 250MHz 278mW T
 
-
* 500MHz 524mW T
 
-
* 805MHz 903mW T
 
-
* 900MHz 1064mW T
 
-
 
-
So it seems like the power saving cpufreq hacks are largely irrelevant and one would always use ondemand for maximum CPU peak throughput. Needs further testing with irregular I/O-dependent load tho.
 
-
 
-
'''NOTE: everything >500MHz WILL destroy your CPU long term, due to overheating and EM''' This is as evident as the rule "You shall not operate 12V incandescent Lamp at 15V or 20V"
 
-
--[[User:joerg_rw|joerg_rw]] 12:28, 13 May 2015 (UTC)
 
===2G data, short pings===
===2G data, short pings===
Line 94: Line 67:
3G recieving at 200 k/s 275 mA
3G recieving at 200 k/s 275 mA
-
===random adds:===
+
==random adds:==
-
WLAN PS-mode medium,10 mW, ssh login active, local xterm with bq27200 script loop -9, screen blanked, aggressive custom breathing indicator light: 20 mA
+
===2x bash infinite loops, by frequency===
 +
* 250MHz 278mW T
 +
* 500MHz 524mW T
 +
* 805MHz 903mW T
 +
* 900MHz 1064mW T
 +
 
 +
So it seems like the power saving cpufreq hacks are largely irrelevant and one would always use ondemand for maximum CPU peak throughput. Needs further testing with irregular I/O-dependent load tho.
 +
 
 +
'''NOTE: everything >500MHz WILL destroy your CPU long term, due to overheating and EM''' This is as evident as the rule "You shall not operate 12V incandescent Lamp at 15V or 20V"
 +
--[[User:joerg_rw|joerg_rw]] 12:28, 13 May 2015 (UTC)
 +
 
 +
WLAN PS-mode medium,10 mW, ssh login active, local xterm with bq27200 script loop 20, screen blanked, aggressive custom breathing indicator light: 20 mA
xchat 8 freenode chan, wifi PSM medium, screen locked:
xchat 8 freenode chan, wifi PSM medium, screen locked:
Line 117: Line 101:
18:40 4087 99  99  -64  1180 1180 1180 65535 3403  36  0
18:40 4087 99  99  -64  1180 1180 1180 65535 3403  36  0
</pre>
</pre>
 +
 +
7mAh / 4min = 7*60mA_min / 4min = ~105mA(h/h);  obviously depends a lot on IRC activity during test period
===A script to monitor the power consumption for a minute using bq27x00_battery===
===A script to monitor the power consumption for a minute using bq27x00_battery===
Line 124: Line 110:
'''CITATION NEEDED! Why should a shell script and i2cget be inferior to a perl script and a deprecated kernel module?  
'''CITATION NEEDED! Why should a shell script and i2cget be inferior to a perl script and a deprecated kernel module?  
--[[User:joerg_rw|joerg_rw]] 12:18, 13 May 2015 (UTC) '''
--[[User:joerg_rw|joerg_rw]] 12:18, 13 May 2015 (UTC) '''
 +
Go measure it yourself.
 +
[[User:l29ah|l29ah]] 23:40, 14 May 2015 (UTC)
 +
this only would show that the kernel module and/or the perl script are buggy. Actually the chip is better in doing sum than a script, it has registers for that and works completely transparent without any sw attention--[[User:joerg_rw|joerg_rw]] 14:26, 16 October 2017 (UTC)
<pre>apt-get install perl</pre>
<pre>apt-get install perl</pre>
<pre>
<pre>
Line 143: Line 132:
print mean(@pa);
print mean(@pa);
</pre>
</pre>
 +
 +
 +
chip-based more exact and smarter way:
 +
--[[User:joerg_rw|joerg_rw]] 15:02, 16 October 2017 (UTC)
 +
<pre>
 +
IroN900:~# bq27k-detail2|grep -A1 0x23; sleep 60; bq27k-detail2|grep -A1 0x23
 +
0x23 - 0x22:  3031  SAE Available Energy High - Low Byte            29.2  µV2h (2)  R
 +
                    *29.2 / 20 =  4425 mWh
 +
0x23 - 0x22:  3029  SAE Available Energy High - Low Byte            29.2  µV2h (2)  R
 +
                    *29.2 / 20 =  4422 mWh
 +
</pre>
 +
(4425 mWh -  4422 mWh) / 1/60h = 180mW
 +
 +
<pre>
 +
IroN900:~# bq27k-detail2|grep -A1 0x23; sleep 180; bq27k-detail2|grep -A1 0x23
 +
0x23 - 0x22:  3022  SAE Available Energy High - Low Byte            29.2  µV2h (2)  R
 +
                    *29.2 / 20 =  4412 mWh
 +
0x23 - 0x22:  3019  SAE Available Energy High - Low Byte            29.2  µV2h (2)  R
 +
                    *29.2 / 20 =  4407 mWh
 +
</pre>
 +
(4412 mWh - 4407 mWh ) * 3600 s/h / 180 s = 100mW
 +
 +
 +
most accurate method: get average of NAC over a long period:
 +
<pre>IroN900:~# bq27200.sh 300
 +
LOOPMODE=300 RS=22
 +
      mv  RSOC CSOC mA  NAC  CACD CACT TTF  TTE  TEMP
 +
17:50 4115 96  96  -41  1098 1098 1098 65535 1606  25  NOACT:0 IMIN:0 CI:0 CALIP:0 VDQ:1 EDV1:0 EDVF:0
 +
17:55 4131 96  96  -13  1095 1095 1095 65535 4882  25  NOACT:0 IMIN:0 CI:0 CALIP:0 VDQ:1 EDV1:0 EDVF:0
 +
18:00 4131 96  96  -14  1094 1094 1094 65535 4496  24  NOACT:0 IMIN:0 CI:0 CALIP:0 VDQ:1 EDV1:0 EDVF:0
 +
18:05 4131 96  96  -22  1091 1091 1091 65535 2884  24  NOACT:0 IMIN:0 CI:0 CALIP:0 VDQ:1 EDV1:0 EDVF:0
 +
18:10 4123 95  95  -109 1087 1087 1087 65535 594  25  NOACT:0 IMIN:0 CI:0 CALIP:0 VDQ:1 EDV1:0 EDVF:0
 +
18:15 4118 95  95  -41  1084 1084 1084 65535 1572  25  NOACT:0 IMIN:0 CI:0 CALIP:0 VDQ:1 EDV1:0 EDVF:0
 +
18:20 4118 95  95  -23  1080 1080 1080 65535 1884  25  NOACT:0 IMIN:0 CI:0 CALIP:0 VDQ:1 EDV1:0 EDVF:0
 +
18:25 4110 94  94  -33  1077 1077 1077 65535 1906  24  NOACT:0 IMIN:0 CI:0 CALIP:0 VDQ:1 EDV1:0 EDVF:0
 +
18:30 4118 94  94  -34  1076 1076 1076 65535 1859  24  NOACT:0 IMIN:0 CI:0 CALIP:0 VDQ:1 EDV1:0 EDVF:0
 +
18:35 4107 94  94  -12  1073 1073 1073 65535 5156  24  NOACT:0 IMIN:0 CI:0 CALIP:0 VDQ:1 EDV1:0 EDVF:0
 +
18:40 4113 94  94  -143 1069 1069 1069 65535 447  25  NOACT:0 IMIN:0 CI:0 CALIP:0 VDQ:1 EDV1:0 EDVF:0
 +
</pre>
 +
average delta-NAC per 5 minutes: 3mAh = 36mAh/h
 +
 +
delta-NAC 17:50 4115 96 1098  -  18:20 4118 95 1080 = 18mAh/30min = 36mA
 +
 +
The noise observed in spot reading of "mA" and "TTE" values is from random system activity. It averages out just fine to match the 36mA from long term measure.
 +
 +
Above test been done on a locked/dimmed device on WLAN with working PSM, xchat active
==Software==
==Software==

Latest revision as of 17:56, 10 September 2020

This page contains information on the amount of energy used by each subsystem of the N900, and where applicable ways it can be reduced.

Much of any reduction will require additional software, some may be possible by altering user behavior in ways that do not impact the users overall experience..

Measuring power usage is hard. For example, power consumption of the speakers/speaker-amp has to be disentangled from power consumption of reading a file from SD/eMMC, decoding it, PulseAudio's power use, and the DAC power use.


Below currents are from l3/l4 manual - assumed to be from a supply at 5 V.

  • FMTX 19 mA - l3/4
  • WLAN on - no powersave - 200 mA
  • WLAN transmit 802.11b - 150 mA

Battery parameters can be monitored thru fuel gauge chip TI BQ27200 [1]

Contents

[hide]

[edit] Some preliminary numbers using the battery monitor chip.

These numbers are biased, and represent best cases. Some have had outliers which may be normal and unavoidable current spikes removed. This is under the assumption that the minimal power represents the minimum power achievable, and it should long-term be possible to - possibly with software patches - achieve these. +x indicates the measurement is for that element only. A raw measurement has no + (marked "T"), and is a total consumption of whole device, when operated in that state. Unless otherwise mentioned, numbers are for the idle locked case, with screen off, battery voltage "full" = 4.0 to 4.1V. Assume

  • Suspend (echo mem >/sys/power/state), wifi and GSM off. 2 mA T *)
  • Suspend, GSM on, connected to 3G (2 bars) 5 mA T *)
  • Suspend, GSM on, connected to 2G. (2 bars) 3.6 mA T *)
   *): states not recommended, used for test purposes only
  • Idle, no SIM, wlan off 7 mA@4.1 V T
  • Wifi on with maximum powersaving. +~2 mA
  • BT enabled, no headset connected +2 mA with ~1/5 time spikes to +9 mA
  • MMC card in. Under +1 mA
  • Xchat running, sporadic traffic. +8 mA
  • Screen on, no backlight. +80 mA
  • Backlight on max +150 mA, +40mA on 4 of 5 steps in simple brightness applet & low ambient (/sys/class/backlight/acx565akm/brightness = 63)
  • Media player playing MP3, one step above mute. 110 mA T
  • Vibrator at max +120 mA
  • md5sum /dev/zero 250 mA T
  • md5sum /dev/mmcblk1p1 - 1G SD card. 240 mA T
  • md5sum /dev/mmcblk0 - internal MMC 240 mA T (these indicate the CPU is somewhat idle, waiting on IO, and this counteracts any increased power use by the memory)
  • camera active, showing preview. (backlight off) 210 mA T
  • GPS - location test gui - in continuous GPS recieve mode - +50-80 mA
  • 3G connected, good signal, no data or other activity +8 mA.
  • 2G connected, good signal, no data or other activity +5 mA

[edit] 2G data, short pings

(all Total - ATTENTION, these values depend on distance from device to base station and thus how much TX RF power it needs)

  • 1 s ping 130 mA
  • 10 s ping 70 mA
  • 30 s ping 45 mA

[edit] 3.5G data, short pings

  • 1 s 186 mA
  • 10 s 120 mA approx.
  • 30 s 136 mA

[edit] 3.5g data, long pings (8000 bytes)

  • 1 s 240 mA
  • 10 s 205 mA
  • 30 s 120 mA

[edit] 2G data, long pings (8000 bytes) (with specified seconds between pings)

  • 1 s 160 mA
  • 10 s 105 mA
  • 30 s 50 mA

3G sending file at 150 k/s 375 mA 3G recieving at 200 k/s 275 mA

[edit] random adds:

[edit] 2x bash infinite loops, by frequency

  • 250MHz 278mW T
  • 500MHz 524mW T
  • 805MHz 903mW T
  • 900MHz 1064mW T

So it seems like the power saving cpufreq hacks are largely irrelevant and one would always use ondemand for maximum CPU peak throughput. Needs further testing with irregular I/O-dependent load tho.

NOTE: everything >500MHz WILL destroy your CPU long term, due to overheating and EM This is as evident as the rule "You shall not operate 12V incandescent Lamp at 15V or 20V" --joerg_rw 12:28, 13 May 2015 (UTC)

WLAN PS-mode medium,10 mW, ssh login active, local xterm with bq27200 script loop 20, screen blanked, aggressive custom breathing indicator light: 20 mA

xchat 8 freenode chan, wifi PSM medium, screen locked:

Nokia-N900-42-11:~# bin/bq27200.sh 20
LOOPMODE=20
      mv   RSOC CSOC mA   NAC  CACD CACT TTF   TTE   TEMP EDV1 LOW
18:36 4092 100  100  -134 1187 1187 1187 65535 530   37  0
18:36 4092 100  100  -17  1186 1186 1186 65535 3990  37  0
18:37 4106 99   99   -68  1186 1186 1186 65535 1042  37  0
18:37 4095 99   99   -52  1185 1185 1185 65535 1359  36  0
18:37 4130 99   99   -18  1185 1185 1185 65535 3807  36  0
18:38 4092 99   99   -138 1184 1184 1184 65535 511   36  0
18:38 4090 99   99   -110 1184 1184 1184 65535 644   36  0
18:38 4090 99   99   -57  1183 1183 1183 65535 1241  36  0
18:39 4090 99   99   -118 1183 1183 1183 65535 597   36  0
18:39 4114 99   99   -34  1182 1182 1182 65535 2077  36  0
18:39 4127 99   99   -17  1182 1182 1182 65535 3569  36  0
18:40 4122 99   99   -77  1181 1181 1181 65535 570   36  0
18:40 4087 99   99   -64  1180 1180 1180 65535 3403  36  0

7mAh / 4min = 7*60mA_min / 4min = ~105mA(h/h); obviously depends a lot on IRC activity during test period

[edit] A script to monitor the power consumption for a minute using bq27x00_battery

The shell script using i2cdump affects measurements a lot so it's better to use the kernel module.

CITATION NEEDED! Why should a shell script and i2cget be inferior to a perl script and a deprecated kernel module? --joerg_rw 12:18, 13 May 2015 (UTC) Go measure it yourself. l29ah 23:40, 14 May 2015 (UTC) this only would show that the kernel module and/or the perl script are buggy. Actually the chip is better in doing sum than a script, it has registers for that and works completely transparent without any sw attention--joerg_rw 14:26, 16 October 2017 (UTC)

apt-get install perl
#!/usr/bin/perl
use strict;
use warnings;
use List::Util qw(sum);
sub mean { return @_ ? sum(@_) / @_ : 0 }
my @pa;
for (my $i = 0; $i < 15; $i++) {
	open(my $cf, '<:encoding(UTF-8)', '/sys/class/power_supply/bq27200-0/current_now');
	open(my $vf, '<:encoding(UTF-8)', '/sys/class/power_supply/bq27200-0/voltage_now');
	my $cc = <$cf>;
	my $vc = <$vf>;
	my $pc = $cc * $vc / 1000000000; # mW
	push @pa, $pc;
	sleep(4);
}
print mean(@pa);


chip-based more exact and smarter way: --joerg_rw 15:02, 16 October 2017 (UTC)

IroN900:~# bq27k-detail2|grep -A1 0x23; sleep 60; bq27k-detail2|grep -A1 0x23
0x23 - 0x22:  3031   SAE Available Energy High - Low Byte             29.2  µV2h (2)  R
                    *29.2 / 20 =  4425 mWh 
0x23 - 0x22:  3029   SAE Available Energy High - Low Byte             29.2  µV2h (2)  R
                    *29.2 / 20 =  4422 mWh 

(4425 mWh - 4422 mWh) / 1/60h = 180mW

IroN900:~# bq27k-detail2|grep -A1 0x23; sleep 180; bq27k-detail2|grep -A1 0x23
0x23 - 0x22:  3022   SAE Available Energy High - Low Byte             29.2  µV2h (2)  R
                    *29.2 / 20 =  4412 mWh 
0x23 - 0x22:  3019   SAE Available Energy High - Low Byte             29.2  µV2h (2)  R
                    *29.2 / 20 =  4407 mWh 

(4412 mWh - 4407 mWh ) * 3600 s/h / 180 s = 100mW


most accurate method: get average of NAC over a long period:

IroN900:~# bq27200.sh 300
LOOPMODE=300 RS=22
      mv   RSOC CSOC mA   NAC  CACD CACT TTF   TTE   TEMP
17:50 4115 96   96   -41  1098 1098 1098 65535 1606  25  NOACT:0 IMIN:0 CI:0 CALIP:0 VDQ:1 EDV1:0 EDVF:0
17:55 4131 96   96   -13  1095 1095 1095 65535 4882  25  NOACT:0 IMIN:0 CI:0 CALIP:0 VDQ:1 EDV1:0 EDVF:0
18:00 4131 96   96   -14  1094 1094 1094 65535 4496  24  NOACT:0 IMIN:0 CI:0 CALIP:0 VDQ:1 EDV1:0 EDVF:0
18:05 4131 96   96   -22  1091 1091 1091 65535 2884  24  NOACT:0 IMIN:0 CI:0 CALIP:0 VDQ:1 EDV1:0 EDVF:0
18:10 4123 95   95   -109 1087 1087 1087 65535 594   25  NOACT:0 IMIN:0 CI:0 CALIP:0 VDQ:1 EDV1:0 EDVF:0
18:15 4118 95   95   -41  1084 1084 1084 65535 1572  25  NOACT:0 IMIN:0 CI:0 CALIP:0 VDQ:1 EDV1:0 EDVF:0
18:20 4118 95   95   -23  1080 1080 1080 65535 1884  25  NOACT:0 IMIN:0 CI:0 CALIP:0 VDQ:1 EDV1:0 EDVF:0
18:25 4110 94   94   -33  1077 1077 1077 65535 1906  24  NOACT:0 IMIN:0 CI:0 CALIP:0 VDQ:1 EDV1:0 EDVF:0
18:30 4118 94   94   -34  1076 1076 1076 65535 1859  24  NOACT:0 IMIN:0 CI:0 CALIP:0 VDQ:1 EDV1:0 EDVF:0
18:35 4107 94   94   -12  1073 1073 1073 65535 5156  24  NOACT:0 IMIN:0 CI:0 CALIP:0 VDQ:1 EDV1:0 EDVF:0
18:40 4113 94   94   -143 1069 1069 1069 65535 447   25  NOACT:0 IMIN:0 CI:0 CALIP:0 VDQ:1 EDV1:0 EDVF:0

average delta-NAC per 5 minutes: 3mAh = 36mAh/h

delta-NAC 17:50 4115 96 1098 - 18:20 4118 95 1080 = 18mAh/30min = 36mA

The noise observed in spot reading of "mA" and "TTE" values is from random system activity. It averages out just fine to match the 36mA from long term measure.

Above test been done on a locked/dimmed device on WLAN with working PSM, xchat active

[edit] Software

Many software subsystems interact to aim to reduce battery usage.