yashsingh1/xdaforums huggingface dataset:
[AT&T Samsung Galaxy S II SGH-I777] Jonnyredcorn:
I can confirm draw something destroys battery. My girlfriend made me install it to play with her and it killed both our batteries(she has a gs2 epic 4g touch w/ sprint) I freeze it with titanium backup and defrost it when I want to play.
[AT&T Samsung Galaxy S II SGH-I777] gsrrr:
Anyone know exactly how the push notifications work on our phones for exchange? I want to see if there is a difference in battery usage between setting it to push or sync every X minutes.

I am wondering if under push, the phone stays asleep and the server will send emails as they arrive, waking up the phone. Or if it wakes up on it's own to listen for the "heartbeat"?
[AT&T Samsung Galaxy S II SGH-I777] Entropy512:
No, other than Exchange push is frequently broken and drains battery... The server apparently has to be configured *just right* or it'll kill your battery.
[AT&T Samsung Galaxy S II SGH-I777] godefroi:
Yes, Microsoft has it explained quite clearly: http://technet.microsoft.com/en-us/library/aa997252.aspx

Essentially, the client issues an HTTP request, and the server doesn't respond until either something happens (like incoming mail), or the timeout expires (which I think starts at 15 minutes, but I could be wrong). If the server never responds, the client assumes that something timed out in between (firewalls, proxy servers, etc) and shortens the timeout by half. It then reissues the request. It continues doing this (issue, wait, shorten) until it gets a response. It will then begin to lengthen the timeout until it finds the maximum value that works.

Whenever the phone and server are in "wait" mode, there is no communication, and therefore, the phone stays asleep. The longer that the phone can stay in "wait" mode, the better your battery life. If you're getting emails often, then there won't be as much time in "wait" mode, and you're better off doing periodic syncs instead of DirectPush, because it'll do all your email in one big chunk instead of waking the phone every few minutes (but then you don't get your email immediately...). If you get email rarely, and everything is configured for long timeouts, then DirectPush is great. I've seen DP connections idle on my firewall for >40 minutes, so I know the timeout can be at least that high.
[AT&T Samsung Galaxy S II SGH-I777] mrozowjj:
I'm having the Android IOS problem. Last night before I went to bed it accounted for 83% of the battery usage.

I'm running the thing stock, I haven't rooted it, up until recently I haven't felt a need to. If this battery drain problem continues I might have to root it and install a custom rom if that would even help.

Android version 2.3.6

Baseband version I777UCKK6

Kernel Version 2.6.35.7

Buildnumber Gingerbread.UCKK6

CPU Spy gave me this info

1200 Mhz0:05:10 1%

1000 Mhz 0:02:51 0%

800 Mhz 0:13:15 3%

500 Mhz 0:20:07 5%

200 Mhz 0:45:39 12%

Deep Sleep 4:39:49 76%

I have BBS installed but I have no idea what I'm looking at when I open it or what I'm supposed to do.

I removed Words with Friends, Skype, etc a few months ago. I don't know what going on and it's frustrating.
[AT&T Samsung Galaxy S II SGH-I777] alacrify:
Do some reading in the thread - CPU spy isn't going to give you any detail that you need (unless it's not deep sleeping, which it is). BBS isn't that hard to read - look at what's taking up the time, search on it, and you'll get information on what might be causing it (or it might just have a name that makes you go "oh, my email is doing it!"). For further digging, you might have to use Wireshark to get more information and post that here for someone to look at. You'll find info on that in the thread too.
[AT&T Samsung Galaxy S II SGH-I777] mrozowjj:
The time on what? I can't seem to see any time displayed.
[AT&T Samsung Galaxy S II SGH-I777] alacrify:
All of the BBS categories show time used by the process listed - some show a percentage as well. Things in (for instance) partial wakelocks that are taking more than 5% or so are too high, and are probably draining the battery.

