yashsingh1/xdaforums huggingface dataset:
[Galaxy S II Original Android Development] LBTaylor1984:
Just a quick note peeps. important on eke2 rooted with original kernel installed. I had serious battery issues. i was very lucky to get 10hrs of a charge and use the phone. on someone's recommendation i factory defaulted, wiped cache and reinstalled my apps. I've uninstalled Samsung hubs, Samsung apps, ap mobile, and accuweather. O and yahoo finance.

Im running 25% screen brightness, as before.

Now I've been running for 12hours with medium-heavy use, I've been using the net, for 2hours, 30min phone call 20mins on zedge. And Im at 60%

While I've not done anything too crazy on the phone, its been used in a typical manner and returned 2hours more on time than I've been able to manage, and i still have 60% left, rather than 0%

Maybe someone might like to try a factory reset and see the results?
[Galaxy S II Original Android Development] tublah:
Would 2.3.4 fix it?

Looks like the Nexus One owners who were having this same problem report that 2.3.4 fixes this issue. Anyone else gather that from reading the code.google.com page?
[Galaxy S II Original Android Development] kumarshah:
I wish we knew what exactly caused this at least.

Main reason I haven't got the SG2 yet on AT&T.
[Galaxy S II Original Android Development] slyydrr:
Not trying to be rude but you should read through my previous posts throughout these forums on this specific topic. I have been saying the same thing so you're barking up the wrong tree.

If you have any experience with Android devices, you'd know that on any most devices absent the bug, Android OS usage is almost nonexistent, especially when the screen is off, which actually gives 60% some meaning.

You are right in that more needs to be provided, especially if I'm comparing my results to others. However I believe coming in to this conversation throwing punches like that is far from productive.
[Galaxy S II Original Android Development] slyydrr:
Yea it looks that way. I wonder if this is indeed the same issue. It does make me wonder why it says declined on the bug though, especially if it was fixed. Perhaps another bug about this exists on their page and was addressed?

I have the device on AT&T and even with the issue, I'm still getting at least one solid day out of my battery. It's a fantastic device.
[Galaxy S II Original Android Development] simonk83:
So being new to android, how do os updates work? The nexus phones appear to have received 2.3.4 first for whatever reason, how long would you expect it to be before our phone receives it? And do we then need to wait for Samsung to do their thing to it before its rolled out?
[Galaxy S II Original Android Development] kaassema:
Sorry slyydr... Really wasn't trying to throw a punch... But indeed looks like it after reading my post again :)
[Galaxy S II Original Android Development] winwiz:
fast dormancy is something set by the operator. im not sure if this feature is enabled on all networks. Orange UK have rolled out this feature recently
[Galaxy S II Original Android Development] dan13l:
Could this be related? Inside cell standby it says 100% time without signal. Is this consistent with others? I'm curious to know if you're getting good battery, whether that figure is 100%. And of course the opposite: if you've got this problem, does your time without signal say 100%, or something else?
[Galaxy S II Original Android Development] DocRambone:
i have the same,. 100 % without signal, and heavy idle drain
[Galaxy S II Original Android Development] earthdome:
it might be one of the cause too. Yesterday I had 0% time without signal and i have pretty good battery life. But today after idling for about 8 hours and playing with it for 15minutes, I only had 78% left with 100% without signal.

Anyway, it seems that if you use wifi all the time, you'll get 0%. and 100% without signal if you use network data, which also leads to higher android OS usage

EDIT: Also I had my Power Saving Mode disabled yesterday
[Galaxy S II Original Android Development] El Salvador:
BUT, if you turn on Wifi, it causes more drain as well due to Wifi Direct, Wifi sharing, Google maps etc which are staying active even after you turn off Wifi again. So it works both ways.

Btw, I've experienced that turning on Wifi for the first time also seems to trigger the phone to stay awake and not turning idle anymore, even if you turn off Wifi at a later stage.
[Galaxy S II Original Android Development] earthdome:
hmm.i'm not sure about losing more battery with wifi on. I had it on the whole day yesterday and it drops only 1% and today when i turn the wifi off and use the network data instead, it drops 2,5% per hour
[Galaxy S II Original Android Development] walda:
+1

sent from my SGSII via T*patalk
[Galaxy S II Original Android Development] dan13l:
@walda & @earthdome - can you check under cell standby in battery usage, and see what your Time without a signal value is?
[Galaxy S II Original Android Development] El Salvador:
Good Q, I think it's related to the Wifi signal. If you have a Wifi signal then the percentage of time without a signal decreases.

