yashsingh1/xdaforums huggingface dataset:
[Galaxy S II General] Entropy512:
They're related somehow to the system_server process.

I never looked more closely, since if you look at their sleep_time, while the count is high, the amount of sleep_time used was only about 0.1 seconds
[Galaxy S II General] Ospreylian:
No idea if it's of any use but Extended Controls gave me a huge battery drain on the OS, that's using SpeedMod s12 and LeoCheck Rom.
[Galaxy S II General] lokhor:
Do you mean the quick settings in the notification bar? I'm using the extended ones of those and have quite a high Android OS usage on Checkrom Revolution :/
[Galaxy S II General] luizlee86:
I think he means the widget called "Extended controls".
[Galaxy S II General] boggie81:
From the screenshots below, is it considered normal? Running were push services (Gmail, Yahoo), Yahoo messenger. Wi-Fi on, as well as data.
[Galaxy S II General] Seylox:
might be, although 8mins for suspend does seem a little bit much for me. i don't know how much the messenger consumes of that, the push services and data shouldn't consume more than 0.3% in 1h. at least for me now. Android OS does seem high too.
[Galaxy S II General] Harsha Raj:
Are u two talking about screen shots I posted here?
[Galaxy S II General] AndreiLux:
I don't think Yahoo uses C2DM, but I'm not sure. Use Trillian to connect to Yahoo.
[Galaxy S II General] RandomPlayer:
Hi

I just bought this phone (galaxy s2) and updated it with kies right away from android 2.3.3 to android 2.3.5 build number XWKI8. I think I have severe aos bug, can you tell me what I should analyze from the attached screenshots? Sorry I haven't wakelock log file this time. The phone is atm quite useless when it didn't make even 1 day when idling. I'll try to test it with different sync setups and completely without syncs in the coming days and see what happens to battery consumption. But I think its not the way I want to use a smartphone, without syncs. Is this battery issue completely software issue or is it possible that there is some kind of problem in hardware?

screens: 1. http://imageshack.us/photo/my-images/526/batterystats311011.jpg/

2. http://imageshack.us/photo/my-images/840/batterystats2311011.jpg/

3. http://imageshack.us/photo/my-images/252/batterystats3311011.jpg/

and 4. http://imageshack.us/photo/my-images/706/batterystats4311011.jpg/

---------- Post added at 10:17 PM ---------- Previous post was at 09:18 PM ----------

By the way found this from oxygen roms bug tracker. Maybe you guys find something useful from the conversation

http://bugs.oxygen.im/index.php?do=details&task_id=52
[Galaxy S II General] AndreiLux:
I don't know what could cause your problem. You should monitor your dmesg logs. Without that or the wakelocks file it's like poking in the dark as we've seen before...

As for that Oxygen thread, it's not helping. They squander talk **** about this thread while not adding anything worthwhile. They're blaming us on having a chicken and the egg problem, while that's not even the point of it. I'm not here to dig into the root of the problems else I'd have done it months ago. I regret I don't have the time or low level device programming experience to just dive into the source code matrix style and show you where the flaws are at.

And they're blaming it on Bluetooth, which is equivalent of blaming it on the fairy godmother.

Anyway. Here's more interesting stats.

​

Pretty average "light" usage for me. 1h30 screen on time at time of the screenshot. That big drop is when I was browsing for 30 minutes or so. I rebooted several times over the whole period and even flashed kernels and so on. Also the screen-on graph isn't fine grained enough to show the smaller screen-on periods at such periods, so don't think I just didn't touch my phone in those black areas.

But anyway: that stairy drop at the end is what pisses me off. What happened at the end there is I was getting a load of data packet wakeups and for the love of god I just couldn't find out what it was. It ate away 10% battery in a couple of hours where as you see in the previous time 10% lasts me 24 hours. I didn't add or change anything application wise. It's plain retarded and without doing a network capture it's impossible to find out what it is.

Also, sec-battery-monitor is still the regular numero uno wakeup cause, and the funny thing is, is that's I can't see any damn pattern in it. Since we now got time stamps in our dmesg logs, it's easier to see. Sometimes it fires 2 wakelocks within a minute, sometimes 5 minute interval, sometimes goes as long as 15 minutes without doing anything.
[Galaxy S II General] RandomPlayer:
I'm new with this stuff so can you say if this the right way to do this log stuff.

