yashsingh1/xdaforums huggingface dataset:
[Desire General] th3:
It's a big issue in battery life for me on the OD ROM. Idle 1-3% sys-CPU usual is 15mW but with this bug it is 35-40mW. When the power usage spikes even higher every 3-5 seconds due to this bug, the touchscreen fails to register and respond to most touches on the homescreens. Especially swiping left/right.

Yes, aLogcat, OSMonitor and PowerTutor all logging the data which is time stamped. You can see when one and the other occurs including their CPU usage and power draw. I have dozens of incessant network location errors every time this behaviour initiates.

-----------------------------------

- Sent via my HTC Desire -
[Desire General] andycted:
Changing rom and/or rebooting makes the Contact Sync item in power tutor logging, appear and disappear at times. I would think it's a wrong identification of the process stemming the battery usage, maybe when getting the PID and climbing back to the original process name, power tutor gets confused at times and reports the first sub-process that is using those resources. By the way, do you think the 'maps' process using cpu time when idle is masking some kind of localization usage from other applications ?

I've also noticed a ridiculous amount of programs that use a few mJ even on idle, without having ever been launched and when -most importantly- are supposed to be completely dormant. I resolved to 'freeze' them with titanium backup, for now, but I'm curious if the CPU part they use is some kind of automatic memory management, a cache refresh, bad programming, phoning home (rarely data connection is triggered) or u.f.o.'s planting bugs in my phone. Oh, wait, that's Apple Inc.
[Desire General] thecompany:
How do test how many mw/mA the battery draines? Which app can I use?
[Desire General] andycted:
Current widget and power tutor
[Desire General] thecompany:
Thanks! Let it run for a few hours and messaging really seems to be the highest "drainer" @ 120 joule average.. Is this normal behaviour? Also, the total power is around 420 mW. Also normal?

420 mW = 4 mA?
[Desire General] andycted:
Alright, I'm sure others in this threads will explain better than me, but:

Amps = Watts/Volts

Voltage is 3.7 on the HTC Desire (right?)

so mA = 420mW/3.7V

Joules... beats me.

What do you mean by 'messaging' ? IM programs staying in the background ? They can use quite some juice, but that's nothing compared to real usage with screen on.
[Desire General] bemymonkey:
Correct.

Joule = Watt*second => 1W=1J/s

It's just a unit of energy, whereas Watt is a unit of energy used in an allotted amount of time. :)

Basically, Joules are to Watt-Hours what meters-per-second are to kilometers - both the same thing, but different units. ;)
[Desire General] thecompany:
No, the text message application. SMS.
[Desire General] bemymonkey:
To put it in perspective: You text messaging app supposedly used 120J of energy.

THat's 120 watt-seconds, which is 120/3600 watt-hours. That's 33.333mWh, which is ~9mAh. That's 9/1400 (0.64%) of the battery's capacity.

Not that much, really...

Still, you say that Messaging, as in SMS has higher consumption than anything else? Hmmmm... smells fishy :p
[Desire General] th3:
I usually have Messaging and Browser as the top 2... OLED display power users because my screen is being used for them the most ;)

The Messaging reading you're seeing most likely is because you spent most screen-on time in the Messaging application. So it is highly likely showing you not the applications power drain but the amount of energy used by the OLED display whilst on the Messaging application. Since the OLED display is the biggest power consumer, whatever you are displaying on the screen most will be shown by the PT app.

You can check that by unchecking all the tabs except OLED. That will indirectly show you which application has used the most screen time (it will be listed as the highest).

-----------------------------------

- Sent via my HTC Desire -
[Desire General] andycted:
I had to install and use nimbuzz today since gtalk has been borked by my account (thanks google).

I always assumed IM clients were a huge battery drain, but after measuring a bit with both tools, it seems something in the range of 15 mA... Of course, keeping it on the entire day equates to something like 200 mAh, which is relevant...

Anybody has some reference ?

