GPSD Process Overutilization - Nexus S Q&A, Help & Troubleshooting

Problem Description:
The gpsd process is using 100% of my cpu for (at time of this post) 8 hours straight. The gps is locked on, and I can get sub 50 meter accuracy indoors instantly. (Which is abnormal)
I turn off gps, and the problem continues. (GPS does not shut down despite the UI telling me it is shut down.)
Problem remediation:
I can reboot. This fixes the problem for a little while.
Question:
Is there a way to see what app is locking up the gpsd process?
I have all of the usual (adb, terminal, root) methods of investigation.
I don't want to reset the gps yet until I figure out what is doing this.

ps
system 85 1 5388 360 ffffffff afd0c0cc S /system/vendor/bin/gpsd
kill -9 85
system 10455 1 1288 548 00000000 afd0c0cc S /system/vendor/bin/gpsd
kill -9 10455
system 10468 1 1288 548 00000000 afd0c0cc S /system/vendor/bin/gpsd
Each kill only resets the PID, and the process continues to eat the battery/cpu.

I actually have a suspect app that I would like to point a finger at, but I need some sort of evidence to present the app maker.
Any help, or direction to start looking would be appreciated.

I know there is a way to tell what is using what, I just don't remember exactly whether its a system thing or an app. That isn't very helpful, I know. However, what I can offer is this: if you know which app is the offender, take a screenshot of your battery usage right now, uninstall the app, then after a full day of use see if the battery usage is better. If so, you will at least confirm.your suspicion.
Brought to you by tapatalk on my HTC Flyer.

It is much more immediate than battery usage over a day. If I leave it this way, the battery is dead in an hour or less.
Here are the tell tale signs:
CPU is pegged at 100%
Phone is very warm to the touch
Battery is getting sucked down like a slurpee
Here are my mitigating steps:
Watchdog Lite alerts on gpsd going too high
I have uninstalled the offending app
I have not gotten this specific issue since I have uninstalled.
I am 99% sure that the app I uninstalled is the offending app.
I need a log or way to prove conclusively that this app is causing the issue so that I can present my findings to the developer.

You could try looking through logcat to see if you find anything suspicious.

Related

[Q] Nexus S stock 2.3.4 and how to check keep-awake culprits

Hey guys,
N00b here.
I've read the n00b guide and also searched around in the forum. I did find a thread similar to mine however I couldn't really get any useful info out of it and maybe since then new tools are available to help me track my problem, so I post my question.
So... on to it...
My Nexus S is suddenly having high keep-awake times. About phone tells me a battery usage of 32% android system, followed by 21% Display. Android system has a keep awake time of 3h 51m and a CPU total of 7m 52s. All this over the course of 19 hours. I don't have a screenshot with me but it's clear that the phone is awake a lot when the screen is off.
Automatic updates are off.
Some days ago everything was fine. My google acount is only synching contacts and calendar and even that is turned off when I'm not at home. Even so, I saw a high usage of the keep-awake bar even when the screen was off.
I've installed some weather widgets and battery info widgets and the update cycles of weather applications are around 45 mins so I wouldn't see a reason for such a high period of keep-awake cycles.
Anyway, each phone is a phone, is there an application that can tell you what is keeping the phone awake ? I have installed Watchdog lite but it doesn't show anything abnormal. I've installed Spare Parts Plus but it can't show me the battery usage history because apparently stock 2.3.4 Gingerbread doesn't support it.
So now I'm stick with trying to disabled notifications on one app, remove its widget and see if it helps. If it doesn't.. go to the next. This is quite tedious work really.
Still the battery life is ok I guess... 50% after 19 hours however I haven't played around with it much but I would be happier to have a low keep-awake cycle for the Android System like I had some days ago.. makes me feel like everything is fine
Thanks for any hints guys!
Having the same issue as well.. I have my widgets and such to only check every 4-6 hours, but the awake time in the battery stats is nearly on all the time.
Keep awake time is 4 hours and 22 min, out of 12 hours of battery. I'm left with 42 % battery with only 1 hr 15 min on screen time (texts and such, no games).
Hmmm a memory drain of 60% in 1 hour is quite a bit heavy. I would suggest you to download Watchdog lite from the app store and use it's real time CPU analyzer to try and see what's consuming the most.
Once I had weatherbug going rogue. But then it showed up in the battery usage list with a high CPU usage and clicking on the item I could see a high awake time so I uninstalled it.
At the moment I've removed some of my widgets and so far it seems to be OK. However tonight I had some weird awake times again. I uninstalled Battery Info widget from the phone and I'll see if it all goes well tonight. Then I'll start to activate the other widgets I had deactivated before to see what happens.
Also I downloaded aCatLog from the app store. Pretty interesting tool... you can see what's going on in the logs. I see a few Java exceptions every now and then.. never a good sign as they might not be handled properly by the application code that threw them. I see evernote synch problems, a data traffic counter throwing exceptions and K-9 to have problems with idle connection reset by peer. And I often see the garbage collector working. But I assume all this is normal. Switching to the event log it's too much information to absorve. Nevertheless I haven't seen in any of those logs an explicit request or grant of a system wake lock.
mindwalkr said:
My Nexus S is suddenly having high keep-awake times.
Click to expand...
Click to collapse
Did you recently enable Latitude, by any chance?
Try top -m 5 -n 1 in terminal
fallenguru said:
Did you recently enable Latitude, by any chance?
Click to expand...
Click to collapse
No Latitude enabled
snandlal said:
Try top -m 5 -n 1 in terminal
Click to expand...
Click to collapse
Do I need to download Terminal Emulator from the market to do this ? Or do I need to download the Android SDK and connect to the device via USB ? I need to check out to do this, never done it before and this is my first android phone.. only a week old
Again this morning my awake time was on for quite a bit (I guess 1 hour). I got an extract of the main log...
Some things are curious, the following occurs more or less each half hour. I am signed out of gtalk why was the service trying to keep alive ?
06-08 06:10:03.656 W/GTalkService( 189): [GTalkConnection.18] doConnect: caught XMPPError connecting to mtalk.google.com:5228.: (502)
06-08 06:10:03.656 W/GTalkService( 189): -- caused by: java.net.SocketTimeoutException: Connection timed out
06-08 06:10:03.660 D/GTalkService( 189): [GTalkConnection.18] connectionClosed: connId=0, error=CONNECTION FAILED
This is also giving me trouble, I might uninstall my Traffic Counter app
06-08 06:42:30.710 W/System.err( 4015): java.io.FileNotFoundException: /data/data/com.carl.trafficcounter/app_pref_bytes_last/0_0_bytes_last (No such file or directory)
Evernote seems to have some issues as well sometimes
06-08 06:44:36.371 I/com.evernote.android.edam.TAndroidHttpClient( 5320): 25: Response received in: 126718ms
06-08 06:44:36.398 E/com.evernote.client.SyncService( 5320): Sync failed
06-08 06:44:36.398 E/com.evernote.client.SyncService( 5320): org.apache.thrift.transport.TTransportException: java.net.UnknownHostException: www.evernote.com
And that's all I could see. Everything else seems to be garbage collection WiFi activities and what not..
It seems that I've narrowed down Go Weather as what's making my Android System stay awake. I couldn't see anything really useful on logcat about this but empiric observations seem to confirm it.
If I remove the Go Weather widget and turn off it's background updates (hourly), then restart the phone... I see the Android System incrementing some 3-4 mins keep awake time per hour. If I set the widget again and turn on Go Weather's background updates, after an hour the Android System keep awake time goes up like 15-20 mins or so. If at this point I remove the Go Weather widget and turn off it's background updates, the Android System keep awake will still go up at the same rate as if the Widget was there. If I restart the phone without the widget, then the Android System keep awake seems to increase back to regular 3-4 mins per hour.
The funny thing is that according to Permission Dog, Go Weather doesn't even use the WAKE permission so I would rule it out as what was keeping Android System awake.
Android System was driving me crazy too. I figured out that when my WiFi was enabled, it would continually keep the phone awake when the screen was off. So I just toggle the wifi off when I'm not using it, and android system behaves now.
I'm curious as to what changed though, because when I was using stock 2.3.4 and CM7.0.3 I would leave wifi on all day, and android system didn't cause any battery issues.

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