Seriously, do some reading, starting with the OP and looking in particular for other posts by Entropy - he explains things VERY clearly.
[AT&T Samsung Galaxy S II SGH-I777] mrozowjj:
I did do some reading. I read the op. the only thing it mentioned about BBS is that I should install it. Didn't say how to use it. The thread I found the APK file from didn't even say how to use it.
[AT&T Samsung Galaxy S II SGH-I777] alacrify:
It's got a really nice help system inside the program. And if you got the APK from a thread, you're probably not using the real or right version - you should install from the Play Store (I think it costs a little, but it's worth it). If he released a free version for XDA, I wasn't aware of it, so I dunno about that part.
[AT&T Samsung Galaxy S II SGH-I777] Entropy512:
It is available for free on XDA.
[AT&T Samsung Galaxy S II SGH-I777] alacrify:
Thanks, I wasn't sure.
[AT&T Samsung Galaxy S II SGH-I777] Jonnyredcorn:
My girlfriend is having awful battery life on her epic 4g touch. She's running cm9 and getting about ~4% /hr idle drain. CPU spy is showing 20% @ 200mhz. The following are pics from bbs.
[AT&T Samsung Galaxy S II SGH-I777] Entropy512:
Out of how much time are those?

deleted_wake_locks can be created if you have a lot of wifi wakelocks then turn off wifi
[AT&T Samsung Galaxy S II SGH-I777] Jonnyredcorn:
~5 hours, we were at work during that time . I'll charge to 100% tonight and post again after a proper test...but that's basically been the story for the past week or so.

EDIT: So I took the phone off the charger after a reboot and let it sit for 45 minutes. I lost 3% and deep sleep was at 82%(yes I reset after taking off the charger). Its running cm9 with stock cm9 kernel. Syncing Google and wifi set to sleep when the screens off(I don't believe that the wifi actually turns off though, I have the same bug with AOKP it seems).
[AT&T Samsung Galaxy S II SGH-I777] mzaur:
Entropy can you please take a look at my log? Not sure if my drain is normal. I'm running AOKP with CM9 kernel.

4 hours since charge, and I have 12m of deleted_wake_locks, 10m of PowerManagerService, and a bunch of event-2003. I also have Partial Wakelocks from MMS Connectivity (4m). Any advice would be appreciated
[AT&T Samsung Galaxy S II SGH-I777] mzaur:
Would these by caused by an app or something else?
[AT&T Samsung Galaxy S II SGH-I777] chamonix:
You reading shows :

- bad network connectivity (gprs data stalls)

- a pretty impressive number of accounts doing sync (is there a Google service you don't use?) and an overhead caused by SyncLoopWakeLock trying to sync all those. It's hard to say if that is related to the bad coverage or to an overloaded cloud service but you should check if you need all accounts and if the frequency for synchronization is maybe not optimal
[AT&T Samsung Galaxy S II SGH-I777] mzaur:
Thanks for your response. Is -89 dBm 12 asu a weak signal?

I only have one google account which syncs email, calendar, contacts, and music. Not sure why that's causing overhead? :/

I did try to setup 30 minute sync frequency in AOKP rom settings, but I guess that wasn't working. I got Easy Battery Saver app to take care of that. Hopefully that will help :)
[AT&T Samsung Galaxy S II SGH-I777] mzaur:
Hi guys,

I have been trying to narrow down the issue.. I froze Facebook and Sugarsync, disabled Google backup, and got Easy Battery Saver which only syncs every 30minutes. Battery life was quite good recently... but I left WiFi on last night (not intentionally, wifi sleep policy just doesn't work on this rom/kernel), and got some really bad drain.

I'm not sure how to identify what is causing it. Is it a ROM/kernel issue? (AOKP 4/11 build on CM9 3.0.27) or a rogue app or something else? I was running My Data Manager to try to pinpoint what apps use data. It has OS Services at 45%, then Go SMS, maps, google services framework, gmail.

I attached my BBS log. Any advice would be greatly appreciated!
[AT&T Samsung Galaxy S II SGH-I777] Entropy512:
Very high deleted_wake_locks - did you have wifi on before and turn it off before the dump?
[AT&T Samsung Galaxy S II SGH-I777] mzaur:
thanks for taking a look. yes I might have turned it off before the dump... should I do it again with wifi on?
[AT&T Samsung Galaxy S II SGH-I777] jasvncnt1:
I always have high battery drain when I use wifi...no matter what ROM im on. So I just assume its something with my router. Thats why I really dont use wifi much.
[AT&T Samsung Galaxy S II SGH-I777] mzaur:
Yeah I agree, and I didn't mean to leave wifi on, but look at that drain! that's definitely not normal.. It was like a 40% drain over 6.5 hours. I just want to know what's happening and how to get rid of it
[AT&T Samsung Galaxy S II SGH-I777] AJ Newkirk:
Something doesn't seem right. I never turn my wifi off but I get less than 1% per hour idle battery drain.
[AT&T Samsung Galaxy S II SGH-I777] alacrify:
If you're on a win 7 network, I have a post somewhere in here with a bunch of unnecessary stuff I turned off that reduced my drain from 5%+ to <1% an hour...I can dig it up if you're on a non-search connection...
[AT&T Samsung Galaxy S II SGH-I777] jasvncnt1:
i know...can never figure out how some of you leave your wifi on all the time..im jealous :D
[AT&T Samsung Galaxy S II SGH-I777] mzaur:
Really? I will take a look, thanks. I found the post you're referring to..

To be honest I am surprised that this could be the cause. I was assuming that it was either an issue with either ROM/Kernel or some pos rogue service.

I bought JuiceDefender Ultimate to auto disable wifi. AOKP/ICS wifi sleep policy doesn't work for some reason and neither does Easy Batter Saver (free app). JD seems to work though. This might be an OK fix, but doesn't get rid of the actual problem. I am hoping Entropy can weigh in on his thoughts about my BBS log when he has time.
[AT&T Samsung Galaxy S II SGH-I777] alacrify:
I was surprised too (especially by things like Windows Media constantly trying to broadcast when I don't use it) but I used Wireshark to get who was calling and then tracked them down.
[AT&T Samsung Galaxy S II SGH-I777] geomax45:
I just use the Sonos system to pipe music around my house. I also have high wifi drain. I ran Shark For Root and saw an entry for Sonos every other line. I admit I can't read that stuff, but it looked like Sonos is constantly broadcasting. I can't turn it off, since I use it every day, so I keep my phone wifi use controlled.
[AT&T Samsung Galaxy S II SGH-I777] alacrify:
Considering what it costs, you might see if the Sonos software would let you exclude the phone (i.e. whitelist or blacklist IPs to send to) - if it's truly broadcasting through the router, you could see if the router could be set to filter those from going to the phone - my current router firmware won't do that, but I'm thinking of going to dd-wrt which should let me pick which packets to allow through.
[AT&T Samsung Galaxy S II SGH-I777] chamonix:
This log tells me that MdmDataReporter is waking up our phone every 15 seconds (1600 times in 6 1/2 hours). I'd say there is no need to look at the rest, that kind of activity and the related overhead is killing your battery
[AT&T Samsung Galaxy S II SGH-I777] mzaur:
Thank you chamonix. It's ironic that the data reporter app I downloaded to monitor wakelocks is the cause of more wakelocks, LOL.

Does this explain all the kernel wakelocks as well? MdmDataReporter had 12 minutes, but "deleted_wake_locks" and all those events account for much more time.

"deleted_wake_locks" (): 3 h 47 m 38 s (13658 s) Cnt:(c/wc/ec)58202/0/8266 57.4%

"event3-1997" (): 1 h 4 m 22 s (3862 s) Cnt:(c/wc/ec)6980/0/0 16.2%

"event0-1997" (): 56 m 41 s (3401 s) Cnt:(c/wc/ec)6114/0/0 14.3%

"event1-1997" (): 56 m 40 s (3400 s) Cnt:(c/wc/ec)6120/0/0 14.3%

"event2-1997" (): 56 m 40 s (3400 s) Cnt:(c/wc/ec)7146/0/0 14.3%

"sec-battery-monitor" (): 56 m 12 s (3372 s) Cnt:(c/wc/ec)6126/60/0 14.2%

"event7-1997" (): 31 m 41 s (1901 s) Cnt:(c/wc/ec)6986/0/0 8.0%

"alarm_rtc" (): 27 m 51 s (1671 s) Cnt:(c/wc/ec)1941/0/655 7.0%

"l2_hsic" (): 23 m 25 s (1405 s) Cnt:(c/wc/ec)7044/0/0 5.9%
[AT&T Samsung Galaxy S II SGH-I777] geomax45:
Thanks for the idea, but it's my understanding that Sonos uses it's own wireless network. I will, however, check their website for a possible solution.
[AT&T Samsung Galaxy S II SGH-I777] johnf440:
I was getting less than 8 hours per charge, so I downloaded Juice defender to shut my wireless off when screen is off. I changed the wireless settings to not turn off when screen is off in phone settings. I started getting 30 hours a charge. Unfortunately, the stock email app started going rogue and eating battery. Also burned my 3 gig plan up in 2 days. Needless to say, not using stock email app anymore and not on a stock rom.
[AT&T Samsung Galaxy S II SGH-I777] chamonix:
It's hard to tell as there is no real mapping but the first on is definitely a side effect of that, at least for one part. Please post a dump 'after' so we can see if anything else comes up that may have been masked. Protip: when it comes to any kind of performance tuning 3 rounds or monitoring/tuning is a good habits to resolve 90% of the problem
[AT&T Samsung Galaxy S II SGH-I777] patsmike:
This drain is DEFINATELY caused by your wireless network. I have the same exact problem at work (see attached pics - this was with my phone sleeping all but a couple minutes).

But, when on my wireless network at home, I have never ever seen this problem - I get 95-98% Deep sleep when on my home network.

I have seen this problem with my work wifi on every single ICS rom, from touchwiz to cm9... but I never saw this on Gingerbread. mzaur - is this the case for you too - only on ICS?

Unfortunately, I have no idea how to fix it, other than shutting off wifi. Anyone have other suggestions?

EDIT: I will try and post a full bbs dump next time i'm at work
[AT&T Samsung Galaxy S II SGH-I777] patsmike:
Wow this is pretty amazing - so the only thing that was causing the problem was the computer on the network? I would have never thought that other devices on a network could cause so many problems.

So did you end up messing with your router to lower the activity going to your phone, or were all the optimizations directly on your computer? It's gonna be difficult for me to go on everyones computer at work and turn off network sharing haha... I guess that's what happens when a bunch of research scientists try and set up a wireless network :)
[AT&T Samsung Galaxy S II SGH-I777] csetera:
I just caught an interesting WLAN wake that was probably the cause of a huge battery drain I saw a couple of weeks ago that killed my phone over night. If you use a Macintosh and have ever used the ability with the Preview application to scan using a networked scanner, you may see this. I found that if I activate that function, it is sending out a huge number of multicast "discover" requests. I was seeing something less than 40% deep sleep numbers until I figured it out and killed Preview.

Preview itself is fine, but if you use a networked scanner make sure to quit Preview after you are done to shut down the multicast discovery.
[AT&T Samsung Galaxy S II SGH-I777] gaui:
Great thread, thank you for it!

But lately I have been noticing this wakelock:

Alarms: 273, Intent: com.android.internal.telephony.gprs-data-stall

I have never enabled data connection. Only WiFi

Any ideas?
[AT&T Samsung Galaxy S II SGH-I777] alacrify:
It's being reported a lot (mine has it too) - apparently it's a CM9/AOKP bug at this point...

EDIT: actually, since loading Task's build 32 this afternoon, I haven't had this yet...I'm still getting RILJ, GTALK_CONN, and some other stuff I can't figure out that's probably connected.
[AT&T Samsung Galaxy S II SGH-I777] gaui:
Ok hopefully they'll identify it. But we have to spread the word out! :D
[AT&T Samsung Galaxy S II SGH-I777] squigge:
I've been seeing better battery results when I switched from CM9 to AOKP. However it still isn't as good as I was getting with CM7 or UnNamed. I'm seeing a lot of partial wakelocks from AudioOut_1. Does anyone know what that is? I'm not using headphones or anything like that, and only occasionally is the phone not on vibrate.
[AT&T Samsung Galaxy S II SGH-I777] gaui:
Guys, please help me. I have been having trouble with drains for a very long time. I'm really exhausted, really thinking about uninstalling all apps, start from scratch and install only one app by one. But that would take a REALLY long time.

I'm running a custom ROM (HyDrOG3N-ICS) and Siyah kernel (latest). This has nothing/little to do with that, because I've tried several other ROMs/kernels. Always the same/similiar problem. Also other users are experiencing great battery life with these two.

No CPU/GPU undervolt going on. I use the ondemand governor.

I have a "Screen off" profile that sets the CPU max_freq to 200 MHz.

I have a "Screen on" profile that sets the CPU max_freq to 1000 MHz and min_freq to 200 MHz.

I have tried to turn off WiFi, it didn't change much.

I have only sync on Gmail, calendar and contacts.

I have seen gprs.data-stall wakelock a lot lately. Even though I have mobile data disabled at

all times

.

I have GTALK_ASYNC_CONN wakelocks even though I froze Talk app with TiBU.

I did a cat /proc/wakelocks > wakelocks.txt and put it into a PDF in the attachments.

In attachments are also my WireShark and dmesg and BBS dumps

BBS dump in attachment not working, here it is: http://pastebin.com/W3iAw5Ui

192.168.1.20 is my phone.

I filtered the WireShark dump with this:

ip.src == 192.168.1.20 || ip.dst == 192.168.1.20

Because I was getting a lot of other network data.

Here are some screenshots:

http://imgur.com/a/cyhSO

As you can probably see in wakelocks.pdf battery-sec-monitor is getting very high wake_count. Don't know what that is.

PLEASE help me get to the bottom of this. :)
[AT&T Samsung Galaxy S II SGH-I777] mzaur:
The BBS log you posted isn't working. Says 404 page not found... Repost a working BBS log. The best ones are where you unplug at night and then leave your phone overnight untouched, and then save log in the morning before doing anything else.
[AT&T Samsung Galaxy S II SGH-I777] gaui:
Sorry mate, here...

http://pastebin.com/W3iAw5Ui
[AT&T Samsung Galaxy S II SGH-I777] Thor_BR:
WiFi battery drain

Hi Folks,

I've been facing a huge battery drain, caused by my wifi. I don't have a cheap-ass router (dlink dir-655) and my CPU-SPY looks like this:

500MHz - 28%

200MHz - 32%

DS - 25%

Checking the BBS, I don't see any problems with Kernel/Partial Wakelocks. But when I check "Other", it gives me 100% wifi on.

Based on that, I installed the shark file suggested, and after running it for quite some time, the only thing I got (besides NULL) was "RAW". I'm running the CM9 nightly 14/04, with XXLPS modem.

With wifi off, I have an excellent battery life.

Any suggestions?
[AT&T Samsung Galaxy S II SGH-I777] alacrify:
Let shark run for 15-20 minutes, and post the Pcap log here (check the thread for options to set) - let someone who can read it better than I can chime in. You may be getting a lot of polling from your network that's keeping it awake.
[AT&T Samsung Galaxy S II SGH-I777] selw0nk:
You can turn off data and turn off sync to save battery life. Only turn it back only when you need it.
[AT&T Samsung Galaxy S II SGH-I777] alacrify:
You really shouldn't have to - when my phone is tweaked properly on a stable ROM, I lost ~1% an hour idle. With normal use, I get a day and a half off the charger. It does take some effort to track down the issues, but it's worth it.
[AT&T Samsung Galaxy S II SGH-I777] Entropy512:
For me, 1%/hour idle is high except when on weak signal - and since ICS I've cracked the 1% threshold even at my desk.
[AT&T Samsung Galaxy S II SGH-I777] alacrify:
You're an exceptional example though - I'm not running my own ROM, no tweaks at all, no SetCPU even right now. Just a solid ROM with your kernel input and debloating by not loading bad apps :)
[AT&T Samsung Galaxy S II SGH-I777] Thor_BR:
Pcap attached

Hey Folks,

Here's the pcap. The app crashes if I leave it for 30 min.

Any help is appreciated!
[AT&T Samsung Galaxy S II SGH-I777] CruX.:
Are you serious? We're talking about phone being at sleep but 3g (UMTS & HSPA) enabled all the time?

With wifi & goog signal thats possible I think, but I think I've never got below 5%/h or so...

(Running cm9 by the way)

Greetings

Nevermind, I've a GT9100, wrong forum :/

Should be similiar though
[AT&T Samsung Galaxy S II SGH-I777] xhepera:
I'd like some help in improving battery life, if I may. My info is as follows:

SGH-I777

SHOstock ROM v1.9.4

SetCPU: Normal=800/200; conservative----Screen off=500/200; conservative

WiFi is set to never sleep

I rebooted the phone and left it for a bit over 5.5 hours, overnight.

Battery monitor showed battery at 94%

CPU Spy reports:

800 MHz 0:10:22 3%

500 MHz 0:09:42 2%

200 MHz 0:10:20 3%

Dp Sleep 5:08:01 91%

Total State Time 5:38:28

My BetterBatteryStats log is attached.

Since underclocking and installing the ROM my battery life has been much better than when I first got this phone a week ago, but I'd appreciate any tips that might help me squeeze a bit more out of the setup.

Thanks much!
[AT&T Samsung Galaxy S II SGH-I777] navdra:
Hi,

Thanks for starting this very informative thread. It motivated me to deal with the drain I have.

Here is basic phone data.

Phone: GT-I9100

Baseband: XXLPS

Rom: CM9 20120414-nightly

Build number: IMM76D

I believe that my main problem is with Wifi. If I keep it on, my battery usage tends to go into berserk mode (very high wlan_rx_wake count). It doesn't matter if I'm connected to Wifi network or not, so I can't connect the problem I have to Win7 system comms, bad router or something like that. Phone simply forgets how to sleep. Probably some app is not allowing WiFi to stop and let the phone go to sleep. Not sure...

Today, I had WiFi deactivated most of the day and phone and battery life was tolerable, considering the usage, till I activated WiFi. It happened again - phone forgot how to enter deep sleep.

I captured around half an hour of Shark log (with -s 68 flag) but I'm not sure what I should be looking for to nail down the problematic app. So, the WiFi was on, but I wasn't connected to the WiFi network. I'm pretty confident that it wouldn't happen with WiFi turned off (first half of the day). Please take a look.
[AT&T Samsung Galaxy S II SGH-I777] Entropy512:
I9100 and I777 are nearly identical. And yes, that's with the phone idling with the screen off.

Wifi on, 3G on, at home: Around 0.5%/hour or even less on ICS

Desk at work (very weak signal) - 1.5%-2%/hour on Gingerbread, around 1ish on ICS.

5%/hour is consistent with:

1) Permanent wakelock on older kernels (prior to I9100 update3). Update3 took it to less than 3% or so, the Honeycomb cpuidle backport had wakelock drain close to 2%, it's around 1.5% on GB.

2) The infamous "BT-AMP" bug or any other issue that causes frequent wifi wakeups - on CM9 this can happen if you've got a dirty wireless network with some spammy machines. I haven't had time to look in more detail, but it seems like ARP traffic will wake up a device on CM9, when it shouldn't.
[AT&T Samsung Galaxy S II SGH-I777] dandrumheller:
Yep, disable the key press sounds (2 or 3 check boxes, I can't recall) in menu> sounds and the wakelock should diminish dramatically.
[AT&T Samsung Galaxy S II SGH-I777] alacrify:
If they're on, that might help - I'm still getting Audio_1 wakelocks and I've never had those boxes checked. I think it's connected to the GTALK/RILJ wakelocks...
[AT&T Samsung Galaxy S II SGH-I777] dandrumheller:
Huh. I was seeing audio_1 wakelocks of around an hour over a 10 hour or so run early on when I first switched to ICS roms (early SHOstock builds) until I turned them off. For comparison, today (SHOstock 2.1) I have audio_1 at 7 counts for a total of 20 seconds over 3 hours since a reboot...
[AT&T Samsung Galaxy S II SGH-I777] alacrify:
They're not killing me - they're just "new" with ICS for me (or it's a new name, I dunno).