yashsingh1/xdaforums huggingface dataset:
[AT&T Samsung Galaxy S II SGH-I777] mzaur:
Ok.. AlarmManager wakelock is caused by gprs-data-stall... some say it's because of bad network. I have same issue and I have a good connection. No idea :/

You also have high SyncLoopWakeLock which means our phone is obsessively trying to sync one account. Try to disable each account one by one to figure out which. Hard to say which is causing it.
[AT&T Samsung Galaxy S II SGH-I777] navdra:
Continued to the problem described in post #643...

Here is the situation today. This is more or less typical.

WiFi is on all the time.

I charged before went to sleep and everything was fine till morning. Very high deep sleep percentage and only 3% lost during night. I was connected to home wifi network all the time.

After using the phone in the morning it went back to deep sleep, but at some point it 'forgot' how to enter deep sleep mode and is constantly draining battery. At this point I'm connected to my office wifi, but I don't see that it makes any difference, since in my yesterday's report, I was not connected to Wifi.

WiFi policy is set as 'Never'. Maybe I should change that trough system setting, or Llama, that I'm using.

Relevant files attached.

Please take a look and help out with advice.

Drazen
[AT&T Samsung Galaxy S II SGH-I777] CruX.:
Makes sense to me, but still im pretty sure i've never reached something like that. But i have to admit that most of the time my phone is turned on every 20min or so, even if its just a few seconds...

I've got no real wakelocks, good deep sleep but still...

Greetings
[AT&T Samsung Galaxy S II SGH-I777] mzaur:
This might be your issue:

Alarms: 2210, Intent: com.levelup.beautifulwidgets.ACTION_UPDATECLOCK
[AT&T Samsung Galaxy S II SGH-I777] navdra:
Thanks for looking into my problems.

I've found something about it documented here:

http://support.levelupstudio.com/discussions/beautiful-widgets/903-bw-and-alarmmanger

http://support.levelupstudio.com/di...ble-action_updateclock-on-weather-only-widget

I'm pretty confident that it's not the cause of my problems. I may be wrong.

I believe it's primarily WiFi related. I created a pair of new Events in my Llama configuration:

- WiFi On: When screen turns on - enable WiFi

- WiFi Off: When screen turns off - delay for 1 minute and then disable WiFi

This seems to help (prevents the 'berserk drain battery mode'), but will know more after some more usage.

Trying to interpret a pair of Shark logs I posted:

- one with WiFi on & not connected

- one with WiFi on & connected to network (router IP 192.168.10.240)

On both occasions I was experiencing battery drain, but I don't know how to read the shark logs. I'm trying to figure it out...
[AT&T Samsung Galaxy S II SGH-I777] alacrify:
Download the Wireshark reader for the desktop - open the files there, and they're MUCH easier to wade through.
[AT&T Samsung Galaxy S II SGH-I777] navdra:
Thanks for your reply.

I have it installed but I'm not sure what I should be looking for.

Sent from my Galaxy S II
[AT&T Samsung Galaxy S II SGH-I777] alacrify:
I'd go here and do some reading: http://wiki.wireshark.org/ - once I was looking through the shark capture I did some googling on UDP ports and found troubleshooting steps for listing the active services on your network and figuring out which process was using which port (I can't find the link right now). But that led me to the services I wanted to shut off (or it might lead you to applications that are constantly pinging the net...)
[AT&T Samsung Galaxy S II SGH-I777] schwalbach:
Getting more and more kernal wakelocks recently.

wlan_rx_wake and wlan_wake when on Wifi,

event2-2035, or any other type of "event", for example there is event3-2035, and a myriad of others
[AT&T Samsung Galaxy S II SGH-I777] navdra:
Thanks for link.

