[Q] How to use CPU spy? - Nexus 4 Q&A, Help & Troubleshooting

There's definitely something wrong with my phone right now. Android OS is taking up over 50% of the battery. My phone has been on for 16 hours, with only 1 hour screen time, and I only have 34% battery left.
I have decided to install CPU spy to find out what's going on. According to CPU spy, my phone is very rarely going into deep sleep. For the 1 hour that I have had it installed so far, my phone has gone into deep sleep for a total of 6 minutes, and in the 384 Mhz state for 50 minutes. The whole time the screen has been off. Something is definitely not right.
That leads me to the topic of this thread. How do I pinpoint what app is causing this issue? Do I have to just do trial and error with every app, or is there a quicker way of finding the bad app?

Install Better Battery Stats. There's a paid market version and a free XDA version. It'll pinpoint what's keeping your device from deep sleeping

jacklebott said:
Install Better Battery Stats. There's a paid market version and a free XDA version. It'll pinpoint what's keeping your device from deep sleeping
Click to expand...
Click to collapse
Thanks. I just got the app. Do I look at the Partial Wakelocks section to determine which apps are the problem?

Yes, Partial wakelocks lists app services

So if my deep sleep says 39:51:46 - 59%, is that good or bad?

it depends what you done with your phone that deep sleep sounds ok but I don't know your other stats,cpu spy is only for cpu frequency
I put better bat stats on my signature, look for the partial wakelocks since boot or unplug.

Related

[Q] How have you improved your battery life?

