[Q] 40% Battery Burn Overnight (with WLD Screenshots) - Nexus 5 Q&A, Help & Troubleshooting

Hey guys,
I had the issue with the 40% battery burn overnight again. According to WLD, the CPU was awake for 96% of the ~11 hours since it was charged (which explains it). I want to make sure I'm reading these right, so I've posted screens of wakeup triggers and CPU wakelocks.
I've got Google Now turned on, the "OK Google" keyword detection turned off, location reporting on, location history on, and location services set to high accuracy (I use navigation and what not and would prefer to not have to toggle it constantly). Please see the attached screenshots.
Some googling of my own told me it's location reporting keeping it awake, which I'm afraid is the case, as I didn't have this issue for a while when it was off (it's also been on for several days and I haven't had this issue).
So, I have two questions in total. Is it Google Now's location usage that's draining my battery and keeping my phone awake? Also, since this isn't an every night issue, do you have any suggestions or recommendations to solve it without losing Gnow functionality?
I am running Carbon (July 1st nightly) and the Franco Kernel r55. Thank you very much in advance, this issue has alluded me and annoyed me for months.
Update: upon further research, I'm seeing that blocking wakelocks from Google Search / Google Now related location services will eliminate the problem without affecting Gnow functionality - is there any truth to this? I've also seen people claim to have disabled location reporting without loosing their weather, nearby events, etc. I worry that disabling the wakelock will impede functionality because I don't have the screen on often while traveling. I just can't seem to get a straight answer!
Update 2: after a phone call to Google (yes, they actually gave me a good answer), I was told that Location Reporting *only* tracks where you've been to give you travel time and similar things. Turning it off doesn't disable weather, nearby events, parking location, and so on, so it's looking like just disabling it is a good place to start.

turbofandude said:
Hey guys,
I had the issue with the 40% battery burn overnight again. According to WLD, the CPU was awake for 96% of the ~11 hours since it was charged (which explains it). I want to make sure I'm reading these right, so I've posted screens of wakeup triggers and CPU wakelocks.
I've got Google Now turned on, the "OK Google" keyword detection turned off, location reporting on, location history on, and location services set to high accuracy (I use navigation and what not and would prefer to not have to toggle it constantly). Please see the attached screenshots.
Some googling of my own told me it's location reporting keeping it awake, which I'm afraid is the case, as I didn't have this issue for a while when it was off (it's also been on for several days and I haven't had this issue).
So, I have two questions in total. Is it Google Now's location usage that's draining my battery and keeping my phone awake? Also, since this isn't an every night issue, do you have any suggestions or recommendations to solve it without losing Gnow functionality?
I am running Carbon (July 1st nightly) and the Franco Kernel r55. Thank you very much in advance, this issue has alluded me and annoyed me for months.
Update: upon further research, I'm seeing that blocking wakelocks from Google Search / Google Now related location services will eliminate the problem without affecting Gnow functionality - is there any truth to this? I've also seen people claim to have disabled location reporting without loosing their weather, nearby events, etc. I worry that disabling the wakelock will impede functionality because I don't have the screen on often while traveling. I just can't seem to get a straight answer!
Update 2: after a phone call to Google (yes, they actually gave me a good answer), I was told that Location Reporting *only* tracks where you've been to give you travel time and similar things. Turning it off doesn't disable weather, nearby events, parking location, and so on, so it's looking like just disabling it is a good place to start.
Click to expand...
Click to collapse
The data we need to see isn't shown in your screenshots. This is why I prefer BBS. You can just post a log and nothing will be missing.

Aerowinder said:
The data we need to see isn't shown in your screenshots. This is why I prefer BBS. You can just post a log and nothing will be missing.
Click to expand...
Click to collapse
Ugh, I knew I should have left it. I've got it installed now and will post a screenshot if it happens again. I've got Location Reporting turned off. I want to see if it will still give me the features I want, and if the battery drain issue stops, yippee. I will leave BBS there, however, in case it happens again.

turbofandude said:
Ugh, I knew I should have left it. I've got it installed now and will post a screenshot if it happens again. I've got Location Reporting turned off. I want to see if it will still give me the features I want, and if the battery drain issue stops, yippee. I will leave BBS there, however, in case it happens again.
Click to expand...
Click to collapse
All of the wakelocks that start with Nlp are due to location. Switching the location mode to Device only will stop them. Anything that relies on GPS still works fine. This should be the default setting.

I did a factory restore of the phone, latest Gapps, Carbon rom (07/07 nightly + 07/06 firmware), latest ElementalX Kernel now (so far, better temp/performance + equal or better battery). I know it's only an hour's worth of use, but a problem is pretty apparent.
Location reporting/history is off, Gnow is enabled, keyword detection is off. WiFi is on, and location services are in high accuracy mode. Why is a wakelock created by never released and how do I avoid that?
Is there any reliable setting I can use to avoid a random software issue eating up my battery? This inconsistency is driving me insane.

Related

Better Battery Stats - what's causing "NetworkStats" & related Partial Wakelocks?

Better Battery Stats - what's causing "NetworkStats" & related Partial Wakelocks?
I think I've isolated my battery drain down to a few things through BetterBatteryStats and GSam Battery Monitor:
1. "NetworkStats" as the longest Partial Wakelock and "RILJ" and "AlarmManager" as the highest count Partial Wakelocks in Better Battery Stats.
2. In GSam battery monitor "Android System" is almost always #1 for number of times waking devices, and usually followed in #2/3 by "Google Maps" and "Google+". Google+ sync'ing is turned off, but the "Sync Instant Upload" is turned on. I can't for the life of me figure out why Google Maps is always high on this list, even when I don't open the app all day.
Does anyone have any tips for how I can figure out what is triggering these NetworkStats/RILJ/AlarmManager/Android System/Google Maps wakelocks?
I'm thinking they are all related to each other through something like Calendar, or some other Android service gone awry. I don't know of any other way beyond Better Battery Stats and GSam to isolate the drain down to something more specific and measurable. Any thoughts or tips are appreciated.
Just wondering, is Google location services, gps satellites, location and Google search turned on?
erwaso said:
Just wondering, is Google location services, gps satellites, location and Google search turned on?
Click to expand...
Click to collapse
I did not turn off Google Location Services.. what apps/services fall under that?
I also did not turn off Location and Google search, but that shouldn't be causing wake locks when I'm not using my phone, right?
GPS Satellites were turned off.
I have the same issue on my nexus. I have all three option disabled but get google keeps have the network location service running in the background. I even cleared maps cache and force stop. it really annoying
r29 said:
I have the same issue on my nexus. I have all three option disabled but get google keeps have the network location service running in the background. I even cleared maps cache and force stop. it really annoying
Click to expand...
Click to collapse
Sorry to hear - but glad to hear I'm not the only one that has noticed this. Are you running stock, custom rom, or what? One suspect is the HTC weather widget, I have that on my home screen but it's set to sync only once every 4 hours.
There must be some way to delve into what is triggering "NetworkStats".
So some of the things I've done so far that have helped:
Uninstalled the applications on{x} and Pageonce. Both were regularly showing large amounts of wake locks.
Disable Google+ sync'ing in BOTH Settings->Accounts AND within the Google+ application. Within Google+ there are separate Notification, Messenger, and Hangout sync settings. I'm not positive that disabling from within the app is necessary but I was still getting wake locks from Google+ after disabling it within Settings->Accounts. I'll know soon enough if that helps.
Disable redditnews from checking for new mail. I had accidentally set this to check for new reddit mail every 15 minutes!
Disable GPS satellites, Google Location Services, and Location and Google search from within the Settings->Location menu. I did this to see if it would eliminate the Google Maps wake locks that I can't seem to get rid of or pinpoint the cause of. It's only been a day but it seems the Google Maps wake locks have been cut down, but not completely. It's driving me crazy not knowing what is triggering Google Maps to wake lock my phone. The hunt continues...
I am on a custom rom LiquidSmooth 4.0.4 base.. I have tried removing anything that deals with maps but that stupid service still starts

[GUIDE] The Total Newb's Guide to Wakelocks