I checked it out quickly before, and now decided to read it more thorough. Been looking at it for last 10-15 minutes. It's not easy when one does not know how to start and what to look for. I tried different kinds of Statistics analysis and display filters to nail down the problem. Maybe it's not visible and I should simply stick with my newly configured Llama events if it turns out that they work effectively against the drain. The solution is rather elegant, since I use Llama anyway, but I'd prefer to comprehend what's going on under the hood.
[AT&T Samsung Galaxy S II SGH-I777] alacrify:
Got home and found the link - http://www.corrupteddatarecovery.com/Port/89-Port-Type-tcpudp-su-mit-tg.asp - wireshark shows you the port, and this shows you how to get the PID on the computer and find out what service is actually doing the calling. There's another post I made quite a while ago with the Win 7 services I was able to track down and turn off based on this research...YMMV, of course.
[AT&T Samsung Galaxy S II SGH-I777] mzaur:
Partials and alarms are more important in figuring out the issue
[AT&T Samsung Galaxy S II SGH-I777] xhepera:
So, does anyone have any advice for me? I posted my stats, etc. above. Thanks.
[AT&T Samsung Galaxy S II SGH-I777] alacrify:
I went back two pages and don't see them - I'd suggest posting a link to the original post if you want to bump.
[AT&T Samsung Galaxy S II SGH-I777] xhepera:
Thanks for the suggestion. Yes, it was a couple of pages back.

http://xdaforums.com/showpost.php?p=25019553&postcount=642
[AT&T Samsung Galaxy S II SGH-I777] mzaur:
Not sure why but Titanium Backup keeps waking up your phone.

Also 'fahrbot.apps.blacklist' is waking up your phone too. Not sure what that is.
[AT&T Samsung Galaxy S II SGH-I777] alacrify:
Fahrbot looks like a call blocker/call/text manager. Must be monitoring inbound lines continuously. You know you can just block the numbers in the phone app, right?
[AT&T Samsung Galaxy S II SGH-I777] furyau:
I had a similar issue, no real wakelocks and had good deep sleep but still 3-4%perhr drain.

Turned out I needed to try some different modems.

LPQ or LPR seem to be working the best and have brought me back towards the 1% perhr idle drain.

