yashsingh1/xdaforums huggingface dataset:
[Nexus 5 General] Enddo:
you'll need to look at 'better battery stats' stats/wakelocks if you want to know what really happened. that sounds like a lot of drain though

im pretty sure that once you turn location off, location reporting/history gets disabled too. but you can check this in your location page in settings. it's at the bottom. it will probably be greyed out if it's disabled(like location is for you)
[Nexus 5 General] Enddo:
so that's lame. using gps only removes the ability to let google now use your location. . .for some reason. so im giving up on google now location features. ill keep it on but with location off and ill use a weather app to get my updates. it's pretty sad that we even have to do that

i will keep working on getting tasker to work at disabling and enabling my gps, but i couldn't get it to work yesterday. positive thoughts!
[Nexus 5 General] Remoteconcern:
Why not just disable location reporting and history? O understand that's not the point of this thread but it does fix the majority of drain. I keep mine on like this for very very minimal impact on battery.
[Nexus 5 General] msgfromside3:
Just wondering which G Now features are not available by using gps only. It seems weather is okay to me although G Now complains.
[Nexus 5 General] LeoRex:
A Weather app may use GPS. Google Now well lose traffic notifications, 'events nearby', directions to your recent searches.... probably more.
[Nexus 5 General] Enddo:
disabling both location reporting and history does nothing to change my wakelocks when the device is trying to be in deep sleep mode

when i put location to GPS/device only and open google now, instead of seeing my weather widget, it tells me to turn on location for location cards to work
[Nexus 5 General] LeoRex:
Those two remove some, not all, location wakelocks. There are two sides; the service that updates the current location, and the apps that access your location. Dropping reporting and history stops the former, but the latter still occurs as the overall location service is still active (but not updating)