I'm looking for best practices and successes rather than commiseration.
I'm running JuiceDefender on aggressive and still not getting more than a day of use (3g+BT off, wifi 2hrs, screen time 3hrs).
If you've managed to get some kind of improvement, please share what you did and how much of a difference it made.
I've installed betterbatterystats and saw that trillian causes a hell of a lot of wakelocks, so I've disabled that. My battery usage graph is much smoother and less steep but I can't put any numbers on it.
PickleHead said:
I've installed betterbatterystats and saw that trillian causes a hell of a lot of wakelocks, so I've disabled that. My battery usage graph is much smoother and less steep but I can't put any numbers on it.
Click to expand...
Click to collapse
Thanks for this. I found out that it was the Smarter Alarm app, which was activating hundreds of times an hour and preventing my phone from going into deep sleep (this app wasn't a problem on my Desire HD, just on the Note).
Here is a shot of BetterBatteryStats showing 4hrs of non-deep sleep followed by 8hrs of deep sleep:
http://i.imgur.com/pXXD3.jpg
And here is the battery graph. You can see in the top left how even when the screen and services were off, the battery was still falling at an unusual rate:
http://i.imgur.com/fjSKi.jpg
An aside: JuiceDefender didn't prevent this from happening, but did heat up the phone noticably. I've since turned it off.
randomstranger99 said:
I'm looking for best practices and successes rather than commiseration.
I'm running JuiceDefender on aggressive and still not getting more than a day of use (3g+BT off, wifi 2hrs, screen time 3hrs).
If you've managed to get some kind of improvement, please share what you did and how much of a difference it made.
Click to expand...
Click to collapse
How long have you had it? Remember that it takes a week or two before the battery reaches its full capacity.
BazookaAce said:
How long have you had it? Remember that it takes a week or two before the battery reaches its full capacity.
Click to expand...
Click to collapse
I've had it 11 days. My battery life has been all over the map, anywhere from 8hrs to 55hrs, depending on usage and wakelock activity. My one-day limit started about four days ago.
randomstranger99 said:
Thanks for this. I found out that it was the Smarter Alarm app, which was activating hundreds of times an hour and preventing my phone from going into deep sleep (this app wasn't a problem on my Desire HD, just on the Note).
Here is a shot of BetterBatteryStats showing 4hrs of non-deep sleep followed by 8hrs of deep sleep:
http://i.imgur.com/pXXD3.jpg
And here is the battery graph. You can see in the top left how even when the screen and services were off, the battery was still falling at an unusual rate:
http://i.imgur.com/fjSKi.jpg
An aside: JuiceDefender didn't prevent this from happening, but did heat up the phone noticably. I've since turned it off.
Click to expand...
Click to collapse
from my understanding of how juice defender works, i believe it closes off non-essential background apps to save battery?
the problem with this is that if the app is designed to remain running at all times, then youre only going to cause problems when running juice defender. juice defender will close the app, the app will reopen itself, juice defender will close the app, the app will reopen itself, etc. its a reboot loop for the app, which will end up draining more battery than simply leaving the background process running.
i dont recommend using any app killers. they all do the same thing and just end up chewing through your battery more. if you want to really disable an app, use titanium background to freeze it.

Battery problems?

My new note's battery seem weird after I let it run to 1% and then charge up to 100%.
After that, it seems to lose battery very much faster.
Left overnight, it went from 79% to 49%!! a 30% drop!!
I checked Battery status report battery health is good and average 33-35 degrees temperature.
Bulk of battery usage is reported for Display (62%, "time on" of 1hr 30m) ...
Is this normal??
What can I do?
Thanks.
Maybe the battery needs some recalibration, run it down to 1% then charge the phone while its still off.
Here's the battery level profile...
Not sure what is keeping the phone awake even while screen-off??
Any help or advice to diagnose and resolve the battery issues appreciated.
planetcooler said:
Here's the battery level profile...
Not sure what is keeping the phone awake even while screen-off??
Any help or advice to diagnose and resolve the battery issues appreciated.
Click to expand...
Click to collapse
Try a factory reset and then calibrate the battery.
Just woke up after the first night with the Note. I had 45% battery left when i went to bed, and now 9 hours later it's at 43%.
Sent from my GT-N7000 using xda premium
planetcooler said:
Not sure what is keeping the phone awake even while screen-off??
Click to expand...
Click to collapse
You diagnosed the problem correctly by identifying the device being awake while the screen is off. I suggest two tools to narrow it down:
1. Cpu Spy, Market, free, displays how much time the CPU spent in the different power states. During the night it should almost completely be in deep sleep.
2. BetterBatteryStats, Market, ~2.50$, allows to identify apps with wakelocks, apps which prevent the system to enter the deep sleep power state while the screen is off and the device basically is idleing. On CM Spareparts xan do that for free, for Samsung devices I first have to find a free alternative app that works...
No wipe needed (yet), no delete this or do that. First find the villain, then shoot em, not the other way round.
Sent from my GT-N7000
Installed BetterBatteryStats,
but there is lots of information, and I have little clue what these constitute or how to identify what apps cause the issues??
You could post screenshots of all the screens of betterbatterystats and we will try to help you.
Charge the phone to 100% and disconnect it right before you go to sleep, enter cpuspy and reset its counters. Then enter task manager and kill all the programs and clean the memory. Now go to sleep and when you wake up post screenshots of the built in battery stats, betterbatterystats and cpuspy.
Hi
I have a similar problem, my battery keeps draining entirely too much for what I think it should. Mine gets drained about 40% in about 10 hours of very light use.
BetterBatteryStats shows it is WiFi that has a humongous amount of wakelocks, but the thing here is I have WiFi disabled.
Image (BetterBatteryStats): http://antti.vahtera.org/images/SC20111221-020623.png
CPU Spy shows nothing that looks that weird to me, although I rather wonder why so little deep sleep and so much 200MHz, but that might be if deep sleep has a longer "counter" than it did on SGS/SGS2. If I use the phone to check time, or twitter from a widget couple of times per hour, does SGN enter deep sleep during those "breaks"?
Image (CPU Spy): http://antti.vahtera.org/images/SC20111221-020441.png
But, the one that caught my eye, was the stock Battery Info window. During the (almost) entire 10h time the phone was awake?! Why in the whole wide world? Does SGN really have some bug with WiFi keeping it awake even though it is disabled?
Image (Battery Info -window): http://antti.vahtera.org/images/SC20111221-020744.png
I really wanna get behind this. I love this phone, but this battery drainage begins to be a problem for me. I got about 2-5% drain per night with SGS2 and 10-15% per day on similar usage.
AnttiV said:
Hi
I have a similar problem, my battery keeps draining entirely too much for what I think it should. Mine gets drained about 40% in about 10 hours of very light use.
BetterBatteryStats shows it is WiFi that has a humongous amount of wakelocks, but the thing here is I have WiFi disabled.
Image (BetterBatteryStats): http://antti.vahtera.org/images/SC20111221-020623.png
CPU Spy shows nothing that looks that weird to me, although I rather wonder why so little deep sleep and so much 200MHz, but that might be if deep sleep has a longer "counter" than it did on SGS/SGS2. If I use the phone to check time, or twitter from a widget couple of times per hour, does SGN enter deep sleep during those "breaks"?
Image (CPU Spy): http://antti.vahtera.org/images/SC20111221-020441.png
But, the one that caught my eye, was the stock Battery Info window. During the (almost) entire 10h time the phone was awake?! Why in the whole wide world? Does SGN really have some bug with WiFi keeping it awake even though it is disabled?
Image (Battery Info -window): http://antti.vahtera.org/images/SC20111221-020744.png
I really wanna get behind this. I love this phone, but this battery drainage begins to be a problem for me. I got about 2-5% drain per night with SGS2 and 10-15% per day on similar usage.
Click to expand...
Click to collapse
yeah, there's something seriously wrong with your phone. Are you rooted ? would you consider a full wipe and maybe a different ROM ?
Not rooted, not modified in any serious way either. (Using GO Launcher EX, not TouchWiz launcher, that's really the extend of modification on this phone.)
Android version is 2.3.6, Baseband N7000XXKK5, kernel 2.6.35.7-N7000XBKK4
This is what was shipped with the phone. It's unbranded and unlocked.
I haven't really done anything to it but installed apps from Android Market (and a couple with Samsung Apps).
EDIT: This is my day-to-day phone with all settings as I like them and all things set, so I would like if I wouldn't have to do a full wipe. But if nothing else helps, I guess I'll have to, in the end.
I hope someone will be able to help you cause I've never seen anything like that.
Sent from my GT-N7000 using Tapatalk
This might help...
I had the same problem. The first night my Note was dropping from 100% down to about 50% when I was asleep and the screen was off.
In the battery stats I could see that it was the Android core that used all this power.
So I tried a couple things to see if it helped:
1) I went to WiFi-settings and set it to turn off WiFi when screen off. This is a setting that is not on by default, you have to set it yourself.
2) I turned off AutoSync (Google account and so on)
Those to settings removed the overnight powerdrain problem. The next night it only went from 100% to about 98% when I slept
And since I am a serious betterysaver I also turned off autolight on screen, and set it to lowest light possible (still nice picture). I turned on the "Autoadjust screenpower), turned off all animations, turned off all kind of vibrations on the phone.
I left the"System powersetting" alone. It didnt save much power and it made the phone slower.
All in all, now my battery is great, I still have lot of juice left after a full day of using my Galaxy Note
I seem to have fixed my problem, without having to do a full wipe. I don't know which part it was that finally did it, but I'm glad it now behaves like I think it should. (about 2% battery drain in ~5h in pocket, one 1min phonecall and two or three times checking time from lockscreen.)
Anyway, I apparently ALSO had the infamous problem with Mediaserver eating humongous amounts of battery, so I'm not sure if that had anything to do with the WiFi keeping it awake or was just a separate problem.
Long story short, here's what I did:
a) installed JuiceDefender, had it manage Wifi
b) turned Wifi on, restart
c) turned Wifi off, restart
[d) installed nomedia manager and excluded most directories from mediascanner]
e) turned phone off, recharged to 100%.
Seems to be working now. No WiFi wakelocks, no mediaserver eating CPU, deep sleep ~70% of the time.