Also found disabling IPv6 on my home PCs and laptops appeared to help with WIFI.
[AT&T Samsung Galaxy S II SGH-I777] alacrify:
There are some other services you can probably turn off too (I've got a post earlier - post 341) - Windows Media Service was continually trying to discover stuff and I don't use it at all - stuff like that.
[AT&T Samsung Galaxy S II SGH-I777] navdra:
What about LPS? I have that one and after reading your post thinking about switching back.

Sent from my Galaxy S II
[AT&T Samsung Galaxy S II SGH-I777] alacrify:
Try them all - I went through the list and still switch when new ones come out. Run jivy's kernel cleaning script and it doesn't take long. Also, use http://www.speakeasy.net/speedtest/ to test - the speedtest app is unreliable.
[AT&T Samsung Galaxy S II SGH-I777] beefgoat:
Wow . . . I truly learned a great deal from this thread. Thanks!
[AT&T Samsung Galaxy S II SGH-I777] Neutr1no:
How do I prevent wifi from disconnecting after certain period of time? Android wifi sleep policy is set to 'always turn on', no additional settings in AOKP. What I'm getting at is when wifi disconnects, com.android.internal.telephony.gprs-data-stall seems to roll in causing huge battery drain, i.e. 6%/hr; whereas when connected it estimates around 1%/hr. Then the enormous battery drain will not be reduced until battery is fully charged, only to start the loop with high battery drain again...
[AT&T Samsung Galaxy S II SGH-I777] xhepera:
Thanks very much for the reply. I looked at Titanium Backup and it seems I had inadvertently set backup to run twice. I fixed that. Fahrbot is the developer that does the app Call Master.

---------- Post added at 06:49 PM ---------- Previous post was at 06:45 PM ----------

Thanks for replying. I use Call Master (the Fahrbot app) because it's able to block all numbers not in my contacts. My understanding was that if I used the built-in capability, I would have to add each number to the blacklist. It didn't occur to me that Call Master would be monitoring the line continuously, but would be triggered only on an incoming call. If it's draining battery, perhaps I need to rethink this. Thanks again!
[AT&T Samsung Galaxy S II SGH-I777] nizbot:
Just wanted to add my +1 to this. With KK6 and KH7 I was seeing a lot of wlan_rx and other wlan wakelocks. Over the 30% range within a 2 hour period. With UCLD3 I am seeing WAY less. I'm continuing to test however to find the best modem for this specific wake lock as it takes some time to get acceptable data.
[AT&T Samsung Galaxy S II SGH-I777] Jonnyredcorn:
So I got a weird drain the past 2 previous nights...first night was after flashing tasks 4/24 aokp with neak kernel and after setting overnight after a fresh 100% charge I started getting a drain around hour 6 and I woke up with 75%. Same thing happened last night with tasks 4/25 update, but I switched back to siyah 3.1.2. Here is what bbs showed for both nights.
[AT&T Samsung Galaxy S II SGH-I777] furyau:
LPS was the problem for me.
[AT&T Samsung Galaxy S II SGH-I777] Entropy512:
Looks like your Google syncs are failing frequently. However, you do have very long gaps in the capture with no traffic, so things appear to be fine in that capture to me.
[AT&T Samsung Galaxy S II SGH-I777] navdra:
Thanks for checking it out.

For now, I'm keeping my WiFi off most of the time and battery life is excellent. It has to be something WiFi related, but I can't figure it out. :confused:

Sent from my Galaxy S II
[AT&T Samsung Galaxy S II SGH-I777] maccawire:
Apps to diagnose the drain

I recommend an app called Badass Battery Monitor to help diagnose which apps are draining your battery and waking up your phone.

https://play.google.com/store/apps/details?id=com.gsamlabs.bbm&feature=search_result#?t=W251bGwsMSwxLDEsImNvbS5nc2FtbGFicy5iYm0iXQ..

From the main screen tap on App Usage it will let you see the % power used. From the dropdown at the top you can see many options, pick the last one View Num Times Waking Device and you can see the main culprits.

For me Ring Dimmer was causing 200+ wakelocks in 10 hours so I uninstalled that.

Also Justpictures was using a lot of juice so I disabled background updates.

Result: got a noticeable improvement in battery life.
[AT&T Samsung Galaxy S II SGH-I777] thanitos:
I've got my phone on lil' phone bricker, I use my phone to stream Pandora and check emails and texting. Usually its just streaming or getting push from hotmail or Gmail or yahoo. I uninstalled yahoo and noticed better standby times but as I sit here writing this I've lost 4% battery life. The stock battery monitor shows my screen, media server and android is being the top three, 33, 13 and 13 percent respectively. The problem I have is my screen brightness is set to 0% at all times how does it use the most battery? It seems like when its set to auto it uses less battery, I have shark running at the moment to look for other caulprits though. Maybe a bad save of the battery stats?
[AT&T Samsung Galaxy S II SGH-I777] schwalbach:
Hey,

Uploaded BBB

On 4/28 AOKP with CM9 Kernal, LC5 modem.
[AT&T Samsung Galaxy S II SGH-I777] heardamir:
Just wanted to say thanks for all of the priceless information in this thread. Before reading, I had no idea how to actually identify the problem processes that were causing my battery drain. Let alone understand what I was looking at with better battery stats and CPUSpy. IMO, this thread is a must read for everyone!
[AT&T Samsung Galaxy S II SGH-I777] chamonix:
Your main problem is mail (exchange). The partial wakelocks may seem small but the number of Wakeups is huge
[AT&T Samsung Galaxy S II SGH-I777] schwalbach:
Yea no idea why it is doing this. I had it set to poll every 30 minutes. Just turned it all off to do it manually.

Now my only problem is AudioOut partial wakelocks. Tried the turning off lock sounds stuff, anything else to fix that or try to diagnose it?
[AT&T Samsung Galaxy S II SGH-I777] thanitos:
My bbs for 5 hours over night.off charger
[AT&T Samsung Galaxy S II SGH-I777] rav4kar:
Hope you know the attached file has your personal (info) email IDs!! :D
[AT&T Samsung Galaxy S II SGH-I777] thanitos:
eh life could be worse, my emails just for school stuff anyways ty though.

Did I not post the right file?
[AT&T Samsung Galaxy S II SGH-I777] JordanElliott:
Shouldn't this be stickied?
[AT&T Samsung Galaxy S II SGH-I777] godefroi:
Can I get an analysis on this BBS log? I'm on AOKP (5/1), and I saw about 50% drain this morning during about 6 hours, with light to moderate usage (maybe 15 mins of calls, and 10 mins of nav, and a little audio player). Seems like that was a bit much (ok, a LOT much).
[AT&T Samsung Galaxy S II SGH-I777] schwalbach:
You're email application is one of the biggest problems. Try K9 or something. Also for me the thing that literally doubled my battery life was just turning off GPS and wifi when not in use and rebooted after. If that isn't a hassle try that
[AT&T Samsung Galaxy S II SGH-I777] twiggums:
deleted

(found the answer to my own question)
[AT&T Samsung Galaxy S II SGH-I777] mzaur:
Under Alarms you can see: Alarms: 359, Intent: android.intent.action.TIME_TICK

There's your problem. Not sure what's causing it. Do you have a clock widget?
[AT&T Samsung Galaxy S II SGH-I777] alacrify:
I highly recommend K-9, and freezing the stock Gmail app (and turning off sync for everything but contacts :)) - I set K-9 to manual sync, since I only check it when I want to check personal email. It helped a lot. I also turned off GPS (unless I need it) - I do leave location services on since the phone is on anyway, and I leave wifi on (but turned off the "scan continually for wifi and tell me when it's available in the grocery store" cr*p). 2% and hour or less drain :D
[AT&T Samsung Galaxy S II SGH-I777] thanitos:
Yeah just the stock Android alarm set for Mon - Fri
[AT&T Samsung Galaxy S II SGH-I777] alacrify:
Try Kaloer clock (the one I use) or one of the others in the Play store - I froze the stock clock and I don't get that kind of drain.