[GUIDE] Basics For A Better Battery

{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
*If you find this Guide Thread helpful, feel free to hit the "thanks" button below!​
Getting a full day out of your battery isn't something that should be fantasized over, but rather is absolutely attainable with most phone configurations. With following this [GUIDE] you should have no trouble getting more from your Atrix 2's battery life. I will outline several "usual suspects" and "battery butchering bandits" that some may already know of, and some that you might not have ever considered. However, if you try all of these it, may ruin your Android experience because you’ll be constantly fussing with your battery; that's not what this is for. These are ALL the tips/tricks I know. Even I don’t use all of them. Using just a few of these (possibly even one or two) should be enough that you notice an increase in your battery life. So, n00bs and more knowledgeable users can both benefit from this, and for the more resident members here, we've all seen the threads like, “Please help with my battery issue”, “Does undervolting save you battery life” or “Getting horrible battery life”, so this should help give everyone some great ways to improve upon your battery's performance and lifespan between charges.
First off, let me start by telling you all to be realistic. What I mean by that is this: You Atrix 2 is meant to be used! Your Atrix 2 is more than just a phone, it is a pocket-sized computer, an arcade full of your most favorite games, it is meant to be talked on, played with, downloaded to, uploaded from, tweaked/modded/themed/rom'd and everything else that you may desire! So, again, after reading and implementing some of (or all, if you're neurotic) the things I'll outline, hopefully this will alleviate some of the questions you may have as to why your battery performance isn't everything you anticipated it to be. Though, if you think you will get days out of your battery's life by following these suggestions, you're either not using your phone for anything other than holding down a stack of papers, or you're just not being realistic. Will these suggestions help give you more from your battery? Absolutely. I know this is all (well, mostly) very elementary in effort, but overall this WILL HELP you.​
*"There are many things to consider when thinking of your battery's performance, such as: Animation Speed. Polling For Notifications. GPS, WiFi scans, Overclocking. CPU/Ram Usage, Proper Sleep, Widgets, Brightness, 2G/3G/4G Data Usage, Call Time, Text Volume, just to name a few ~THESE are the things that really affect your battery life. The bottom line is, if you truly want to save battery you are going to have to get your hands dirty... there simply isn't a "one-click" (or one-flash) solution."​
*STANDARD DISCLAIMER: I cannot be held responsible for any and all damage related to Hardware loss or Data or Software, which the user might cause while attempting these procedures. Additionally, I am taking the liberty to assume that anyone who attempts these procedures understands the potential risks involved. Though, there should be no such issues to arise from following this guide, I am still exempting myself from any liability.
---For All Users (Rooting Not Required)---
​
1) Turn Off Your Radio(s) When Not Using Them:
Radios are what connect your phone to the rest of the world. You have your general mobile connection, WiFi, data/internet connection (3G), GPS, and/or 4G. Those are listed in order from least to greatest in battery consumption. If you’re not using the radio turn it off. If you know you won’t be online for a long time, why turn 3G data on? If you’re at home, use WiFi instead of 3G. If you’re not using Google Maps why is your GPS on? You’d be amazed at how much battery life you can save just by turning off the radios that you aren’t using.
2) Vibrate Uses More Battery:
Anytime your phone vibrates a lot of battery is used. This include haptic feedback. A lot of keyboards have the option to turn off haptic feedback and I would recommend it. If you’re a heavy texter you’ll notice very quickly how much longer your phone will last. Also, if you’re in a place where you can easily hear your phone why do you need to have vibrate enabled? If you know you’ll be able to hear your phone there’s no reason for it to be buzzing too.
3) Don’t Use Task Killers:
Crazy, right? Android has it’s own task killer that’s actually very good. If programs are using too much memory your Android OS will kill it. A common misconception is that apps run in the background forever; this is not true. If an app is using too much memory (which links to battery life) it’ll be killed by your phone. That’s why if you play a game, check a message, and come back the game is still running. It’s memory usage isn’t that high. However if you put your phone down, walk away for an hour, and the game is still trying to run in the background, there’s a good chance it will be closed before you come back. Separate task managers have to constantly be running in the background which can actually use more battery than it saves. Yes, task managers can use more battery than claim to save.
4. Power Cycling:
Not sure about the real effectiveness of this charging policy, but some users have tried it and have claimed to have had good results from it. So, to begin with the phone in the on position, fully charge the battery with the phone on. Once your Atrix 2 is fully charged, unplug the charger until the led goes off. After the led goes off, plug the charger back in. When the led turns green , power off the phone. Now, with the phone fully powered off, 1) Unplug the charger. 2) Wait until led goes off. 3) Plug charger back in until the led turns green. When it turns green, unplug the charger again and go to step 1). Repeat steps 1) and 3), 10 times. This may take anywhere from 30 seconds to 30 minutes per cycle. Typically only about 1 minute though. It takes too much work for me, but I’ve done it once just to test it.
5) Don’t Use Live Wallpapers:
They look awesome, right? They also use a lot of battery (especially the more complex ones). We’ve all used live wallpapers to show off how cool our phones can be, but for daily use they can KILL your battery. Also, your animations will be a factor in diminished battery life expectancy. To adjust this, simply navigate to: Settings>Display>Animations>set to "Off or Medium". #1 when it comes to what is eating your battery, is your display. It always has been and always will be, so accept it and try to do something about it. If you don't believe me, go to your Settings>Battery> and see just how much percentages the screen takes up. But, you want to do something about this, right? This part is easy. Just lower the brightness. You can set it to a brightness that is low but you are still able to see well enough to function. Live Wallpapers fall into this category. They are cool to look at but static ones take up less RAM and also less display because they are not running all the time in the background. These screens are very bright at 100%, so tone it down.
6) Watch Your Applications:
You have to pay attention to your applications. I repeat. You have to pay attention to your apps! Especially if they run in the background. This can be anything from a harmless .99¢ game to a monster like a Live Wallpaper. The battery drain threat is twofold here because the application is running in the background but it could also be using its anonymous data collection abilities and sending that back to the Mother ship. Ever wonder why your signal bars in the status bar have arrows or other animations going back and forth when your phone is just sitting there? This is because some application is transmitting data, whether you are using it or not. There are apps in the market that monitor these situations like Watchdog Task Manager Lite or you can adjust app permissions like LBE Privacy Guard. Data transfer is #2 on the "What Kills My Battery" list.
7) Worthless Widgets:
They look cool. But widgets are nothing more than RAM and battery hungry monsters that you purposely put in your home screen. Think about it. What does a widget really do? All it really does is monitor an app that you have running. So not only is it running and taking up battery and RAM but the app that it is linked to is running in the background a la Facebook, Twitter, Google+, CNBC, MSNBC, BBC, …the list goes on and on because they want us to put THEM on our home page. What a great marketing campaign the widget is: "Hey, look at me new home screen!" "Cool. Hey what widget is that?" "Oh, it is (whatever widget)." "Nice, I’ll have to download that tonight when I get home." Right then and there, they have you and your battery. If you're serious about getting the very most out of your battery, get rid of the widgets. I know, they're hard to resist, but trust me, your Atrix 2 will be a better place if you want the most out of your battery.
8) Set Your Screen Timeout:
Some phones start with their screen timeout at 3 minutes or more. That’s completely unnecessary. While you don’t want it to be instant, you know your preferences. Set it to as low as you see fit. The sooner your screen goes off, the longer your battery life will last. I set my screen timeout to the lowest "never" -but, in doing so, every time I am done checking emails or sending a text, I kill the display with the power button to turn off the display. This takes some habitual conditioning, and if you're used to allowing your phone the responsibility of turning off the display for you, it might bode well for your battery capacity crusade to simply adjust this to the minimum. But, if if you're like me and like 'control' over your display, I recommend you still set the timeout to the lowest possible setting, in the event that you forget to manually shut the display off yourself. It's just good practice when going for battery life longevity.
9) The Charger, and What You Can Do Regarding it:
Using certain chargers causes a wakelock on your phone that prevents it from going into deep sleep. This can result in roughly 10% battery attrition, regardless of activity or screen on time. Before you try anything else, you should test each of your chargers and make sure they aren’t causing a wakelock. Though this shouldn't be of concern if you are using the stock wall charger that came when you purchased your Atrix 2, there are other aftermarket ones that you may not suspect as reasons to worry about charging your phone with. If you are not using the stock charger, and you suspect you may have a problem, or may be curious to find out: Install CPU Spy from the Play Store. Open the app to see how much time your phone spends in each CPU state. If Deep Sleep is a very small percentage, or Deep Sleep doesn’t even appear, you have a problem with your charger. Or, follow the method below to test each of your chargers:
Testing CPU Spy:
1) Plug your phone into the charger and turn the screen off. Leave it charging for about 30 seconds. (Don't do this with a fully charged phone, as I don't know how that affects the testing)
2) With the screen still off, unplug the phone from the charger.
3) Open CPU Spy, hit the menu button, and "Reset Timers". Turn the screen off.
4) Let the phone sit idle for a few minutes with the screen off.
5) Turn the phone back on and refresh the timers in CPU Spy (menu button again).
If Deep Sleep doesn’t appear in the list of CPU states, your phone is experiencing a wakelock brought on by the charger. It’s probably spent the majority of time at 192mhz or 384mhz. To further confirm this, leave your phone unplugged, restart it, leave the screen off for a few minutes, and then check CPU spy again. You should now see it going into Deep Sleep.​​
10) Your Camera Flash and Battery Don’t Get Along:
If you like using your camera LED for a flashlight realize that will absolutely MURDER your battery. In all seriousness, your flash uses battery more than any other process on your phone. Turn off the flash. Don't set it to "automatic", you should know when you will need it and when you will not. By setting it to "automatic" you're relying on the phone's light meter to determine if the flash is needed. Sometimes it is, and other times it isn't.
11) Low Cell Signal Hurts Battery
Your phone is always searching for a stronger signal…This process gets more hectic as the cell signal goes down. So if you’re at one bar your phone’s battery life will drop faster than if you’ve got full coverage. There’s not much you can do here, but if you’re in a place where your phone has little to no signal anyway, you probably won’t be making calls so you might want to just turn on airplane mode or your phone off. And with Airplane Mode, you can toggle the airplane mode on/off 3 times in a row, that will reduce your Cell Standby battery usage. It should only be necessary to do it once after flashing but if you think Cell Standby uses too much power at some stage, you could toggle again the airplane mode 3 times. This is a handy little trick, not well known, but should give you some relief with Cell Standby usage. I travel for my job, which means that at times, I do not get good reception, or bounce around between Edge/3G/4G, and each time that happens, your Atrix 2 is sucking more juice by trying to find a good signal. If you are not in a static network, meaning one that is either 3G/4G at any given time, without locating off-network tower connections, turn your radio off or switch to Airplane Mode.
12) Speaking Of Syncing…:
Check your settings to see what is syncing and when. You probably have things syncing you don’t even use (stocks, news, contacts, etc). You can turn those off and edit the other ones. I don’t need my contacts’ statuses every hour, so my facebook sync is scheduled for once a day rather than the old once an hour. Find out what you need and how often you want it, and turn the rest off. I know you are very important and you need to know what LeBron James is doing right now, or that you need to upload a picture of you and your girlfriend every time you two are at a party, drinking beer. That is fine and I applaud you for it, and will probably download the picture and Photoshop myself in your place. This is not the problem. Syncing your accounts is. That is what is causing battery drain. Do you really need to have your FB widget (see widgets section) streaming all day long? I doubt it. Kill it (not LeBron, but rather the auto-syncing). Every time you “friend” someone their numbers, contact info gets sync’d to your phone. Also, there are settings in Facebook, Twitter and Google+ that you can upload pictures instantly. Don’t do that. Once you do, it is out in the Ether-World and just swallowed a bunch of battery doing it too. Settings>Accounts and Sync>Auto-sync>uncheck it
13) Don’t Use GPS Unless You Have To:
Some apps give you the option to precisely determine your position using GPS, or make a general estimate (usually within 100 meters) based on WiFi or 3G data. While this isn’t always the best (like if you’re driving or getting navigated), try to use the 3G connection when it doesn’t really matter. The data radio uses far less battery than GPS.
14) We're Gonna Need A Bigger Boat, erm... I Mean Battery:
If still not completely convinced that you have have stellar performance from your stock Atrix 2 battery, you can always check out the Atrix 2 Accessories threads for suggestions and/or discussions on extended capacity batteries. I've never used one myself, but don't see as to why this wouldn't certainly add to your life expectancy of your battery -assuming you're choosing foregoing the suggestions above, and simply insist on having your widgets and eating them to -or your battery, for that matter. Nonetheless, there are several manufacturers that supply an aftermarket extended capacity battery for the Atrix 2, just use your pal Google to help you find one.
​
---For All Users (*Rooting Required)---
​
*FOR ROOT USERS: If you’ve rooted your phone you have a few more options. You don’t gain too many more options, but they are even more effective than the ones listed above.
Underclock Your Phone:
Just like SetCPU can overclock your phone, it can underclock it as well. Set it to underclock when the phone is sleeping or even lower the max clocking speed. This will give your CPU's scaling frequencies a lower "resting" point, and will not allow the load of the CPU to be any higher than the maximum setting you permit. I know everyone who likes to get their hands into the belly of their Atrix 2 and start tweaking it loves the idea of overclocking, but c'mon, you don't have to run your CPU at 1.3GHz all day, everyday. Scale that baby down when you don't require such a high CPU load, and trust me, your CPU and your battery will thank you. Also, along with underclocking your CPU, you can undervolt as well. This will allow (after some testing you'll need to do first to make sure you're not undervolted too low for stable CPU loads) for your Atrix 2 to run at a lower voltage consumption, and with these types of settings, you can allow your Atrix 2 to run at your desired CPU frequency scaling, but a slightly lower voltage rate. *Note: As aforementioned, some testing is required for this to be effective with both your CPU's table values, as well as how it may improve your battery's life. Also, please reference This Thread for the latest kernel/module overclocking and undervolting methods.
Wakelocks That Destroy Your Battery Life:
If you're not familiar with wakelocks, they're basically processes that run on your phone that prevent it from going into deep sleep. Deep sleep is the mode your phone should go into when you're not using it so that it can conserve battery. Some wakelocks are intentional, while others can be the result of rogue apps or system processes. 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. 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. To effectively find your wakelocks, you'll need Better battery Stats It's free to us XDA users. You can get it IN THIS THREAD. More on wakelocks can be found in the post below.
Use SetCPU:
Create a special profile that forces the device to run at low clock speeds when the display is off.
Go to profiles
Check Enable
Press Add Profile
Set the following:
Condition: Screen Off
Max: 600MHz Max
Min: 300MHz Min
Governor: ondemand
Priority: 50
Press Save
On the Main tab make sure you have
Max: 1000MHz
Min: 300MHz
Governor: ondemand
Scheduler: deadline
Clean Out the Bloat:
Some of the bloatware and unnecessary applications on our Atrix 2's can drain battery. I really recommend you freeze the applications by using Root Freezer and run your Atrix 2 for a few days after you have frozen an unwanted application, and certainly before you decide to uninstall. This way you won’t accidentally uninstall something your phone needs to remain stable. Albeit, most of the custom roms that you will see here are already "de-bloated", if you're new to rooting and Android, and haven't quite decided that taking the next jump to flashing roms is for you, use Root Freezer to "freeze" applications that you suspect are bloat, until you decide to run a de-bloated ROM -and you will, eventually...
The Stock ROM Sucks:
If you’re still unrooted and on stock Gingerbread, I feel sorry for you. What the heck are you doing on this forum if you’re scared to flash a new ROM? This guide would be way too long if I tried to explain the battery improvements you might see by stepping up to the Stock ICS leak. You’ll probably see even more improvement if you flash one of the many custom ROMs in the Development section. If you’re dedicated to getting the most out of your phone, spend a weekend reading the ever-loving crap out of the stickies in the Development forum, and the [ROM] threads. Only after you have read those threads and feel like you have a good understanding, backup your phone and flash a new ROM on it. As long as you’ve backed up properly, you can flash between several ROMs and choose the one that works best for you. If you have any questions about the ROM you’re trying to flash, ask in that ROM's specific thread, don’t start out by creating a new thread in the General Section. You did do a search first, right?
Lost DIR Liability:
Let's say that you have your phone plugged into your PC and for some reason you, in a fit of rage, jerk the plug out without unmounting it first. This creates a file that is put into your LOST DIR folder on your SD card. Anytime you don't safely unmount the SD card, it will create a file in that folder. In the scheme of the SD card, it isn't too much, but I don't like having useless items free floating about. Clear them out using Root Explorer or a like Root File Explorer, and this will free up some (depending on how many times this has been done) valuable memory real estate.
Tombstones:
So you are downloading an update from the market and for some reason your phone freezes and the Force Close-Retry-Wait doesn't work out for you. You have to do a battery pull. Frustrating I know and the memory takes a hit too. Every time you have to do a battery pull because of a freeze up or something of the like, it creates a TOMBSTONE file in /data. These are useless and can be deleted. If you are flashing ROMs and are constantly having to do battery pulls b/c market crashes or an app freezes, then you are creating a Tombstone file. Here is where your file manager (with root) will help. Go into /data and scroll all the way to the bottom and open /tombstone. There should be some files in there and depending on how many there are, I could be a nice chunk of wasted memory. Just select all and delete. They are not needed. Your internal memory should go up by doing this.
Lost & Found:
Same scenario, but now go into /data/ cache or /cache and you'll see Dalvik Cache (don’t mess with this), Lost & Found and Recovery. If you tried to download an app and it got frozen for some reason and had to do a battery pull, the apk will be free floating in there, uninstalled (free floating radical). You can delete this. While it isn't in the Dalvik Cache folder, it is taking up space. Once you are able to download something completely and correctly from the market, it will populate into Dalvik Cache correctly and won't be a free radical, as I like to say.​
---For All Users (Miscellaneous)---​​​​​​
Some More Memory Clearing Tips:
Home Launcher:
If you have a 3rd party home launcher, see if it has the ability to long-press an icon to take you to its screen in the Manage Apps section. I use ADWex and if you long-press on say Market, it takes me to the same place as is I were to go to Settings>Applications>Manage Apps>Market. Instead of all that, just long-press on the icon and BAM! it takes you there. Here you can clear out your cache for the market or delete the data (if you need to do that). Or clear the cache of the XDA app because you looked at too many posts with pictures, etc.
Browsers:
These develop cache that takes up memory and space, especially the stock browser. If you use a 3rd party, you can get the settings to clear cache, cookies, passwords,…on exit. I use Dolphin, but I am pretty sure that most have something like this on them. (side note: most 3rd party browsers once exited will not run in the background unlike the stock one)
Media:
So you download a bunch of mp3's from the internet or you've clicked on some pix and saved them to your SD card. Or maybe you just felt like wiping your card and having a fresh start. Every time you reboot, you phone will scan media. No big deal, but the more you criss-cross things from PC to phone and back again, it can create a bunch of double files in your media cache on the phone. With the proper placement of .nomedia files (this prevents your media scanner from doing just that, scanning media- i.e. pix, jpegs,…Don’t place a .nomedia in your music, album art or DCIM files**bad). Every once in a while, I'll hit the Diskusage or go to Manage apps and clear the media cache. Then I got to my file manager and the DCIM->Thumbs and delete the thumbnails files (should be 2). Unmount the SD card and remount to start the media scan, pull up the Gallery and wait for the thumbs to come back (depending on how many you have, this could take awhile). By doing this you can get almost 5 mb back if you have a bunch of double scans in your media folder.​
Applications That Use Advertisements:
Try to avoid ad-supported applications, if you can. A research showed that in apps where there is adds, 70% of the power use comes from downloading and managing those adds to your screen. With just a 30 second use of an application that uses ads, it might drain your fully charged battery anywhere from 0.35% to 0.70%, which is enough to completely discharge the battery within a couple of hours if the process is repeated. This, according to a team of researchers, show that applications using advertisement support can take a high toll on your Android smartphone’s battery. The researchers analyzed how Android apps use the battery and concluded that the ad-serving processes that run in the background are responsible for heavy battery drainage. This may not seem like much, but so many applications that are free utilize advertisements and are blasted about the bottom or top of your application. I know I'll likely get ostracized for mentioning this, at least by some of the developers who rely on ad-support within their applications, but there is a way to eliminate these ads from showing themselves in your application(s). This is for BOTH rooted and un-rooted devices, as there are applications available from Google Play Store, such as AdFree Android (for ROOTED users only) or you can find one that will work on a non-rooted device. Or better yet, you could pony up the nominal dollar or two and show your own support for your favorite applications by buying the paid version, and thus eliminating the ads in that manner.​
*I will be updating this OP as I see necessary, and if anyone has useful tips that I may have missed or overlooked, please let me know. I'm aware that there are threads of this capacity floating about through XDA, but I have taken the liberty to create on specifically for our community.
Credits & Big Thanks To: Woodrube
Wakelocks Explained
Two final notes before I get started with the Wakelock Portion of this 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 drop down 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?
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.
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.
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.
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: 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. 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 is 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.
To fix: Check your charger and adjust if needed. 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.
To fix: Good question!
vbus_present: 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. Strange...
To fix: Check your phone. Is there a cord plugged into it? If so, does that cord lead to a source of power? Like, I don't know, an adapter plugged into a wall socket? That's your root cause. vbus_present is a completely harmless wakelock, which will appear for as long as your charger is plugged into your phone. Set a custom reference point in BBS when you unplug, and you'll note that it's magically disappeared.
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.
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: 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 key tone 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. 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.
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.
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.
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.
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. 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, 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?
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. It's as good a third-party Facebook client as you'll find on Android, and it only wakes up when you tell it to.
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.
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.
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.
Credits & Big Thanks To: T.J. Bender
A Little Charging Trick
If, after rooting or more likely that case after flashing a new ROM, you often have battery reporting errors, and re-calibrating the battery along with some steps I will outline for you below will ensure that your battery is getting a full charge, and the battery reporting accuracy is right on. I run my device's CPU governor in performance mode all the time, and with a CPU overclock of 1.25GHz and various tweaks, I have about a day and a half - to a day and a quarter of full run time from my battery. This is with moderate usage (calls, emailing, text, gaming, web browsing, etc.) so you should have no problems getting acceptable battery performance after following these steps, coupled with the ones I've given in the OP:
1. Take the case off your Atrix 2 (one of the latter steps involves taking the battery out from the phone while it's plugged in. Make sure your case won't stand in the way.)
2. Install Battery Calibration app from the market
3. Plug in your Atrix 2 to charge while it's on, wait till it gets to a 100%
4. When the charge is 100%, open the BatteryCalibration app and lookup what the charge is in MV while at 100%. Write it down.
My Atrix 2 was showing ~3400MV while at 100%, which is definitely not the maximum capacity.
5. Discharge your Atrix 2 completely until it shuts off.
A good way of doing this quickly is by turning on wifi, and a video player.
6. Without turning on the phone plug it into a wall charger and let it get to 100%
7. When it's at 100%, without unplugging it from the wall charger, take off the battery cover, and take the battery out.
Your phone will "reboot" and show a Missing Battery icon.
8. Without unplugging the phone from the wall charger or turning it on, put the battery back in and wait until the phone recognizes the battery.
9. Your battery should now be recognized by the phone, and showing a charge % significantly lower than 100%.
Mine showed only 5%.
10. Let it sit there charging for 2-3 hours (or more).
My phone wouldn't charge past 10%, but yours might. The numbers don't matter much as the phone is definitely getting additional charge that could have been lost while flashing ROMs, etc.
11. After 2-3 hours (or more), turn the phone on while holding the volume down button and get into CWM.
Do not disconnect it from the charger still!
12. Wipe battery stats in CWM, reboot.
Do not disconnect it from the charger still!
13. When the phone turns on, go into Battery Calibration app again and look up your MV numbers -if you were like me, they should be significantly higher than before. After this whole process I had 4351MV at 100%, comparing to 3400MV before calibration.
Do not disconnect it from the charger still!
14. Before going to sleep - Install Watchdog Task Manager Lite from the market. Go into it's preferences, set CPU threshhold to 20%, check "Include phone processes", check "Monitor phone processes", check "Display all phone processes", set system CPU threshhold to 20% as well.
Do not disconnect it from the charger still!
15. Make sure your wifi and data connections are off. Now finally unplug the phone from the charger.
Go to bed, let your phone sleep too.
16. Success! Next morning check where your battery % is at and if you followed the instructions correctly / got lucky like me, your battery life should be 90% or more.
I went to bed with 98% and woke up to 94%. So, I consider this mission a success.
NICE JOB!!!!
Sticky... I will ask...
Nice Guide just fixed minor things and my battery is already better!
Sent from my locked MB865 on Ice Cream Sandwich.
temperature
what causes battery temperature rising ? oc? data? games?
cause i've noticed that battery drops horribly on graph when temperature increases
shardul.phatak said:
what causes battery temperature rising ? oc? data? games?
cause i've noticed that battery drops horribly on graph when temperature increases
Click to expand...
Click to collapse
Battery temperature is a direct result of device usage. If you go to sleep at night, and are NOT charging your phone overnight, in the morning when you wake up and roll over to check xda or Facebook or whatever, the phone isn't warm, right? During the day, if you're running a browser or streaming music or just have a lot of screen time on, your phone will get warmer and warmer. It's hard to say without seeing any test results from your phone as to what is causing higher temperatures, but it's safe to say that any or all of the things you listed could be a cause. Obviously, overclocking WILL cause your phone to run warmer. Your permitting a higher CPU load value at the maximum frequency scaling, and subsequently your phone's CPU is working harder. Try some (or most) of the suggestions in this thread and see if you notice a lower temperature and battery drop as a result of the changes...
Great guide mister strider!
Motorola lied and I'm still locked mb865
Nice! Thanks for putting this together, Apex... Keep on striding, man!
Apex_Strider,
Can you tell us the final result when you applied these trick on your phone ?
Mine was not used any above, and gave me ~24hrs with heavy use, wifi on 24/24, screen on 5h using wifi. Phone for 15 mins/day, sometime movies for 2hrs.
I charged it at 22:30 PM every night.
Awesome guide. I made my lady read it. She was constantly complaining about her new atrix2's battery life. She learned quit a bit. It was easier to take this way than coming from a frustrated loved one.
You should use your skills to write a guide about how to use the report button and what help or response should be given and how to give it by non op's or those not involved in a given project for all the sudo (ha!) forum cops. (See I can't do it. My sentences are too long.) The constant correcting of anyone by everyone is getting annoying.
Sent from my MB865 using Tapatalk 2
Nice guide Apex!! Keep up the excellent work!
Thanks guys, your appreciation of my time doing these is more appreciated than I can say. Writing has always been a passion of mine, and really the only thing I was good at in school/college- when I wasn't ingesting illicit substances by the truck load. I'm working another guide thread now, hopefully completing it by tonight or tomorrow sometime. Thinking, since I'm nowhere near "dev" status or knowledge, I might apply for Recognized Contributor. Not sure we have any here in this community, at least that's not as present here as I am. Not to slight anyone who might be one, just haven't seen any floating around in here...
Sent from my SAMSUNG-SGH-I747 using xda premium
Apex_Strider said:
Thanks guys, your appreciation of my time doing these is more appreciated than I can say. Writing has always been a passion of mine, and really the only thing I was good at in school/college- when I wasn't ingesting illicit substances by the truck load. I'm working another guide thread now, hopefully completing it by tonight or tomorrow sometime. Thinking, since I'm nowhere near "dev" status or knowledge, I might apply for Recognized Contributor. Not sure we have any here in this community, at least that's not as present here as I am. Not to slight anyone who might be one, just haven't seen any floating around in here...
Sent from my SAMSUNG-SGH-I747 using xda premium
Click to expand...
Click to collapse
Wait isn't "ingesting illicit substances" part of the college curriculum? If it is not officially it should be, cause it does, ur, um, it did help... LOL.
vinamilk said:
Apex_Strider,
Can you tell us the final result when you applied these trick on your phone ?
Mine was not used any above, and gave me ~24hrs with heavy use, wifi on 24/24, screen on 5h using wifi. Phone for 15 mins/day, sometime movies for 2hrs.
I charged it at 22:30 PM every night.
Click to expand...
Click to collapse
Are you asking for my "results", meaning my battery usgae stats (i.e.: maximum duration of battery from full charge to full discharge, screen time, etc.)? If so, I'll have to do this again, as it's been a couple of months since I had. Keep in mind, that everyone's results will vary, as it depends on so many different variables.
Also, being on WiFi will demand less from your battery than relying solely on the network connection. So, if you're 'always' on WiFi, you will get more from your battery than not. On my Atrix 2, I can get a full day or more from one full charge. Now, this is from my usage, and like I mentioned -everyone's will vary. Generally speaking, in practical use Wi-Fi isn’t any more or less friendly on your battery than cellular is. Sure there are differences, but the biggest one of all is distance. Since you’re probably a good-deal closer to your Wi-Fi WAP than you are to your cellular tower, it’s likely that your battery life will be better if you’re using Wi-Fi rather than cellular data.
The charging trick I outlined in this thread is very useful for battery reporting errors after flashing a new rom, or just is one feels like their battery isn't getting the kind of "full" charge it should. It helped me out, as well as others...
I have an extended battery that I've run through several full drain/charge cycles over the past two weeks (when I got it). However, it still doesn't register the charge % properly - it will say 5% for over a day. I used the BatteryCalibration app to no avail.
Ideas?
Ajfink said:
I have an extended battery that I've run through several full drain/charge cycles over the past two weeks (when I got it). However, it still doesn't register the charge % properly - it will say 5% for over a day. I used the BatteryCalibration app to no avail.
Ideas?
Click to expand...
Click to collapse
Try the battery charge trick above, without the Watchdog part -sounds like a battery reporting error. Are you using 1% battery mods?
Sent from my SAMSUNG-SGH-I747 using xda premium
Apex_Strider said:
Try the battery charge trick above, without the Watchdog part -sounds like a battery reporting error. Are you using 1% battery mods?
Sent from my SAMSUNG-SGH-I747 using xda premium
Click to expand...
Click to collapse
No, I'm completely stock with root.
The Battery Calibration app DOES list the appropriate mV levels, though.
I'll give it a shot.
governors, i/o schedulers ?
may be this & this could help if u want to do sum experiment :silly:
+10 awesome job again !!!!!