There are a bunch of wakelocks in play... the trick is finding which ones can be blocked without screwing up things. I think I'm almost there actually.
[Nexus 5 General] msgfromside3:
Yup. Weather works for me. I dont care about the rest of the location based info so I didn't notice that. Thanks.
[Nexus 5 General] Enddo:
that sucks :( and very well might be how it is. i just know that i took a shower and the phone had 100 wakelocks from one of these and then 60 wakelocks from the other. in only a 20 minute span. i just want my device to sleep at night. im looking into some tasker automation for this and hoping for the best
[Nexus 5 General] LeoRex:
If you use tasker and Secure Settings, you can toggle Google Location Services when the screen is off (if 4.3 or before). Or you can use Xposed and wakelock terminator to block the wakelocks completely (works really well)...

tasker some won't do it alone
[Nexus 5 General] Enddo:
yup, i was using secure settings when testing. but im on 4.4.2 of course. i think i got it working on my n4, but it was working like 95% of the time. a couple times when i tested it, location wasn't being turned off.could have been user error.

and i use art, so no xposed for me sadly. but thank you for the suggestions
[Nexus 5 General] JazzMozz:
Mind sharing your settings?
[Nexus 5 General] LeoRex:
The consent pop up is a bit of a pain... Only way to get rid of that is to use yet another Xposed module... which doesn't work with KitKat yet.

Without Xposed, there will always be something to annoy you about the process unfortunately.
[Nexus 5 General] jdec529:
I have been able to greatly reduce mine by turning lacatiin sharing and history off, location to battery savings and setting up tasker to turn WiFi off when I'm not home. Also have to make sure you have WiFi scanning always available off. In 6 hours I have about 100 wake lock from Google services but its only for a total of 30 seconds. What I feel helped the most was turning WiFi off when I'm not connected to a network and making sure wifi scanning always available off. Try it out and let me know if it helps.
[Nexus 5 General] JazzMozz:
This does not work for me. Location sharing and history are off. Location is set to battery saving. I use Juice Defender to turn Wi-Fi off when not at home. But these two wakelocks are still present.
[Nexus 5 General] jdec529:
Have u went into wifi-advanced settings and made sure WiFi always scanning isnt clicked.
[Nexus 5 General] JazzMozz:
Yep, disabled
[Nexus 5 General] jdec529:
Sorry. I tried. I did notice that when I first set them settings it didn't work as well. Not sure why but it seems like it got better with time. Maybe placebo.
[Nexus 5 General] JC Why:
Is Wakelock Terminator working?

Hi,

I've been reading the thread here, and I've installed Wakelock Terminator. How do you know if it is working? (I couldn't find a log showing what it is doing.)

At the moment, I have Google Play Services (NlpCollectorWakeLock, NlpWakelock) and Google Search (NlpCollectorWakeLock, NlpWakelock) blocked through Wakelock Terminator. However, according to BBS, I am seeing NlpWakeLock from com.google.android.quicksearchbox.Google Search.

Should these wakelocks still be appearing in BBS or will they show up still even though they are being suppressed?

Thanks!
[Nexus 5 General] LeoRex:
I don't see any of the wakelocks I put into WT in my BBS stats.... I checked BBS, Wakelock detector and GSAM and the WL's I entered into Wakelock Terminator aren't even listed. Do you see any from Google Services listed? If you are only seeing the one from Google Search, then it's doing something... odd that it isn't stopping the one from Google Search though... but I don't even see a NlpWakeLock entry from Google Search, only the one from Google Services.

Can you post a screenshot from BBS showing the partial wakelocks?

---------- Post added at 11:32 PM ---------- Previous post was at 11:13 PM ----------

You may want to look to a different tool to toggle the Wifi... if you look, the fact that Juice Defender is showing up on that list means that it's contributing to your battery drain (maybe as much as it 'helps)..... Not as much as the Google wakelocks, but it's still adding to the problem. 1446 wakelocks for a total of over 5 minutes... that's not so hot.

Have you ever tried Llama? It's a VERY user friendly automation app that has a very light touch (at least on mine) and works awesome. I've used Llama, Tasker and AutomateItPro and while Llama may not have the power that Tasker or AI have, it's amazingly simple and easy to configure and debug.... with only a few simple tasks, it can do wonders for your keeping those background tasks in check.

Llama shows up in my partial wakelocks, but only when it fires and does something.... Juice Defender threw nearly 1500 wakelocks in 3 1/2 hours... that seems quite heavy handed to me.

By the way, I stopped bothering to disable Wifi when I leave home and it disconnects. I played around with it a little and I found that toggling it really didn't do much to save my battery (it actually did the opposite on quite a few occations due to some wakelocks related to toggling the Wifi radio in the background).... I've found that there is really only two instances where Wifi running causes significant battery drains... first when you got a really crappy connection and it has to crank up the power (a strong Wifi connection draws almost no power to maintain itself). And second, if I am connected to a relatively locked down network that might block some of its connection to Google's networks... then I'll start to see more wlan related wakelocks firing and keeping my phone awake. I've found that setting Wifi to not keep itself active when the phone sleeps works to reduce those.

Sorry for the tangent.... but I guess it is slightly related... the end goal here is that we all want the damn phone to get the F to sleep when we turn the thing off.... and all that network traffic (NLP related or not) is usually the guilty party when it comes to keeping your phone awake.
[Nexus 5 General] MWilkenson:
If I disable these as well...what does it prevent me from doing on my phone in terms of google now...maps...etc. I just don't want to cripple my phone by terminating these wakelocks. Anyone feel free to chime in :)
[Nexus 5 General] JC Why:
My understanding is that if the set up is working correctly the background location reporting will be suppressed. However, if you manually open Maps then the network location will fire up (and that is consistent with what I'm seeing...however based upon my previous post I'm not 100% sure it is completely set up correctly.) Same goes with Google Now - location reporting won't run in the background, but if you manually open Now it should update.
[Nexus 5 General] MWilkenson:
So if I am not mistaken after you close the app it'll go back to not wakelocking the device? Google really should address this. Thanks for the reply by the way !! I may try what you did
[Nexus 5 General] JC Why:
Here are screen captures from BBS and WT. The BBS screen capture with "custom" is with the WT rule for Google Play and Google Search, and the one with since "charged" includes a combination of WT rules for only Google Play Services and Google Play Services and Google Search.

(Of note, I think all of the wakelocks I've been seeing for NLP have been for Google Search. I'm not sure I've seen it coming straight from Google Play Services. My wakelocks for NLP have been on the order of 1-2%, so I'm not sure if it truly is a problem.)

Thanks!
[Nexus 5 General] JC Why:
That's my understanding, but I think some of the others in this thread (LeoRex?) are better resources and can hopefully confirm!
[Nexus 5 General] the7thson:
Would you mind sharing your Tasker profile for this please?

Sent from my Nexus 7
[Nexus 5 General] JazzMozz:
Thanks for the tip. I will look into that. I have become less fan of Juice Defender ever since I switched to my N5. I then saw (as you did) the number of wakelocks it causes and the battery drain. Funny when you think it is an app that aims at reducing your battery drain. Might try Wakelock Terminator as well.

By the way, mind sharing your Llama, AI and Tasker settings (in a PM)?
[Nexus 5 General] muyoso:
I think a lot of the "fixes" are probably causing more problems then they are fixing. I used to have the NLP wakelocks badly, but simply disabling Location Reporting and restarting the device has fixed the issue 100% for me and it has stayed fixed for weeks. Now everyone's usage cases are different and its very possible that this wont fix the issue for others, but I have to wonder what errors or issues all of the greenify and App Ops and other apps blocking services from starting is causing. Also, for the record, disabling just Location Reporting does not disable a single feature of Google Now from what I have noticed. I still get traffic and weather updates just like I always have.
[Nexus 5 General] fix-this!:
This device has pretty horrid battery life in general. Im saving for a note 3. Kinda disapointed in lg & google. This thing needed a minimum of a 3000mah.
[Nexus 5 General] Enddo:
troll elsewhere
[Nexus 5 General] msgfromside3:
It seems it doesn't work well for me. I have been switched to gps only mode with the reporting on and both wakelocks as well as EntriesRefresh_wakelock went away for like three days or so. After reading this post, I gave it a shot, and both wakelocks are back, although not as severe as before, and more importantly EntriesRefresh_wakelock is back as crazy as if I have disabled both wakelocks from AppOps.

To me, just change the location to GPS only works the best. Weather works for me (although I have turned it off now - using Chronous for that) and I don't use much of the location based functionalities, including the traffic report to home.

Update: Actually it seems EntriesRefresh_wakelock goes crazy as soon as I turn off the location reporting, regardless of the location mode. Does anyone see this behavior?
[Nexus 5 General] LeoRex:
Yep... that wakelock would rear it's head quite often. It's Google Now trying to get some info when it can't.. is see it if I blocked the nlp wakelocks and it would be ruthless.

So I blocked it too. :)
[Nexus 5 General] anshmiester78900:
guys im faing this wakelock named gcm_conn_alarm wakelock . I started facing it after i used the wakelock terminator app to stop the google play services wakelock .! Does anyone know how to stop it ? as it is really killing my battery life .
[Nexus 5 General] Enddo:
nope, we're talking about different wakelocks here
[Nexus 5 General] anshmiester78900:
Please mate if you have any info on hat problem, do consider helping me :)
[Nexus 5 General] Enddo:
i haven't encountered it, but i bet the guys in the better battery stats thread would be happy to take a look at your log file if you were to submit one to them
[Nexus 5 General] msgfromside3:
Yup. It is a known issue with blocking these two wakelocks in this subject. Weird thing is that I haven't noticed this until now but it seems that wakelock triggers for a short period time with the same setting that I have been using - I hadn't seen it at all for three days and it is now up for 1+ hr out of 4+ hrs since unplugged. I am going to check around a bit longer.
[Nexus 5 General] ramiwi:
Step by step profile setup: http://www.reddit.com/r/Android/comments/1u8alp/guide_to_fixing_google_play_services_battery_drain/