Anyway, I'm not getting anything near a 1% drain/hour when Wifi + sync is turned on all the time.
[Galaxy S II Original Android Development] walda:
i get 9 h and 100% without signal.

today wifi all time on.

my batt is at 70% now :D

sent from my SGSII via T*patalk
[Galaxy S II Original Android Development] slyydrr:
No worries man - I appreciate your follow up. :)

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

Hi all, I know I haven't been very active in terms of digging through this issue over the past 24 hours, but I'd like to post a little food for thought. After thinking about all the crap I had going to monitor CPU usage/battery life (I was running 3c06 battery monitor widget, and NextApp's process monitor), I decided to turn it all off and have nothing monitored. Amazingly, my CPU usage has dropped from about 5-10 minutes of CPU time consumption per hour to about 1-2 minutes. Android OS usage is still higher than I'd like, but it's currently not overtaking the Display battery usage, and that's with minimal screen-on time.
[Galaxy S II Original Android Development] walda:
i ve running battery monitor widget and system panel, no problems since days.

sent from my SGSII via T*patalk
[Galaxy S II Original Android Development] slyydrr:
No problem with actual battery life, or with Android OS specifically? I personally have never had a real problem with battery life, but the Android OS usage was always high (5-10m CPU consumed/hr).

Battery life can be related to signal strength, however the calculation on the phone to determine time without signal is buggy in itself. It's best to compare the time the phone has been off the charger against the time the phone has had signal.
[Galaxy S II Original Android Development] dan13l:
More fuel for the fire: If you dial *#*#4636#*#* then look in Phone Information, the preferred network type is GSM/CDMA auto (PRL).

It looks like it should be possible to remove CDMA (or GSM) from the equation, but I can't get a change to stick, it always reverts back.

Options are: WCDMA preferred, GSM only, WCDMA only, GSM auto (PRL), CDMA auto (PRL), CDMA only, EvDo only, GSM/CDMA auto (PRL), Unknown

Maybe the battery drain is because it's checking for CDMA networks instead of just being happy with GSM? (clutching at straws now).
[Galaxy S II Original Android Development] walda:
no problem with high drain. only high aos% but who cares...

sent from my SGSII via T*patalk
[Galaxy S II Original Android Development] slyydrr:
I don't imagine this to be the case only because CDMA/GSM aren't compatible. I think the software supports CDMA, but the hardware doesn't, therefore preventing the software from even checking for CDMA. This is just my theory, but I believe it to be true.

Any chance you'd mind disabling the two just to analyze your Android OS usage over the course of a day to see if the CPU time consumed/hr decreases?
[Galaxy S II Original Android Development] walda:
i did this with juice defender at the weekend which turns off wifi+data when screen is off.

i didnt recognize a really lower drain so i deactivated jd after the half day and switched wifi on.

sent from my SGSII via T*patalk
[Galaxy S II Original Android Development] TheGhost1233:
People please don't say you have fine battery life when android os is in the list. It just means your expectations are to low.
[Galaxy S II Original Android Development] DocRambone:
Ok, this is a way to cure the high android os bug for me:

Factory reset

Make the initial setting (accounts etc) with 2g/3g data connection (no wifi)

Before: 70-80% android os a day, 99% over night (many hours in android os)

After, 14 min android os today (8%), screen on time 3 hours)

(tested multiple times with the available roms)

And Dlink dir 655 triggers the high drain again, but only when connected.
[Galaxy S II Original Android Development] pulser_g2:
So it sounds like you are unaffected if you don't use WiFI then?

/me hopes his SGS2 actually appears some time, as I never use WiFI :p
[Galaxy S II Original Android Development] DocRambone:
Yes, the dir 655 is root to all evil :)
[Galaxy S II Original Android Development] pulser_g2:
Right, so let me get this straight. The Android OS usage is low (normal?) when you do NOT use the Dlink DIR 655 router?

Seems a lot of people have said router then :)
[Galaxy S II Original Android Development] lgkahn:
this is bs.. my sgs i works find and goes into sleep on the same router.. (linksys 610) with dd-wrt that the sgs ii fails too.
[Galaxy S II Original Android Development] DocRambone:
Maybe, we have at least few xda members with same problem on the dir 655.

And i can easily see the high idle drain on dir655