1. I recharge my phone 2. unplug the cable 3. restart phone 4. keep the phone idling, lets say 5 hours (how long is enough?) 5. after that period I run these commands in terminal emulator: cat /proc/wakelocks > /sdcard/wakelocks.csv and dmesg > /sdcard/dmesg.txt 6. Then I try to analyze what it all means what's inside these logs?
[Galaxy S II General] Molitro:
Andrei, I still can't understand how the hell do you get that with the 1650 mAh battery.
[Galaxy S II General] olavjunior:
How do you reset the wakelock counter? Powermanager is reading 47166299626564 (ms?) total time in my file. :S

My battery life is horrible, I've got the 2000 mA battery, and it lasts one day
[Galaxy S II General] RandomPlayer:
I have the normal battery but it didn't last even one day so I'm quite desperate with this phone. Can't even imagine how somebody gets those 3 days what you can see from above screenshot. I get new 2000 mA battery in xmas. Till then should figure out how to get this phone last even that one day with moderate use. The problem for me is quite obviously battery drain when idling, not when using it.
[Galaxy S II General] olavjunior:
Not quite an answer to my question, but yes - I've had the same issues as you, but never bothered to look into it until now.

But now I've

-disabled/removed exchange sync/push (is exchange the "wrong kind" of sync?)

-disabled automatic updates for Pulse, Engadget,

-disabled google talk notifications and logged out (never uses it)

-disabled facebook messenger

-disabled Tasker gps-based locations

-disabled battery status app notification

-disabled Samsung powersaver mode

-I've left gmail push and google+ as they are (for now), but

-google+ automatic upload only on wifi

-disabled Latitude

-disabled noLed

-disabled Sweet Home

So, it'll be exiting to see the results. But I have no high hopes what so ever. I've had this phone to long, and know how it's behaving. Must be a system process.
[Galaxy S II General] Entropy512:
Reboot.

total_time is irrelevant - it's sleep_time that matters

---------- Post added at 10:39 AM ---------- Previous post was at 09:57 AM ----------

As to not being here to dig into the root of problems - you say that, but in the end, that's not what you've done. You found your root cause (Skype).

And they chastise us for ignoring wakeup interrupts - you know what? The easiest way to find wakeup interrupts is looking at wake_count in /proc/wakelocks. I need to look more closely at /proc/interrupts, but if they're looking at Bluetooth, clearly /proc/interrupts is misleading them. I tell people to pull wakelocks because wake_count is a ****-ton easier than interpreting where the wakeup interrupts in dmesg are routed. (I have, however, confirmed that INT2 = 0x20 is consistent with a WLAN wakeup, that's where the WLAN chip's GPIO interrupt line is routed.)

It might be possible for a wakeup interrupt to occur that doesn't cause a wakelock that has its wake_count bumped up, but I sure as hell have never seen it.

Then they call us idiots when apparently based on the later posts, some people have had their drain fixed by my fuel_alerted fix. (I'm still surprised how often that was apparently hitting people.)

BTW, I'm attacking "accelerate to wait" now, unsuccessful so far. I keep on SoDing, there's more to the issue than just voltage I think, or I'm missing some regulator hits. (I've set it to allow frequency transitions after PM_SUSPEND_PREPARE but not allow voltage transitions, and the voltage is locked to support 800 MHz or the highest policy frequency prior to PM_SUSPEND_PREPARE.)
[Galaxy S II General] BigMrB:
7hours 4 mins - battery 72%

Android OS 70%

Display 15 %

android system 4%

Dialer 3%

Cell Standby 3%

summary - Love the phone, hate the bug ... please hurry up ICS with bug fixes :D
[Galaxy S II General] nickbarbs:
Suggestion.

Hi guys.

I would really recommend those of you having problems flash the Rom XWKI4 stock, using stock kernel (after rooting)

it's android 2.3.4

I find the battery life to be incredible and I am flashing this on all my friends and coworker's SGS2's in London.

Feedback is constantly -> You fixed my battery life thank you.

So, take it for what its worth. But I get very good battery life - Check it out.

Nicholas
[Galaxy S II General] RandomPlayer:
http://bugs.oxygen.im/index.php?do=details&task_id=52

the guys are tentatively reporting that it looks like battery drain issue is cured on AOSP oxygen rom... are you really sure that it's bs what they are doing? no offense I don't understand these issues just curious.

Kingfisher asked: "Just for the records - what were the difference in the most recent source?"