[Q] HTC One X constant CPU load killing my battery

Now, I've been troubleshooting this issue for >3 months and I've lurked the forums as much as possible. I've looked over threads like the Google Services is Killing My Apps but it doesn't really go beyond the surface of the issue. Now, I'm pretty good with linux/bash and I understand most advanced computing topics but I'm a noob as to the inner workings of droids. At this point I'm hoping that you guys can offer some enlightenment because I don't know what steps to take next. Here's what's going on:
Device: non-root ATT HTC One X
Versions:
Android: 4.1.1
Kernel: 3.4.10
Now, here's the extra tasty bits of info:
CPU usage is always very high. Here's some averages throughout the day,
CPU: ~10% usr: <10% sys: 1% nice: 90% idle: 0%
Load Average: some days it's floating around 2, other days floats around 5. Regardless of load average, the above numbers stay pretty much exactly where they are.
Now, I've uninstalled every app. I've disabled Google Play, Google Play Services, and all other Google Services. This solved the issue except that after ~2 hours, I saw that Google Play and Google Play Books automatically re-enabled and re-installed themselves and the issue's occurring again. Sure, that means that I've sort of narrowed down the cause of this insane cpu usage but that doesn't get me any closer to knowing what to do to fix it. Anybody have any idea as to why google play is abusing my battery?
The stats you gave in the middle of your post there aren't very clear, can you please try to elaborate on that? What app are you using to come up with the stats? What kind of battery life are you getting?
Sent from my Evita
timmaaa said:
The stats you gave in the middle of your post there aren't very clear, can you please try to elaborate on that? What app are you using to come up with the stats? What kind of battery life are you getting?
Sent from my Evita
Click to expand...
Click to collapse
I'm using an SSH app called Terminal IDE. In the bash shell I run the command top to get those stats. It's the same thing as turning on "Show CPU Usage" in settings -> Developer Options -> Advanced -> Show CPU Usage.
Also, to clarify, when my processor is getting abused, it's showing as 10% is coming from user processes, 10% system processes, 90% "nice" processes and usually 0% idle. I've never seen nice processes consume so much cpu lol. I assumed that whatever app(s) are causing the issue are probably connecting to the net so I went through every app to disable notifications and any automatic downloads, automatic updates, and automatic anything. Anyways, is there a way to track what apps are trying to make connections to the net on a non-rooted phone? I'm going to root my phone soon-ish but in the meanwhile...
Ok, but what about the last question? I'm just struggling to see where the problem is unless you're suffering bad battery life. The CPU doesn't seem to be operating incorrectly from what I can see.
Sent from my Evita