And yes, the android os get down to more normal (to high anyway) levels without the router
[Galaxy S II Original Android Development] gmatharu12:
I honestly think that only using 3G data connections doesn't help. My phone has been discharging for 12 hours and 32 minutes now, but Android OS is still at 58 minutes CPU time (17%), I agree it is not awful, but it is still not right. Upon using WiFi, it didn't change much, and with Background Data disabled, it also didn't change much.

It is hard to measure considering the Android OS CPU time fluctuates from day to day even if you do the same testing. Firmware is KE1, rooted and all Samsung apps frozen.
[Galaxy S II Original Android Development] slyydrr:
Your results seem to confirm mine in that data/wifi don't seem to affect Android OS as I initially suspected (with the dir655 router potentially being an exception). Are you running any background battery/process monitoring apps? I noted in the first post that disabling those seemed to reduce CPU time consumption for me (from about 5-7 minutes of CPU usage per hour down to about 2 minutes). I'll start digging into some more stuff when I leave the office tonight.
[Galaxy S II Original Android Development] walda:
no :D

i have high aos% but no battery drain 1%/h. my router is a netgear 1gb with tomato fw.

sent from my SGSII via T*patalk
[Galaxy S II Original Android Development] slyydrr:
Can someone with horrible battery drain send me their logcat file? I want to see if something stands out in this. Doc, any chance you have a logcat file from when you were experiencing drain issues?
[Galaxy S II Original Android Development] DocRambone:
Do not have any left...... but i can connect it to dir 655 ;)
[Galaxy S II Original Android Development] gmatharu12:
I haven't installed anything other than System TaskPanel Pro because I use it as a Task Switcher and killer but it does monitor CPU usage as well. In the options menu, it says Monitoring is disabled however I think it does still monitor some stuff in the background regardless of this option.

I'll uninstall tonight, charge and try tomorrow. Cheers!
[Galaxy S II Original Android Development] dan13l:
An hour ago I did the hard reset, which isn't as painful as it sounds with Titanium Backup and root, opted out of any Google tracking or backup, skipped initial account setup, and have left wifi turned off.

I then added my account, restored my apps, and froze the things I'm never going to use. So far, android OS has only consumed a couple of minutes of CPU, where usually I'd have seen as much as half an hour.

I need to charge it up now, but it'll be interesting to see what happens when I turn wifi back on!
[Galaxy S II Original Android Development] lgkahn:
dont bother.. i have that same app on two sgs. and have no battery drain so it is not the app.. there definately i s some problem in the os onthe sgs ii
[Galaxy S II Original Android Development] dryspuri:
OK!!!

People please pay attention!!!

I have o2 Uk, & Lebara (Vodafone UK network) , and i have Incredible s & samsung galaxy s II!

Now my finding with fastdormancy on alogcat(market application)

1. o2 Uk in SGS II: fastdrmancy repeatedly with getcpa false

2. Lebara sim in sgsII : no fastdormancy at all

3. o2 Uk sim in Incredible s : no fastdormancy

4. lebara sim in Incredible s : no fastdormancy

does this means that 02 & SGS II are having a problem,

today i will be keeping lebara sim in sgs II & will see & report battery life!!!

:confused::confused::confused::confused:
[Galaxy S II Original Android Development] fade1d:
logcat

Hey there,

as requested in the OP, here is some clips from my logcat app. I set it to filter for fastdormancy.

I am on AT&T network running KE2 firmware here in new york.

Let me know if you need anything else!

Edit: I have terrible battery life as well by the way. I am at 48% battery, unplugged 5 hours, display on for 45 minutes, and android OS at 25% and 42 minutes, and i talked on the phone for 22 minutes. otherwise haven't used any other apps, and the rest of the battery status stuff is normal.

D/FastDormancy( 2857): before ======= ENTER DORMANCY =======

D/FastDormancy( 2857): [FD] ON default: true

D/FastDormancy( 2857): Before mDormFlag: false in getCapaDormancy()

D/FastDormancy( 2857): After mDormFlag: false in getCapaDormancy()

D/FastDormancy( 2857): before ======= ENTER DORMANCY =======

D/FastDormancy( 2857): [FD] ON default: true

D/FastDormancy( 2857): Before mDormFlag: false in getCapaDormancy()

D/FastDormancy( 2857): After mDormFlag: false in getCapaDormancy()

D/FastDormancy( 2857): before ======= ENTER DORMANCY =======

D/FastDormancy( 2857): [FD] ON default: true

D/FastDormancy( 2857): Before mDormFlag: false in getCapaDormancy()

