NlpWakeLock and NlpCollectorWakeLock Discussion

Search This thread

b00bs

Senior Member
Oct 5, 2010
465
108
Bandung
rakattan.com
I personally suggest don't use this app for Google Play Service. It will wake your phone endlessly for what service that you have disabled. For my case is analytic, checkin, and system update service.

Instead just disable it autorun receiver using this app.

https://play.google.com/store/apps/details?id=com.autostarts.event

For more info:
http://xdaforums.com/google-nexus-5/general/how-to-disable-ota-lollipop-wakelock-t2952845
 
Last edited:

mattcoz

Senior Member
Dec 26, 2007
417
23
Chicago
I have killed most of the location wake locks in lollipop with disable system app disabling the following...

cf7c6df3e745b73f1ac6196a2c95f7ef.jpg
46ece986c1701c5c885805f3aae7b941.jpg
4dd295ce5b0f49e13175425b8dcaf4f1.jpg

What ill-effects come from this? Does it just disable anything location related?
 

frigidazzi

Senior Member
Apr 21, 2011
1,533
265
Nexus Player
OnePlus 5
What ill-effects come from this? Does it just disable anything location related?
I'm not sure of any negatives. My Google now still works fine..and everything else I use with location. Once in a while an app like walgreens for example complains that Google play services is unable yup determine location, but that is when launching the app. When I click search location it still shows up fine.
 

augoza

Senior Member
Feb 4, 2010
535
42
I personally suggest don't use this app for Google Play Service. It will wake your phone endlessly for what service that you have disabled. For my case is analytic, checkin, and system update service.

Instead just disable it autorun receiver using this app.

https://play.google.com/store/apps/details?id=com.autostarts.event
For more info:
http://xdaforums.com/google-nexus-5/general/how-to-disable-ota-lollipop-wakelock-t2952845
I just installed Manage Android Autostart app 60 seconds ago. I went to disable those 3 specific recievers...I noticed there are already several things disabled by default. Is this normal or did the app do this on its own? Here is an example pic:

Google Services Framework is disabled, under During Startup section
 

Attachments

  • Screenshot_2014-12-26-20-54-44.png
    Screenshot_2014-12-26-20-54-44.png
    169.2 KB · Views: 1,008

mattcoz

Senior Member
Dec 26, 2007
417
23
Chicago
I'm not sure of any negatives. My Google now still works fine..and everything else I use with location. Once in a while an app like walgreens for example complains that Google play services is unable yup determine location, but that is when launching the app. When I click search location it still shows up fine.

Tried it and my battery life is definitely a lot better and I haven't noticed any problems, thanks!
 

b00bs

Senior Member
Oct 5, 2010
465
108
Bandung
rakattan.com
I just installed Manage Android Autostart app 60 seconds ago. I went to disable those 3 specific recievers...I noticed there are already several things disabled by default. Is this normal or did the app do this on its own? Here is an example pic:

Google Services Framework is disabled, under During Startup section

It's not the app. Even if you check with Disable Services, there's some services from Google Services Framework that already disabled by default. So this is normal.
 
Last edited:

robertusIT

Senior Member
May 23, 2013
382
25
Palermo
in Alarms i have into com.google.android.gms i have MCS_HEARTBEAT that stress my battery.

You know what is this and how can i fix it?

Thanks in advance
 

msgfromside3

Senior Member
Nov 23, 2010
744
131
I personally suggest don't use this app for Google Play Service. It will wake your phone endlessly for what service that you have disabled. For my case is analytic, checkin, and system update service.

Instead just disable it autorun receiver using this app.

https://play.google.com/store/apps/details?id=com.autostarts.event

For more info:
http://xdaforums.com/google-nexus-5/general/how-to-disable-ota-lollipop-wakelock-t2952845

It depends. I haven't used this app personally, but with App Ops, for some that side effect happened, but for some, it didn't.

BTW, I gave a try of Manage Autostarts For Android, but unfortunately, it itself caused more partial wakelocks than without it, so at least for me it defeats the purpose of using the app. Sigh, I wish HTC has an easy/free way to set s-off and has made the system partition bigger. With my N5 and App Ops combo, I am able to disable all the offending permissions (mostly location). Strangely 5.0.1 on HTC One M8 didn't show as many location related wakelocks as N5, even with location history and report on.
 

b00bs

Senior Member
Oct 5, 2010
465
108
Bandung
rakattan.com
It depends. I haven't used this app personally, but with App Ops, for some that side effect happened, but for some, it didn't.

BTW, I gave a try of Manage Autostarts For Android, but unfortunately, it itself caused more partial wakelocks than without it, so at least for me it defeats the purpose of using the app. Sigh, I wish HTC has an easy/free way to set s-off and has made the system partition bigger. With my N5 and App Ops combo, I am able to disable all the offending permissions (mostly location). Strangely 5.0.1 on HTC One M8 didn't show as many location related wakelocks as N5, even with location history and report on.