Tasker Dpad fix for the consent popup in 4.4: Add 2 lines after the Secure Settings Location Services Enable. Input > DPad > Right and then Input > DPad > Press.
[Nexus 5 General] zxyz:
For me, I read that disabling Location Reporting stops this. I tried it and although I was on wifi, my drain went from about 1.5% /hr to a mere 0.4 on Franco Kernel. I haven't really read a lot of this thread but I'm just wondering what disabling it does to Google now/Maps?

EDIT: Sorry, it seems to be addressed a few posts up. If I open it manually it will set off location reporting. I see. I'd still like to know exactly how it changes things though.
[Nexus 5 General] Gormsen:
I finally got this sucker for good. My N5 is sleeping like a baby now. Will post a guide tomorrow on what I did :)
[Nexus 5 General] msgfromside3:
Great. Just wondering if your method increased EntriesRefresh_wakelock count. Setting to GPS worked for me for several days but since last night, I was getting massive EntriesRefresh_wakelock. This only happened when I was blocking these two wakelocks before. I changed the location with the high accuracy today and it went away. This brought these two wakelocks back, but they were less costly than EntriesRefresh_wakelock. :silly:
[Nexus 5 General] Enddo:
what a tease :p
[Nexus 5 General] Gormsen:
It did, but got this one under control too, same goes for the AudioIn wakelock.