How to find apps keeping device awake?

Okay so, most people are saying that ICS Aurora battery is awesome.. clearly not my case.. After opening up CPU Spy, I noticed that phone was on for over 40 hours, and only in sleep mode for 24hours (64 hours: 41 mins uptime).. so it was mostly awake.
Now, I would like to find the culprit of this... my question is.. how can I? Is there anything that will show me how which app is keeping my phone up running at 368Mhz instead of Deep Sleep?
I have BetterBAtteryStats... but can't make sense of the things.
Thanks.
after battery charging routine the phone keeps wroking in lowest frequency and does not enter deep sleep.
If you reboot after recharching you will see that deep spleeps like a baby.
Its annoying I know but it works and I don't know any other way.
Never heard of the problem before. Thanks.

GSam Battery Monitor Screen Usage?

Every night, my battery is drained by 7-8% even though, GPS, WiFi, all radios are off and the phone is in airplane mode (done automatically via LLama scripts). I installed GSam Battery Monitor to try to figure out what was going on and it indicated that even though the screen was dark, it was draining the battery (and was the primary culprit). Is this accurate or is it a bug? Anyone else seeing something like this on their Nexus 4?
Mine shows 78% usage in dark.. I think that just means how much of battery total it was used while the phone screen was off. I'm taking a completely random guess here though.
mrlad said:
Every night, my battery is drained by 7-8% even though, GPS, WiFi, all radios are off and the phone is in airplane mode (done automatically via LLama scripts). I installed GSam Battery Monitor to try to figure out what was going on and it indicated that even though the screen was dark, it was draining the battery (and was the primary culprit). Is this accurate or is it a bug? Anyone else seeing something like this on their Nexus 4?
Click to expand...
Click to collapse
So you reset the app right before going to bed and checked it first thing in the morning and in the 7 hours you slept, the main battery drain came from the screen?
I use the same app and I never noticed anything wrong. Still, battery readings are not always accurate... sometimes when I recharge my phone, it stays 100%for a few hours, then it drops 7-10% in a matter of an hour...and that's completely normal I say you shouldn't worry about it too much as long as you get satisfying usage times..
0rigin said:
I say you shouldn't worry about it too much as long as you get satisfying usage times..
Click to expand...
Click to collapse
I'm not happy w/battery life and trying to track down what the culprit is. If all major services are off at night, 7-8% battery drain doesn't seem normal to me. Granted this is apples and oranges, but my iPad Gen 3 in the same configuration remains at 100% overnight.
If doing nothing drains nearly 10% over 6-7 hours, no surprise I've got issues during the day.
I've noticed the same thing, one time I didnt turn the screen on on my phone, then I went to screen and it showed 0% discharge while screen on, and 7% discharge while off. I'm running the latest version of Viper, I'm also confused and I wonder if theres some issue where maybe power is being sent to the screen even though it's not on.
mrlad said:
I'm not happy w/battery life and trying to track down what the culprit is. If all major services are off at night, 7-8% battery drain doesn't seem normal to me. Granted this is apples and oranges, but my iPad Gen 3 in the same configuration remains at 100% overnight.
If doing nothing drains nearly 10% over 6-7 hours, no surprise I've got issues during the day.
Click to expand...
Click to collapse
After my 7 hours sleep.. Every morning my phone uses 2% battery drainage at MAX. i.e.: Wifi Edge Sync etc ALL OFF. And I am getting 4+ screen time on my phone with moderate usage. Pretty happy with the battery life so far.
Hi
mrlad said:
Every night, my battery is drained by 7-8% even though, GPS, WiFi, all radios are off and the phone is in airplane mode (done automatically via LLama scripts). I installed GSam Battery Monitor to try to figure out what was going on and it indicated that even though the screen was dark, it was draining the battery (and was the primary culprit). Is this accurate or is it a bug? Anyone else seeing something like this on their Nexus 4?
Click to expand...
Click to collapse
Your phone probably isn't going into sleep. The Nexus 4 seems to be prone to insomnia caused by apps that don't cause a problem on other devices.
To check this download CPU Spy from the play store. Run it, reset timers to zero, and with the phone on battery (i.e. not on charge) let it rest for 30 minutes or so, then check the figures.
You should see Deep Sleep as > 90%, if not, or it is listed as an unused state, your phone isn't sleeping.
To fix this you either work forward or backwards!
Work forward:
Factory reset, install CPU Spy, run the test and see your phone is now deep sleeping.
Start installing applications one by one and after each install, run the app, then run the CPU Spy test again.
Eventually you will find the app causing the problem, all you can do is avoid that app. Note you may have more than one app causing a problem so keep checking after each install.
Work backwards:
Start by un-installing an app at a time restarting your phone in between then running a CPU Spy test. Start with any live wallpapers (even if not set to be used) you have installed, then any weather widgets. Note just un-installing is not enough, you must restart after each one.
Eventually your phone will start deep sleeping again so finding the problem app.
Hope that helps.
Regards
Phil
I tried your advice, and my phone is going into deep sleep around 90% of the time, so I don't think that it's a rogue app. I keep my phone on the dimmest setting at all times, and I only get 2.5 hours of screen on time. I have an anker battery.
PhilipL said:
Hi
Your phone probably isn't going into sleep. The Nexus 4 seems to be prone to insomnia caused by apps that don't cause a problem on other devices.
To check this download CPU Spy from the play store. Run it, reset timers to zero, and with the phone on battery (i.e. not on charge) let it rest for 30 minutes or so, then check the figures.
You should see Deep Sleep as > 90%, if not, or it is listed as an unused state, your phone isn't sleeping.
To fix this you either work forward or backwards!
Work forward:
Factory reset, install CPU Spy, run the test and see your phone is now deep sleeping.
Start installing applications one by one and after each install, run the app, then run the CPU Spy test again.
Eventually you will find the app causing the problem, all you can do is avoid that app. Note you may have more than one app causing a problem so keep checking after each install.
Work backwards:
Start by un-installing an app at a time restarting your phone in between then running a CPU Spy test. Start with any live wallpapers (even if not set to be used) you have installed, then any weather widgets. Note just un-installing is not enough, you must restart after each one.
Eventually your phone will start deep sleeping again so finding the problem app.
Hope that helps.
Regards
Phil
Click to expand...
Click to collapse