PARTIAL WAKELOCKS
PWLs are a different beast. These are almost all caused by an app (with a couple of notable exceptions). For that reason, I won't go in-depth on too many of them, as the solution is usually to delete the app causing them. There are a few notable ones, and a few apps that merit mention.
AudioOut_1, AudioOut_2: This is an evil leech of a wakelock that will drain you dry if given the chance. For being such a pain in the app, it's surprisingly easy to get rid of. This wakelock is created whenever the phone's speaker plays a sound. With 99% of sounds, it goes away almost instantly. With keypad sounds, however, it doesn't go away so quickly, and it will sit there draining your battery for as long as it goes unnoticed.
To fix: Open Settings, then select sound. Turn off keytone sounds, touch sounds, screen lock sounds and vibrate on screen tap. It'll take some getting used to, but the extra battery you'll coax out just by solving this ridiculously simple problem is more than worth it. See DoctorQMM's post (#5), linked at the end of this one, for info on additional causes of this wakelock and how to fix them.
ConnectivityService: This will appear whenever your phone is trying to connect to a mobile data network. Excessive wakelocking here suggests that your phone is having a hard time finding a network, and an even harder time staying on it.
To fix: Test out different radios and see if one's better in your area. I personally have to use UCLF5, as UCLF6 is a mess out where I live. If you're able to control your radio bands and you don't live in an LTE area, setting your phone to hunt for GSM/HSPA connections only can save you a little bit of juice here. Not much, but every drop counts, and if you're not using LTE anyway...
AlarmManager: This isn't a wakelock unto itself so much as it's a compilation of app alarms and the time they held the device awake for. Seeing the wakelock alone doesn't tell you much, but here's where one of those features of BBS that I said we'd be using comes in.
To fix: Open BBS. Tap the menu button, then "More", then "Raw Alarms". That will show you which apps are waking up your phone, and how often they're doing so. Google will have a ton of wake-ups, but they're mostly innocuous. We'll discuss some of Google's problem apps later. Email clients will also have a ton of alarms. If anything else looks out of whack, though, first check the app settings to see how often it's refreshing. If the app is set to refresh every hour but it's set off 400 alarms in the last 30 minutes, get rid of that sucker and email the dev. You can't eliminate this wakelock, and it's constantly my #1 PWL at this point, but you can minimize it.
A special note about this wakelock: You will get all kinds of crazy numbers out of this wakelock. You may see as high as 20m on a 1h30m stretch of battery. You will want to kill this wakelock, and kill it with fire. Don't, I say, don't do it! Look at your deep sleep time vs. time awake - screen on. Odds are, it's far less than the 20m that this wakelock is showing. You may have a time awake - screen on time of less than 3 minutes. What's the reason for the discrepancy? Well, it's well-known that there are wakelocks out there, PWLs especially, that will hold your device awake even if it's already been woken up: i.e., you'll have a PWL registering while the screen is on. Alarms are certainly among those that do so, as they are designed to wake your device up, so that's the first thing they'll try and do. I suspect the remainder of the discrepancy is caused by the way BBS reports. I suspect every alarm is tallied differently, so that if you have two alarms go off at the same time and last for 2 minutes each, BBS will register 4m of wakelock even though it was only held awake for 2m. Make sense? It doesn't for me either, but that's the best pair of explanations I've got, and the numbers seem to back it up.
MediaScannerService: This is a wakelock created by the system as it scans your device for music, movies, pictures, etc. Once in a while, it will randomly get hung up and hold the phone at 384 MHz for...well...until you notice and do something about it. Like AudioOut_1, this is a heavy-drain wakelock. Luckily, like AudioOut_1, it's almost always easy to fix. A note about this wakelock: it's been shown to be an occasional, but serious, problem on Jellybean ROMs. We're still not entirely sure why, let alone how to solve it permanently. That said, haloeight has been able to beat it into submission on his phone.
To fix: Reboot. Ninety-nine times or so out of a hundred, this solves the problem. If the problem persists, go to Settings -> Applications -> Running then tap on "Show cached processes". Find the Media process and stop it manually to kill the wakelock. That's a short-term fix, though, as a persistent wakelock from this process most likely means you have a corrupt media file somewhere on your phone--and there are a lot of sounds, movies and images on your phone. This is one of the few wakelocks that, if it's a regular problem, justifies considering a full wipe and clean reinstall. That's not because it's doing any kind of damage to your phone, but more because sifting through every single media file on your phone to find the culprit isn't really a practical solution. If you've got a persistent wakelock here on a JB ROM, try haloeight's approach above.
SyncLoopWakeLock: This is exactly what it sounds like; your phone is being held awake while apps sync. There are two possible causes for this: apps syncing (duh) and a bad data connection.
To fix: Open BBS. Tap the menu button, then "More", then "Raw Network Stats". This will show you which apps are using the most data, and help you narrow down possible culprits. Once you've done so, check those app settings and make sure they're not set to constantly push notifications, refresh every five minutes or anything dumb like that. If they're set correctly and still holding sync open that long, try downloading the Speed Test app off of the Play Store and test your phone's connection. If your connection is on the slow side, it's possible that the apps are struggling to sync because of your bad data connection. Try flashing different radios to see if that solves it. If the troublesome apps remain so after you've found a better radio, it's best to just delete or freeze them.
ActivityManager family: This is a harmless wakelock. The typical cause is not exiting out of apps fully before turning the screen off.
To fix: Don't sweat this one too much. If it's a big issue for you, make sure that you're exiting out of apps fully (i.e., either use the back button to exit the app or FC it in Task Manager) before turning the screen off. Credit to the XDA Wiki on this one, as this is one of the PWLs I wasn't able to figure out for myself simply because I hardly ever saw it. I use the back key to exit apps.
GTALK_ASYNC_CONN family: Despite its name, this wakelock doesn't seem to be directly related to Google Talk. How do I know? I haven't had Google Talk on this phone in over a month, but the wakelock still pops up from time to time. This wakelock also seems to be related to a poor wifi connection, so keep an eye on that as well. These wakelocks can be absolute destroyers of your battery if given the chance, and unfortunately, there's no known root cause for them, and no reliable way of eliminating them.
To fix: These wakelocks will often disappear within a minute or so of generating. If one becomes persistent, check your wifi/data connection and make sure it's good. If it persists, reboot into recovery and wipe cache and Dalvik ASAFP. That solves the problem temporarily, but it will reoccur. Thanks, Google.
NetworkLocationLocator: What a lovely name for such a lovely wakelock. It's a minor annoyance usually, nothing more. If this one is persistent, it's because you're in an area with crappy cell coverage and very few Google-mapped Wifi networks.
To fix: Why, exactly, are you leaving Network Location on all the time anyway?
NetworkLocationCallbackRunner: Thanks to clankfu and mw86 to pointing this one out, and a huge thanks to promiseofcake for finding the solution. This is the first wakelock published here that's specific to a phone other than the Skyrocket; it's an S3 issue. Hooray, we've gone global! NetworkLocationCallbackRunner is another wakelock caused by that most wonderful of apps, Google Maps. If you're still using it, seriously, why?
To fix: Upon turning on your phone, don't open Google Maps or anything else that utilizes Google location data. Or, you know, you could just uninstall Google Maps and use an alternative program...details below.
show keyguard: This is a new one for me. It had always been there, but since switching ROMs, it's really started to show up. Not in massive quantities, but enough to make me scratch my head. I've already established that setting your lockscreen to not show user info, weather or calendar data will significantly reduce this. I'll play around with adding those back in more, and having sliders on your default lockscreen won't do much damage either. Still, the more people who've goofed around with this one, the better, as it makes this entry all the more accurate.
To fix: I'm testing several possibilities now, but the one that's worked best so far is turning calendar, weather and user info off. It seems that having those on causes the lockscreen to wake the phone to refresh itself, which creates the wakelock. Judging by my recent experience, this seems to be a pretty big leech.
Chekin Service: Thanks to epapsiou for finding this one and confirming my guess on it. Getting tough to test without my Skyrocket being used as a phone anymore. This wakelock, while a Google Services process, seems to be caused by Facebook. That kind of confirms my theory that Facebook "borrows" Google services.
To fix: Uninstall Facebook and use an alternative app, or just access Facebook through your mobile browser of choice.
SCREEN_FROZEN: Uh oh.
To fix: If this is high on your list, you've got bigger problems than a wakelock.
PWL OFFENDING APPS
We're almost done, I promise!
Down here, I'm going to list off for you apps that will cause you severe PWL migraines, and what to do about them.
A note when uninstalling Google built-ins: Google built-ins are often system packages, and deleting them can have unpredictable results. I highly recommend freezing them in Titanium Backup for several days to see how the phone runs before uninstalling them through there as well. Deleting system processes is inherently risky, and I assume no responsibility for your own decisions.
Facebook: Any social networking app will want to sync as often as it can, but you can overrule that by setting notification intervals. Thing is, Facebook doesn't respect those intervals, and wakes up the device for data exchanges pretty constantly (even though your news feed may only update every hour or so when you want it to). This app is no better than bloat, and should be treated as such when you clean house.
Alternative App: Friendcaster and Fast are both great alternatives that let you set how often the app wakes up, but I've taken to just accessing m.facebook.com through the browser of my choice lately.
Gmail: A running theme here will be that if there's a non-Google equivalent to a Google app, you should probably kill the Google and download the alternative. Gmail is an alarm fiend, and one of the main offenders if you have an excessive SyncLoopWakeLock problem.
Alternative App: How many email clients are out there? I've had the best luck with the stock Email app, but K-9, Kaiten, MailDroid, even Enhanced Email and Touchdown for the power users are all great alternatives. Speaking of which...
Whatever email client you're using: Email clients will always be high up on the list of alarms, and that's by their nature. Keep an eye with raw network stats on how long they're connected for, and don't be afraid to experiment. I tried K-9, Kaiten and MailDroid before settling back on the stock Email app as the one that gave me the best balance of battery life and necessary features.
Alternative Apps: Download and try out different clients until you find the one that works for you. Nothing ventured, nothing gained, right?
Google Latitude: Latitude is a tracking service. As such, it tracks you. Beyond the creepiness aspect of that, it holds your phone awake pretty often while doing so. Kill it. Kill it with fire.
Alternative App: Personally, I'm not into the whole stalking thing, but I've heard that Glympse works quite well.
Google Maps: Colossal waste of space and battery. You can do better. An important note on Google Maps: this app will still wake your device up even after being frozen in Titanium Backup. I don't know how it happens, but it does. To truly solve the alarms from Google Maps, you have no choice but to uninstall it. Do so at your own risk.
Alternative Apps: I'm a fan of Waze for navigation and MapQuest for a Google Maps-ish browseable interface. OSMAnd is also a great alternative, but it uses a ton of internal memory because of its offline nature. If you really love Google Maps, reinstalling it from the Play Store as a user app can reduce those wakelocks dramatically.
Google Play Music & Movies: Updates itself constantly and wakelocks. Even if you freeze it, it still somehow manages to tell you that there's an update available. It's the Google zombie.
Alternative App: There are literally 100+ music and/or movie players out there. I'm sure you can find one that works for you. I'm a big fan of RocketPlayer for music, and I just use the stock video app more often than not.
JuiceDefender: What's that you say? JD sets off tons of alarms and holds the device awake for more time than I'd care to discuss, largely because of its data control settings. More harm than good, in my opinion.
Alternative Apps: JuiceDefender's main goal in life is to minimize the amount of time your device is held awake. Therefore, if you've just gone through all this to clear out wakelocks, do you really need another wakelock-prone app to do what you've already done?
Skype: Occasionally, after a call, Skype will wakelock. This is not designed to happen, and is more a glitch in the app than a forced sync. Force-stopping the app and clearing its cache have solved it for me on the rare occasion that I've seen the wakelock occur.
Alternative Apps: No idea. I don't personally consider this a "replace" situation.
World Weather Clock Widget: Do you have this on your phone? Get rid of it. I installed it as an alternative to SiMi Clock Widget, and while it certainly looks pretty, it ignored my "Update every 3 hours" and tried to update 275 times in that 3 hour window. This drove AlarmManager, GSYNC_ACONN, and NetworkStats off the deep end, and left me at 82% deep sleep with 6% of my battery gone in 3 hours. Kill it. Kill it with flaming nuclear waste.
Alternative Apps: I liked SiMi Clock and wanted to try something new, basically. I'm back to SiMi, but there are literally hundreds of clock widgets out there.
Google Search: If you use Google Now, forget trying to fix this one. GNow is a battery hog, and there's nothing you can do about it without crippling the feature. If you don't use GNow, you can use Greenify to hibernate Google Search and stop the persistent alarms and wakelocks it creates. Greenify is a method I hadn't used in the past, but I've grown to like it for hibernating rogue Google apps.
Alternative Apps: A quick look at the Play Store revealed Quick Search to be the second most-popular option after Google Search. I've run devices without Google Search in the past without issue, but it is usually a system app, so freezing instead of deleting would be a safer option.
That's the bulk of what I've learned from clearing out wakelocks. Remember how, early on, I specified that the search engine of your choice was the third tool? Simple fact is, I haven't installed every app on the planet, so I haven't seen every PWL out there. Because of the way my phone's set up, there are KWLs that I've never seen and never will. If you've got a pesky wakelock that won't go away and it's causing noticeable battery drain, Google (or Bing, or Ask.com, or whatever) is your friend. Good luck, happy hunting, and enjoy the extra battery life you'll get just by spending a few hours over the course of a few days tracking down and killing those wakelocks.
Also, be sure to check out Jrockttu's thread on fixing your battery, as there's tons of great information in there.
Additional in-thread references below. If any of these posts helped you out, please click the link down here and send them a thanks.
DoctorQMM covers com.google.android.apps.maps, an alternate fix for AudioOut_1 and using CPU Spy to help track down wakelocks.
kishke tracks down an alternative cause for the sdio family of wakelocks (including sdio_al) and details it for us here.
polarbearno shares their experience with the mmc_detect family of wakelocks.
haloeight gives us some great steps on how to get rid of the MediaScannerService wakelock on AOKP-based ROMs.
promiseofcake solves the S3-specific NetworkLocationCallbackRunner PWL.
Hi,
I am trying to use smartcharging feature on my crdroid ROM. During the charge, when I reach the preset charging value, it is working well as the phone stop charging. However, at this time, I can see with betterbatterystat that a Kernel Wakelock appears and prohibit the deep sleep mode to be enable. The name of this kernel is c440000.qcom,spmi:qcom,[email protected]:qcom,qpnp,smb5.
As a result, the deep sleep consume a lot of battery and the next morning, when I unplug my phone, I can see a huge battery drain around 2-4% per hours, which is not ideal for a smartcharging feature...
Do you know why this kernel wakelock appears? Is it possible to do something to avoid that?
Thanks
A Comprehensive (but not by any means definitive) Guide to Wakelocks
OP edit, January 12, 2016: To say that I'm proud of what this guide grew into would be an understatement, given that drawing it up was a weekend project for me using my old Galaxy S2 Skyrocket and either ICS or JB.
Take that last little bit into account here. It was done over three years ago on an S2-variant phone using Android 4.0 or 4.1. A lot of the specifics here are no longer going to be 100% correct, even if the principles remain true. If you're a rookie de-wakelocking your phone for the first time ever, please take what you see in the OPs with a grain of salt and ask questions in the thread before making any drastic system changes or mucking around in a terminal emulator.
Thanks for stopping by, and I hope you know a little bit more about your phone when you're done here than you did coming in!
-TJ
----
Wakelocks suck. If you're trying to maximize your battery life, you know this already. Some wakelocks are happy, friendly things, but many are silent leeches, sucking away your battery life while you remain blissfully unaware of what's happening. The goal of this guide is to list some of the more common wakelocks you'll encounter and how to wipe them off of your system. As you encounter ones not on this guide, let me know and I'll add them to the list. For some reference, I typically have light to moderate use of my phone. Before de-wakelocking, I was getting maybe 24 hours on one charge. After de-wakelocking, I was up to 36. Then I bought the Galaxy Nexus Extended battery, and on that battery's third cycle, I went two and a half days on a single charge. Impressive, right?
First off, you have to understand the difference between kernel wakelocks (KWL) and partial wakelocks (PWL). KWLs are wakelocks caused at the kernel or hardware level. Some of these are benign, and some of them are vampires. The only way to solve them is to change how your phone behaves. You'll see examples of that below.
PWLs are wakelocks caused by an app. The solution to these, more often than not, is to freeze (or, in the case of Google apps, uninstall) the offending app. Before you do so, and this is critical, go in via Settings -> Apps, force close the app, and wipe its cache and data. If you don't, you'll almost certainly cause yourself more headaches about 30 seconds after killing the app.
Second, you need to know the tools involved in wakelock hunting. The first is Better Battery Stats. Google "better battery stats XDA" and the dev's post will come up; they give this app away to XDA members. That said, if BBS helps you out, show the dev some love and buy the paid version. It's only $2.89, and the dev will have more than earned it from you by the time you've finished de-wakelocking yourself. The other tools you'll need are (hopefully) this guide, and, of course, the Internet search engine of your choice. I won't cover everything simply because I haven't seen it all.
Two final notes before the guide: do not go wakelock hunting right after installing a new ROM or clean-wipe reinstalling your current one. New ROMs cause the phone to go nuts for a little while, as things decache and little behind-the-scenes tweaks are made. Wait one full battery cycle (100% to 0%, which you're probably doing to calibrate after a clean ROM install anyway) before trying this, or you'll drive yourself nuts. Also, remember that solving one wakelock will often create another, especially early in this process. That's normal and to be expected. God does not hate you, your ROM of choice is not crap, your phone is not glitched, and a clean install while your current ROM is still settling in will only make things worse.
So, how do you track these wakelocks down with BBS? This is a really complicated procedure, so make sure you're with me. First, open BBS. Then, see the dropdown menu at the top that probably says "Other" right now? Tap it, and then you'll see "Kernel Wakelocks" and "Partial Wakelocks" below. That was obscenely difficult, right?
Something to note with BBS: it seems to have a weird "counting" bug. While testing a ROM with BBS, I finally began to question why my PWL time would be considerably higher than my true wakelock time. "True wakelock time," simply put, is time awake - time awake with screen on. If your phone is awake for 45 minutes and the screen is on for 40, you have five minutes of true wakelock time.
So why does BBS say that you have 90 minutes of PWLs when you only have a true wakelock time of 45 minutes? Well, I have two theories to account for that. One, BBS counts wakelocks independently, even if they occur at the same time. For example, if AlarmManager wakes your phone up for two minutes and AudioOut_1 wakes your phone up for 30 seconds during that same time, BBS will register 2m30s of PWLs even though the device was only held awake for 2m total. Now throw 30s of wlan_rx_wake (KWL) in there, and BBS is registering 3 minutes of wakelocks when there were only two. Throw in the notion that you had the screen on for 30 seconds during that time frame, and suddenly you're showing 3m of wakelocks when really there was only 90 seconds of true wakelock time to begin with. BBS has effectively doubled the reported wakelock time, and thrown off your stats. Now, throw in several dozen mini-wakelocks happening at once with the screen on, and you can easily see, say, 6h of PWLs on a 24h run, even if your true wakelock time is only 45m. It seems that Android's battery screen in settings reports this the same way, so my advice to you is to use the true wakelock time when cleaning up and attack KWLs and rogue apps. Some PWLs (AlarmManager) will always be high.
The second theory is that alarms are given a minimum reporting duration; i.e., five seconds per alarm for the sake of demonstration. Now, let's say you have Facebook, Twitter, Google+, LinkedIn, Gmail, Email, News & Weather and BBC News all set to sync every 30 minutes. They'll each set off an alarm at the same time, and suddenly your five seconds of alarm reporting time becomes 40 seconds every half hour. Now, let's say you have 35 alarms going off every half hour (not out of the realm of possibility with Google Services Framework). 35 x 5 = 175 seconds of time awake (in the five seconds per alarm scenario), which is now 350 seconds per hour of wakelocks reported, even if the true wakelock time was only ten seconds. Just something else to keep in mind when attacking PWLs.
One more note on BBS and how it handles KWLs: There is no such thing as a 0-KWL cycle, regardless of what the BBS reporting screen says. If BBS is showing 0 KWLs, tap the menu button, then "More", then "Raw Kernel Wakelocks" to see them. KWLs are required to boot the phone. In essence, the only phone that has 0 KWLs since it was last charged is a phone that hasn't been turned on since its last charge.
There are a couple of other features of BBS that we'll make extensive use of later, but there's one you need to know right now. Tap your phone's menu button to get the BBS menu up. Tap on "More". See the button that says "Set Custom Ref."? You'll need it--you'll need it a lot.
Also, anytime new information about a certain wakelock or wakelock family comes to light elsewhere in the thread, I'll be sharing that information here. If it helps you out, please visit the post that gave us that information and thank the poster. I'll link to each post twice, once in the wakelock description and once at the bottom of the OP, so no excuses about not being able to find it!
Last, but certainly not least: modifying your system in any way, including altering or deleting processes needed to resolve wakelocks, can have unpredictable results. Use caution and make backups of your apps and data, as well as nandroid backups, frequently while finding and eliminating wakelocks. Any modifications you make are done at your own risk, and I assume no responsibility for any damage you may do to your phone while cleaning out wakelocks.
With that said, we'll get started with the KWLs, as they're the trickiest to get rid of. Use the guide below to identify your wakelock, what is causing it, and how to get rid of it.
KWLs in post #2
PWLs in post #3
KERNEL WAKELOCKS
wlan_rx, wlan_rx_wake, wlan_wake: This is a wakelock caused by network traffic. The easy solution would be to just turn off Wifi, but be careful doing so! If an app goes to sync and it sees that Wifi is off, it will search for a mobile data connection (which causes the ConnectivityService wakelock). If it can't find a mobile data connection, it will wait and search again at its next sync interval and/or automatically sync when the phone wakes up. This wakelock can also, deceptively, be caused by the Wifi network itself as it refreshes connections or refreshes IPs.
To fix: This is a tricky little sucker to fix, as there are so many possible causes for it. Airplane mode is a safe bet--syncing apps seem to "respect" airplane mode, whereas if Wifi alone is turned off, they'll just try to find a way around. But then, of course, you lose your ability to talk on the phone. If you're particularly unlucky, your Wifi network itself will be the problem. Mine was--between my wife and I, we have four computers, an iPad, three Androids, a Wii, a PS3 and a Wifi-enabled TV hooked into our home network. The "background noise" caused by all of that would wake my phone up constantly. The solution? I happened to have a spare Wifi router laying around, so I hooked it up, set it on a different channel from my main router, and we now use that network for two of our three smartphones. Period. It's not the easiest fix ever, but wlan_rx_wake is almost completely eliminated (I'm looking now and have 4m45s of it 12h27m into a charge).
PowerManagerService: This is probably your #1 or #2 kernel wakelock, and you'd probably love to get rid of it at all costs, right? Hate to say it, but there's not much that can be done about this one. PowerManagerService is a KWL that serves as a "catch-all" for your PWLs. It's a placeholder, nothing more, nothing less. Don't spend much time worrying about it.
To fix: Reduce PWLs. See below.
deleted_wake_locks: Remember what I said above about force-stopping an app and deleting its cache and data before uninstalling it? This wakelock is why. It's the PowerManagerService for deleted apps. Once the app is gone, the wakelocks it caused suddenly become unknown to the system, so they get lumped in here. This number can also go up as the system "looks for" deleted apps and/or finds more wakelocks associated with them, but not dramatically.
To fix: Make sure to force close apps and wipe their cache and data before deleting. A reboot should eliminate the wakelock entirely. If it's still showing up, wipe phone cache and Dalvik.
sdio_al, sdio_dmux, etc.: This is an annoying wakelock, as there are two potential causes for it. One's easy, and one sucks. The easy one is that you've fallen victim to the charger wakelock. The easiest way to tell is to download Jrockttu's Skyrocket Charger Test App. If your charger shows up as AC Regular Charge, there's your problem. If it's AC Fast Charge or USB Normal Charge, your wakelock could be caused by your SD card. That can be an irritating fix, but the SD card version of this wakelock is typically small enough that it's not worth addressing. Also, a huge thanks to kishke for discovering a third cause for the sdio family of wakelocks: data. It seems that the sdio family is also the wlan wakelock family equivalent for cell data, and can be caused by apps searching for a data connection.
To fix: Check your charger and adjust if needed. To test the cell data possibility, make note of the time on the sdio wakelock, then turn cell data and Wifi off and walk away for an hour. Check it upon your return, and if you have minimal to no sdio wakelock, that was it. Try out some different radios for a better connection, or leave cell data off and stick with Wifi only. If it's the SD card, it's probably not a strong enough wakelock to be worth fixing, but if you want to fix it, you'll have to format your SD card. If formatting doesn't work, format it again, then wipe cache and Dalvik.
alarm_rtc: This is your phone's internal alarm scheduler, set to wake up your phone for sync, push, etc. Closely related to the AlarmManager PWL.
To fix: Check your apps and make sure they're only set to sync when you want them to, not for constant push or stupid-short intervals.
mmc0_detect, mmc1_detect, mmc2_detect: I'll be honest, I have no idea what causes these. Fortunately, they seem to be minimal, so I've never wasted much time worrying about them. polarbearno, however, has had a great deal of experience with this wakelock, and traced the cause of excessive activity here to a faulty SD card.
To fix: Unmount your SD card and pull it, then reboot. Might want to clear cache and Dalvik for good measure. If your problem was caused by a faulty external SD, this should solve it. If your problem was not caused by a faulty external SD, we're back to the original solution of "good question".
vbus_present: This wakelock exists as long as the phone is plugged into a wall charger. This wakelock can also persist if you use an Apple-compatible charger, which registers as "slow USB" charging and will cause the wakelock to hold after you'e unplugged.
To fix: Check your phone. Is there a cord plugged into it? If so, does that cord lead to a source of power? If so, unplug your phone (after it's fully charged, of course). Is the wakelock still there? Plug your phone into an OEM charger for a few seconds, then unplug it to kill the wakelock, then consider ditching that piece of fruit you're charging with. I try to use OEM Samsung chargers as much as possible, as they're designed for the phone (and to not cause persistent wakelocks). Jrockttu has an awesome charger test app, linked to in the OP of his outstanding "fix your battery life" thread.
suspend_backoff: This is a difficult one to nail down. Very difficult. To make a very long story short, this wakelock is caused when your phone wants to sleep, but a running process blocks it from doing so. Typically, this is going to be Wifi. Make sure your Wifi is set to stay awake when the phone sleeps. Otherwise, you risk the Wifi going out of its way to keep the phone from sleeping. This can also, unfortunately, be caused by apps, making it hard to pin down.
To fix: Do the Wifi thing, then reboot into recovery and wipe your caches. If it persists after that, you have no choice but to look at a dmesg output to pin it down. Go into a terminal emulator app and type the following commands, one per line:
su
dmesg >/mnt/sdcard/dmesg.txt
Next, transfer the .txt file onto your computer and open in WordPad or a similar program that automatically cuts line (i.e., no Notepad). Search the document looking for the word "event". You should find a lot of strings that look like this:
eventX-XXXX
Where the X's are all numbers. See those last four numbers after the dash? You should see them repeated again and again. Write them down, then go back into your terminal emulator. They are your process ID (PID). Once there, type:
ps
This will show you all processes that have run since your last boot. If you look at the second column from the left hand side of the page, and you should see a sequence of four numbers. These are listed sequentially, lowest to highest, as you come down the page. Scroll around until you find the sequence of four numbers that matches the one you wrote down. The line below those four numbers is the name of the process causing the wakelock. If it's instantly recognizable as an app, delete the app and see what happens. If it's a hardware thing that can easily be fixed, like Wifi, change your settings to accommodate it. If it's com.android.process.acore, I smell a wipe in your future. If you don't know what the process is, don't go screwing with things to find out. You can brick your phone in terminal emulators. Instead, write it down and Google it. Someone has already written about what this process is and what it does. If it's something you can easily fix, go for it. If it's a deeply-embedded system process, I'd just do a full wipe and clean reinstall.
Remember, terminal emulators can brick your phone if you're not careful. If you use them and something bad happens, or if you wreck your phone trying to fix this or any other wakelock, it is your problem, not mine.
There are a number of other, lesser KWLs that I'm not going to worry about here because you shouldn't worry about them either. You might occasionally see a battery cycle with very low (sub-1%) KWLs, but that's the exception and not at all the rule.
PWLs in post #3
The phone doesn't sleep when its charging, some android thing, that specific wakelock is called vbus_present.
kishke said:
The phone doesn't sleep when its charging, some android thing, that specific wakelock is called vbus_present.
Click to expand...
Click to collapse
That one's in there. It's the last wakelock under KWL.
I know it's there but you wrote: "This is a weird one. I never could quite figure out what causes it, but it seems like it's there as long as the phone's plugged it."
So I just want to clarify it so you could give it a straight explanation. Also you have a small typo there it=in.
It's a great guide!
T.J. Bender: Good topic… good write-up. I can’t agree with you more regarding the frustration level chasing down “greased-pig” wakelocks! The key is to have the right tool-set for analysis. At a minimum, make sure you have CPU Spy, BBS, and a utility which will show you what processes and services are active. Here’s my approach to identify wakelock problems. Again using CPU Spy to check time in Deep Sleep.. and using BBS to check Count of Alarms as well as time (minutes/seconds) of wakelocks:
1) open BBS and set a “Custom Reference” point (basically, this will reset the clock)
2) open CPU Spy and “Reset Timers”
3) turn screen off and let it sit for your predetermined time (i.e., 15min, 30min, 60min, etc)
4) when you reach the first predetermined time checkpoint, turn screen on and first check CPU Spy. How much time did the phone NOT sleep?
5) open BBS and check “Partial Wakelocks” against “Custom Ref Point”. Also check “Alarms” against “Custom Ref Point”.
6) do this every predetermined time (i.e., 15/30/60 min).. and write down results
What I found was very interesting. First I found "com.google.android.apps.maps" Partial Wakelocks were running about 80 times an hour (and preventing Deep Sleep): SOLUTION (thanks Bruno2123), un-check "Google Location Service” in "Location Services" in system setup.
Second culprit: AudioOut_1 : I also had unchecked all the keytone and touch sound options in setup, however, I was still getting a boat-load of PWL for AudioOut_1. I tracked it down (trial-and-error) to PowerAmp. Even though PowerAmp was not actively running, I had checkmarks (in PowerAmp Settings… Headset) in “Pause on Headset Disconnect” and “Resume on Headset Connect”.. which were preventing Deep Sleep. By un-checking these, it stopped the PowerAmp AudioOut_1 PWLs… and allowed Deep Sleep.
Third: this was a surprising find. Started to continue to see excessive AudioOut_1 PWL times; however, fewer counts (number of occurrences). Turns out, every time I open PlayStore, AudioOut_1 PWLs incremented… every time I played certain games (even with sound turned OFF in the game’s settings), AudioOut_1 PWLs incremented. However, these did not interfere with Deep Sleep.. these PWLs incremented when screen was on anyway!
Anyway, hope others find this approach useful and hopefully will help you identify PWL/ Alarm problems and find solutions.
kishke said:
I know it's there but you wrote: "This is a weird one. I never could quite figure out what causes it, but it seems like it's there as long as the phone's plugged it."
So I just want to clarify it so you could give it a straight explanation. Also you have a small typo there it=in.
It's a great guide!
Click to expand...
Click to collapse
Sarcasm is a fine art, mastered only by years of practice.
DoctorQMM said:
snip
Click to expand...
Click to collapse
I completely forgot to mention CPU Spy! Honestly, I did almost all of my hunting using the BBS "Other" timers, which show the percentage of time in deep sleep, awake, screen on, PWL and KWL. That's not to say CPU Spy isn't a valuable tool, because it is, but I had plenty of luck with BBS alone.
I kind of hinted at the benefits of leaving all Location Services off unless you need them. That said, I'm going to link this post from the OP, because you've kind of underscored the need to do so here.
And yeah, again, good catch on wakelock times. I was thrown for a loop the first time I had 94% deep sleep and 9.8% PWL until I realized that a lot of those PWLs were coming from apps that were running only when the screen was on.
This is an informative post. Thanks op
Sent from my SGH-I727 using xda premium
Good stuff...
Too bad your findings point to Google in a lot of ways as far as battery drain... maps, gmail, etc...
I don't mind Maps that much. It has been pretty accurate from me. When I ran BBS last time, it showed no problems on my phone as far as wakelocks, etc... I had more problems with BBS than anything.. WEIRD....
Every time I unplug my phone, it will ask for root permissions about 5-6 times before I get to my home screen even.... I just don't have time to be hitting allow that many times... (yes, remember is checked...)
Thanks for the posting! I subscribed and will check back here often!
onealvideo said:
Too bad your findings point to Google in a lot of ways as far as battery drain... maps, gmail, etc...
I don't mind Maps that much. It has been pretty accurate from me. When I ran BBS last time, it showed no problems on my phone as far as wakelocks, etc... I had more problems with BBS than anything.. WEIRD....
Every time I unplug my phone, it will ask for root permissions about 5-6 times before I get to my home screen even.... I just don't have time to be hitting allow that many times... (yes, remember is checked...)
Click to expand...
Click to collapse
Almost sounds like you've got a ROM issue. I've also read that switching from Superuser to SuperSU can solve a root permissions "loop" like that.
Unfortunately, yeah, a lot of the PWL headaches I've come across can ultimately be traced back to a Google app. That said, I set out looking to make a battery last as long as possible. If you get to a point where you're happy with your battery life, I'd stop there regardless of what apps are still on the phone. The more you change, the more you can potentially screw up.
Can someone post the link to xda bettery stats, I search for it and find nothing.
Sent from my SAMSUNG-SGH-I727 using xda app-developers app
specter07 said:
Can someone post the link to xda bettery stats, I search for it and find nothing.
Sent from my SAMSUNG-SGH-I727 using xda app-developers app
Click to expand...
Click to collapse
Unfortunately you don't know how to search my friend.
http://bit.ly/NuHF7q
Sent from my SAMSUNG-SGH-I727 using xda app-developers app
jyazzie110 said:
Unfortunately you don't know how to search my friend.
http://bit.ly/NuHF7q
Sent from my SAMSUNG-SGH-I727 using xda app-developers app
Click to expand...
Click to collapse
Seems you don't know how to google either. Where's the free better bettery stats for xda members? That just shows the link to the store for the paid one.
Sent from my SAMSUNG-SGH-I727 using xda app-developers app
No at the bottom of the second post is dl link I just grabbed it
Sent from my SGH-I727 using Tapatalk 2
specter07 said:
Seems you don't know how to google either. Where's the free better bettery stats for xda members? That just shows the link to the store for the paid one.
Sent from my SAMSUNG-SGH-I727 using xda app-developers app
Click to expand...
Click to collapse
I know how to google....your the one who cant search or read! Haha
Sent from my SAMSUNG-SGH-I727 using xda app-developers app
jyazzie110 said:
I know how to google....your the one who cant search or read! Haha
Sent from my SAMSUNG-SGH-I727 using xda app-developers app
Click to expand...
Click to collapse
Be nice
Sent from my SGH-I727 using Tapatalk 2
Illnevertell said:
Be nice
Sent from my SGH-I727 using Tapatalk 2
Click to expand...
Click to collapse
Wow, when he says it... u have issues lmao
Illnevertell said:
No at the bottom of the second post is dl link I just grabbed it
Sent from my SGH-I727 using Tapatalk 2
Click to expand...
Click to collapse
Thanks, I kept scrolling pass it since on my phone you can hardly even see the attachment on the broswer.
Sent from my SAMSUNG-SGH-I727 using xda app-developers app
Come on, guys, please keep this thread on topic.
Wanted to share some results with you. Screenshots below. No KWLs in 24 hours since being unplugged...not half bad. PWLs are within reason, especially considering that Alarm Manager is one of those PWLs that will hold even if your screen is on. The only thing that strikes me is Twitter alarming my phone 6 times, when it's set to never auto-refresh. Not a huge deal, but worth investigating.
70% battery 24 hours into a charge, screen-on time of 31m. Granted, I have barely used my phone today outside of sending a few texts, checking into XDA once and playing a few quick hands of Blackjack, but I'm still pretty stoked with this run.
**EDIT: Good thing I checked! Twitter had automatically updated earlier in the day, and when it did, it reset itself to sync every hour. Switched it back to never sync, and that should solve it.