Yeah I know, especially since these wakelocks are just a PITA ;) but I've gone to bed and don't really feel like doing it now ;)
[Nexus 5 General] LeoRex:
The best way I can describe it is that part of Apollo 13 where they are trying to figure out the right start-up sequence to not blow the main bus.

Find the right wakelocks to suppress, and you are golden. I think I'm on it too, but I've been ROM jumping lately, so long term stats are tough to come by.
[Nexus 5 General] shan25:
I've noticed that I see the nlp wake lock more when the Google Search app is listed as using a significant amount of power. Just a thought, maybe they're related?
[Nexus 5 General] Gormsen:
Okay boys and girls, here's the solution to these freaking wakelocks that keep raping our N5s battery. I've tried different approaches but nothing seemed to do the trick. I got as frustrated as you guys when turning of location reporting and history didn't help anything.

So what I did was:

1. Download Xposed Framework.

2. Download Wakelock Terminator (https://play.google.com/store/apps/details?id=in.andro.wlt).

3. Install both, reboot the required times and activate the module.

4. Open Wakelock Terminator and scroll down to Google Play Services, hit it and select "Prevent Wake Lock"

5. Hit "Filter Wake Lock" and enter the lines in this image (sorry for the large size):

Hit "OK"

Think you're done? So did I, but guess again, this does not prevent the wakelock.. yet.

6. Go into Location in settings in Android.

7. Disable Location Reporting and Location History.

There this takes care of the NlpWakeLock and other associated wakelocks.

As [MENTION=3224409]msgfromside3[/MENTION] said another wakelock is triggered by this "EntriesRefresh_wakelock". The good news is that the same trick can be used to suppress this wakelock. The only hickup is that in order to supress more than one app in Wakelock Terminator you have to pay for it (around $4). On the other hand:

Why not support a developer that has greatly enhanced your battery (or made it like Google should have done)

;)

1. When you have made the in-app purchase go to Google Search in Wakelock Terminator.

2. Same as above only this time type in the following:

EntriesRefresh_wakelock

AudioIn

NlpWakeLock

Yeah I know NlpWakeLock again, but trust me, just do it ;)

There you go, now enjoy the Deep Sleep and much cooler phone :D

As a side note: This does not prevent the wakelocks from ever happening they will still be present, but instead of taking up hours a day we're down to a couple of minutes.

Sorry for the long post, here's a potato:
[Nexus 5 General] Ben36:
Is this effectively the same as using app ops to turn off 'keep awake' in the play services?
[Nexus 5 General] tylerdurden83:
Except that this makes you unable to use any location service like Maps, Wake or any other app that uses Google's location rather than their own implementation, thus crippling a lot of the phone's functionalities, at least to some.

We must find a way to do all the rest, but leave these on.
[Nexus 5 General] Gormsen:
Nope, I've also tries the App Ops, but they didn't help me.

No it doesn't, I'm using maps, Google Now with location based cards and so on. I'm not disabling location entirely ;)
[Nexus 5 General] tylerdurden83:
"Location entirely" means that even non-google location services will not work. For example, I have Beautiful Widgets. In the settings you can choose to use either Google's location services or the weather provider's location services. If I choose the weather provider location services and turn OFF Location entirely, it won't work. If I turn Location back ON, it starts working again, regardless of whether Location Reporting is ON or OFF. If I choose Google's location provider and I have Location OFF it wont work, if I turn location ON but have Disable Location Reporting on OFF, it wont work either, only way to make it work is to turn on both Location AND "Location Reporting".

Same for all other Google apps like G+ etc, if I have Location ON but Location Reporting OFF, they dont work here. Or better, you might think tha they do if you are at the same location that you were last seen at, but as you move, your location won't update, at least mine doesnt.
[Nexus 5 General] Gormsen:
I don't have any problems on my end and I drive around a lot. Well, seems like we disagree here, so you do what you want to :)