Adams reply: "There was an issue with the battery driver with a wakelock not being released however I considered it quite minor and never thought it was related to the draining issue."

ofcourse those results was just preliminary but give some hope that maybe someone finds what cause that damn battery drain...
[Galaxy S II General] furyau:
CyanogenMOD (Android 2.3.5) fixes this in all the newer nightlies.

Im using #99 atm, and its rock solid.
[Galaxy S II General] RandomPlayer:
Now I managed to get dmesg log and wakelocks log. Any help from more experienced guys who knows how to read them? Only thing I understand is that there is 1030 wake_count in sec-battery-monitor... can you tell anything whats going on my phone (draining battery)?
[Galaxy S II General] Entropy512:
That is one of many different battery drain issues - and I'm the one that identified and fixed that bug. Despite them claiming this thread is "useless", they wouldn't have that fuel_alerted wakelock fix without this thread.

Most other people that have had drain can trace it to data usage by an app - in Andrei's case the culprit was Skype.

---------- Post added at 06:21 PM ---------- Previous post was at 06:16 PM ----------

How much time was the phone running/idling?

To me that looks fairly normal - the phone was waking for battery monitor polling, that count is higher than I'm used to, but I think you had the phone running for quite a while.

svnet-dormancy is fairly high at 108 minutes total time holding wakelocks - this could be a sign that something is driving a decent amount of data. However, 36 minutes of svnet wakelock time (this is basic radio management) says to me that your device was just running for a very long time.

What was your deep sleep percentage? (usual rule - reset timers when unplugging)
[Galaxy S II General] AndreiLux:
Well yes, maybe I've expressed myself badly there. But Skype itself isn't the sole problem, like I posted on the page before, weird traffic still happens. What we've managed to do it narrow it down to it being a technical limitation/design flaw rather than a bug and actually prove that the AOS usage was real.

Thank you again for that fix, even if was complete luck we even stumbled upon that problem. That one time were I reported it was also the only time I encountered it while monitoring the device. Funny now that now in the Oxygen thread they claim that that was the cause of high AOS%, which is ... lol.

And the issue with my Skype was of some other origin; the rogue packets I was receiving were coming from my desktop computer, they clients were trying to sync message history or something and consistently failed to do so, so it might not be nearly as bad for other users as it was for me. Keeping a separate account on the phone should theoretically alleviate such issues, but I haven't come around to test it yet.
[Galaxy S II General] RandomPlayer:
Phone ran 12h40min and there was still 52% battery left.

deep sleep percentage was 77%.