Kaloer lets me dim the screen at night so I can use it as bedside clock/alarm (plugged in) and dark enough to sleep too :)
[AT&T Samsung Galaxy S II SGH-I777] thanitos:
What app would freeze the alarm or should I just uninstall it
[AT&T Samsung Galaxy S II SGH-I777] alacrify:
Titanium Backup - which you should have anyway for all the wonderful things you can do with it :D
[AT&T Samsung Galaxy S II SGH-I777] thanitos:
Lol I still need to figure out those things thank you for the help I'll post another log in a hourish
[AT&T Samsung Galaxy S II SGH-I777] stevenh:
could someone have a look at this pcap dump? I've got loads of activity between my phone and 173.194.78.103, which turns out to be a Google IP, but I've got no idea what's causing it...

Thanks in advance.
[AT&T Samsung Galaxy S II SGH-I777] mzaur:
Now I'm also having alarms from android.intent.action.TIME_TICK -- no idea what that is and search leaves me dry!
[AT&T Samsung Galaxy S II SGH-I777] R2D2_SW:
Can anyone have a look at my Shark data? Not sure what to look for but my issue is that I have the wlan_rx_wake even though I am not connected to any network. Note that my WiFi settings are so that I don;t want to be notified when a new network is available. Turning off the WiFi effectively rid the wake but I'm just curious as to what is causing it, and perhaps I'll be able to get rid of it even with my WiFi turned on.

Thanks in advance!
[AT&T Samsung Galaxy S II SGH-I777] elherr:
Hey -- I have not fired up Wireshark for ages and thought it might be fun to do while waiting for laundry to finish. :-)

It looks like most of the boundary events are fairly normal. Name resolution, connection to Hotmail, Google services (of one flavor or another). Not seeing any ARP chatter to speak of. No DLNA SSDP's. No broadcast to speak of. Almost too quiet. You ran capture for a little over an hour?

Here are some of the hosts you were connecting to:

eherr@quark:~$ host 204.232.175.78
78.175.232.204.in-addr.arpa domain name pointer pages.github.com.
eherr@quark:~$ host 107.21.246.48
48.246.21.107.in-addr.arpa domain name pointer ec2-107-21-246-48.compute-1.amazonaws.com.
eherr@quark:~$ host 74.125.227.50
50.227.125.74.in-addr.arpa domain name pointer dfw06s06-in-f18.1e100.net.
eherr@quark:~$ host 216.137.47.226
226.47.137.216.in-addr.arpa domain name pointer server-216-137-47-226.mia3.cloudfront.net.
eherr@quark:~$ host 216.74.41.14
14.41.74.216.in-addr.arpa domain name pointer perureisen.com.
eherr@quark:~$ host 74.125.45.188
188.45.125.74.in-addr.arpa domain name pointer yx-in-f188.1e100.net

