yashsingh1/xdaforums huggingface dataset:
[Galaxy S II Original Android Development] aurelm:
Ofc. It solved the "Wi-fi sharing" battery drain issue and nothing wrong happened. It did not solve the "Android OS" thing which is the main issue anyway.

I frozened again about 20 more samsung & android apps and services. I hope it will be better but I doubt it. It all will seem ok, I'm gonna make a thread "voila, how I managed to solve the battery drain issue" and in a couple of days it will be back again.

It's like the gps issue on sgs all over again, some preliminary tests, all is ok and then once again it doesn't work. I'm getting tired of this :(
[Galaxy S II Original Android Development] dryspuri:
That thing does not work mate. Try running adb logcat before and after and you will see no difference
[Galaxy S II Original Android Development] nobnut:
Agreed. FD has absolutely nothing to do with the Android OS 'bug', it is a red herring. Fact.
[Galaxy S II Original Android Development] slyydrr:
Which is exactly why over a week ago I updated my first post stating such with some nice big red text stating so. Unfortunately not everyone wants to read it :( Some people like yourself do however know that this is the case, thankfully!
[Galaxy S II Original Android Development] metalboy94:
Wrong place to post, please excuse me.
[Galaxy S II Original Android Development] EarlZ:
About fast dormacy, since I dont use 3G data should I also have this disabled or it wont matter?
[Galaxy S II Original Android Development] pontusbredin:
External_SD

I'd like to add something to the first post in this thread;

Use of an external micro SD card.

In my case using an external SD card will make Android-OS almost on par with display usage after a days use.

If I unmount the external SD card the Android-OS doesn't even show up in battery usage after a days use.

I've only got 3 GB of MP3's on my external SD card (16 GB, brand: A-Data, Class-II I think).

Best regards,

/Pontus
[Galaxy S II Original Android Development] xavierdylan:
I used the SolarFlare S2 v1.0 - Gingerbread 2.3.4 with the XXKG3 2.3.4 Kernel by NeoPhyTe.x360. I appears to not have the Android OS bug.

Dont know what he did right or if its a newer/official version of the KG3 kernel. Bt the Android OS is non existant when i check the battery stats.
[Galaxy S II Original Android Development] endor43:
is the logging just disabled? or are suspend and events/0 actually behaving now?
[Galaxy S II Original Android Development] Vulpix:
What is love, baby don't drain me, don't drain me, no more. :( Using a D-Link DIR-655 router here, but this only happened recently with no change in apps...
[Galaxy S II Original Android Development] AndroidFreud:
Does anyone know if this bug has finally been fixed?

I'm running stock PDA:KF3 / PHONE:KE4 / CSC:KF3 (INU) on my SGS 2 and my battery use shows 'Android OS' as 86% (and it is usually around this amount) all the time.

Anyone know of any permanent solution - preferably stock. But if that is Not possible then the other options. It's driving me bat sh* insane!!

Thanks for any reply.

Cheers,

AndroidFreud.
[Galaxy S II Original Android Development] Lennyuk:
1) Not many people actually have this "bug", it is mainly a myth and misinterpretation of the stats.

2) If you do have this bug then you are on an android 2.3.3 rom, install a 2.3.4 rom or higher and you will be "bug" free (That is the KG series, so newer than you are on)
[Galaxy S II Original Android Development] TheFirstBen:
@lennyuk. I have this bug, and I have it with all the roms I tested since 2.3.4 ! I didn't have it before. I'm currently using villain ROM 3.0 with cf_root 4.2 and baseband ki3. I still get a full day use with average GPS/phone/inet usage so it's not that bad a problem. I only see one msg I don't understand from the logcat that keeps appearing. But please don't say it does not exist. If I keep my phone in Standby it drains. if you don't have it good, but don't say it's a myth !
[Galaxy S II Original Android Development] AndreiLux:
I think I already told you to stop spreading around that BS over a month a go in some other thread. Why are you allowed to spread that around like a fact when having a moderator and developer tag? The bug is not a myth and it's known as to what it is.

The area around 40% into the timeline to the end the phone does not move position or is used. At around the middle, I check the phone for the time. The AOS bug triggers. Android OS in goes from 30 something to 75% battery usage. BatterBatteryStats shows the suspend process skyrocketing in CPU time and you can see the CPU load with Watchdog reporting on usage while the screen is off. It's hogging the CPU at 99%. Towards the end I reboot the phone. Bug disappears. suspend only adds a few seconds over several hours. Android OS usage slowly goes down percent by percent over the hours. I go as low as 0.3% battery usage per hour after that.