Regarding the sms application, I use handcent with a black background.
[Desire General] andycted:
As I said, somebody else can explain it better in here, hehe. This time I don't even have the excuse of being drunk
[Desire General] andycted:
Briefly, I understand well what those screens show, I'm actually saying that even on idle, total cpu usage increases over time.

Regarding aosp roms memory management, you might be right, but that's not necessarily a good thing for me. I find some memory intensive progress, like launchers, to have many problems in od because of this
[Desire General] andycted:
I have this and leedroid thread, subscribed side by side. It's incredibly comic, seeing all the figures and calculations done here, then moving there and seeing people claiming more than 4 days of battery, magically by using setcpu.

I'll save you doing the math this time and do it myself...(I'm not drunk and it's simple)

1400mAh / 100h = 14mA of average drain. Right ?
[Desire General] th3:
Interesting. Then it's certainly using CPU power. Check the way to see current power by the app in PT that I mentioned above. Through that you can see how much CPU usage and power the app is requesting, and how often. On WiFi, Maps and Maps (-) both show no power usage idling on both my ROMs.

-----------------------------------

- Sent via my HTC Desire -
[Desire General] th3:
Yep. Not possible unless they've been in total standby for the vast majority of time. We've well established at least 90-110 mA by the screen alone when awake.

This is why I always make mention or post the "display on" time. Since being a >70% total energy consumer, it is critical to how much battery life we get, universally, across every HTC Desire. If you have 0.1-1 hour aggregate "display on" time in a full discharge... long runtimes are very expected :P

-----------------------------------

- Sent via my HTC Desire -
[Desire General] andycted:
Already done that, it mainly polls some cpu time now and then. It's very far in between, but since I have around 200 user applications I wonder if they have some impact.

I find system panel easier to read when monitoring this behavior
[Desire General] th3:
I have 183 installed on the OD ROM... no such behavior.

-----------------------------------

- Sent via my HTC Desire -
[Desire General] andycted:
It's extremely light and is probably a non-issues, since it only eats a few mJ... still I'm only curious to know what they do. Could just be some memory cleaning cycle or something like that.

As a reference having the phone on, but data connection off, all night, eats about 4% battery with current widget logging almost contant 3-4mA with some spikes to 6mA and some rare 20mA every 20 minutes or so. That seems ok, although the next night, it was completely flat at 3mA, with some occasional 5-6mA.

I'm sure killing most process before going to sleep would eliminate some of those 20mA, but that seems hardly worth it I guess.
[Desire General] ChronoReverse:
Thanks for all the information with robust testing backing it. Pretty much confirms everything I thought about how the power usage patterns ought to be.
[Desire General] andycted:
Thanks for the appreciation.

My idea of the power usage pattern and possible optimizations is as follows:

-brightness is probably one of the main optimization you can make. Dark screen for amoled too

-another big one is airplane mode when reception is poor

-wifi has probably an edge on 3g data, but that varies with situations

-having 3g data off has almost no gain. Juice defender and such programs are useless or placebos

-the kernel throttles down speed efficiently. Using setcpu to interfere with that has very little impact, if none at all.

I've tested two nights in a row, same setup, one with setcpu profile for Low mhz at screen off, the other without setcpu installed. No big differences in current widget logging, MAYBE a couple of spikes less saving something like 5mAh in 8 hours, and that should be confirmed with more testing...

Sent from videotext, using the remote
[Desire General] th3:
On OD 3.1.0, 4.0.3 and 4.0.4, I haven't been able to replicate this issue. Only 3.1.0 and 4.0.4 were full wipe installs. So I can't help there.

Those figures are similar to what I get across any ROM to date.

2mA is my standby average without cell, with and without WiFi.

3-5mA with cell, with and without data, and WiFi.

In the latter, fluctuations to 6mA are very common.

86-94mA lowest brightness, without button backlight, WiFi on, cell off.

108-114mA, same as above but with button backlight.

The >6mA standby spike doesn't occur in my observations. That would mean some hardware component is waking up into an active power state- looking at the figure - quite possibly the NAND.

-----------------------------------