I resetted cpu spy when I unplugged the phone. And I restarted the phone after charged and unplugged (doesn't that reset those dmesg and wakelock logs?)

I have my google account (calendar, contacts, gmail) syncing and in that samsungs email client is one email that refreshes hourly. That samsungs facebook app refreshes only once a day. Beautiful widgets updates forecast every 4 hours. Also had that accuweather updating every 6 hours and from settings -> privacy was back up my data, but these two I just took away. And now I'm testing will it help if turn fast dormancy off.

Thanks for your help I appreciate it really!
[Galaxy S II General] Entropy512:
Yeah.

I tried to battle "accelerate to wait" last night - I think there's more to SoDs away from 800 MHz than voltage - I worked on a patch that locked voltage to be high enough to support 800 and then not touch the regulators (Bad Things would happen if calling the regulator routines after the I2C bus went away) but still permit the PLLs to change...

It would come out of sleep maybe 4/5 of the time... So there's something there that can still die even if the voltage is always high enough to support the desired clock.

I did notice it dropping to 200 MHz - so clearly the device is spending a lot of time at idle, OR the "spinning" is considered to be "nice" load - I need to retest with ignore_nice_load set to 0 in my governor. Unfortunately I'm going out for the rest of this evening and all of tomorrow evening, so won't get to poke at this again for a while. If ignore_nice_load changes the results significantly, it would indicate we may have something looping incessantly while it waits - and fixing this would allow us to stay at 800 MHz but hit deepidle states.

One other thing I need to poke at is the lack of a cpu.awake entry in power_profile.xml - who knows whether or not that is skewing the results in any way.

---------- Post added at 07:58 PM ---------- Previous post was at 07:02 PM ----------

Hah, they now say it won't be fixed until ICS drops in that other link.

AdamG seems to be sensible, but Thalamus - he's an ass. He trashes this thread, and when his smack talk is responded to with actual data, he has the discussion closed. Then he continues ranting about interrupts, claiming that interrupts while awake are responsible for AOS drain issues.

Yeah, interrupt spam CAN bog down a device and drive up power usage - but has absolutely no evidence to support this as the cause of the issue here. I've seen it many times before and I know what it looks like, this isn't it.

He accuses me of spending too much time talking and writing code - but what does he have to show for it? Has he traced down root cause for anyone? Has he identified a reproducible test case? Has he, in the process of investigating, discovered an unrelated bug and authored a kernel patch to fix it? In this case - no. That IPC_HOST_WAKEUP interrupt he loves to talk about? It's just a catchall for anything that wakes the host, kind of like PowerManagerService is a catchall for userland wakelocks. He can stare at it all he likes and he's not going to find root cause. In fact, I just confirmed that WLAN wakeup interrupts will cause the IPC_HOST_WAKEUP interrupt count to start climbing rapidly in a pingdrain test. I bet if the guy he asked for a /proc/interrupts dump from had provided a /proc/wakelocks dump, we'd see exactly what was driving the wakeups, just like we have for everyone else who has posted /proc/wakelocks.
[Galaxy S II General] yhrn:
Hi,

Did anybody have a look at my wakelocks in post #371?

Anyways, I'm now sure that part of my problem was my router. I just replaced my D-Link DIR-655 (it was starting to become unstable anyway) with an Asus RT-N56U and all of a sudden I have similar drain on WiFi as on 3g. Maybe even a little bit better, but I'll have to look into that more. Not fantastic idle drain though; between 1% and 2% an hour.

At the office we have a DIR-655 as well and there I still get the nasty drain.

@Entropy512: Would it be useful for you if I did the same thing as in post #371 but connected to the new router? If so then I'll try to do that in the next few days.

Cheers
[Galaxy S II General] rastik:
Calendar sync

I've had a pretty bad battery life so I went to check wakelocks. Majority of them was from svnet and svnet-dormancy. So it must be a network/data issue in my case. Running tcpdump I've seen a lot of traffic to my Exchange server. I had push sync of email/contacts/calendar enabled. But even with push, it should be quiet unless I get a new message or the push wait expires (not sure about Android implementation, but on WinMo it used to be 10-15 minutes). When I disabled calendar sync the communication immediately dropped.

So now I get a much better battery life. I still have push sync of email and contacts with Exchange and do calendar sync manually once in a while. Does it apply to any of you out there having battery drain issue?
[Galaxy S II General] AndreiLux:
Your wakelocks file is completely inconsistent with Wifi use, it shows svnet activity, and weirdly enough a lot of deleted wakelocks activity, and a ****load of time on sec-battery, amounting to about 3 hours of wakelocks. Your screenshots of CPUSpy though say 2 hours awake... On top of that your dmesg log has an awake time of 113 hours so you didn't reboot the phone in a while, but in it it shows that most of the wakeups were indeed wlan_wakeup's. If changing router fixed it for you then I really want to know what kind of traffic was going on there.
[Galaxy S II General] yhrn:
That is really weird. I know for sure that I rebooted the phone after full charge, before I left it with wifi on for the night.

As for the network traffic I don't know what it could have been. No PC:s were running during the night. The only thing that should have been on is an old NAS (DNS-323) with some basic servers (DLNA, NFS, SMB). Possibly my girfriend's fruit-phone was connected as well but that should be it.
[Galaxy S II General] AndreiLux:
Nevermind about the 113 hours, it was 113 minutes. I haven't slept in a long while....
[Galaxy S II General] BigMrB:
When you say fixes... As in 2.3.5 build has been bug fixed or CyanogenMOD actually fixed it? What did they actually fix do you know?

I'm curious.... I was gonna leave this phone stock but I will prob end up rooting
[Galaxy S II General] morg01:
Just to add my 10 pence worth.

A friend has an S2, stock, not played with at all, to be fair he's not a heavy user but his battery stats are 2days and still at 40% charge, even though his Android os usage was up at 43%.

Where as I'm lucky to get a day out of mine, but I have a different stock rom and modded kernel (Speedmod), I have three pop email accounts syncing every hour and push gmail and twitter and FB syncs (which according to some of the posts shouldn't be an issue).

Anyway my thought was, could this issue be down to flashing? by that I mean as an ex HD2 owner there was a utility to properly format nand before flashing new firmware, could a utility such as this help with new / clean installs?