As far as fixing it: I have not yet tried KI3 kernels, but I have switched to a combination of SyiahKernel which uses the ATT sources which are newer than update2 but not as new as KI3 stock. In combination with the KI3 modem I've observed that previously the "Android OS" bug consisted of high use of the suspend and events/0 processes, the events/0 process now is only at 20s CPU time over a period of a whole day. suspend is still hogging it at 1h5m for today.

I'm still waiting on Cognition to switch completely to 2.3.5 because I don't have time to jump on another ROM. In any ways, if the disappearance of the events/0 usage is any sign, then Samsung is actually doing something.
[Galaxy S II Original Android Development] mwatson:
I never had the AOS bug..I read about it but never a problem...

Then I upgraded to 2.3.4 via KIES and there it is. I've tried rebooting, doing a factory restore and its still there.

Back to 2.3.3 for me.
[Galaxy S II Original Android Development] Logi_Ca1:
I believe the nightly build #80 of Cyanogenmod has finally fixed the bug. I get like 9m 4s CPU usage in 8 hours of heavy usage since the phone is charged.

Cyanogenmod has matured to the point that I'm probably going to switch to it permanently from now on.
[Galaxy S II Original Android Development] tonycfc:
The bug seems to be ironed out in the latest ROM releases. Sometimes a rogue apk can trigger it, from my experience that is.
[Galaxy S II Original Android Development] winwiz:
Fast dormancy to improve smartphone networking and battery performance

By Mikael Ricknäs

October 19, 2010 07:47 AM ETComments (0)Recommended (4)

IDG News Service - Nokia Siemens Networks and Qualcomm have tested a new standardized feature that will improve smartphone performance while decreasing network congestion, the two companies said Tuesday.

Smartphones are increasingly "always on" with many applications receiving frequent updates and messages. This can cause batteries to drain fast.

The proprietary approach to solving this issue has been to rapidly disconnect from the network once information is sent or received using a feature called fast dormancy, according to Nokia Siemens. But it puts a heavy toll on mobile networks. That's because the constant connections and disconnections increase the amount of signaling traffic, which lowers overall network performance, according to Nokia Siemens.

However, a standardized and improved version of fast dormancy aims to solve this issue by allowing networks and smartphones to talk to each other in a way that takes battery life as well as network congestion into consideration, according to Leslie Shannon, mobile broadband marketing manager at Nokia Siemens Networks.

The interoperability test was done to show that the standardized version of fast dormancy works and that the "dark days" of low battery life and crippling amounts of signaling traffic will soon be over, according to Shannon. The test was conducted using a base station from Nokia Siemens and a smartphone chipset from Qualcomm.

For this to work, both networks and smartphones have to implement the standardized version of the fast dormancy feature. Since solving the underlying issue is in the interest of the whole industry, Shannon expects this to happen soon.

Nokia Siemens' base station software is getting an update this month. Earlier this month, an executive at Research In Motion said that its smartphones will implement the feature by the first quarter of next year.
[Galaxy S II Original Android Development] The_Revenge:
im running KE2 since it came out :)
[Galaxy S II Original Android Development] EleCtrOx666:
Just Flashed KE2, now I have only like 4-5 of these messages.
[Galaxy S II Original Android Development] slyydrr:
You weren't getting them constantly before though, correct? I'll be trying a straight KE2 upgrade tonight to see if that changes anything. If not, I'm going to start digging some more.
[Galaxy S II Original Android Development] EleCtrOx666:
No, never got them constantly. IDK When they come up, I presume at boot.
[Galaxy S II Original Android Development] slyydrr:
I updated to KE2 and still saw the same logging. Did a factory reset after to start clean and I'm still seeing it, but now once ever 5 seconds instead of every second.