- Sent via my HTC Desire -
[Desire General] andycted:
Well, the occasional spikes could well be some applications that perform some background activity, a switch from one 3G tower to the other, or similar stuff. But to put it into perspective, I had maybe 5 of them, even if they are at 30mA for one entire minute, that translates to around 2.5 mAh, for the entire night, I think.

I can't remember where I put the report about SetCpu test, but I've repeated them and there was absolutely no difference in one night spent with SetCpu profile at 245Mhz with screen off vs one without SetCpu installed.
[Desire General] foxmeister:
I must say that over the past few days, I've been trying out the new power governors and SetCPU, and whilst I've not attempted to quantify the results, I'm really not noticing any gains in battery life for my usage patterns.

I tried JuiceDefender in the past on my Hero, and again didn't notice any real gain in battery life.

IMHO, this situation is very much like the use of auto task killers - those who use them absolutely swear by them, but in my experience they do nothing of any note.

I'm definitely firmly in the camp of leaving Android to do its own thing, and I'm getting 30+ hours usage with what I'd consider quite heavy usage.

Regards,

Dave
[Desire General] andycted:
Yep, thanks for the confirmation. I probably mentioned it before, but does anybody remember the fake overclocking application on WinMo, which everybody sweared made miracles, then the developer revealed it was a prank ?

It's incredible what the will to have something happen can do to your perception, especially when you have something as complex as a smartphone...

On this note, I remember from the Winmo days, quite a few people surmising that having the RAM occupied by programs, had an impact on the battery. Not the program itself, with its processing, but the simple fact that a byte of RAM memory with some data was supposedly draining more battery than a byte free of that.

Now, I don't really know well how phone RAM memory works, but I've always surmised that it works much like any other physical memory, that when freeing memory, the system only removes the address for the chunk and there is no actual electrical state difference. It is, I'm sure I remember to have studied it, a lot more complicated, but the main idea remains: having memory free vs taken doesn't really change battery usage for RAM, right ???
[Desire General] andycted:
Right.

Now go tell that to the 20.000 user in the forum which swear by SetCpu profiles, JuiceDefender and snake oil.

P.S. : what do you think about my note on busy vs free RAM ? I've also another thing in my head lately, how hard is the 'mobile network location' functionality on battery ?
[Desire General] veryjiggy:
I have tried both JuiceDefender and SetCPU. While I do not like JuiceDefender at all, i just adore SetCPU. Believe it or not, it has increased my battery life by atleast 50%. I have underclocked my desire (setting profiles etc in SetCPU) and it has really helped. Even I was (am) concerned about the life of the chip, but I would like to get more info whether underclocking does indeed have any affect on it or not.
[Desire General] andycted:
If anything, underclocking could prolong the life of the chip. However th3 remarks about messing with stock settings in hardware is good. Underclocking ARM processors inside this tiny architecture can't probably be compared to underclocking/overclocking cpus in the days of P III's (when I actually burnt two ram modules and one GPU)

If having SetCPU profile to lock the Mhz to a low value while screen off has increased your battery life of 50% (which I doubt. No offence, really, I think you are just having a placebo effect) there might have been something wrong going on when your phone is supposed to be idle.

If you want to have more accurate findings, try having currentwidget logging your battery usage for one night with setcpu and one without it (uninstalling it).
[Desire General] foxmeister:
I can't find Snake Oil in the market!

Do you know of any snake oil salesmen I could purchase some from? ;)

Regards,

Dave
[Desire General] andycted:
Try an apple store.
[Desire General] bemymonkey:
Or any store that sells Monster Cables...
[Desire General] andycted:
Hey, they're endorsed by Yao Ming ... yeah right.

As we are on the subject, what about a 'debunking' or 'confirming' battery myths that haven't been analysed yet ? Or something like BatteryBusters.

Some ideas:

- Faster transfer rate over HDSUPA drains less battery than with standard 3G, because the connection stays open for less time.

- Network location (no GPS) fix drains a lot of battery