As you said: Do you have any ideas on how to achieve the same result without disabling history and reporting?
[Nexus 5 General] tylerdurden83:
https://support.google.com/gmm/answer/3118687?hl=en

There isn't much to disagree with tbh.

You drive around a lot, you are using Maps as a navigator and you say that it still works so you are inferring that that setting isn't stopping your gapps location service functionalities, is that it?

From that same page:

So I'm pretty sure that what is happening here is that you are getting GPS data to properly navigate with Maps even with Location Reporting turned OFF.

No, sadly I gave up and it's up to Google to fix this ****. Personally I think that they can't and that is why they hid the battery stats, hoping that we'd not figure this mess out.
[Nexus 5 General] imarvind:
This is what I've done.

1. Select Battery Saving as the location mode (agree to Google's popup)

2. Set location reporting & location history to Off

Works fine. No big wakelocks, but Gapps are location aware when I query. (eg. If I ask 'whats the weather' in Google Now, it gives me the weather for my area in my city)

I also use tasker to toggle Wifi etc based on Net Location context and it works just fine too.

Screenshots attached. NlpCollectorWakeLock ran for a grand 1m22s out of 11hrs or so of phone usage. No complaints.

Device: Hammerhead

ROM: Stock 4.4.2 + Xposed Framework

Kernel: Franco r31

Update: In case you're wondering what contributed to the 3.8% per hr drain, the biggest wakelocks were due to two hours of music playback (android.media.MediaPlayer) over BT while commuting, and about 30 mins of phone calls (RILJ)
[Nexus 5 General] Gormsen:
Sounds plausible, all I know is that everything is working as it should. And finally I'm not suffering from wakelocks, which I think cripple the device more than some of the services not working from disabling the two location options. If that were the case.

I think your right about Google, though I'm still hoping that they fix these issues :)
[Nexus 5 General] muyoso:
Yea, I turned off Location Reporting and left everything else on and it completely fixed the wake lock. I don't know why all of these crazy fixes are necessary.
[Nexus 5 General] Gormsen:
All the "crazy fixes" are necessary because not all of us are able to fix the wakelocks by just disabling to Location reporting and history. Don't you think we would have tried everything out before spending a lot of time figuring out how to solve it?

I'm glad that it's working for you, but that's just not the case for everyone.
[Nexus 5 General] tylerdurden83:
I'm sorry but I still stand by my side of the argument. I just double checked. I had Location ON, Battery Saving as the mode, and Location Reporting ON while at the office, opened Maps, it located me just fine. Turned Location Reporting OFF and left Location ON and Battery Saving mode.

I went to eat quite a few kilometers away, and at the restaurant I opened Maps. It could NOT update to my new location. Wifi was on and connected to the restaurant's wifi. As soon as I re-enabled Location Reporting, bam, I was pinpointed correctly on Maps.

PS: [MENTION=2345032]imarvind[/MENTION] and [MENTION=4033185]Gormsen[/MENTION]

I kinda lied before, or at least wasn't completely accurate. I did fix the whole issue, but not without some extra apps and work. What I did is basically what Gormsen wrote minus the disable of location reporting. To handle that without actually being unable to ever use any location gapp I solved the problem with Tasker. I made a Tasker profile that disables Location when my screen turns off (I dont have google now installed btw), and one that turns location on when certain apps are loaded (say Maps). There are some caveats. Turning location on will display the disclaimer popup, and since the xposed module to hide it is broken on 4.4 I made Tasker auto accept it using the DPADs under Input. It's annoying to see it popping up and being auto accepted, but better than manually having to open location and accept it myself....
[Nexus 5 General] Gormsen:
Just to make sure that I hadn't forgotten og mistod something I went for a walk around the city, opening Maps at different locations and it updated fine without Location Reporting or History enabled. I've used Maps on different roms for over a month, and the first thing I do is disable Location Reporting and History. I don't know why it's not working for you, but I can only report it working for me, everytime. I can post a couple of screenshots, but that wouldn't do anything else than me telling you what happened ;)

The important thing would be that we got rid of the Nlpwakelocks, even though we use different methods the results are priceworthy.
[Nexus 5 General] tylerdurden83:
You had location set on battery saving?

But yeah the main point here is that google's being dire at this...
[Nexus 5 General] Gormsen:
I did and always do ;)

You're right, they screwed up pretty good with this mess, but then again, that's one of the reasons we have root ;)