05-14 18:49:44.031: DEBUG/FastDormancy(2942): before ======= ENTER DORMANCY =======
05-14 18:49:44.031: DEBUG/FastDormancy(2942): [FD] ON default: true
05-14 18:49:44.031: DEBUG/FastDormancy(2942): Before mDormFlag: false in getCapaDormancy()
05-14 18:49:44.031: DEBUG/FastDormancy(2942): After mDormFlag: false in getCapaDormancy()
05-14 18:49:49.046: DEBUG/FastDormancy(2942): before ======= ENTER DORMANCY =======
05-14 18:49:49.046: DEBUG/FastDormancy(2942): [FD] ON default: true
05-14 18:49:49.046: DEBUG/FastDormancy(2942): Before mDormFlag: false in getCapaDormancy()
05-14 18:49:49.046: DEBUG/FastDormancy(2942): After mDormFlag: false in getCapaDormancy()
05-14 18:49:54.067: DEBUG/FastDormancy(2942): before ======= ENTER DORMANCY =======
05-14 18:49:54.067: DEBUG/FastDormancy(2942): [FD] ON default: true
05-14 18:49:54.067: DEBUG/FastDormancy(2942): Before mDormFlag: false in getCapaDormancy()
05-14 18:49:54.067: DEBUG/FastDormancy(2942): After mDormFlag: false in getCapaDormancy()
05-14 18:49:59.087: DEBUG/FastDormancy(2942): before ======= ENTER DORMANCY =======
05-14 18:49:59.087: DEBUG/FastDormancy(2942): [FD] ON default: true
05-14 18:49:59.087: DEBUG/FastDormancy(2942): Before mDormFlag: false in getCapaDormancy()
05-14 18:49:59.087: DEBUG/FastDormancy(2942): After mDormFlag: false in getCapaDormancy()

The digging will resume soon.
[Galaxy S II Original Android Development] DocRambone:
This bug do not occur in charge mode or with screen lit... so the logcat with cable attached is not valid
[Galaxy S II Original Android Development] slyydrr:
The same results hold true even with the device not connected and the screen off. I pulled the log from aLogcat (from Market) off of the device as well to check this.

Here is a snippet of the logcat file from my phone. Notice the two intents: one to turn the screen off, and one to turn it back on.

D/FastDormancy( 2942): before ======= ENTER DORMANCY =======
D/FastDormancy( 2942): [FD] ON default: true
D/FastDormancy( 2942): Before mDormFlag: false in getCapaDormancy()
D/FastDormancy( 2942): After mDormFlag: false in getCapaDormancy()
D/FastDormancy( 2942): [B][FD] INTENT ACTION android.intent.action.SCREEN_OFF[/B]
D/FastDormancy( 2942): [FD] mIsScreenOn: false
D/FastDormancy( 2942): before ======= ENTER DORMANCY =======
D/FastDormancy( 2942): [FD] ON default: true
D/FastDormancy( 2942): Before mDormFlag: false in getCapaDormancy()
D/FastDormancy( 2942): After mDormFlag: false in getCapaDormancy()
D/FastDormancy( 2942): before ======= ENTER DORMANCY =======
D/FastDormancy( 2942): [FD] ON default: true
D/FastDormancy( 2942): Before mDormFlag: false in getCapaDormancy()
D/FastDormancy( 2942): After mDormFlag: false in getCapaDormancy()
D/FastDormancy( 2942): before ======= ENTER DORMANCY =======
D/FastDormancy( 2942): [FD] ON default: true
D/FastDormancy( 2942): Before mDormFlag: false in getCapaDormancy()
D/FastDormancy( 2942): After mDormFlag: false in getCapaDormancy()
D/FastDormancy( 2942): [B][FD] INTENT ACTION android.intent.action.SCREEN_ON[/B]
D/FastDormancy( 2942): [FD] mIsScreenOn: true
D/FastDormancy( 2942): before ======= ENTER DORMANCY =======
D/FastDormancy( 2942): [FD] ON default: true
D/FastDormancy( 2942): Before mDormFlag: false in getCapaDormancy()
D/FastDormancy( 2942): After mDormFlag: false in getCapaDormancy()
D/FastDormancy( 2942): before ======= ENTER DORMANCY =======
D/FastDormancy( 2942): [FD] ON default: true
D/FastDormancy( 2942): Before mDormFlag: false in getCapaDormancy()
D/FastDormancy( 2942): After mDormFlag: false in getCapaDormancy()
D/FastDormancy( 2942): before ======= ENTER DORMANCY =======
D/FastDormancy( 2942): [FD] ON default: true
D/FastDormancy( 2942): Before mDormFlag: false in getCapaDormancy()
D/FastDormancy( 2942): After mDormFlag: false in getCapaDormancy()
D/FastDormancy( 2942): before ======= ENTER DORMANCY =======
D/FastDormancy( 2942): [FD] ON default: true
D/FastDormancy( 2942): Before mDormFlag: false in getCapaDormancy()
D/FastDormancy( 2942): After mDormFlag: false in getCapaDormancy()
D/FastDormancy( 2942): before ======= ENTER DORMANCY =======
D/FastDormancy( 2942): [FD] ON default: true
D/FastDormancy( 2942): Before mDormFlag: false in getCapaDormancy()
D/FastDormancy( 2942): After mDormFlag: false in getCapaDormancy()