Just hours of "EntriesRefresh_wakelock". Anyone else?

Is anyone seeing this copious amounts of this wakelock too? It's part of the Google Search app and its wakelock has now been active for close to 5 hours now just today and seems to be active for most of the day. This is reported by Better Battery Stats and is seems to be confirmed by high energy usage by the built-in batttery settings app, as Google Search hovers in the mid 20s percentage.
floepie said:
Is anyone seeing this copious amounts of this wakelock too? It's part of the Google Search app and its wakelock has now been active for close to 5 hours now just today and seems to be active for most of the day. This is reported by Better Battery Stats and is seems to be confirmed by high energy usage by the built-in batttery settings app, as Google Search hovers in the mid 20s percentage.
Click to expand...
Click to collapse
I got this wakelock overnight after completely disabling location services. My N5 was held awake literally the whole night by this wakelock. This morning I turned back on location reporting and the phone is deep sleeping once again. Very strange. Did you have location service disabled because that seems to be what is causing the wakelock?
I would like to find a solution to this so I can keep location services disabled without completely disabling Google Now for overnight when I can't access a charger.
GoldElocks said:
I got this wakelock overnight after completely disabling location services. My N5 was held awake literally the whole night by this wakelock. This morning I turned back on location reporting and the phone is deep sleeping once again. Very strange. Did you have location service disabled because that seems to be what is causing the wakelock?
I would like to find a solution to this so I can keep location services disabled without completely disabling Google Now for overnight when I can't access a charger.
Click to expand...
Click to collapse
Yeah, I have my location services set to "device only", which I guess is the equivalent to the former GPS only. It could be that the GPS is turning itself off and on continually while it's supposed to be sleeping, and the fact that I'm mainly indoors could explain the hours long wakelock.
I set it to GPS only on the Nexus 5, because that was the most battery friendly on the Nexus 4, but the way services now work, it could be the least battery friendly setting.
this is completely confirmed! my note3 wasnt sleeping at all with the new google search 20hrs of no deep sleep with location off and i turned location on and its been sleeping like a dream for the past hour.. Very weird though
Same issue here with my HTC One. I noticed my battery was tanking at about twice the normal rate today, so I just opened up Wake Lock Detector and saw that on about 5.5 hours of use, Google Search had it awake for 4.5 of them. I've just turned on location services to see if that fixes it.
But, I'm with you. I'd rather find a fix that lets me keep location disabled.
Me too. I have a Galaxy4 S4 with 4.3 stock Samsung ROM. WLD shows huge count of EntriesRefresh_wakelock with almost three hours from 12 por off charge.
Confirmed on the lg g2 on 4.3. I disabled Wi-Fi and mobile network location because of the horrible nlp partial wakelocks only to encounter the entriesRefresh wakelock leech. Keeps awake like 90 of the time. I'm going to go back to enable Wi-Fi and mobile location until this is cleared up.
I am unable to even use Google now.. if I enable Location Report it's burning up and running about 20%.. if I disable Location Reporting it's running 50%.. I like Google Now and don't have any use for the location stuff...
Anyone have any updates? My only other option is going to just be to wipe it and keep Google Now unused so it doesn't run at all..
You can try to greenify Google search which contains this wakelock if you have the paid version of greenify (hibernates system apps). They say it's inadvisable to hibernate system apps, but you can override it. I would do a full backup and try it. They refund your money in 3 days instead of 15 minutes if your not happy. I haven't had a chance to try it yet.
Sent from my LG-D801 using xda app-developers app
Oddly enough I never had this issue on my nexus 5, but my Nexus 7 is absolutely plagued with just hours and hours of this wake lock as soon as I turn location reporting off.
Same issue here, my N7 is going nuts with this.
the7thson said:
Same issue here, my N7 is going nuts with this.
Click to expand...
Click to collapse
This has happened on my N5 before. Force stopping it once I noticed and also rebooting seem to fix it.
I had this wakelock for 2 nights in a row, completely draining the battery BUT
I have location services enabled and GPS is on (I play Ingress all the time and the network loaction gives me a faster lock)
I too noticed this was my top partial wakelock yesterday even though I have location services on. First time I've seen that happen. But it wasn't as aggressive as it was when location services were off.
Sent from my LG-D801 using xda app-developers app
Noticed this keeping my Nexus 5 awake 51%, location services were disabled. My Nexus 7 and Moto X also have them disabled and they were only awake 1%. Google Search is showing 60% of the battery but my device has been mostly idle for 4 days now. I'll see if enabling the services helps otherwise I'm not sure what else to attempt.
ohmimpotence said:
Noticed this keeping my Nexus 5 awake 51%, location services were disabled. My Nexus 7 and Moto X also have them disabled and they were only awake 1%. Google Search is showing 60% of the battery but my device has been mostly idle for 4 days now. I'll see if enabling the services helps otherwise I'm not sure what else to attempt.
Click to expand...
Click to collapse
I got this wakelock this morning.... "entriesrefresh_wakelock"
my location reporting is off
I love my N5 but god......I'm experiencing battery drain frequently (when I'm not on WIFI) with different wakelocks...
Otherwise the battery life is very good, if google can fix it once for all
I had this problem on my Nexus 5 too. I "fixed" it by uninstalling updates for the Google Search app (you can get there by going Settings>Apps and tapping Google Search). However Google will re-update the app frequently so you will have to repeat the process. Here's hoping another update fixes this problem.
Either disabling Location reporting or Locations all together can get rid of this I believe. Tasker can automatically re-enable it when you leave your wifi zone.