D/FastDormancy( 2857): After mDormFlag: false in getCapaDormancy()

D/FastDormancy( 2857): before ======= ENTER DORMANCY =======

D/FastDormancy( 2857): [FD] ON default: true

D/FastDormancy( 2857): Before mDormFlag: false in getCapaDormancy()

D/FastDormancy( 2857): After mDormFlag: false in getCapaDormancy()

D/FastDormancy( 2857): before ======= ENTER DORMANCY =======

D/FastDormancy( 2857): [FD] ON default: true

D/FastDormancy( 2857): Before mDormFlag: false in getCapaDormancy()

D/FastDormancy( 2857): After mDormFlag: false in getCapaDormancy()

D/FastDormancy( 2857): before ======= ENTER DORMANCY =======

D/FastDormancy( 2857): [FD] ON default: true

D/FastDormancy( 2857): Before mDormFlag: false in getCapaDormancy()

D/FastDormancy( 2857): After mDormFlag: false in getCapaDormancy()

D/FastDormancy( 2857): before ======= ENTER DORMANCY =======

D/FastDormancy( 2857): [FD] ON default: true

D/FastDormancy( 2857): Before mDormFlag: false in getCapaDormancy()

D/FastDormancy( 2857): After mDormFlag: false in getCapaDormancy()

D/FastDormancy( 2857): before ======= ENTER DORMANCY =======

D/FastDormancy( 2857): [FD] ON default: true

D/FastDormancy( 2857): Before mDormFlag: false in getCapaDormancy()

D/FastDormancy( 2857): After mDormFlag: false in getCapaDormancy()

D/FastDormancy( 2857): before ======= ENTER DORMANCY =======

D/FastDormancy( 2857): [FD] ON default: true

D/FastDormancy( 2857): Before mDormFlag: false in getCapaDormancy()

D/FastDormancy( 2857): After mDormFlag: false in getCapaDormancy()
[Galaxy S II Original Android Development] slyydrr:
FastDormancy might not be supported on the Incredible S - it has to be supported on both the device and the network in order for it to return true in getCapaDormancy(). Also, did you by chance have Wifi on when testing the Lebara SIM in your SGS2?

Aside from the frequency at which the FastDormancy polls in KE1 firmware, I haven't really been able to directly tie FastDormancy directly to Android OS CPU time usage.

FastDormancy allows the phone <--> network data connection to going into a hibernation mode to preserve battery life and network congestion it would seem. Even when FastDormancy's getCapaDormancy() returns true on devices on a German network, the Android OS usage is still high.

On a side note, if anyone has any logcat files they can send me that I can dig through, that'd be great. I haven't had any to look at other than my own and I'd like to see what's going on inside our devices.
[Galaxy S II Original Android Development] slyydrr:
Any chance you could give me a full logcat dump? I'm not having much success digging through mine as I'm not experiencing horrific battery life. If you don't mind doing so, PM me and I can provide you with my email address.
[Galaxy S II Original Android Development] dan13l:
How far back does logcat go? I figure it would be handy to compare before and after I turned wifi on to see if there's anything helpful in there. I've proved conclusively today that it's the activation of wifi that starts to cause problems for me.
[Galaxy S II Original Android Development] slyydrr:
I'm not really sure how far back it goes. How familiar are you with adb? If you are, can you do an adb dump to file? I don't have access to test it out right now, but I believe the command you'd use would be something like:

adb shell logcat > filename.txt

There's also a -v modifier that will allow you to change the format of the logcat log messages. Default is brief and I'm not sure if that includes a datetime stamp. I don't know what modifier to use and I can't check from here. You'd need to do something like adb shell logcat -v to see what options you can choose for -v

I can give the exact syntax later tonight when I get a chance.
[Galaxy S II Original Android Development] chukkie:
This works for me.. switching off wireless location services also helped and freezing all the bloat-ware that kept running in the background dramatically reduced my android OS problem.. now get 24 hours with moderate-normal use whereas last week I got 10 hours tops.. I think the trick as with freezing the apps.. maybe these apps are part of the android OS problem and may be totally unrelated to the dormancy thing. dormancy i feel is related to the network.. I'm just deducing all this, no scientific backing lol
[Galaxy S II Original Android Development] dan13l:
@slyydrr - here you go https://www.dropbox.com/s/2gsb9fftyo2phwn/20110517_230840.log

I'm going to go over this myself tomorrow, but I'm too bleary eyed right now.