It is worth noting that when the screen was off, it seems the call on getCapaDormancy() occurs less often. The screen was off for at least 1-2 minutes, yet only a couple calls.
[Galaxy S II Original Android Development] DocRambone:
How do you know the logcat logs the correct event with the phone in idle mode?
[Galaxy S II Original Android Development] slyydrr:
Why wouldn't it? I would imagine the exact same line of code is being used to write out the log statement, and is just printing out the return value of getCapaDormancy(). The logging level likely isn't likely to switch from DEBUG to INFO/WARN when the phone enters and idle state either.
[Galaxy S II Original Android Development] mosd:
dont want to be negative my sgs2 comes on monday , but we are not supposed to sit here and do all this thinking and texting. It should work from the start. We should use our brains for something important instead really :(
[Galaxy S II Original Android Development] pulser_g2:
What? You trying to say this is pointless and we should all sit down and ignore niggles?

When my phone arrives, I wanted these minor issues sorted so I started fixing things. That's what we need here. More threads like this. Let's take something good, and make it excellent :)

This is xda developers. If you don't like it, please don't install anything that is modified by people here then
[Galaxy S II Original Android Development] slyydrr:
After re-reading what winwiz posted, I did a little more tinkering and realized that FastDormancy isn't being called at all when the data connection is turned off. FastDormancy is only invoked when there's an existing data connection. (updating first post with this info).

This makes me wonder a couple things:

- Why can't the device enter dormancy?

- Is it network dependent? (I'm on AT&T USA)

Any ideas anyone?
[Galaxy S II Original Android Development] DocRambone:
hmm, thats a thought, i get lots of time without signal even tho there is full coverage... could it be a operator mismatch?
[Galaxy S II Original Android Development] pulser_g2:
Does your provider use national roaming? Just a thought
[Galaxy S II Original Android Development] DocRambone:
Yes, the "Tele 2" uses a Sweden 3g roaming for the 3 g network
[Galaxy S II Original Android Development] pulser_g2:
Anyone here who is not on roaming and seeing this?

Have you told the phone to pick one network and stick on it? It could be getting woken up to check if your present network is stronger or weaker than the alternative...
[Galaxy S II Original Android Development] slyydrr:
I'd like to see what The_Revenge's signal strength is like. I wonder if he loses reception from time to time? I'll try to get his attention :)

If anyone has a way to kill their reception (anyone have a giant cement box that they can walk into? :)), I'd be interested to see what FastDormancy reports.

Again, w/ KE2 it seems that it polls once every 5 seconds vs once every second with KE1, so that's a plus. However, I'm still curious as to what the true purpose of getCapaDormancy() is. Speculating is only going to get me so far unfortunately.

In the meantime, I'm going to watch some TV and I'll be turning off my data connection and seeing what Android OS says after 45 minutes. This might help us to understand if the lack of FastDormancy reporting directly translates to Android OS usage. I'll report back shortly.
[Galaxy S II Original Android Development] DocRambone:
I changed to 2g network, lets see if it make any change
[Galaxy S II Original Android Development] The_Revenge:
Actually.. well, im on o2 germany, and my signal strength here indoors is about 3/4.

most of time the device stands on 3g, and as soon as i start to do anything it switches to HSDPA. i noticed some times when i take it into another room it switches to EDGE sometimes for a few seconds.

(i can actually watch it switch from 3g to hsdpa, its always the same procedure. i start a network request, so the green arrow in the 3g icon blinks one time, and not even one second later its H. also, after closing internet-using apps, it usually takes only a few seconds for the phone to switch back to 3g, but sometimes it takes a while, like 1-2 minutes at longest)

//EDIT: i tested this now about 10 times in a row, and it seems like

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

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

D/FastDormancy( 2822): Before mDormFlag: true in getCapaDormancy()