edit: has anybody given this a try

http://xdaforums.com/showpost.php?p=17364606&postcount=1

seems that the standard email client has a bug which drains battery
[Galaxy S II General] Entropy512:
Newer CM releases (at least for AT&T devices...) have my fix for fuel_alerted in them (I linked atinm to the commit on github). Not sure about I9100.

Other than that I have not seen anything in teamhacksung's github that affects this, unless there's some change in the update3 kernel sources. Last I checked there was nothing obvious - but Andrei seems to think update3 has been beneficial for him.
[Galaxy S II General] AndreiLux:
Siyah has had your fix for some versions now. I'm not aware of any other kernel having it on the stock Samsung side. (*SpeedMod has it too)

I don't know if it's update3, a fix of the network traffic, or a combination of both, but I'm now at 127 hours uptime with 2 hours screen on, calls, messages, and all the other shenanigans, and have 33% battery left. Other than weird network traffic 2 days ago, it's running fine now.
[Galaxy S II General] RandomPlayer:
I think I found the cause of my battery drain. I got this phone a week ago and installed straight away all apps with appbrain what I had in my htc desire. And well there was "skype" program called viber. I don't know why I didn't recall that when you guys were talking about skype. Maybe it was that there was nowhere clear leads to that program eating battery and doing wakelocks (was it masked behind that aos in battery usage stats?). Anyway now the phone has ran about 10h30min and I have lost only 13-14% of my battery in that time. :o still the aos is the biggest battery consumer in stats but at least battery isn't draining super fast anymore.
[Galaxy S II General] olavjunior:
Can anybody help me telling what's going on here?
[Galaxy S II General] Entropy512:
Helps if you divide sleep_time by 60e9 to get the minutes...

But svnet-dormancy (cell data) is your #1 item holding the device awake, #2 (at around 2/3 of the sleep_time) is userland wakelocks - on I9100 ROMs, all userland wakelocks get lumped into PowerManagerService - you need BBS to identify what is cranking this one up. I777 ROMs are a bit better, each userland wakelock appears independently in /proc/wakelocks.

(I just confirmed - it's a ROM thing that causes this difference, I'm running SensatioN by Crysis21 for a day or two in order to develop a porting guide and I can no longer easily see userland wakelocks..)

Looks like you've been running for quite some time, with sec-battery-monitor at 1079 wakeups
[Galaxy S II General] lokhor:
So how do we see svnet dormancy on i9100 roms?
[Galaxy S II General] s2d4:
This is good news, would be awesome to just dump the wakelock.txt rather than having other monitoring services eating up extra resources (minimal or not as it would be completely redundant then).. once again, thanks for all your research and experiments..
[Galaxy S II General] olavjunior:
Thanks! What's the unity for the time since if you divide it by 60e9 you get seconds?? I thought it was milliseconds at first - blew me off.

BBS is showing that spotify and mediaserver is causing some of the user wakelocks now (didn't dump that yesterday). But that's nothing to the events/0 and the suspend which counts for something like 95-99 % of the wakelocks i guess. I'm on 2.3.5 original unrooted rom.

About cell data, nothing to do about that when I'm not on WiFi, is there? Maybe it's Tasker which is cheking on locations?

I'd been running for about 9 hours only. 50 % left of the 2000mA battery. Not very good as I'd had light use. I'm not sure if the stats got reset when I pulled the battery in the morning after a full charge?
[Galaxy S II General] yhrn:
It's nanoseconds. And by dividing it by 60e9 you get minutes.
[Galaxy S II General] Molitro:
I'm going to give it a try. This email thing is a friggin' war. Is there no email app that works properly? Damn...

The stock samsung one more or less works when you don't use push, but if I want to have an account with manual sync, it just doesn't sync at all, no matter what I do.

Edit: Doesn't sync in my phone.
[Galaxy S II General] :
Keep us informed. On timed sync I'm still getting some wake locks from Samsung email app.. But I like it anyway :)
[Galaxy S II General] Entropy512:
svnet-dormancy is a kernel-level wakelock - ROM won't change how that's displayed.

It's userland wakelocks that are different.

I777 ROM users can look in /proc/wakelocks and get EVERYTHING

I9100 ROM users get the kernel locks from /proc/wakelocks, and if PowerManagerService is high on the list, they need to use BBS to "break apart" the PowerManagerService "lump"