NlpWakeLock and NlpCollectorWakeLock Discussion

msgfromside3

Senior Member
Nov 23, 2010
741
131
0
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. :)
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.

Sent from my Nexus 5 using Tapatalk
 

ramiwi

Senior Member
Apr 13, 2011
99
11
8
Would you mind sharing your Tasker profile for this please?

Sent from my Nexus 7
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)?
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.
 

zxyz

Senior Member
Feb 17, 2013
149
90
0
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.
 
Last edited:

msgfromside3

Senior Member
Nov 23, 2010
741
131
0
I finally got this sucker for good. My N5 is sleeping like a baby now. Will post a guide tomorrow on what I did :)

Sent from my Nexus 5 using Tapatalk
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:
 

Gormsen

Senior Member
Apr 30, 2011
730
340
0
Aarhus
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:
It did, but got this one under control too, same goes for the AudioIn wakelock.




what a tease :p
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 ;)

Sent from my Nexus 5 using Tapatalk
 

LeoRex

Senior Member
Nov 30, 2012
514
256
0
Leominster MA
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.
 
  • Like
Reactions: Enddo

shan25

Member
Jan 2, 2013
43
6
0
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?
 
  • Like
Reactions: floepie

Gormsen

Senior Member
Apr 30, 2011
730
340
0
Aarhus
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 @msgfromside3 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:
 

Ben36

Senior Member
Jun 8, 2012
8,258
2,868
113
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 @msgfromside3 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........... [/IMG]
Is this effectively the same as using app ops to turn off 'keep awake' in the play services?

Sent from my Nexus 5 using Tapatalk
 

tylerdurden83

Senior Member
May 28, 2011
1,191
226
0
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.
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.
 

Gormsen

Senior Member
Apr 30, 2011
730
340
0
Aarhus
Is this effectively the same as using app ops to turn off 'keep awake' in the play services?
Nope, I've also tries the App Ops, but they didn't help me.


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.
No it doesn't, I'm using maps, Google Now with location based cards and so on. I'm not disabling location entirely ;)

Sent from my Nexus 5 using Tapatalk
 

tylerdurden83

Senior Member
May 28, 2011
1,191
226
0
No it doesn't, I'm using maps, Google Now with location based cards and so on. I'm not disabling location entirely ;)
"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.
 

Gormsen

Senior Member
Apr 30, 2011
730
340
0
Aarhus
"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.
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?

Sent from my Nexus 5 using Tapatalk
 

tylerdurden83

Senior Member
May 28, 2011
1,191
226
0
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?

Sent from my Nexus 5 using Tapatalk
https://support.google.com/gmm/answer/3118687?hl=en

There isn't much to disagree with tbh.

Location Reporting allows Google to periodically store and use your device's most recent location data, as well as activities like driving, walking, and biking, in connection with your Google Account. Location Reporting is a per-device setting.
...
Location History and Location Reporting data may be used by any Google app or service.
...
Important: This setting only controls Google apps; if you turn this setting off, Google services that aren't apps and non-Google apps may receive your location from the device.
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:

Location Reporting updates
To stop Location Reporting, open Google Settings in your device’s apps menu:
Devices running Android 4.4: Touch Location > Location services > Google Location Reporting > Location Reporting.
The Location Reporting update frequency isn't a fixed amount of time. The update frequency is determined by several factors, such as how much battery life your device has, if you are moving, or how fast you are moving. Location Reporting will only use cell ID or Wi-Fi location detection depending on your device.
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.
 

imarvind

Member
Feb 7, 2010
25
4
0
https://support.google.com/gmm/answer/3118687?hl=en

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.
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)
 

Attachments

Last edited:

Gormsen

Senior Member
Apr 30, 2011
730
340
0
Aarhus
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.
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 :)

Sent from my Nexus 5 using Tapatalk