Can you share more Information about your partial wake lock? Forgot to mention, my device is Nexus 5. And here is screen shoot after using Manage Autostart app. Only turn off system update and check in services for the sake of deep sleep.

https://www.dropbox.com/s/hjyl5197nbbpgmu/Screenshot_2014-12-30-03-50-55.png?dl=0

I always turn on Location reporting so I guess it's normal for my NLP wake lock.
When I was used Disable Service and turn off system updates, check in and analytic, their sync services will caused a loop and kill my deep sleep.
 

msgfromside3

Senior Member
Nov 23, 2010
744
131
Can you share more Information about your partial wake lock? Forgot to mention, my device is Nexus 5. And here is screen shoot after using Manage Autostart app. Only turn off system update and check in services for the sake of deep sleep.

https://www.dropbox.com/s/hjyl5197nbbpgmu/Screenshot_2014-12-30-03-50-55.png?dl=0

I always turn on Location reporting so I guess it's normal for my NLP wake lock.
When I was used Disable Service and turn off system updates, check in and analytic, their sync services will caused a loop and kill my deep sleep.

I uninstalled the app, but let me reinstall it and see if I can capture the screenshot as well as BBS log.

EDIT: Attached.
EDIT2: FYI, I usually get about 0.5-0.7% drain when the screen is off. I will create a screenshot later and attach it.
 

Attachments

  • Screenshot_2014-12-29-17-58-57.jpg
    Screenshot_2014-12-29-17-58-57.jpg
    151.5 KB · Views: 2,396
  • BetterBatteryStats-2014-12-29_175953904.txt
    28.1 KB · Views: 43
Last edited:

Ok_Kaleidoscope5109

Senior Member
Dec 29, 2009
2,624
709
Is it me or is Google Fit acting up with 42 minutes of wakelock today. I work in a corporate office, so its not like I'm running 3 miles a day, but jeez... 42 minutes of wakelock?

It's all our favorite nlpcollectorwakelock too, and I'm only 8 hours into my day so far.
 

msgfromside3

Senior Member
Nov 23, 2010
744
131
Is it me or is Google Fit acting up with 42 minutes of wakelock today. I work in a corporate office, so its not like I'm running 3 miles a day, but jeez... 42 minutes of wakelock?

It's all our favorite nlpcollectorwakelock too, and I'm only 8 hours into my day so far.
It has started acting up since the last update, which reminds me why I greenified it before it worked okay...
 

lirong

Senior Member
Feb 21, 2012
343
13
Hi - I am suffering from the NLP wakelocks and read about trying Wakelock Terminator. I have xposed installed.

I was unable to fund Wakelock Terminator in Google Play and when I go to Xposed and search the Download section I dont see it there either. How do I find this?
 

jianwen03

Senior Member
Jan 23, 2017
244
96
Hi old thread.
Am on CM14.1.
Wifi & Bluetooth scanning: Off.
Google Location History: Off.
Google Location Sharing: Off.
Location mode: Battery saving.
Nlp wakelocks went from ±2 minutes to >10 second overnight. When location is disabled nlp wakelocks are almost nonexistent but weather widgets don't work.
Thanks for having this discussion thread.
Still a slight drain in battery though whereas a straight line is obtained when location is disabled overnight…
 
Last edited:

Ardysan

Senior Member
Jul 26, 2019
209
24
Can I necropost on this one? ?
700 NlpWakeLock per hour on Mi9T EU stable ROM 10.3.12. DoesntPostAThing Anything changed in 2019 on how to fight this?
 
Last edited:

Top Liked Posts

  • There are no posts matching your filters.
  • 31
    Firstly, this is not another thread to complain about your horrible battery life due to Google Play Services. I'm tired of those (mostly on Reddit, but some here too. Either way, none of that here :) ). This is instead to try and find a root cause for it. "It's Google's fault" is not good enough for me, and if you truly care about your battery life it shouldn't be for you either. If all you're after is an easy way out to get your battery life back, then this thread is not for you. We're here to reach a solution where you can get location services and good battery life. I've done if before, on my Galaxy Nexus on 4.3, but it seems that something is wrong in KitKat. Let this be a place where we all dig deeper into this issue, perform tests, gather results, and then share and discuss them. Here's what I've got so far:

    The wakelocks that cause this battery drain are NlpWakeLock and NlpCollectorWakeLock. Nlp stands for network location provider. As you may know, Android provides developers with two ways of gathering location information. One is through the GPS_PROVIDER, which uses the GPS, and the other is through NETWORK_PROVIDER, which uses cell towers and WiFi APs to get your position. According to their developer website[1] , NETWORK_PROVIDER uses less battery, is faster, but is less accurate. GPS uses more battery, takes longer, but is good if you want an accurate location. I'm assuming this particular wakelock uses NETWORK_PROVIDER.

    I also did some digging using ROM Toolbox Pro's autostart manager. My guess was that Google Play Services must be triggered every time a certain intent is broadcasted, since nothing obvious is telling it to run. Turns out there are quite a few. 30, to be exact. However, many of them have to do with GCM and we don't really care about those. One of particular interest is one called com.google.android.location.internal.NlpNetworkProviderSettingsUpdateReceiver. It listens for the intent android.location.PROVIDERS_CHANGED. The LocationManager API's documentation[2] tells us this:

    Broadcast intent action when the configured location providers change. For use with isProviderEnabled(String). If you're interacting with the LOCATION_MODE API, use MODE_CHANGED_ACTION instead.

    I'd assume that this means when you change your location providers, such as enabling/disabling data, WiFi, GPS, etc.

    However, location reporting only seems to use network location. If you're on KitKat, go to the location settings and choose device only. Then choose battery saving. It asks you to accept location reporting. Same thing when you choose high accuracy. What do both of those have in common? Network location. You can switch between those two as much as you want and it won't ask you to accept again. However, once you switch to device only and back it will ask you. This shows that it only uses network location.

    I find that Google (Play) Services has 5% (+/- 1%) keep awake. Tested on both Nexus 5 running KRT16M and Galaxy Nexus running JWR66V. Both use a certain time of GPS, although that number is never increasing. I assume this is some sort of initial one-time lock. It can be disregarded.

    One more thing I noticed is that this Google Play Services issue is much more prominent on KitKat. While they have happened before, often times a simple Play Store update would fix it. This time it seems to be location based. Guess what changed in KitKat? The way you deal with location settings. It may be that the way location settings are grouped in KitKat cause that intent to keep firing, and that in turn triggers something that eventually ends up being what you see as NlpWakeLock.

    What I'm going to try next is disabling that intent receiver and then monitor that wakelock as well as if location reporting still works. Feel free to play around, and be sure to share your results.

    To those who are suffering from these wakelocks, could you please share your settings? Such as what type of location mode you have (high accuracy, battery saving, device only), WiFi on or off, data on or off, signal strength, WiFi always scanning, Play Store and Play Services version, what device you have, Android build number, and what ROM/kernel you're using if you are using one? Any other info such as screenshots of battery screen, betterbatterystats, wakelock detectors, etc. will all be welcomed.

    Here is the Reddit thread I created discussing the same issue: http://www.reddit.com/r/Android/comments/1rvmlr/nlpwakelock_and_nlpcollectorwakelock_discussion/
    17
    Hi

    The battery drain caused by these wake-ups and wake-locks are all to do with Google Location services. Specifically when Wi-Fi location services are enabled, in Kit-Kat terms this is High Accuracy and (ironically) Battery Saving modes. GPS is considered a high battery user, but it may not be the worse offender.

    When we agree to use Googles Wi-Fi database we agree to send data to Google. This enables the following back ground tasks:

    1) Building and updating Googles Wi-Fi database when High Accuracy is selected. Background services will wake the phone, look for Wi-Fi access points nearby, then fire up the GPS to get a precise location, and send that data back to Google, Google uses this to identify Wi-Fi access points and their locations to continually update it's database. They don't drive around in cars any more to collect this data. I'm not sure anyone knows the schedule for this, and it seems sometimes this happens a lot, other times this activity dies away. Perhaps the more we use the Wi-Fi database lookup for locations, the more Google will use our phone later for keeping that database up to date. No such thing as a free lunch.

    2) Google doesn't just collect data as to where we are, but it also collects data about how we get to where we are. Some of us will have seen cards in Google Now telling us how much we cycled, ran or walked. In order to work this out, our phones must wake regularly (every n seconds) to do a location lookup to work out the distance we travelled and so the speed we are travelling at. From our location and average speed Google decides if we are walking, jogging, or in a car or train. No doubt there is some attempt at backing off these wake-ups to save battery power, for example if the phone hasn't moved in several hours it will sample less often. Note it doesn't seem to matter if you consume this data, e.g. someone doesn't use Google Now, Google are still gathering and recording this data for their marketing purposes and data mining.

    3) Traffic. When Google works out we are travelling by road Google will ramp up sampling rates. Google will gather location data from us, again whether we use that data ourselves or not, to work out congestion and hold-ups on the road and then offer those using Google navigate new routes to avoid problems and hold ups. All of us with an Android device are GPS trackers for Google traffic services.

    It has not always been like this, it is only recently Google has ramped up the collection of location data. Google suggest their location framework will use on average no more than 1% of battery power an hour, over 24 hours that is almost a quarter, it adds up. If reception is not good then the constant chatter of data back to Google services could see the phone using a lot more.

    The problem with all 3 above is the usage isn't always predictable. So messing around with a few settings might see an improvement for a while, but generally these wake-locks just come back.

    The only way to stop these wake-locks is to turn off location services, either completely or just use GPS mode.

    This is why using GPS only can now save battery. Modern GPS chips use less power and lock-on quicker, often working in some buildings as well, and avoids having Google use our phones as location trackers.

    Regards

    Phil
    11
    Hi

    found this and it's about wakelocks so yeah http://xdaforums.com/showthread.php?t=1827676 thought it might help us understand and have a unified answer on how to maximize our battery lives

    Wake-locks are misunderstood unfortunately which can lead to a dead end.

    Many apps can show tens or hundreds of wake locks but they haven't caused any battery drain. An app can only have a wake-lock if the phone is already awake. A wake-lock just says, "Hey phone, I'm busy doing something which if you went to sleep now it might cause a problem". For example saving something to a file or downloading/uploading some data which would become corrupt if the phone just went into deep sleep. Many times these wake-locks are taken then released in milliseconds and we were using the phone anyway. Many wake-locks are taken and released because we have turned on the phone to do something with it.

    Wake-locks may cause battery drain when an app is badly programmed, for example an app takes a wake-lock but fails to release it. The phone then stays awake, although the screen will go blank and look off, the phone is on and not in sleep mode. The phone then runs down much more quickly over the course of a day or hours because it is actually constantly on. Typically apps are well behaved these days and release the wake lock correctly.

    The NlpWakeLock and NlpCollectorWakeLocks are a symptom but not the cause. The cause is location code that runs in Google Play Services that uses the AlarmManager in Android to constantly turn the phone on every few seconds to get a location update. The AlarmManager uses a real-time clock separate from the main CPU and can be told to wake the phone up from deep sleep at X time or every X seconds. Essentially this wake-up is the same as us pressing the power button, except the wake-up keeps the screen off as Android knows it wasn't a user initiated wake-up.

    When this alarm runs, the phone wakes up (but screen stays off so we are unaware this is happening), Google Play Services location code gets a message to say "Hey, this is your wake-up call", at that point Google code knows it is time to do a location check. In order to keep the phone awake while this check takes place and data is exchanged with Google services, the NlpWakeLock and NlpCollectorWakeLocks are taken, a location fix is obtained, Google Play Services then sets another alarm for a some seconds later and releases the wake locks. The phone immediately sleeps again, maybe after only a second or so, but is then woken not many seconds later for another location check, and so it goes on.

    The problem is the frequency of wake-ups, ideally our phones should sleep and never wake up unless we receive a phone call or text message or turn the phone on to use it. Each time the phone wakes up power is drawn for the CPU to run, and power is also used in the action of transmitting data back to the Google mother-ship and reading from other sensors, and when this happens every few seconds it soon depletes the battery.

    There is no bug here. It is all by design. Google needs to get frequent location updates to find out if we are moving and how fast, it can then offer us things related to that, for example how far we might have cycled or walked, or gather info regarding traffic congestion. The end goal is marketing to us based on our activity and location. To do this needs a high sampling rate. Prior to Google working out our current activity which is a fairly new thing, they were just concerned with our location, and typically just fired the phone up every 10 minutes or so to get a location and we didn't notice the power drain as it didn't amount to much.

    Google are collecting this activity data whether we use it or not, and that collection is enabled when we Agree to the terms and conditions seen when turning on location services.

    I guess the other plan with always collecting this data is to make us accustomed to poorer battery life and it becomes the norm for us. This way Google can come out with some new nifty marketing thing based on our activity and location to raise their profits and tell us it will use no more battery power. Apps like Tasker can sell on the basis of being battery friendly because they use the Google location data for things like Geofencing, and as for most people Google location code is already on and draining the battery will see no extra usage.

    The answer is simple, we either all boycott Google until they give us better control over this so we can opt not to share this activity data, but still get the benefit of Wi-Fi location services (unlikely to happen), or we just turn location services off or use GPS only.

    Google have nothing to fix, this is all by design.

    Regards

    Phil
    9
    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):
    FkFtS1V.jpg

    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:
    baked-potato.jpg
    6
    I've tried solution which @sherdog16 gave us and I figured out that just denying wake up and keep awake in App Ops for Google Play Services(not Google now) helps with wakelocks!
    Here is how it looks like:
    uploadfromtaptalk1401796566658.jpg

    I'm using Mahdi ROM which has App Ops build in to the ROM. This method doesn't affect acquiring location by any other app. Google Now shows weather for my location etc.

    Here is also screenshot how it looks like in BBS:
    uploadfromtaptalk1401796907568.jpg

    Hope it will help!

    BTW. Any one tried 4.4.3 update? Is the issue also there?