.

Do you have Wireshark installed on your computer? For a capture of this size it is pretty easy to look at. For easy viewing you can look under 'Statistics' menu and select 'Conversations'. In pop-up window click on IPv4, TCP, ot UDP and it will show summaries, including timelines.

I'd forgotten how freaking cool Wireshark is.
[AT&T Samsung Galaxy S II SGH-I777] elherr:
Thought I'd install tcpdump on phone and do some packet peeping.

This is a strange one. Layer 2 HPNA frame being sent/received on wlan0? I'm assuming 9a:0c:82:d9:9f:82 is being spewed by Android. 98:0c:82:d9:9f:82 is actual MAC for interface.

00:38:46.454586 9a:0c:82:d9:9f:82 > 98:0c:82:d9:9f:82, ethertype Unknown (0x886c), length 86:
0x0000: 8001 0074 0000 1018 0001 0002 0000 0000 ...t............
0x0010: 0045 0000 0000 0000 0000 0000 0000 0000 .E..............
0x0020: 000c 0000 0800 0000 776c 3000 0000 0000 ........wl0.....
0x0030: 0000 0000 0000 0000 0000 0c00 0000 6d00 ..............m.
0x0040: 0000 3412 0000 0000 ..4.....

shell@android:/ # ip -d link
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN mode DEFAULT
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: sit0: <NOARP> mtu 1480 qdisc noop state DOWN mode DEFAULT
link/sit 0.0.0.0 brd 0.0.0.0
3: ip6tnl0: <NOARP> mtu 1452 qdisc noop state DOWN mode DEFAULT
link/tunnel6 :: brd ::
4: rmnet0: <POINTOPOINT,MULTICAST,NOARP> mtu 1500 qdisc pfifo_fast state DOWN mode DEFAULT qlen 1000
link/ppp
5: rmnet1: <POINTOPOINT,MULTICAST,NOARP> mtu 1500 qdisc noop state DOWN mode DEFAULT qlen 1000
link/ppp
6: rmnet2: <POINTOPOINT,MULTICAST,NOARP> mtu 1500 qdisc noop state DOWN mode DEFAULT qlen 1000
link/ppp
7: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP mode DORMANT qlen 1000
link/ether 98:0c:82:d9:9f:82 brd ff:ff:ff:ff:ff:ff
[AT&T Samsung Galaxy S II SGH-I777] R2D2_SW:
Thanks for looking at it. Yes I have wire shark on my PC, but I just didn't know what to look for. I did search for ARP to rule out the BT-AMP bug and couldn't find any. So at that point I was just unsure on why I still have the wlan_rx_wake showing on BBS and preventing my phone from deep sleeping. As far as the other protocols, I don't really know what to make of them or if they are normal or not. Should I run shark over a longer period?

Thanks!
[AT&T Samsung Galaxy S II SGH-I777] Entropy512:
Was that popping out at 1 Hz continuously?

If so - that's the infamous BT-AMP bug (responsible for battery drain in UCKK6...)

If it's just occasionally (it seems to burst when disconnecting/reconnecting) it's not a problem, but if it's firing at 1 Hz - it's the infamous UCKK6 battery drain bug.

****, I thought we were free of that mother****ing bug.

Not sure what's going on in R2D2_SW's case - that cap looks clean. Is there anything weird in dmesg?
[AT&T Samsung Galaxy S II SGH-I777] R2D2_SW:
I'm running another pcap over a longer period. Perhaps some stuff will show up. I'll send over my dmesg as well once it's done.

Thanks!
[AT&T Samsung Galaxy S II SGH-I777] elherr:
Nope. Just bursting 15 frames or so with an odd single frame every now and then. Sorry if I caused any intestinal distress. :-)

I'm still wrapping my head around Android implementation specific stuff. In time I'd like to do some development work but that will be a ways down the road. Like everything else I've run into so far, there are subtle (and not so subtle) differences between Linux and Android environments.
[AT&T Samsung Galaxy S II SGH-I777] elherr:
Here's the dump for L2 0x886c. Ran tcpdump for about 25 minutes. Text file.
[AT&T Samsung Galaxy S II SGH-I777] :
Mates, bbs author chamonix says maybe you I'm this thread can help me with this problem :

