Interested in solving a real puzzler? Then read on!
The patient: a rooted, otherwise stock Jelly Bean (JRO03C 4.1.1) Galaxy Nexus. Being used as an everyday phone (and a bit of development).
The symptoms: Excessive battery drain by "Google Services", but ONLY on my home Wifi network!
This is where things get weird: on 3G, on my company's work Wifi, and without network, the battery drain is absent. I can *reliably* cause Google Services to start hammering the wakelocks, and stop them, just by moving to a different Wifi hotspot. There's NO change in functionality: Google Talk, Play Store, and network access work exactly the same. Push messages seem to come in normally too, but I haven't tested that very well. There's no configuration change whatsoever.
More details: After installing BetterBatteryStats, I've gotten a better look at the wakelock draining the battery. After gathering stats for 25-30 minutes, the following wakelock is the top user:
Code:
GTALK_ASYNC_CONN_com.google.android.gsf.gtalkservice.AndroidEndpoint (Google Services): 7 m 47 s (467 s) Count:786 30.3%
So, I decided to check logcat for "GTalkService" messages, and see if there's a major difference between work (good) and home (bad).
Turns out I get a lot of the following at home, but not at work:
Code:
[ 08-15 17:36:02.719 709: 709 I/GTalkService/c ]
[[email protected]] connect: acct=1000000, state=CONNECTING
[ 08-15 17:36:34.461 709: 1177 E/GTalkService ]
connectionClosed: no XMPPConnection - That's strange!
This is repeated a LOT and looks like it correlates quite well with the wakelock.
I use the phone, and I would hate to wipe it completely: I would really like to get to the bottom of this.
First of all, I'm not 100% sure this is a Galaxy Nexus only problem. It might be Jelly Bean, or ICS, or whatever. Would you suggest I post on the Google Android bug list, where the crickets chirp, and major bugs disappear into a big Python black hole?
Thanks guys! If only for reading this far!
Update 2012-10-02:
OK, I have eliminated my firewall from the equation: obviously I can't necessarily just whack the work's firewall without consequences. Nothing's blocked, and all services on the phone seem to work.
As for other devices: I dug up my old Nexus One (Gingerbread, stock), and upgraded my Transformer Prime to Jelly Bean. Both do not show the error in logcat, and neither have the battery drain issue. Just for kicks, I checked the version of the Google Services Framework on all three:
Samsung Galaxy Nexus: 4.1.1-398337
ASUS Transformer Prime: 4.1.1-438695
HTC Nexus One: 2.3.6
Wanna bet there's a bug in 4.1.1-398337 that got fixed in 4.1.1-438695?
Further update:
I also tried the following with no success:
Delete app data for Google Services Framework (NOT RECOMMENDED!)
Remove Google accounts from the phone.
Re-add Google accounts to the phone.
Update: 2012-10-04
I think I found a workaround. It looks like it's a domino effect thingy that happens here:
1) I've got a Netgear N600 ADSL/Wifi router at home. On my 2.4GHz radio, I set up two access points: one for my stuff and one for guests. I made sure to delete the guest account from all my Wifi equipment to make sure there's no "fighting" or "flapping".
2) It appears that the phone ignores the Wifi-'stay connected while sleeping' setting, or the radio is broken. When the phone goes to sleep, it disconnects from Wifi.
3) When the phone disconnects from wifi, the Google Services Framework lose connection: this causes the phone to wake up.
4) When the phone wakes up, Wifi gets re-established. This makes Google re-connect.
5) The phone goes back to sleep and we return to step #2.
This causes a LOT of wakeups, lost connections and other crap. Since the phone doesn't lose connection when it's awake, it's fricken difficult to debug. Also, it's NOT a signal quality issue. My phone can be right next to the access point and it wouldn't help.
So, could you guys try different access point settings at home? I've heard WMM, QoS and some of the protocols could cause the Galaxy Nexus's radio in Jelly Bean to go a bit wonky.
-- Jan Gutter
jangutter said:
Interested in solving a real puzzler? Then read on!
The patient: a rooted, otherwise stock Jelly Bean (JRO03C 4.1.1) Galaxy Nexus. Being used as an everyday phone (and a bit of development).
The symptoms: Excessive battery drain by "Google Services", but ONLY on my home Wifi network!
This is where things get weird: on 3G, on my company's work Wifi, and without network, the battery drain is absent. I can *reliably* cause Google Services to start hammering the wakelocks, and stop them, just by moving to a different Wifi hotspot. There's NO change in functionality: Google Talk, Play Store, and network access work exactly the same. Push messages seem to come in normally too, but I haven't tested that very well. There's no configuration change whatsoever.
More details: After installing BetterBatteryStats, I've gotten a better look at the wakelock draining the battery. After gathering stats for 25-30 minutes, the following wakelock is the top user:
Code:
GTALK_ASYNC_CONN_com.google.android.gsf.gtalkservice.AndroidEndpoint (Google Services): 7 m 47 s (467 s) Count:786 30.3%
So, I decided to check logcat for "GTalkService" messages, and see if there's a major difference between work (good) and home (bad).
Turns out I get a lot of the following at home, but not at work:
Code:
[ 08-15 17:36:02.719 709: 709 I/GTalkService/c ]
[[email protected]] connect: acct=1000000, state=CONNECTING
[ 08-15 17:36:34.461 709: 1177 E/GTalkService ]
connectionClosed: no XMPPConnection - That's strange!
This is repeated a LOT and looks like it correlates quite well with the wakelock.
I use the phone, and I would hate to wipe it completely: I would really like to get to the bottom of this.
First of all, I'm not 100% sure this is a Galaxy Nexus only problem. It might be Jelly Bean, or ICS, or whatever. Would you suggest I post on the Google Android bug list, where the crickets chirp, and major bugs disappear into a big Python black hole?
Thanks guys! If only for reading this far!
-- Jan Gutter
Click to expand...
Click to collapse
Could it be that your home router's firewill is somehow blocking parts of GTalk traffic, causing it to continuously retry connecting?
Petrovski80 said:
Could it be that your home router's firewill is somehow blocking parts of GTalk traffic, causing it to continuously retry connecting?
Click to expand...
Click to collapse
Nope, I checked that: there's no firewall. At work there is, but it doesn't affect my phone (services are not affected visibly). Google Talk works fine in both situations.
any developments in this? have an s3 which is behaving similarly. my WiFi is always on as I'm usually near a hotspot at work home /gfs.gtalk_async wake lock showing up in better bat stats. been having battery drain issues for a while now and decided it was time to do some research.turned off pretty much every synch/auto backup app on the phone but still draining, not quite as bad, but still seems to struggle to stay asleep for very long!
Exactly the same
cricka15 said:
any developments in this? have an s3 which is behaving similarly. my WiFi is always on as I'm usually near a hotspot at work home /gfs.gtalk_async wake lock showing up in better bat stats. been having battery drain issues for a while now and decided it was time to do some research.turned off pretty much every synch/auto backup app on the phone but still draining, not quite as bad, but still seems to struggle to stay asleep for very long!
Click to expand...
Click to collapse
Does anyone have solved this.. i have got exactly the same situation as Jan. No trouble at work but only at home.
Not affecting ASUS Transformer Prime
Nothing new here, except I also cross-checked with my ASUS Transformer Prime. There's no drain on it, and also no errors in logcat about GTalkService.
I'll post an update once I've checked my trusty old Nexus One out of storage, that'll happen next week, though.
Interesting note about the wifi. I only seem to get this problem during the week at work, on the weekends it doesn't happen that often. I get poor data connection at work and rely on the wifi instead. I'll try to not use the wifi for a day or so and see if the wakelock is reduced. Thanks for the tip, this has been a problem for a while now.
Galaxy s2 on Sprint
sgtlange said:
Interesting note about the wifi. I only seem to get this problem during the week at work, on the weekends it doesn't happen that often. I get poor data connection at work and rely on the wifi instead. I'll try to not use the wifi for a day or so and see if the wakelock is reduced. Thanks for the tip, this has been a problem for a while now.
Galaxy s2 on Sprint
Click to expand...
Click to collapse
Just take note: in general Wifi uses a LOT less battery than 3G. A better test might be to disable Wifi AND sync.
Jan
some decent insightful ideas here. My S3 on official stock based custom has bad drain over wifi. My google services framework version is the 4.1.1-438695 which isn't affected in your case so it's not that.
Better battery stats at first put google maps as the wakelock so I realised it's location service was left on so I turned that off. Then BBS varies and shows different apps and what not causing wakelocks but the drain remains the same.
My router is an Asus with custom linux firmware Tomato with a robust plethora of functions. I updated it yesterday and put the settings back closer to default. I'll have to try disabling WMM and QoS settings as their both already on at the moment. Also the kernel developer i'm on to quote: "Made a change in wifi offload filtering to deny muticast packets but allow multicast DNS packets."
After leaving wifi on last night the drain still remains at about 10% per 3 hours. Compared to before it used to be almost 15% per 3 hours. BBS doesn't show wlan_rx_wake as the top wakelock as most common before as that's down to running for 8 minutes in 9 hours rather than the top around 45 minutes. Instead battery-monitor is the top at a little over half an hour in the 9 hours. Googling battery-monitor shows little useful information but I assume it's like before where Wifi is waking the device and something OS related that turns on with it gets given the wakelock status although its not the trigger.
I'll have to try disabling WMM, QoS, auto-sync and gtalk and see how I go. Hopefully you're right about it being wifi disconnect related and can be fixed.
Infy_AsiX said:
Googling battery-monitor shows little useful information but I assume it's like before where Wifi is waking the device and something OS related that turns on with it gets given the wakelock status although its not the trigger.
Click to expand...
Click to collapse
Have you tried disabling the WiFi Power Save Mode on the S3? From this article:
http://www.s3forums.com/forum/galaxy-s3-general-discussion/1329-wifi-tip.html
1. Open up the Galaxy S3 phone dialer
2. Dial *#0011#
3. Look for the “ServiceMode” screen and press the left menu button
4. Select “WiFi”
5. You should see that the “WiFi Power Save Mode” button is “ON” – turn it “OFF”'
My colleagues with the same phone has serious battery drain until they use that.
Infy_AsiX said:
I'll have to try disabling WMM, QoS, auto-sync and gtalk and see how I go. Hopefully you're right about it being wifi disconnect related and can be fixed.
Click to expand...
Click to collapse
I seem to recall that the Google framework sends/receives a keep-alive packet once every hour or so. LOTS of stuff in the Android framework keep TCP connections open from the server side because otherwise the service provider just kills them. Blame stateful firewalls.
What could be happening here is that the WiFi chip offloads a number of these functions from the main CPU: i.e. it's got a simple TCP offload stack that just queues data for the main CPU to wake up. If the WiFi chip receives a keep-alive TCP packet with no payload, it doesn't bother to wake up the CPU and just absorbs it. If the WiFi chip goes to sleep, rather, it never receives these, the connection dies and the CPU needs to wake up on timeout and re-establish everything (eating battery in the process). It's paradoxically cheaper to keep the WiFi chip running on full power, than to let it go to sleep. This is pure speculation, and only one of many scenarios that might fit the facts.
The S3 has the *option* to change the WiFi sleep-mode from aggressive (default) to a value that lets the entire system use less battery. The Galaxy Nexus doesn't: which means that it may, or may not have the sleep-mode built in. In any case, it seems my router can remotely trigger disconnects when the main CPU is off, and by switching settings on it, I managed to perform a workaround. Unfortunately the Galaxy Nexus (on Jelly Bean, at least) seems to have a serious bug in this respect, and other people are not so lucky: http://code.google.com/p/android/issues/detail?id=35352
It seems that the core issue (WiFi disconnect), causes a knock-on effect, raising Google Services Framework, Android OS and potentially anything that syncs's battery profile.
Jan
Getting good drain now 1% an hour compared to 3%. Seems setting WMM to auto rather than enabled in tomato fixed it. The night before I had it disabled as well as QoS and it was bad as well. I will test further to be certain what's the scenario.
I've got a second S3 that's been suffering as well. Having two to test makes testing much faster. The service menu power save mode off didn't help. It caused strange disconnects with WMM in all states. S3 wifi menu would state poor connection and wouldn't reconnect. Note the S3 already has strange disconnects to begin with I find but in this case it sometimes wouldn't reconnect. Also restarting the phone resets the power save mode to enabled.
Can't find any information on a difference between enabled and auto in tomato WMM. I'll be sure to keep testing.
Sent from my GT-I9300 using Xparent Cyan Tapatalk 2
New Google Services Framework
Hey guys,
looks like Google Services Framework got a version bump on the latest Galaxy Nexus update: it's now listed as version 4.1.2-485486
This is for JZO54K (4.1.2).
It could be that they've fixed the knock-on effect (but the core issue is likely the same, since the radio code is apparently exactly the same).
Jan
I have this same wakelock on my evo 4g lte. Same log error exactly. Only on my works wifi. Problem is eliminated when running a Vpn on the phone. Only caveat Is all the free vpn services seem to disconnect after a period of inactivity.
I know this is an old topic but I had the same drain (30% overnight) on my Galaxy S2.
After weeks of searching and trying different things I found the solution.
Change DTIM value in your router configuration from 1 (default) to 255.
This value is usually in Advanced->Wireless tab on most routers.
Now my phone uses 2% battery overnight with wifi on, sync on instead of 30%.
Rawi666 said:
I know this is an old topic but I had the same drain (30% overnight) on my Galaxy S2.
After weeks of searching and trying different things I found the solution.
Change DTIM value in your router configuration from 1 (default) to 255.
This value is usually in Advanced->Wireless tab on most routers.
Now my phone uses 2% battery overnight with wifi on, sync on instead of 30%.
Click to expand...
Click to collapse
I tried this and got weird results. My phone couldn't connect to my network, but my tablet could (GT 7510) which also experiences the drain issue. How did you come up with the value 255? Any other value I can try? Thanks
Sent from my SGH-T999 using xda premium
SpinTX said:
I tried this and got weird results. My phone couldn't connect to my network, but my tablet could (GT 7510) which also experiences the drain issue. How did you come up with the value 255? Any other value I can try? Thanks
Sent from my SGH-T999 using xda premium
Click to expand...
Click to collapse
Try lowering this value to 10 or 8 and see if it helps.
Rawi666 said:
Try lowering this value to 10 or 8 and see if it helps.
Click to expand...
Click to collapse
Thanks, will give it a shot. Also, because of your post, I discovered that toggling wifi on and off stops Google Services from draining. It will still drain, if your wifi is set to turn off, when the device sleeps. I really think you hit the nail on the head, discovering the source of the problem. It's an issue I have been trying to fix for a long time and your post at least got me to toggling the drain. So thanks again!
Sent from my SGH-T999 using xda premium
Would love to he root cause of this... I had the same problem on my s3 and now on the s4.with and without custom roms etc. The problem only is work, and I'm putting it down to some service that the work firewall or something blocks... Only solution I've come up with is turning off the wifi when I'm at work.. Else I get in excess of 15min /hour of wakelock.
All apps etc. Up to date, sync on/off, no difference, all "location" settings turned off.
I give up.
Wifi signal strength!
Whatever Google did to cause a variety of wakelock problems, having a strong wifi signal seems to solve them. Apparently, wakelocks occur when there are unreliable connections to Google's servers.
Kal
keltickal said:
Whatever Google did to cause a variety of wakelock problems, having a strong wifi signal seems to solve them. Apparently, wakelocks occur when there are unreliable connections to Google's servers.
Kal
Click to expand...
Click to collapse
A friend with the nexus 4 and same problem told me to try disabling Google hangouts (formally talk).. Apparently it keeps refreshing itself once ur signed in (and it signs in automatically)... Will experiment tomorrow at work where I get the problem.
Sent from my GT-I9500 using xda premium
(Firstly I know I just posted and said Surdu Petru's Kit Kat Carbon Rom is awesome and it is. So is his Omni Rom which I just changed from. The wifi problem isn't caused by the roms. it's been happening with all sorts of Roms for me (and loads of other people on other phones)
I noticed before when I installed his Omni Rom ( and at least 5x before with other roms) that the WiFi was working perfectly until some point between a Google restore & titanium backup - restore. Then I'd start getting the WiFi disconnecting every 30 seconds, even when standing next to the router on my home network.
I Googled and tried everything I could find but nothing would work. So when I installed Carbon Rom a few days ago I flashed the rom and let it install to the Google log in, connected to WiFi and signed into my Google account BUT I didn't allow Google to restore data etc, just let it log in & didn't do a full titanium restore. I then slowly (Titanium Backup) restored all my apps individually that I wanted but MOST of them I just restored the app and not the data. Everything has been perfect for two days, full strong five bar WiFi signal throughout my house, never dropping the WiFi until about 1hr ago... when I opened up Google maps , accepted it's access & (we will learn everything about you) permissions, clicked on the maps GPS logo, it asked me to go to location settings, went there, approved high accuracy and BOOM, WiFi disconnected and my WiFi now says not in range. So... is it going to some server and changing my location in the phone so now it doesn't think I'm where I am and therefore doesn't want to connect to the router 1 meter from me with five bars on the phone but "not within range"? Is this what could be causing problems for loads of people on different phones?
Tried everything to get it to reconnect (Wifi On/Off, Airplane mode on/off, Wifi advanced settings re weak connection etc, Rebooted phone and nothing worked.
Did another Google search and found this forum
http://www.reddit.com/r/nexus4/comments/1rdolw/44_has_murdered_my_battery_rendering_my_nexus_4_a/
where about halfway down it mentions to disable hangouts and log out of Google+ then reboot. I did this and now my WiFi is back to full signal and not dropping connection.
So is this the solution to this? I haven't yet re-signed into Google+ or enabled hangouts or re-opened Google Maps and gone through the whole process above as I'm worried it will screw up my WiFi again.
Just thought I'd put this out there hoping that a developer, such as the Excellent Surdu Petru, might "click" and come up with a fix.
Every since Verizon pushed the Lollipop update to my N4, my "Mobile Data" turns back on all by itself after it has been disabled. It even turns back on when I am connected to wifi.
Has anyone else experienced this and if so can you please explain how I may fix this.
Thanks in advance.
Not exactly that but I have noticed that now I'm always on 3g when I'm usually on 4G all day long same area this is crazy
Mine is also randomly turning on Mobile Data too after the Lollipop update. I have a small data allotment with VZW, this could send me into overages.
I seen on one thread, searching through your downloaded apps to find out which ones have "change network connectivity" in the permissions. I happen to have 6 of them. Some you can disable, but it removes the updates, other you cant disable without removing it.
Another recommendation was hitting settings from the pull down menu, wifi, advanced, then uncheck the "smart network switch". Mine wasn't checked to begin with, so I'm out of ideas til I start removing apps one by one...
The data has been turning on by itself during sleep time on my Note 4. It caused the phone to use 500mb of data in one nite. My data is always off, wifi is only on when using the phone otherwise it's off too. I called Verizon and they have no clue. This is my 2nd new Note 4 for myself & my wife, nothing but problems. Think we are going to switch to anything other than a Samsung phone.
Well, I've systematically removed all 6 apps one at a time. The Youtube and Facebook apps, I was only able to disable them instead of removing them completely. In the end, the phone still turns on Mobile Data by itself. This must be something internal with Lollipop. I have a small data allowance and I'm afraid its going to go over simply because it wont stay OFF even with WiFi available!!
I would call customer service and have them ship you out a replacement. This is our 3rd phone and hopefully it will work as it should. Good luck
Outcast,
I've had my Note4 since it was released in November. It didn't have this problem with 4.4 Kitkat. It's something new with Lollipop and I doubt a new phone would solve this problem, could be wrong.
How involved is it to go back to Kitkat?
I'm not chancing voiding my warranty. They replaced my phones by them and not by request. Our phones get hot and get a warning then shuts down, apps close constantly and the phones consistently reboot on their own. Then the data turning on by itself. The other problems I don't think are software based but hardware failures. The data can very well be software related.
wifiwizard said:
Every since Verizon pushed the Lollipop update to my N4, my "Mobile Data" turns back on all by itself after it has been disabled. It even turns back on when I am connected to wifi.
Has anyone else experienced this and if so can you please explain how I may fix this.
Thanks in advance.
Click to expand...
Click to collapse
I have the same problem and i used up so much of my data when i am at home where the wifi connects automatically on everything else. On kit kat this never happened and i am attempting a downgrade so you might want to try that.
I was having the same problem with mine. I also live on the edge of 4g area, so it was constantly swapping between 3g and 4g. In addition to using some data it was killing my battery swapping between 3g and 4g. Using almost 10% per hour when not being used. I disabled most of the verizon stuff, support and protection, Verizon navigator, caller name id, message+, and verizon location. I turned off facebook location reporting in the app settings, and disabled google location. I did all these a couple at a time and would reboot to see if it fixed the problem and after all those were done i rebooted and wiped the cache and the prblem was gone. I turned google location back on so far and its still working the way it is supposed to. It shows a greyed out 3g symbol and my battery life is much better. My phone sat off the charger all night and only dropped 4% and in 5 hours of moderate use its down to 77% left. Wish i knew exactly which app was causing the problem to help you out better but hopefully you can try those apps and settings and get the same results.
Well it worked for about 3 days, but this morning data and wifi were both running again.
Data usage Samsung Galaxy Note 4
Been having the same problem even when I disconnect data ten or fifteen minutes later data is back on. And I've noticed even if I am connected to Wi-Fi data trumps it and I end up using a ton of DATA when I've been connected to Wi-Fi all day, getting seriously upset cause I never used this much data before.
I have same problem with my Note3 running Lollipop. Have tried every suggestion I can find to turn off data, but it is still runs, unless I am on wifi. Data is set to off, 4g symbol in notification bar is greyed out, but data is still on. I have found forums all over the Web with other people with this problem, but no solution yet. My phone is unlocked but not rooted.
Hi to All, i have problem with GPS, can anyone help me
Sent from my [device_name] using XDA-Developers Legacy app
Definitely not as accurate as it should be. Surprised no one brought this up yet
stu5797 said:
Definitely not as accurate as it should be. Surprised no one brought this up yet
Click to expand...
Click to collapse
Is this a software thing?? My phone is new but I have issues finding satellites. Please let me know if anyone has a solution.
Sent from my [device_name] using XDA-Developers Legacy app
I dont know why, but in past devices I have encountered the same behaviour in the first weeks of use, but fine some time later, odd
Mine works perfect, actually better than my older N8, no drifting, much less interference around tall buildings etc. probably due to dual frequency receiver. If mine had such an issue, I would leave it outside for about 10 min to make sure it has enough time and clear sat view to download all the required sat data, especially on first start. later on the data only gets updated and should be much faster Also there is some way to reset GPS, in case it gets corrupted and doesn't work well, but I don't remember how anymore.
Know issue from Samsung
I'm guessing you have the 5G version as I do. There is a major flaw in the software where the GPS location services are unable to handover when the device switches between the 5G chip and the 4G/3G/2G chip.
This is a know fault that Samsung are working on fixing and are yet to release an update. The most obvious time this fault shows itself is when you are navigating and pass from a 5G area to a 4G area (or vice versa). The GPS drops completely and no satellites can be found. Switching off 5G in the settings stops this issue as the device cannot handover to the 5G chip if it's disabled.
This is obviously not a solution and Samsung are sending me updates every few days saying they are still working on it and hope to release a fix soon.
Hope this helps!
T-Mobile Samsung Note 10 Plus 5G - GPS Issue
If you are using T-Mobile version of Samsung Note 10+ 5G you will experience losing GPS signal constantly. The only way to resolve this software bug is:
Settings > Conections > Mobile Networks > Network mode > and then disable 5G Connection
Technically 5G connection there is nothing to do with GPS but at this point you will find it so related as the bug stays at Samsung Software. Hopefully they will be able to come up with a solution.
Check Time Syncronization
The setting to sync time was turned off. I noticed my phone was 7 minutes fast.... checked the time settings.* Turned on auto sync time.* Once the time was synchronized my GPS stopped being spotty and my games and maps that needed GPS started working correctly again.* The March update must have turned it off by default and I did not notice until my phone was off from my clock and other devices.