Basically, during a roughly 30 minute period I toggled wifi on and off, then turned off the screen. I'm hoping that there's a clear difference in the things the phone's doing during the periods with wifi ON in comparison to the thing it's doing with wifi OFF.
[Galaxy S II Original Android Development] ragflan:
I don't think it's just DIR-655 causing this. I have a Netgear WNDR3700 and my Android OS is at 70% usage over 12 hours. I lost 50% battery through the night where my device was mostly untouched. I doubt a router is causing the battery problems. I have a Galaxy S and a HTC Desire at home that don't suffer from the excessive Android OS usage or battery drain.
[Galaxy S II Original Android Development] lgkahn:
same here galaxy ii looses 35-40 percent at night. whiles my galaxy s looses less than 5
[Galaxy S II Original Android Development] ragflan:
One thing I'm confused about. The topic says Fix Android OS Bug, but there's no fix available. Or is there? I'm confused by what we're doing. Are we trying together to identify the cause or have we identified it but don't know how to fix it?

So, basically I'm asking what's the focus of this topic?
[Galaxy S II Original Android Development] slyydrr:
That's what the [THINKTANK] portion is for - it's a conglomeration of thoughts/ideas that are being delved into at a relatively low-level to see if they're possibly a cause.

Thanks for the logcats, those of you that sent 'em. I'll start reading through them and seeing what I can find.
[Galaxy S II Original Android Development] dryspuri:
hey you are not alone buddy, even i get that, what is that!!!:confused:
[Galaxy S II Original Android Development] simonk83:
No idea. Seems a bit intense though.
[Galaxy S II Original Android Development] ssarl:
This is the Java Garbage Collector freeing memory for process 7394. I also get this kind of messages and this could be related to the high CPU usage of Android O/S process since GC is a system process.
[Galaxy S II Original Android Development] Rytkonen:
Can I help somehow? Is it possible to extract those logs with some kind of an app? I have an unlocked SGS2 and I think I don't have that bad battery life, it lasts at least from morning to evening.
[Galaxy S II Original Android Development] dan13l:
I think this has been mentioned before, but it appears that the wifi sleep policy setting doesn't work. I've just left a terminal window pinging my phone's IP, set all the different policy options, and turned the screen off. Wifi continues.

I'm going to try working around this with Tasker. I've added a couple of events to disable wifi when the screen goes off, and enable when it comes back on. Tested with Ping, this is working as I'd expect.

I noticed this morning that with wifi enabled, but with the screen on, the android OS process did not spike. It's only once you turn the screen off that it starts to ramp up.

I'll report back later on, but hopefully this will make an acceptable workaround while we try to get to the bottom of exactly what's causing it.
[Galaxy S II Original Android Development] darkalchemist:
Not sure if this helps but I think wifi might definately be the way to look. Idling in my office, 3G/H draws less power on idle for me atm than the wifi and i have 2 emails pushing. The original SGS had wifi problems at one point which resulted in the need to roll back the wifi driver.
[Galaxy S II Original Android Development] waldzias:
Hi all,

After reading all posts I decided to do little test myself. I've got 3 wireless routers I connect to, 2 of them support N-speeds and one is just normal 54g. When i connect to the N routers my battery drains about 4 times quicker then on the standard one. I've got still Galaxy S which supports N-Draft speeds but there is no issue with it and battery drain is the same. So maybe there is no problem with DIR-655 but with N routers generally? Also it seems that S2 range and wi-fi signal strength is a bit lower then Galaxy S. :(
[Galaxy S II Original Android Development] slyydrr:
Thanks for this man - do you happen to know what process this was for, and do you know the time between each of these logs? If you have access to adb, get root access to the shell:

adb shell su

Your phone might pop up a window asking you to grant root access, accept.

adb shell ps -A > processlist.txt

This should list all the processes running. Now, keep in mind, if you rebooted your phone, the process died and a new copy started etc.. all reasons why the process number might not match. Good news is, you dumped the process list into a file and can start comparing. See which process matches up w/ the ID showing in the logs.

I haven't had a chance to test this myself so the syntax might be off - someone feel free to correct me if this is the case.
[Galaxy S II Original Android Development] dan13l:
That would certain fit with what I'm seeing on the Netgear 3300 I'm using. I can turn off the 5ghz range on mine, not sure if that would help. I've always ruled that out if I'm connected to a 2.4ghz network - why should the presence of a nearby 5ghz network make a difference?

I'm willing to try anything at this stage though.