http://xdaforums.com/showthread.php?p=26249215

Thank you for your patience!!

Sent from my SGS2 - SlimICS Rom & Syiah Kernel
[AT&T Samsung Galaxy S II SGH-I777] R2D2_SW:
Here's a pcap over a 3-hour period. I've also included my dmesg. Lots of stuff in there but I don't know what to make of them.

Please let me know your thoughts.

Thanks!
[AT&T Samsung Galaxy S II SGH-I777] rav4kar:
any idea what syncloopwakelock is?

note: I doubt endomondo that is the only app I installed in last 2 weeks:D
[AT&T Samsung Galaxy S II SGH-I777] elherr:
I can look after a bit. Been dealing with work crap and now have certain kitchen duties to perform. :-)

---------- Post added at 10:33 AM ---------- Previous post was at 10:28 AM ----------

What are you guys seeing for wlan_rx_wake as a percentage on latest nightly? Also what baseband?

I'm on CM9 0518 with UCLD3 baseband and am seeing about 16%. 2 1/2 hours off charge with 25 minutes rx_wake. In that time I've burned about 30% of battery with not a whole lot of usage.
[AT&T Samsung Galaxy S II SGH-I777] elherr:
https://github.com/asksven/BetterBatteryStats-Knowledge-Base/wiki/SyncLoopWakeLock

More email accounts & contacts you sync = more wake time.

---------- Post added at 12:08 PM ---------- Previous post was at 11:59 AM ----------

It looks like this capture might be heavily filtered? I'm not seeing any Layer 2 chatter. No ARP requests. Unusual for three hours.

Another interesting aspect is that TCP connections to Google Play never show a FIN flag in your capture. This is probably why Wireshark is interpreting Play conversations as being very lengthy.

What is your wlan_rx_wake percentage?
[AT&T Samsung Galaxy S II SGH-I777] R2D2_SW:
I want to say that my wake was between 15 and 20%. On a full day, it drains 3 hours off my battery compare to if I turn off WiFi when not connected on a network. I'm on CM9, stock kernel with UCKH7. I did not filter the capture. I posted it as is.

Thanks again for looking into it.
[AT&T Samsung Galaxy S II SGH-I777] elherr:
BT-AMP (ethertype 0x886c) every two minutes

I'm seeing Layer 2 spew EXACTLY once every two minutes. Should we be seeing this? See attached PCAP.

CM9 0518 with UCLD4 baseband.

Edit: Disregard capture. I believe two minute interval was caused by one of my apps. More testing to be done...

Interesting -- I am seeing 0x886c frames every 60 seconds with wifi enabled but not associated with any AP. Scanning disabled.

2nd Edit: Laughing insanely at BCM4330 blurb on Broadcom site -- "Enhanced Collaborative Coexistence radio coexistence algorithms". REALLY?
[AT&T Samsung Galaxy S II SGH-I777] patsmike:
Wow. Ive had really bad wifi drain and wifi wakelocks for the past several weeks - something like 70-80% deep sleep (compared to 95%+). Its been an hour since disabling IPv6 in AOKP (read the aokp FAQ and the aokp thread on how to disable this on your phone), and this has ABSOLUTELY destroyed and trace of wifi sleep issues. Deep sleeping at 97% right now. I had this problem on my work and home networks - will try on my home network later to see if this is consistently helping.

Anyone else still having issues with wifi drain and wakelocks, i highly recommend you try this.

EDIT: if on a ROM besides AOKP, such as cm9, here are instruction on manually setting up a sysctl file:

http://xdaforums.com/showthread.php?t=1621808

I haven't tried it, but should work on all ROMs

EDIT2: nvm, seems like turning off ipv6 was only a fluke. It seemed to work for a few hours (ie. 97% deep sleep)... I then restarted my phone and haven't been able to get such good deep sleep since. Back to ~75% when on wifi....
[AT&T Samsung Galaxy S II SGH-I777] elherr:
Ha. That is what I am seeing -- roughly 75% sleep. Thanks! More to read.