- Free RAM drains less battery than busy RAM

- G-strings are better than granma pants...oh wait, that's in the cyanogen thread. hehe
[Desire General] th3:
I don't tend to get involved with obvious passionate product/entity fans or fanatics, hard-grained errors, cultural bias and widespread myth. The internet has such an over-abundance of them on every place... I'd loathe them to start spilling over in my neck of the woods :P

"The internet needs a way to help people separate rumour from real science" - Tim Berners-Lee, 2008

Andycted: I'd need to read up on Androids code with memory/storage workings before I can reply on such a question with any validity. While I'm aware how it is done on general PCs and their OSes, I'm unsure of too many aspects of how memory and storage interactions occur with these small form-factor mobile devices and their tailored operating systems. Apologies.

-----------------------------------

- Sent via my HTC Desire -
[Desire General] andycted:
Hey, no apologies needed, besides we are mainly here to discuss stuff without trying to rewrite history... or science hehe.

Jokes aside, I'm quite interested in how much the mobile network location drains. It's a very nice feature which however tends to be completely useless when you stay in a place for very long, so it would be worth knowing if you should take the pain of disabling it. I'm going to try and find a way to measure it.

EDIT: for now CurrentWidget and PowerTutor offer the same results when probing the location with "MyLocation" which however I think includes some kernel time for the screen drawing when displaying results and interacting with the screen. The difference from idle to when getting the location is in the range of 20-30mA when using currentWidget or around 100mW when using powerTutor. Hard to say if it's lower than that, but probably isn't higher...

If anybody has interest and suggestions on how to measure it more accurately, he's welcome to add to it. For now, I'll assume it doesn't drain significant amounts of battery and will keep using it.
[Desire General] dragonithe:
I've been using power tutor for about a day now, and i notice that my bigest battery drain is "HTC contacts".

And i haven't made a single call...

What is it?
[Desire General] andycted:
Maybe account sync?

Sent from videotext, using the remote
[Desire General] thecompany:
According to currentwidget im using around 180mA with brightness on 0 procent, wifi on and with data on, same brightness 220 mA.. Is this normal?
[Desire General] andycted:
40 mA for data on, vs wifi on? No, it's not normal

Sent from videotext, using the remote
[Desire General] bemymonkey:
Both values sound high. If you're downloading a lot, then 40mA difference is okay...

180mA idle with brightness on 0... maybe with lots of bright colors. Or are you on SLCD?
[Desire General] thecompany:
Here is the log for about an hour: http://dl.dropbox.com/u/9605890/currentwidget.log

11 / 7 /4 mA is with the screen off, the rest is with the screen on (mostly)

No SLCD , and i dont have any bright colours: http://dl.dropbox.com/u/9605890/snap20100825_153719.png

I disabled juicedefender and advanced task killer btw, after reading this topic
[Desire General] bemymonkey:
Looks okay to me. The higher 180mA+ values are probably from when you had something brighter than the homescreen on the display... browser or something :)
[Desire General] thecompany:
Well, thats the problem, i didnt do anything with my phone other than hit refresh on currentwidget. Im thinking this values are way to high because on page 26, someone had 80-100 values. i have way over 200.. Maybe im gonna install another ROM or something.
[Desire General] andycted:
Before doing that, try logging with systempanel and/or power tutor. You might find some application which is going stuck in the background or keeps the connection open

Disable auto-brightness, too.
[Desire General] thecompany:
Disabled auto-brightness since i had the phone, never liked it..

I installed juicedefender again and its a little better, now idle is around 5 mA and screen on 120/130
[Desire General] andycted:
Idle at 5mA vs 7mA could make sense, because juice defender turns the wifi/3G data off when phone is idle. This however can save you (supposedly) 2mAh if the phone is mostly on idle, which translate for a full day of idle (unrealistically) to 48mAh, which in turn is 48/1400 = 3.4% battery. Even if you would want this gain, I think that while testing I noticed that switching WiFi/3G data on and off includes an overhead for just switching that compensates for that small gain. Maybe if you keep your phone on idle most of the time and don't want to be bothered in turning data on/off manually, you could see some gain. Otherwise you would probably be better to get to the source of the frequent data connection that causes you trouble.