[Q] Help with Tasker

Hey everyone, first I'm not really sure if this belongs in a Tasker forums. Seeing as I use a N5, I figured it could also go here. Anyway, I've been having some problems with Npl wakelocks. I downloaded wakelock terminator with xposed and it seemed to have helped, however something didn't seem right as my battery was draining the same amount as when the wakelocks were happening. The only time I wasn't having the drain was when location was set to device only, which makes sense.
I'm completely new to tasker. I've watched a few tutorials and I've messed around with it a bit but with not much luck. I wanted to do one of two things. Either have location set to battery saver/high accuracy when the screen is on, and have it set to device only when the screen is off. Another option is to have it set to battery saver/high accuracy when google now/maps is open and device only the rest of the time. I feel like this shouldn't be that hard but I messed around with it and got no where. Anyway, what are your guys' opinion about this strategy and would anyone be able to help me with implementing these tasks. Thanks!
I wouldn't go the route of using tasker for your problem. And I would ditch that xposed module for wakelocks too. I run rooted with xposed on high accuracy at all times. My battery life is great. You need to find the source of your battery drain and eliminate it. Don't look for a bandaid fix using tasker. My guess is you have some rogue app killing your battery. Give us a list of all your apps, or delete them all, and install them one by one to track down the culprit. Also, are you running stock Rom and kernel? What other mods do you have?
Lokke9191 said:
I wouldn't go the route of using tasker for your problem. And I would ditch that xposed module for wakelocks too. I run rooted with xposed on high accuracy at all times. My battery life is great. You need to find the source of your battery drain and eliminate it. Don't look for a bandaid fix using tasker. My guess is you have some rogue app killing your battery. Give us a list of all your apps, or delete them all, and install them one by one to track down the culprit. Also, are you running stock Rom and kernel? What other mods do you have?
Click to expand...
Click to collapse
I can run the phone as normal today with location and everything on and post my BBS log after. Basically, when I'm at home the battery is great. However, ever since updating to the new google search app I've been having extreme wakelocks from the Npl whenever I would leave my house. Which is why I found a thread on xda that was talking about that exact wakelock. You're right though. I'm going to get rid of the app because it seemed weird. The wakelocks weren't showing up on BBS but I feel like it didn't get rid of them. Who knows though, maybe you're right and it is something else that's draining the battery which is why the wakelock app didn't help.
Anyway, I'm running stock ROM/kernel with xposed. I use greenify module, appOpsX, snapshare, gravity box, and gesture navigation module. With gravity box I just use custom quick settings, smaller nav bars, some status bar mods like the day and double tap to sleep. However, again I have had the same GB mods since before the drain. I use a pebble however I've never had a drain from that and I've been using it since Dec. Most of my apps are greenified including facebook, instagram, as well as all my music streaming apps. A lot of the google services I don't use are disabled like books/magazines/movies. I have snapchat, but I don't use it too much, and facebook messenger that I don't greenify. When I check GSam stats though, android system and kernel take the most battery, followed by music players if I was streaming music that day. The rest of the apps are way down the list.
I posted in the battery thread asking if anyone had the same problem with the wakelocks after having the latest google play services. I noticed mine is still 4.3 for some reason so I might just update manually from androidpolice and see if theres a difference. But yeah, I will keep this updated with todays logs.
Try this. Use titanium backup to uninstall Google play services and Google search. Then launch maps, and reinstall both from the play store.
PsychDrummer said:
Another option is to have it set to battery saver/high accuracy when google now/maps is open and device only the rest of the time.
Click to expand...
Click to collapse
This is what I ended up doing. You will need the secure settings plugin for tasker.
Set up a new profile for application "Maps".
When on, launch task GPS On (Secure settings, configuration GPS enabled)
Exit task, launch task GPS On (Secure settings, configuration GPS disabled)
I used the app factory to create an app for this, and use that on my N5 and my second phone too. Works great. Enables GPS when I launch Maps for navigation, and switches to battery saving when I exit Maps
PsychDrummer said:
I can run the phone as normal today with location and everything on and post my BBS log after. Basically, when I'm at home the battery is great. However, ever since updating to the new google search app I've been having extreme wakelocks from the Npl whenever I would leave my house. Which is why I found a thread on xda that was talking about that exact wakelock. You're right though. I'm going to get rid of the app because it seemed weird. The wakelocks weren't showing up on BBS but I feel like it didn't get rid of them. Who knows though, maybe you're right and it is something else that's draining the battery which is why the wakelock app didn't help.
Anyway, I'm running stock ROM/kernel with xposed. I use greenify module, appOpsX, snapshare, gravity box, and gesture navigation module. With gravity box I just use custom quick settings, smaller nav bars, some status bar mods like the day and double tap to sleep. However, again I have had the same GB mods since before the drain. I use a pebble however I've never had a drain from that and I've been using it since Dec. Most of my apps are greenified including facebook, instagram, as well as all my music streaming apps. A lot of the google services I don't use are disabled like books/magazines/movies. I have snapchat, but I don't use it too much, and facebook messenger that I don't greenify. When I check GSam stats though, android system and kernel take the most battery, followed by music players if I was streaming music that day. The rest of the apps are way down the list.
I posted in the battery thread asking if anyone had the same problem with the wakelocks after having the latest google play services. I noticed mine is still 4.3 for some reason so I might just update manually from androidpolice and see if theres a difference. But yeah, I will keep this updated with todays logs.
Click to expand...
Click to collapse
Just run device only all the time, like everyone else does. It's a problem with Google's code, and the same bad coding is clearly seen throughout their entire app lineup.
Lokke9191 said:
Try this. Use titanium backup to uninstall Google play services and Google search. Then launch maps, and reinstall both from the play store.
Click to expand...
Click to collapse
What would that do though?
jj14 said:
This is what I ended up doing. You will need the secure settings plugin for tasker.
Set up a new profile for application "Maps".
When on, launch task GPS On (Secure settings, configuration GPS enabled)
Exit task, launch task GPS On (Secure settings, configuration GPS disabled)
I used the app factory to create an app for this, and use that on my N5 and my second phone too. Works great. Enables GPS when I launch Maps for navigation, and switches to battery saving when I exit Maps
Click to expand...
Click to collapse
Thanks! So, how would I set this up using device only/high accuracy? I'm also super new to tasker so if you don't mind I might PM you asking for help.
Aerowinder said:
Just run device only all the time, like everyone else does. It's a problem with Google's code, and the same bad coding is clearly seen throughout their entire app lineup.
Click to expand...
Click to collapse
Well, I actually like to use maps and google now. However, I don't actually need the location on when I'm not using either of the two services which is why I wanted to setup tasker.
It'll change them from being system apps to user apps. This has solved nlp wakelocks for many others experiencing the same problems.
PsychDrummer said:
Thanks! So, how would I set this up using device only/high accuracy? I'm also super new to tasker so if you don't mind I might PM you asking for help.
Click to expand...
Click to collapse
Sure.
It isn't that hard - install the secure settings plug in first, and when prompted, give it Superuser access. Then, create a new profile in tasker - call it whatever you want. Set up the profile for the application "Maps"
When Maps is launched, set it up to fire a new task (I called it GPS On) - this task just enables the GPS setting in the secure settings (under third party plugins)
GPS on -> high accuracy
GPS off -> battery saving mode
Set up an exit task (I called it GPS Off) - this turns the GPS settings in the secure settings off.
I can send you the apk if you want (but you don't really know me, so you probably shouldn't use an apk from a stranger! lol!), or you can try to import this attached xml into tasker (rename the file to remove the .txt extension - filename will be AutoGPS.prj.xml) - the xml option should be safe.
I haven't tried importing an xml, but it should be fairly straightforward (Save profiles in /sdcard/tasker/profiles and then, in tasker, long press the profiles "tab" and "import"). Before doing this, backup your existing profiles in tasker, just in case. Also, make sure you have secure settings set up before you import this.
jj14 said:
Sure.
It isn't that hard - install the secure settings plug in first, and when prompted, give it Superuser access. Then, create a new profile in tasker - call it whatever you want. Set up the profile for the application "Maps"
When Maps is launched, set it up to fire a new task (I called it GPS On) - this task just enables the GPS setting in the secure settings (under third party plugins)
GPS on -> high accuracy
GPS off -> battery saving mode
Set up an exit task (I called it GPS Off) - this turns the GPS settings in the secure settings off.
I can send you the apk if you want (but you don't really know me, so you probably shouldn't use an apk from a stranger! lol!), or you can try to import this attached xml into tasker (rename the file to remove the .txt extension - filename will be AutoGPS.prj.xml) - the xml option should be safe.
I haven't tried importing an xml, but it should be fairly straightforward (Save profiles in /sdcard/tasker/profiles and then, in tasker, long press the profiles "tab" and "import"). Before doing this, backup your existing profiles in tasker, just in case. Also, make sure you have secure settings set up before you import this.
Click to expand...
Click to collapse
Cool, thanks I will give it a try. And it would be the same if I want to have location on when using google search/now?
PsychDrummer said:
Cool, thanks I will give it a try. And it would be the same if I want to have location on when using google search/now?
Click to expand...
Click to collapse
Yes, it should be. But in my experience, I haven't found Google Search/Now really requiring high accuracy GPS level location for any of the features yet. It gets by fine with just battery saving mode. So, I only enabled this for the Maps application.
Actually, now that I think about it, I don't know how you'd enable it for Google Now - since it runs in the background to notify you about upcoming events. Since you aren't launching Google Now most of the times, I don't know how you'd set up Tasker to enable the high accuracy GPS for that (and it is possible that Google now using active GPS may be part of the battery drain issue - I don't know for sure)
jj14 said:
Yes, it should be. But in my experience, I haven't found Google Search/Now really requiring high accuracy GPS level location for any of the features yet. It gets by fine with just battery saving mode. So, I only enabled this for the Maps application.
Actually, now that I think about it, I don't know how you'd enable it for Google Now - since it runs in the background to notify you about upcoming events. Since you aren't launching Google Now most of the times, I don't know how you'd set up Tasker to enable the high accuracy GPS for that (and it is possible that Google now using active GPS may be part of the battery drain issue - I don't know for sure)
Click to expand...
Click to collapse
I actually wanted to keep the device on "device only" location instead of battery saving. For Google now I wanted the traffic card, but I would only need it if I physically open google now. I don't really need the notification.
PsychDrummer said:
I actually wanted to keep the device on "device only" location instead of battery saving. For Google now I wanted the traffic card, but I would only need it if I physically open google now. I don't really need the notification.
Click to expand...
Click to collapse
To keep device only, you should use Location mode (in secure settings) and set it to Device only or whatever you need, instead of GPS.
Note that "Device only" still uses active GPS and "This mode may use more battery power and take longer to determine your location" (Ref: https://support.google.com/nexus/answer/3467281?hl=en)
The traffic card still works on "battery saving" because it uses cellphone triangulation, and shows you the traffic in your vicinity, and based on your destination.
jj14 said:
To keep device only, you should use Location mode (in secure settings) and set it to Device only or whatever you need, instead of GPS.
Note that "Device only" still uses active GPS and "This mode may use more battery power and take longer to determine your location" (Ref: https://support.google.com/nexus/answer/3467281?hl=en)
The traffic card still works on "battery saving" because it uses cellphone triangulation, and shows you the traffic in your vicinity, and based on your destination.
Click to expand...
Click to collapse
I know, I have always used battery saving. The problem is that with battery saving, I'm having these extreme wakelocks and Google is constantly searching for my location which is what I think is the cause of the drain I'm having. I'm going to use my phone today by just using device-only location and see how the battery lasts. It should be much better since I'm hoping the phone will be deep sleeping longer. Basically, when I take my phone off the charger in the morning and I'm still at home for the first 2 hours of the day the standby time is great. It usually goes down 1-2% in those 2 hours even if I use the phone a little. However, once I leave the house is when I get constant wakelocks from location services and the battery stats to deplete a lot faster. I mean, I can still get through a day just because I don't use the screen a lot. I tend to only use about 1 hr 30 min on a regular day but I just want to play around with settings to see what works.If I can get the same standby time throughout the day that I get within the first two hours when im at home that would be great.
PsychDrummer said:
I know, I have always used battery saving. The problem is that with battery saving, I'm having these extreme wakelocks and Google is constantly searching for my location which is what I think is the cause of the drain I'm having. I'm going to use my phone today by just using device-only location and see how the battery lasts. It should be much better since I'm hoping the phone will be deep sleeping longer. Basically, when I take my phone off the charger in the morning and I'm still at home for the first 2 hours of the day the standby time is great. It usually goes down 1-2% in those 2 hours even if I use the phone a little. However, once I leave the house is when I get constant wakelocks from location services and the battery stats to deplete a lot faster. I mean, I can still get through a day just because I don't use the screen a lot. I tend to only use about 1 hr 30 min on a regular day but I just want to play around with settings to see what works.If I can get the same standby time throughout the day that I get within the first two hours when im at home that would be great.
Click to expand...
Click to collapse
That's strange. With battery saving mode, I get no wakelocks, which with device only or high accuracy, I used to get a lot of wakelocks by the location services.
But yes, no harm in trying out the options. Tasker+secure settings should be able to set up the battery saving or device only (as described above)
jj14 said:
That's strange. With battery saving mode, I get no wakelocks, which with device only or high accuracy, I used to get a lot of wakelocks by the location services.
But yes, no harm in trying out the options. Tasker+secure settings should be able to set up the battery saving or device only (as described above)
Click to expand...
Click to collapse
You get Npl wakelocks? So far I haven't gotten it and that's the wakelock that usually keeps my phone awake for 2 hours or so. basically, I think the way it works is that the device only setting uses more battery when using apps that use location such as maps but when the apps are not in use it uses no battery on location.
PsychDrummer said:
You get Npl wakelocks? So far I haven't gotten it and that's the wakelock that usually keeps my phone awake for 2 hours or so. basically, I think the way it works is that the device only setting uses more battery when using apps that use location such as maps but when the apps are not in use it uses no battery on location.
Click to expand...
Click to collapse
No. Ever since I switched to battery saving (and tasker toggling to high accuracy when I use maps), I have no location based wakelocks (no NPL wakelocks)
jj14 said:
No. Ever since I switched to battery saving (and tasker toggling to high accuracy when I use maps), I have no location based wakelocks (no NPL wakelocks)
Click to expand...
Click to collapse
Interesting, I've been having the opposite. I even took a screen shot of the wakelocks on the stock battery app where when the screen is off there's a huge amount of individual lines for awake (of course this is backed up by BBS). However when using device only the awake and screen on match almost perfectly.
PsychDrummer said:
Interesting, I've been having the opposite. I even took a screen shot of the wakelocks on the stock battery app where when the screen is off there's a huge amount of individual lines for awake (of course this is backed up by BBS). However when using device only the awake and screen on match almost perfectly.
Click to expand...
Click to collapse
Not sure why the difference, but regardless, as long as the individual 'fix' works, that's all that matters

Anyone else having lots of wakelocks after flashing new kernels?

Hey guys.
Lately whenever I'm flashing a new kernel either on KitKat or Lollipop I get terrible wakelocks that kill my battery. Not sure why this is happening. I'm using CWM. Basically after flashing I can just notice a huge battery drainage and I tend to install either GSam or WakelockDetector to see what's the problem. WakelockDetector (Rooted) gives me an overall idea of my battery problem. Usually SystemUpdateService, Audiomix "1013", "NlpWakeLock" , "EventlogService" and "CheckinService" drain my battery the most. Sometimes "ConfigFetchService" as well.
Thanks
KodRoute said:
Hey guys.
Lately whenever I'm flashing a new kernel either on KitKat or Lollipop I get terrible wakelocks that kill my battery. Not sure why this is happening. I'm using CWM. Basically after flashing I can just notice a huge battery drainage and I tend to install either GSam or WakelockDetector to see what's the problem. WakelockDetector (Rooted) gives me an overall idea of my battery problem. Usually SystemUpdateService, Audiomix "1013", "NlpWakeLock" , "EventlogService" and "CheckinService" drain my battery the most. Sometimes "ConfigFetchService" as well.
Thanks
Click to expand...
Click to collapse
[Battery Life Help] Troubleshoot battery issues here!
Application wakelocks have absolutely nothing to do with the kernel.
Keep in mind a "wakelock" is simply a request to keep the device awake; they can happen regardless whether the screen is on or off, they are only an issue if they occur while the screen is OFF.
SystemUpdateService is a pretty obviously named wakelock, it's used while an OTA is being downloaded. You can disable the service and it's receivers with an app like Autorun Manager (https://play.google.com/store/apps/details?id=com.rs.autorun, open in advanced mode, go into it's settings to enable for system apps, tap on Google Play Services, disable everything with SystemUpdateService in it's name).
AudioMix is triggered every time there is an audio event, including touch sounds. Harmless as it's usually only used while the screen is on.
NlpWakeLock is a location wakelock.
EventlogService and CheckinService are harmless, unless they occur 24/7 and don't go away EVER, which means you disabled their services but not their receivers.
ConfigFetchService is mostly harmless, it simply fetches your settings from Google's servers when you open a Google app, if that app stores it's settings on the cloud instead of locally.
Lethargy said:
[Battery Life Help] Troubleshoot battery issues here!
Application wakelocks have absolutely nothing to do with the kernel.
Keep in mind a "wakelock" is simply a request to keep the device awake; they can happen regardless whether the screen is on or off, they are only an issue if they occur while the screen is OFF.
SystemUpdateService is a pretty obviously named wakelock, it's used while an OTA is being downloaded. You can disable the service and it's receivers with an app like Autorun Manager (https://play.google.com/store/apps/details?id=com.rs.autorun, open in advanced mode, go into it's settings to enable for system apps, tap on Google Play Services, disable everything with SystemUpdateService in it's name).
AudioMix is triggered every time there is an audio event, including touch sounds. Harmless as it's usually only used while the screen is on.
NlpWakeLock is a location wakelock.
EventlogService and CheckinService are harmless, unless they occur 24/7 and don't go away EVER, which means you disabled their services but not their receivers.
ConfigFetchService is mostly harmless, it simply fetches your settings from Google's servers when you open a Google app, if that app stores it's settings on the cloud instead of locally.
Click to expand...
Click to collapse
Disabling the receivers works indeed. Thanks! By the way, another issue I'm having is that my Nexus 5's CPU heats too fast operating in UI and doing basic stuff, like installing apps from Play Store or watching videos on YouTube. Normally after about 5 min. of running if I go to System Monitor the CPU's temp is around 40-47ºC on action, in standby cools down to 34-35ºC but then after I use it again the temp rise to 45-47ºC. Usually when this happens the battery's temperature is also triggered and reaches 28-30ºC. Is this normal?
KodRoute said:
Disabling the receivers works indeed. Thanks! By the way, another issue I'm having is that my Nexus 5's CPU heats too fast operating in UI and doing basic stuff, like installing apps from Play Store or watching videos on YouTube. Normally after about 5 min. of running if I go to System Monitor the CPU's temp is around 40-47ºC on action, in standby cools down to 34-35ºC but then after I use it again the temp rise to 45-47ºC. Usually when this happens the battery's temperature is also triggered and reaches 28-30ºC. Is this normal?
Click to expand...
Click to collapse
The CPU throttles at 65C by default (some kernels change this or give you an option to change it), and shuts down at 105C. 47C is hardly anything.

Categories

Resources