Kernel wakelocks draining battery, anybody else? Help needed

Hello all,
My phab 2 Pro is draining its battery too fast with the screen off. Using Battery Historian I've been able to pinpoint it down to something keeping the phone awake when it should be sleeping. The problem is it happens randomly and I haven't been able to "connect" it to a specific app or setting.
The "kernel wakeup reason" that Battery Historian shows as the (I think so anyway) culprit is "Abort:Wakeup IRQ -1169425744 (null) pending". The number after "IRQ -" changes from log to log.
Something else that keeps popping up on the "Userspace wakelock" line with short bursts is "RILJ". This is precisely during the period that the phone is "awake" but the screen is off. So maybe the RILJ and the IRQ thing have something to do with each other?
Steps I took:
Full factory reset
Uninstalled ALL apps that can be uninstalled.
Disabled ALL apps that can be disabled, apart from things that have to stay like keyboard.
Switched of any Location setting that can be switched off
Switched of all syncing that can be switched off
Enabled developer options (to be able to pull the bugreport.txt off the device using adb)
Engaged airplane mode
But even with all of these steps, which leaves the phone totally unusable (but I have another daily driver) this weird kernel wakelock still happens frequently, draining the battery very fast. Going from 38% down to 9% in just 6 hours, with the screen off(!) is plainly unacceptable.
Are there other users out there experiencing the same? I know of one guy who posted lasted year, but maybe there are more out there?
Can anybody help with this? I have no idea what to do now I more or less now where the problem lies. I'm no coder and don't know anybody at Lenovo...
Regards,
Sander
Is not normal what happens to you, but as a remote solution ... try to get into the applications that are working, and look at google services, there is one that spends a bestiality, it is called fileakintentoperation $ external that application next to the others Spend a lot of ram, I ended up blocking the services of google play and play store, and I assure you that the battery lasts for more than two days
rogerbcn said:
Is not normal what happens to you, but as a remote solution ... try to get into the applications that are working, and look at google services, there is one that spends a bestiality, it is called fileakintentoperation $ external that application next to the others Spend a lot of ram, I ended up blocking the services of google play and play store, and I assure you that the battery lasts for more than two days
Click to expand...
Click to collapse
Hi Rogerbcn,
thanks for replying.
Could you type the name of the app/service again? Google doesn't return anything on "fileakintentoperation" .
I already have the Google play and Play Store apps disabled, unfortunately, that didn't help.
Regards,
Sander
Is just below, where are the services of google play, and is also a service, but after reading that you have disconnected and you also have disconnected play store, gives me your battery or is badly calibrated or is to change, Take it to the sat of lenovo and assert your guarantee that for that we have spent 500 dollars / euros,regards
[rogerbcn] is probably correct and that you may have a defective battery. I use greenify and it seems to extend battery life about 23% for app hibernation.
https://play.google.com/store/apps/details?id=com.oasisfeng.greenify&hl=en
I resolved with task killer (kil 1 sec. After lockscreen)
edit: not resolved... anyone has other experience?
Seems to be resolved.
I used greenify, with doze go (adb solution)

Categories

Resources