About the value on screen on, I would think juicedefender hasn't got much to do with it...
[Desire General] th3:
Who said snake oil? :P http://androidforums.com/690345-post9360.html

-----------------------------------

- Sent via my HTC Desire -
[Desire General] andycted:
Beside being my hero for writing all that stuff from your phone and proving concepts so thoroughly...

The big question is: what keyboard are you using? Hehe

Seriously, thanks a million for the huge explanation

Sent from videotext, using the remote
[Desire General] bemymonkey:
Awesome post th3. There were a few juicy details in there for all of us :)
[Desire General] patp:
Thanks th3 for providing all that.

Not sure about the screen, it's always seemed to me that 3G is the biggest power drain on a smartphone. I always found a lot of variation between WM6 roms on my Blackstone in this respect - some would be able to shift data more economically. Of course this is hard to test rigourously, you have to be in the same location, ideally at the same time to do a proper test, and their is a lot of cognitive bias involved. But still I got the impression that some roms used less power for data than others. I haven't flashed enough on the Desire to have an opinion about this yet. The fact will always be though that the battery on this device is a bit underspecified and the only real fix will be to carry a spare or get a bigger one. You can optimize the software to avoid unnecessary drain, but even properly configured, it can only handle a few hours of heavy use.
[Desire General] andycted:
I find the battery to be adequate, still I do have a spare and I did have a spare with my touch HD. But if I tried to do on the Blackstone what I am doing on the desire, the battery would have probably lasted half the current duration.

Regarding roms, I used to think that on the Blackstone too, until one day I took batlog and tried to prove it. Since then I only used the rom I liked most visually...

Sent from videotext, using the remote
[Desire General] andycted:
Alright remember those doubts about my spotty wifi influencing the tests ?

I have an Atlantis wifi modem router that I always used as standard. It was cheap but I assumed the three antennas would make the connection a bit more reliable, if not stronger.

Today I linked my old linksys to it and disabled wifi on the Atlantis, routing everything wireless through the linksys. Besides the fact that I seem to have consistent stronger signals (5-10 dBm difference) these are the results of streaming music alternating data connection (in mA, reported by current widget every minute):

wifi 236 - 239 - 234

3G 296 - 298 - 303

wifi 222 - 216 - 202

3G 302 - 301 - 299

wifi 231 - stopped here, as it's obvious

So, yes, as it is usually supposed, wifi drains less than 3G data connections, but that can be easily flipped if you have a spotty/bad wifi connection as I had...
[Desire General] foxmeister:
[PEDANT MODE]

I hate to be picky on what is otherwise a most excellent post, but the Scorpion is *not* based on the ARM Cortex. It implements the same instruction set as the Cortex, and shares many of the same features, but it is a completely custom design.

See here for more details.

The point is that unlike Samsung, with their Hummingbird processor, Qualcomm didn't take a Cortex-A8 core and drop it into their SoC, they designed the entire processing core themselves.

[/PEDANT MODE]

I'll get me coat! ;)

Regards,

Dave
[Desire General] andycted:
(loads trebuchet with tomatoes)

The end of the story, for both posts, is that the Scorpion base of the Snapdragon is a hell of chip design-wise and that even as optimization for battery goes, we can be very happy with it. Right ? Just trying to summarize for those that didn't read the whole story.

I have a small doubt regarding EVO/snapdragon vs GS/hummingbird:

(I get my coat now, since I probably remember all this stuff very dimly)

the hummingbird dedicated GPU moves data at only 8kbits (much like very old cpu's ???) and that means between the cpu and gpu right ?

I am assuming memory has to pass through the cpu like in the old days of pc's ? or the gpu has its data pipe to the ram ? Or -very probably- I don't understand what's going on and I actually can't even remember how a computer works ? Is the mobile design very different from old pc's in order to save power and space ?