Phone won't enter deep sleep....

Setup: running latest stock image (mhc19i). Rooted, xposed, ElementalX kernel with ghost pepper script, and I run naptime with aggressive Doze.
Issue: fell asleep with my phone around 50% battery remaining. Woke up seven hours later and it had 30 something. I typically don't see more than 1-2% idle drain over night so this got my attention. I checked better battery stats and I obviously have a wakelock issue. Not sure what it could be. Powermanagerservice was running at something ridiculously high, like 96%. Audiomix is the other wakelock running rampid. See screenshots below. Any input appreciated!
Pain-N-Panic said:
Setup: running latest stock image (mhc19i). Rooted, xposed, ElementalX kernel with ghost pepper script, and I run naptime with aggressive Doze.
Issue: fell asleep with my phone around 50% battery remaining. Woke up seven hours later and it had 30 something. I typically don't see more than 1-2% idle drain over night so this got my attention. I checked better battery stats and I obviously have a wakelock issue. Not sure what it could be. Powermanagerservice was running at something ridiculously high, like 96%. Audiomix is the other wakelock running rampid. See screenshots below. Any input appreciated!
Click to expand...
Click to collapse
Have you tried rebooting and then monitoring it to see if it happens again? It could just be a one-time bug, you'd need to reboot to confirm that though.
I was thinking that as well. I did recently reboot. I'm going to accumulate a good amount of up time and then check the stats again. As of now, battery drain seems to be normal.
Something is still keeping my phone awake while the screen is off...
Pain-N-Panic said:
Something is still keeping my phone awake while the screen is off...
Click to expand...
Click to collapse
I've seen this Audio Mix wakelock happen before on the OnePlus One, from memory I think it was kernel related, so switching kernels might be worth a try. You could also try using Wakelock Detector to see if it'll shed any more light on it, maybe it's an app rather than the kernel.
Hmm....think I solved my issue. I got audiomix wakelock to completely disappear. Simply going into settings and turning off all notification sounds did the trick. For me it's not an issue, however, for others who don't constantly keep their device on vibrate I could see this being a massive dilemma. I'm assuming "powermanagerservice" is a normal wakelock to observe?
Pain-N-Panic said:
Hmm....think I solved my issue. I got audiomix wakelock to completely disappear. Simply going into settings and turning off all notification sounds did the trick. For me it's not an issue, however, for others who don't constantly keep their device on vibrate I could see this being a massive dilemma. I'm assuming "powermanagerservice" is a normal wakelock to observe?
Click to expand...
Click to collapse
Yes, powermanagerservice is perfectly normal for when the phone is in use (or some background operation is running). You'll see it roughly correlates with your screen-on time.
I recently decided to check the huge battery drain during night and I found out that my phone would not go in deep sleep. Can anyone please help with that? Also, the 'jio' app I have been using was installed 50 days back and the battery drain similar before that too. Would be really great if I could find a solution for the deep sleep issue. I am trying to load the screenshots of betterbatterystats but not able to.
vikalp4jain said:
I recently decided to check the huge battery drain during night and I found out that my phone would not go in deep sleep. Can anyone please help with that? Also, the 'jio' app I have been using was installed 50 days back and the battery drain similar before that too. Would be really great if I could find a solution for the deep sleep issue. I am trying to load the screenshots of betterbatterystats but not able to.
Click to expand...
Click to collapse
Use gsam form the play store to find out what app is keeping your phone awake.
Uninstall said app.

Categories

Resources