D/FastDormancy( 2822): After mDormFlag: true in getCapaDormancy()

======= ENTER DORMANCY =======

these lines occur every time it switches back from H to 3G in exact time (and sometimes more, maybe network sync?)

//END EDIT

not sure, the network connection here is.. a bit less than average stable, had a orange san francisco before and it also had some minor connection drops, but in general for me the sgs2 has definitely a more stable and faster network connection here.

if its related in any way, i did a speed test and its about 2000kbps download and 1400kbps upload

if it could help you in any way, it'd be a pleasure for me to upload the whole logcat file :)
[Galaxy S II Original Android Development] beppez82:
Im getting an high very high suspend and event/0 when i use dlink dir-655 wifi router, and it start use 30%more cpu from 2sec after i turn off the phone (same with apps frozed and not frozed).

Instead if i use 3g or hspda only or another wifi router it stay under 5% for all the time with some little peak.

So the incredible huge drain for me is fixed with the change of the router, btw why a router put it to sleep and another one no :confused:

*EDIT*

in wifi it have allways a little data transfer and in hspda 3g no...according to power tutor and system panel monitor.(same with frozen and unfrozed apps)

Thats what i have figured strange.
[Galaxy S II Original Android Development] DocRambone:
Lol, with phone in flight mode the drain stops...
[Galaxy S II Original Android Development] Nuhvok:
Quote from the general Android OS batteryproblems thread:

Can someone try this? Would be great if this is the solution.
[Galaxy S II Original Android Development] slyydrr:
I never check the box to allow private data to be sent to google, but in regards to the other option. Is that the top option or the bottom one? Does anyone know short of me doing another factory reset to find out?

Also, for what it's worth - with the data connection turned off completely, over nearly a 2 hours period of no real phone usage, the Android OS is sitting at 13% with just over 2.5 minutes of CPU time consumed. Before I was noticing approximately 5-10 minutes of CPU time per hour. It seems that the Android OS drain might be tied to this as suspected. This also would likely explain why Boosted_RS20 (I think that's his username) has better battery life as he always have Wifi on, because most of the data communication can occur through wifi instead of the data network.

Again, I'm still just speculating, but there is some trial and error behind it. I'll continue to report more as I test various scenarios.
[Galaxy S II Original Android Development] slyydrr:
I appreciate the offer of the logcat file. I wouldn't mind taking a look at it although I'm not sure what, if anything, I'll be able to find. Also, I'd suggest not uploading it directly here and in addition doing a scan of it yourself first to make sure there's nothing personal in it that you wouldn't want anyone to see. :)

I'm still curious why your getCapaDormancy() method returns true and allows the device to enter dormancy. That's the main thing I'd really like to find an answer to.
[Galaxy S II Original Android Development] The_Revenge:
yeah thats like the big question.. hmm, do you have a constant h/h+ connection? or do you face something similar to my 3g/h behaviour? maybe its the network not supporting FastDormancy? tbh, i think it should support it, since else almost every device would get that, but i think that the getCapaDormancy function just checks if the network is capable of FastDormancy.. :s

i'll scan my logfile now, shouldnt be that much since i did not much in the last hours except for playing one game :) i will send you a PM when im done
[Galaxy S II Original Android Development] slyydrr:
I have the same thing with my connection, but not as regularly. However, whenever I'm sitting at 3G and I make a data request to the market, internet, etc., it will switch to H+ if it can.

That's a very good point though - I wonder if the connection that is established with the carrier determines whether or not the getCapaDormancy() returns true or false. Do have any other German friends on your network that have an SGS2 and might be able to help confirm/deny?
[Galaxy S II Original Android Development] The_Revenge:
well, since the SGS2 is not sold here in germany officially, i do not know any other person in my area who has it.

i actually have 2 other SIM-Cards from T-Mobile germany, could test what happens with them..
[Galaxy S II Original Android Development] slyydrr:
It wouldn't hurt, but assuming your main SIM card is also with TMo Germany, I'd expect things to look the same.
[Galaxy S II Original Android Development] The_Revenge:
is there actually an option in settings to do it afterwards? or would that stop google to sync with my phone.

@slyydrr

nope, my main SIM is O2.

well, i tried with both T-Mobile cards, and the results are all the same, getCapaDormancy always returning true here...

but right, we could need more people in general to check their logcats, only a few reported here and it seems like im the only one posting here on wich the function works as it should...