Deep Sleep - Hunt down the errant app - Android Q&A, Help & Troubleshooting

Posting this in general since I figure it's not phone specific but for reference, I have a Samsung Vibrant running ICS.
I've been having an issue with the phone refusing to go into deep sleep. I suspect that it's a misbehaving app as it'll go into deep sleep after a reboot, for perhaps 2-8 hours, after this, it'll default to the set minimum voltage and refuse to go any lower.
What I'm looking for is a way to track down and slay this little battery eating monstrosity. I have this app to peek at the inner magic but to be perfectly blunt, I have no idea what I'm doing. Hoping someone can provide a little troubleshooting device. Going from 100% battery to 30% in 5 hours sucks.

I use "batteryBatteryStats" to show what applications are causing wakelocks, really helped me out a few months ago.
https://market.android.com/details?id=com.asksven.betterbatterystats&hl=en

Related

Deep Sleep Q&A

I'm posting this hoping for some solid answers to explain when our Note should actually be in "Deep Sleep". I've seen many threads with people having issues with battery life due to our phones not sleeping correctly, me being one of them. Hoping this thread could help answer some questions that I'm sure I'm not the only one asking.
So my questions are...
1. When should our phone actually be deep sleeping?
2.Does having "auto-sync" on prevent or interrupt the phone from deep sleeping?
3.Does anyone know of any apps in particular that seem to be causing excessive wakelocks?
4.If a phone is left completely idle should it be in deep sleep the entire time?
5.What is the easiest way to determine what its causing the phone to wake from sleep. (I know that the app better battery stats will work, but I'm unsure how to use it to find the culprit.)
Anyone who knows the answers please help me understand so I can stop obsessing!
Really depends what app u are running. Best solution is to get a battery monitor (i use bad ass battery monitor); allows me to see wakelocks, screen on time and a bunch of usage details for each app u ran since boot/unplugged
Sent from my SAMSUNG-SGH-I717 using XDA App
Also i.downloaded setCPU and im using on demand setting and my battery got much better... In combination with JuiceDefender
Sent from my SAMSUNG-SGH-I717 using XDA App
connordroid said:
I'm posting this hoping for some solid answers to explain when our Note should actually be in "Deep Sleep". I've seen many threads with people having issues with battery life due to our phones not sleeping correctly, me being one of them. Hoping this thread could help answer some questions that I'm sure I'm not the only one asking.
So my questions are...
1. When should our phone actually be deep sleeping?
2.Does having "auto-sync" on prevent or interrupt the phone from deep sleeping?
3.Does anyone know of any apps in particular that seem to be causing excessive wakelocks?
4.If a phone is left completely idle should it be in deep sleep the entire time?
5.What is the easiest way to determine what its causing the phone to wake from sleep. (I know that the app better battery stats will work, but I'm unsure how to use it to find the culprit.)
Anyone who knows the answers please help me understand so I can stop obsessing!
Click to expand...
Click to collapse
1. Any time the device is idle (you're not purposely running background activity) and the screen is off.
2. It probably will sometimes, briefly. It depends on what's syncing. In my experience, the only sync that has caused issues is the Google currents app (but it can be easily adjusted).
3. Instant messaging apps tend to hold wakelocks if signed in (EXCEPT GTalk, which has little impact on battery). Skype has been notorious for this as well. Any app that can trigger data activity can wake the device into a wakelock.
4. Theoretically, yes it should (or very close to it). In practice, the most I've seen somebody achieve was around 97% (observable via CPU Spy).
5. BetterBatteryStats and CPUSpy together are what you need. In BBS, you're looking for partial wakelocks, kernel wakelocks, and alarms. Partial wakelocks are held by apps. Any partial wakelock more than a few minutes should be looked into (changing settings, or removing the app all together). In kernel wakelocks, you're typically looking for svnet-dormancy wakelocks. These are wakelocks caused by data activity while the screen is off. This should typically be less than 4%, I suppose. Alarms will tell you what processes are waking the device. Throughout BBS, the app name will probably be pretty evident. In most cases, you can google the package name if you're not sure. The developer of Better Battery Stats provides support in his thread if you provide the dump file (it's fairly simple to "dump" your information into a file for observation).
A good observation is to reset the timers in CPU Spy, turn the screen off, and let the device sit idle for a couple of hours. I'd say anything around 95% of deep sleep is pretty good. Personally, most of the time, I get close to 95% (in complete idle, of course). Looking in CPU Spy after a normal day's usage isn't helpful because it'll appear as if your device isn't entering deep sleep sufficiently.

[Q] Deep sleep

I left my Note overnight to test the battery drain and lost 40%. I used CPU spy to see what was happening and the phone never really went into Deep Sleep. Android OS was the biggest battery drain.
What's the best way/app to see what is keeping my phone from going into deep sleep? I am not rooted.
Please try a search you will get lots of good answers.
http://forum.xda-developers.com/showthread.php?t=1516565
And get Better Battery Stats to find out what is triggering you out of sleep if the above thread does not help.
Sent from my SGH-I897 using XDA
jpeg42 said:
Please try a search you will get lots of good answers.
http://forum.xda-developers.com/showthread.php?t=1516565
And get Better Battery Stats to find out what is triggering you out of sleep if the above thread does not help.
Sent from my SGH-I897 using XDA
Click to expand...
Click to collapse
I don't need to be told to do a search. That's the first thing I do before I post a thread. The subject of that particular thread didn't seem to apply.
factory reset should take care of andriod os eating battery more then screen.dont install any app for few hours.only install cpu spy.
Thanks for the suggestion, but I'd rather not have to do a factory reset every time a rogue app is draining my battery. Reinstalling everything all over again is a pain (not rooted, so Titanium backup is not an option) and that's like telling a user to reinstall Windows every time they see a little performance degredation.
I'm pretty sure there has to be a better way. I'll try betterbatterystats and see if it can help me narrow down the problem.
yeh i have an unrelated problem, will resetting device fixes it, but definately not a viable solution
but on topic in better battery stats look under 'partial wake locks',and see what programs are listed first (and the time spent on the apps)
that should normally tell you whats making the phone not got to sleep
u not gone find anything with battery stats.one of ur app is causing this issue.
u can give battery stats a try.when u.have a virus in windows, dont have have to do full recovery instead buying a virus program and trying to fix it.
greyhulk please try that solution Jpeg42 linked to.
Thursday I was down to 30% when I left work(10 hours). Friday I turned on the screen before unplugging and I was at 25% with 2 hours of screen on time and 21 hours since I unplugged.
Unplugging the phone with the screen off seems to prevent deep sleep. Give it a try.
If all else fails, it might be the battery itself. Hardware issue.
-On another NOTE, Samsung goes 5.3"
mintu123 said:
u not gone find anything with battery stats.one of ur app is causing this issue.
u can give battery stats a try.when u.have a virus in windows, dont have have to do full recovery instead buying a virus program and trying to fix it.
Click to expand...
Click to collapse
Your post is virtually incoherent, however, I will say you seem to be saying BetterBatteryStats won't help, and it most certainly will. What there is no need for is a factory reset, that's like nuking a planet to kill a flea.
Pops_G said:
greyhulk please try that solution Jpeg42 linked to.
Thursday I was down to 30% when I left work(10 hours). Friday I turned on the screen before unplugging and I was at 25% with 2 hours of screen on time and 21 hours since I unplugged.
Unplugging the phone with the screen off seems to prevent deep sleep. Give it a try.
Click to expand...
Click to collapse
Yeah, reading the thread over, that's exactly what I did last night: Took it off the charger with the screen off. I skipped over that thread originally because the title lead me to believe that it had to do with battery drain while plugged in.
I'll give it another test tonight and see if that makes a difference.
I just wanted to post my experiences with deep sleep.
I was getting some pretty bad drain, and I couldn't figure out why. Thanks to the search engine and running into this thread, I tried what you all tried here.
I am running Launcher Pro, and I wasn't going to deep sleep at all. Did the trick posted, even rebooted without it plugged in and it still wasn't sleeping at all.
I cleared the defaults and went back to the default launcher. It went to deep sleep just fine. I cleared the defaults again, then set the launcher back to launcher pro. It is now deep sleeping with the launcher pro as the default.
I then put the phone on the charger, woke it up, unlocked it and unplugged it. Its still deep sleeping. Really weird how it acted, and I figured for everyone else's sake in case they run into that issue again, it could be your launcher that is causing the issue.
A reboot with the phone, after the launcher switch, as the launcher pro as the default, resulted in no deep sleep. Launching the stock launcher while LauncherPro is still the default launcher resulted in no deep sleep.
After a reboot, with no default launcher, launching the stock launcher resulted in, it does not deep sleep.
After a reboot with no default launcher, launching LauncherPro, no deep sleep.
Some really goofy stuff going on...
I am using the overclock kernel but I am not overclocking. I installed it to lower the cpu to 192mhz instead of 384mhz.
I noticed that my phone (Lenovo P700i) barely goes into deep sleep. At the minimum, it always runs at 250 mhz.
Is this considered a deep sleep problem even though BetterBatteryStats shows that there don't seem to be any significant wakelocks?
there's two build props that will make your device enter sleep instanly...If you understand how to edit them..you may want to search for deep sleep build prop tweaks..hope this helps..
Does this app can fix the issue: http://forum.xda-developers.com/showthread.php?t=2030696 ?

SKANG + Devil 1.0.4 - Battery life?

After three failed flashes of JellyBro 231 from 8/1 and Devil 1.0.4 test3, I thought I had it. Things were buttery. I had an entire morning of slick performance.
I then played with the Devil Kernel Config app to try and get some additional time out of my battery (drain is considerably higher than what I had on Team Whiskey's last Froyo build which, admittedly, sets the bar quite high for efficiency). Playing with deep idle and min/max freq settings invariably seem to reward me with sleeps of death.
I'll take this ROM as it is with Devil - it works, it's smooth, and I can charge my phone at work. If anyone has suggestions for squeezing out a few extra hours, though, I'd happily take them.
[Bump]
OK, at least part of the issue appears to be due to Exchange Services and excessive wakelocks due to said service. It appears to be a common issue on all 4.x devces. Rebooting my device appears to help for some time but then the issue returns within a day or two. Battery life is average when wakelocks aren't killing the battery entirly but when the device is held "awake" by the service, it drains 75% in about 6 hours.
FYI, my exchange account is set to poll once an hour, not "push". Such a schedule helped my battery life immensely on my Froyo install. Hope echange services get fixed eventually.
My question still remains if there are any other power-saving tips people might have.
What are your current settings in devil config?
I don't use exchange, in fact I removed it.
A couple of things that help me
1. Re calibrate battery!
I went from 6hrs on charge to 16+ after calibration with battery calibration app!
2. I keep sync off and manually sync when needed....
3. I have minimal widgets, and no live wallpapers (battery killers)
4. In settings>WiFi>press menu>advanced>WiFi when sleep (never).
All these things I read on a thread about extending battery life.
Currently running Hellybean 0806.
drool on my chin from a mouth full of jellybeans
samsgun357 said:
What are your current settings in devil config?
I don't use exchange, in fact I removed it.
A couple of things that help me
1. Re calibrate battery!
I went from 6hrs on charge to 16+ after calibration with battery calibration app!
2. I keep sync off and manually sync when needed....
3. I have minimal widgets, and no live wallpapers (battery killers)
4. In settings>WiFi>press menu>advanced>WiFi when sleep (never).
All these things I read on a thread about extending battery life.
Currently running Hellybean 0806.
drool on my chin from a mouth full of jellybeans
Click to expand...
Click to collapse
I reverted my settings in devil config to the defaults, so nothing remarkable there. As for your suggestions, please see below:
1. Perhaps, but consider this: after charging overnight, my battery drained 20% in less than 2 hours. The battery usage chart indicated that the Android System process kept it awake the majority of that time. Rebooting the phone causes it to have a much more modest drain, my "Awake" status bar isn't a continuous green bar but, rather, a broken bar as I would expect. It would seem it's not just Exchange at fault, nor is it simply a battery calibration issue, otherwise I wouldn't see the excessive drain in association with a "keep awake" process. The measure of charge drop can be directly correlated to the keep awake status - the less the phone is kept awake, the less my battery is drained.
2. I've been using Froyo for 1.5 years and have had the same sync settings that I have now in Skang - hourly for Exchange and default for Google. After 16 hours uptime in Team Whiskey's ROM, I was generally down to 50%-60% battery. Now I don't even last 6 hours with this issue.
3. No more widgets than what I had in Team Whiskey's ROM. My calendar and Google Voice inbox are the only two. No live wallpapers either.
4. WiFi is on but, again, this is exactly what I had set in Team Whiskey's ROM.
I'm not trying to trumpet Team Whiskey's Froyo ROM for the sake of promoting it. Simply trying to indicate that, from a settings standpoint, I got apples to apples here. I already was aware of your suggested means of getting extra time and, not trying to be dismissive, but I prefer my settings and I know it should be possible to get better battery life with them. Perhaps I should have been more explicit in my question - does anyone have a means of squeezing extra battery life using the Devil Kernel Config. Deep Idle and min clock do a great job of saving battery... and sending my device into a SoD. If there are specific clock speeds to avoid/try, that would be helpful, not to mention if there is anyone who actually got deep idle to work. In concept, it is great.
Perhaps, now that I've seen these two "keep awake" issues (Exchange and Android System) this thread is less relevant - I'm convinced that I will get similar battery life to Team Wiskey's ROM if I can just keep certain processes from keeping the phone awake. Admittedly, "Android System" is not the most helpful in diagnosing the issue as it appears to be a dumping ground for miscellaneous processes' statistics rather than a specific process. In any case, I appear to have an easy way of reproducing the issue - charge for an extended period of time and remove from the charger without a reboot. Rebooting seems to fix the issue until the next charging cycle. I can live with that for now.
Thanks for your input, samsgun357. Sorry I wasn't more explicit in my original question as well as measures I've already considered - I could have saved you a little typing.
If anyone else has noticed this issue with "keep awake" processes that go away after reboot, I'd appreciate input. I'd like to see if there's any way I could help to uncover the root cause of this issue.
PlacidCat said:
I reverted my settings in devil config to the defaults, so nothing remarkable there. As for your suggestions, please see below:
1. Perhaps, but consider this: after charging overnight, my battery drained 20% in less than 2 hours. The battery usage chart indicated that the Android System process kept it awake the majority of that time. Rebooting the phone causes it to have a much more modest drain, my "Awake" status bar isn't a continuous green bar but, rather, a broken bar as I would expect. It would seem it's not just Exchange at fault, nor is it simply a battery calibration issue, otherwise I wouldn't see the excessive drain in association with a "keep awake" process. The measure of charge drop can be directly correlated to the keep awake status - the less the phone is kept awake, the less my battery is drained.
2. I've been using Froyo for 1.5 years and have had the same sync settings that I have now in Skang - hourly for Exchange and default for Google. After 16 hours uptime in Team Whiskey's ROM, I was generally down to 50%-60% battery. Now I don't even last 6 hours with this issue.
3. No more widgets than what I had in Team Whiskey's ROM. My calendar and Google Voice inbox are the only two. No live wallpapers either.
4. WiFi is on but, again, this is exactly what I had set in Team Whiskey's ROM.
I'm not trying to trumpet Team Whiskey's Froyo ROM for the sake of promoting it. Simply trying to indicate that, from a settings standpoint, I got apples to apples here. I already was aware of your suggested means of getting extra time and, not trying to be dismissive, but I prefer my settings and I know it should be possible to get better battery life with them. Perhaps I should have been more explicit in my question - does anyone have a means of squeezing extra battery life using the Devil Kernel Config. Deep Idle and min clock do a great job of saving battery... and sending my device into a SoD. If there are specific clock speeds to avoid/try, that would be helpful, not to mention if there is anyone who actually got deep idle to work. In concept, it is great.
Perhaps, now that I've seen these two "keep awake" issues (Exchange and Android System) this thread is less relevant - I'm convinced that I will get similar battery life to Team Wiskey's ROM if I can just keep certain processes from keeping the phone awake. Admittedly, "Android System" is not the most helpful in diagnosing the issue as it appears to be a dumping ground for miscellaneous processes' statistics rather than a specific process. In any case, I appear to have an easy way of reproducing the issue - charge for an extended period of time and remove from the charger without a reboot. Rebooting seems to fix the issue until the next charging cycle. I can live with that for now.
Thanks for your input, samsgun357. Sorry I wasn't more explicit in my original question as well as measures I've already considered - I could have saved you a little typing.
If anyone else has noticed this issue with "keep awake" processes that go away after reboot, I'd appreciate input. I'd like to see if there's any way I could help to uncover the root cause of this issue.
Click to expand...
Click to collapse
I have an Infuse SGH-i997.
I've seen quite a few reports of battery drain, simply because I'm looking for them.
Here is a thread for you to check out. There are quite a few links from there too.
http://forum.xda-developers.com/showthread.php?t=1408433
note times and dates
have fun

CM10: What is a reasonable percentage of "deep sleep"

Looking at my battery stats I'm troubled by how little the phone is sleeping. Consider:
13 hours on battery
1 hour screen on
6 hours deep sleep
That means that for the 12 hours I want using my phone, it only spent 1/2 of that time in deep sleep.
Shouldn't that number be 90+%? Can anyone help me figure out which app is keeping the phone awake?
Sent from my Amaze 4G using Tapatalk 2
It's impossible to know how much it should be sleeping without any further information.
I recommend grabbing Better Battery Stats and finding out what is causing the wakelocks.
Well, BBS just says that the wake locks were being thrown by the network (ie. rx_wake) which didn't really help me. I don't really know how to use BBS to determine what app is causing a problem.
Moreover, how do I even know there IS a problem if I don't have an answer to my original question (what's reasonable?).
So, I'll re-ask. When the phone isn't being used at all, what percentage of that time should one expect it to be in deep sleep?
Sent from my Amaze 4G using Tapatalk 2
Given the highly variable nature of battery reports, it seems that installed apps makes a huge difference as to how much the phone sleeps.
Goto the Processes tab in BBS, and see if there's a rogue app running in the background. I know the Amazon App Store loves to run even after I close it, same with Facebook.

Possible solution for Vibrant GPS wakelocks - great battery life trick!

Hi, I've had quite a few roms on the Vibrant (all JB) and they've all suffered from poor battery life due to a GPS wakelock getting out of control and leaving the phone stuck at 100mhz, unable to go into deep sleep. The wakelock I see mostly is ste-gps-interface. There isn't much out there except a previous post that I made thinking I fixed it (which wasn't the case, I just did something to make it happen more frequently). Interestingly enough too if you google "ste-gps-interface" nearly all the information out there is for the Vibrant. I know there have been GPS issues with this phone and I guess I'm lucky that GPS works at all.
Basically what would happen is that once the wakelock got started, nothing short of a reboot would clear it, and then it would happen maybe only a few hours after rebooting the phone again. Actually turning GPS off is not a solution. I think I even tried to kill the GPS daemon and that was not a solution either. Installing tweaking scripts seemed to trigger it more for me but I couldn't pinpoint any one action - it would just be the case that the longer I had the phone on, with any rom, inevitably the wakelock issue would rear its ugly head. I'm surprised not more people have mentioned it on here, but it could be that they're not aware of it, and just assuming that battery life is a little bad. It's acceptable when idling at 100mhz but I'd never get a full day out of it. I'm about one day and 4 hours now and at 40% with this fix. I have gone about 4 days with this fix and it seems to be holding so I'm fairly confident to say that at least for me it seems to have solved the problem.
Here is what I did. Download the app Greenify. This hibernates apps and services when the screen goes off. Curious to see if this would help my issues, I greenified Maps. This seemed to help a little bit, but the issue popped up again. I then turned Google Now into a user app via Titanium Backup and Greenfied that as well (Greenify won't let you freeze system apps, and it's safe to make google now a user app because it's not an essential process). You can find this app on the market. I have gone over a day today and I have only had 10 mins of the wakelock, opposed to nearly continuous (hours upon hours) of the wakelock, draining the battery. The only drawback I could see is if you depend on services that need maps or google now to be running when the phone is off, like latitude or location history. I imagine too that hibernating this nasty service just helps with battery life in general.
I'm very curious about this fix, because I wonder if it's a bug on Google's end. I've often thought that the location services seem buggy and excessive. This is worth trying just for battery alone. You can verify if you have the wakelock issue by using BetterBatteryStats and looking at kernel wakelocks (will have a ste-gps-interface wakelock going for almost the entire boot time), or even just looking at any CPU state breakdown - if you see only a tiny bit of time in deep sleep and the rest in 100mhz, that could indicate you're experiencing it as well. Please let me know if this helps anyone and thank you to the app developer of Greenify

Categories

Resources