[REF] Known identified battery drainers

dalavar

Senior Member
Oct 17, 2007
209
7
0
Washington State
Not sold on K9 being a big battery drain. Pretty much the first app I put on my N1 and never had any battery drain issues with that phone. Maybe wakelocks do different things to different hardware though. But Push mail is the whole reason I am running K9 mail so I"m gonna be mad if it's an issue ;)

I had wakelocks issue with K9 mail app. By default it uses push for receiving new email. I get moderate number of emails daily and I noticed that my phone spends too much time woke up with K9 being the reason. There is a report that K9 doesn't let the phone go for at least a minute after each push notification.

Things go back normal after I disabled push, switched to poll every hour and only first-level imap folders. Also increased default value imap-idle refresh timeout.

hope this will help others.

-- vlad
 

vladm7

Senior Member
Oct 8, 2011
369
83
0
Chicagoland
Not sold on K9 being a big battery drain. Pretty much the first app I put on my N1 and never had any battery drain issues with that phone. Maybe wakelocks do different things to different hardware though. But Push mail is the whole reason I am running K9 mail so I"m gonna be mad if it's an issue ;)
maybe the issue is in how many emails you receive daily? If it's not that many, then push-caused minute-long wake locks do not contribute whole lot.
also, if you use your phone a lot and charge daily, then those K9 wakelocks would be drop in a bucket compared to other stuff you run.
 
Last edited:

dalavar

Senior Member
Oct 17, 2007
209
7
0
Washington State
Makes sense. I do not receive a lot of messages maybe on a busy day only about 20. Although I did recently add a bunch of gmail labels to sync which I did notice created a wakelock for each label so I got rid of those. Tried Freezing or uninstalling some of the apps mentioned here will see how it goes.

Just kinda disappointed in the battery life of this phone compared to my Nexus One. No new apps so it's baffling guess I need to give the phone time to settle into it's routine maybe battery life will improve.

maybe the issue is in how many emails you receive daily? If it's not that many, then push-caused minute-long wake locks do not contribute whole lot.
also, if you use your phone a lot and charge daily, then those K9 wakelocks would be drop in a bucket compared to other stuff you run.
 

dmm5157

Senior Member
Dec 1, 2008
228
33
0
Here's the front end of my BBS dump file. Looks like Gmail may be the culprit, but I don't have any widgets or special settings for it. Just my e-mail, contacts, and Calendar set to sync, but there are no options to change it from PUSH.

Any ideas?

Let me know if I should post the full TXT file, if that will be more helpful.

Thanks in advance


===================General Information============
=======BetterBatteryStats version: 1.2.1.0
Creation Date: 2011-11-02 16:09:14
Statistic Type: (0) Since Charged
Since 8 h 8 s
VERSION.RELEASE: 2.3.4 BRAND:samsung DEVICE: SGH-I777 MANUFACTURER: samsung MODEL: SAMSUNG-SGH-I777

=========== Other Usage ===========
Awake (): 2 h 25 m 25 s (8725 s) Ratio: 30.3%
Wifi On (): 2 h 2 m 13 s (7333 s) Ratio: 25.5%
Screen On (): 57 m 12 s (3432 s) Ratio: 11.9%

=========Wakelocks=========

*sync* (com.google.android.gm.Gmail): 5 m 37 s (337 s) Count:73 1.2%
MAIL_SERVICE (com.android.email.Email): 4 m 26 s (266 s) Count:113 0.9%
GmailProviderProviderChangedBroadcastWakeLock (com.google.android.gm.Gmail): 1 m 22 s (82 s) Count:120 0.3%
ActivityManager-Launch (Android System): 1 m 12 s (72 s) Count:273 0.3%
GTALK_ASYNC_CONN (Google Services): 48 s (48 s) Count:5 0.2%
Checkin Service (Google Services): 37 s (37 s) Count:1540 0.1%
AlarmManager (Android System): 27 s (27 s) Count:1669 0.1%
SyncService (com.evernote.Evernote): 25 s (25 s) Count:13 0.1%
GTALK_CONN (Google Services): 23 s (23 s) Count:1504 0.1%
RILJ (Dialer): 23 s (23 s) Count:2671 0.1%
show keyguard (Android System): 22 s (22 s) Count:39 0.1%
WifiService (Android System): 20 s (20 s) Count:745 0.1%
com.google.android.apps.googlevoice.UpdateService (com.google.android.apps.googlevoice.Google Voice): 15 s (15 s) Count:9 0.1%
*network-location* (com.staircase3.opensignal.Open Signal Maps): 14 s (14 s) Count:8 0.1%
 

Entropy512

Senior Recognized Developer
Aug 31, 2007
14,095
25,085
0
Owego, NY
Here's the front end of my BBS dump file. Looks like Gmail may be the culprit, but I don't have any widgets or special settings for it. Just my e-mail, contacts, and Calendar set to sync, but there are no options to change it from PUSH.

Any ideas?

Let me know if I should post the full TXT file, if that will be more helpful.

Thanks in advance


===================General Information============
=======BetterBatteryStats version: 1.2.1.0
Creation Date: 2011-11-02 16:09:14
Statistic Type: (0) Since Charged
Since 8 h 8 s
VERSION.RELEASE: 2.3.4 BRAND:samsung DEVICE: SGH-I777 MANUFACTURER: samsung MODEL: SAMSUNG-SGH-I777

=========== Other Usage ===========
Awake (): 2 h 25 m 25 s (8725 s) Ratio: 30.3%
Wifi On (): 2 h 2 m 13 s (7333 s) Ratio: 25.5%
Screen On (): 57 m 12 s (3432 s) Ratio: 11.9%

=========Wakelocks=========

*sync* (com.google.android.gm.Gmail): 5 m 37 s (337 s) Count:73 1.2%
MAIL_SERVICE (com.android.email.Email): 4 m 26 s (266 s) Count:113 0.9%
GmailProviderProviderChangedBroadcastWakeLock (com.google.android.gm.Gmail): 1 m 22 s (82 s) Count:120 0.3%
ActivityManager-Launch (Android System): 1 m 12 s (72 s) Count:273 0.3%
GTALK_ASYNC_CONN (Google Services): 48 s (48 s) Count:5 0.2%
Checkin Service (Google Services): 37 s (37 s) Count:1540 0.1%
AlarmManager (Android System): 27 s (27 s) Count:1669 0.1%
SyncService (com.evernote.Evernote): 25 s (25 s) Count:13 0.1%
GTALK_CONN (Google Services): 23 s (23 s) Count:1504 0.1%
RILJ (Dialer): 23 s (23 s) Count:2671 0.1%
show keyguard (Android System): 22 s (22 s) Count:39 0.1%
WifiService (Android System): 20 s (20 s) Count:745 0.1%
com.google.android.apps.googlevoice.UpdateService (com.google.android.apps.googlevoice.Google Voice): 15 s (15 s) Count:9 0.1%
*network-location* (com.staircase3.opensignal.Open Signal Maps): 14 s (14 s) Count:8 0.1%
Reread the first post... especially the "if BBS doesn't show any significant wakelocks" instructions... 5 minutes of wakelocks from gmail, but 1 hour of unexplained wake time is a clear indication BBS is missing something.
 
  • Like
Reactions: dmm5157

dmm5157

Senior Member
Dec 1, 2008
228
33
0
Thanks. I'll try the ADB method when I get home and see if it sheds any additional light on what's going on.


In the mean time:

Going to SETTINGS->ABOUT PHONE->BATTERY USAGE yielded nothing. Just showed ANDROID OS CPU as 54 min and no significant STAY AWAKE numbers in any of the apps listed.

CPU SPY showed 35% deep sleep, 34% 200 mhz, and the rest were prety even around 6-9%.
 

Entropy512

Senior Recognized Developer
Aug 31, 2007
14,095
25,085
0
Owego, NY
Thanks. I'll try the ADB method when I get home and see if it sheds any additional light on what's going on.


In the mean time:

Going to SETTINGS->ABOUT PHONE->BATTERY USAGE yielded nothing. Just showed ANDROID OS CPU as 54 min and no significant STAY AWAKE numbers in any of the apps listed.

CPU SPY showed 35% deep sleep, 34% 200 mhz, and the rest were prety even around 6-9%.
35% is extremely poor if you reset the timers after unplugging.

Actually - sorry, I'm wrong, you had a screen-on time of something like 1 hour, so that will drop the deepsleep percentages significantly.

I usually do the following:
Charge to full
Reboot to reset /proc/wakelocks counters
Reset CPUSpy timers once phone boots
Turn off screen for a while

If you do this overnight, it provides a great idle drain baseline.
 
  • Like
Reactions: dmm5157

dmm5157

Senior Member
Dec 1, 2008
228
33
0
I usually do the following:
Charge to full
Reboot to reset /proc/wakelocks counters
Reset CPUSpy timers once phone boots
Turn off screen for a while

If you do this overnight, it provides a great idle drain baseline.


That sounds like a great plan, thanks for the tip. I'll give that a try.
 

Entropy512

Senior Recognized Developer
Aug 31, 2007
14,095
25,085
0
Owego, NY
Here are the two files you told me to pull from my phone, if you require anything else let me know. Once again thanks for the help!
This one is odd... I don't see anything particularly unusual.

The key for looking at these is:
Use Excel or OpenOffice to open wakelocks.txt as a tab-delimited text file
Create a new column called "sleep_time_minutes"
Set a formula for sleep_time_minutes to equal sleep_time divided by 60e9 (e.g.60000000000)
Sort the spreadsheet by sleep_time_minutes

In your case:
vbus_present was the top dog - this wakelock is always present when charging or on USB
svnet is at 19 minutes - this is mostly due to basic radio management stuff
wlan_wake has a wake_count of 153 but is only 1.8 minutes of wakelock time

I suggest going back to the first post, and trying the following:
Charge to full
Unplug and reboot (You clearly didn't do the reboot step, with 226 minutes of vbus_present)
Once booted, reset CPUSpy timers
Let phone sit for a while - I usually do overnight tests of around 8-9 hours
Once you've let it sit, pull wakelocks and dmesg and also look at deep sleep percentage in CPUSpy
 
  • Like
Reactions: florelui001p

florelui001p

Senior Member
Jul 18, 2009
515
50
0
This one is odd... I don't see anything particularly unusual.

The key for looking at these is:
Use Excel or OpenOffice to open wakelocks.txt as a tab-delimited text file
Create a new column called "sleep_time_minutes"
Set a formula for sleep_time_minutes to equal sleep_time divided by 60e9 (e.g.60000000000)
Sort the spreadsheet by sleep_time_minutes

In your case:
vbus_present was the top dog - this wakelock is always present when charging or on USB
svnet is at 19 minutes - this is mostly due to basic radio management stuff
wlan_wake has a wake_count of 153 but is only 1.8 minutes of wakelock time

I suggest going back to the first post, and trying the following:
Charge to full
Unplug and reboot (You clearly didn't do the reboot step, with 226 minutes of vbus_present)
Once booted, reset CPUSpy timers
Let phone sit for a while - I usually do overnight tests of around 8-9 hours
Once you've let it sit, pull wakelocks and dmesg and also look at deep sleep percentage in CPUSpy
Ok I'll follow your instructions, thanks!
 

Adelaide.

Senior Member
Feb 25, 2010
223
40
0
I have CPU spy and I did what you said entropy for 1 hour the n checked it .. my phone never goes into deep sleep it was at 200 mhz the whole hour any ideas?

Sent from my SAMSUNG-SGH-I777 using xda premium
Get better battery stats if you don't have it already. You can find the .apk by searching the forums. It will show most wakelocks. Do the same thing as you did to test the CPU, just let your phone sit for a while and then post the BBS file here.

Also, just in case you don't know you don't need screen shot it to take screen shots, the phone has it built in. Just press the home key and power button at the same time.
 

Entropy512

Senior Recognized Developer
Aug 31, 2007
14,095
25,085
0
Owego, NY
Ok so I fully charged the phone, rebooted, and then reset cpuSpy. I know you said to leave it on overnight but in just 55 minutes, close to an hour I lost 4% battery :confused: . Here are some screenshots and also the files, I'm trying to do the excel thing but don't quite get it sorry.


By florelui001p at 2011-11-02


By florelui001p at 2011-11-02
Play around with it - if you don't figure out how to analyze it in Excel by this evening I'll take a look at it tonight. (Won't be able to until then.)

Hi, has anyone thought about disabling Fast Dormancy? It seems that disabling this may help save battery. Here is a link on the I9100 thread:

http://forum.xda-developers.com/showthread.php?t=1111581
Disabled by default. Also, enabling it seems to do nothing on our phone.

I have CPU spy and I did what you said entropy for 1 hour the n checked it .. my phone never goes into deep sleep it was at 200 mhz the whole hour any ideas?

Sent from my SAMSUNG-SGH-I777 using xda premium
Pull /proc/wakelocks as described in the original post of this thread.
 

weedolo9y

Senior Member
Dec 7, 2010
585
55
0
Wisconsin
Get better battery stats if you don't have it already. You can find the .apk by searching the forums. It will show most wakelocks. Do the same thing as you did to test the CPU, just let your phone sit for a while and then post the BBS file here.

Also, just in case you don't know you don't need screen shot it to take screen shots, the phone has it built in. Just press the home key and power button at the same time.
Thank you for the screenshot thing I used to have a captivate I'm no pro on here but I'm not a newbie either I have bbs but I have no idea what a wakelock is ... is that why my phone doesn't go into deep sleep? Thanks

Sent from my SAMSUNG-SGH-I777 using xda premium
 

rlarsen462

Senior Member
Aug 5, 2011
292
17
0
Villahermosa
So the following is having the phone on for about 10 hours, dropped to 37% with moderate use.

I can't get a handle on this, I regularly have CPU spy results of 70% or lower for deep sleep, the rest at 200Mhz and 800Mhz. I lose at least 2% per hour on idle, and my battery drops like a rock with the screen on.

When I first got the phone (before I installed anything really) I got a little over 5 hours screen time, when I used it continuously for 5 hours (I was on a long car trip lol).

Android OS consumption is always very high. I rarely get a full day's use out of the phone (say 7AM to even 7PM)...and I am used to a Blackberry 9700 where I would get 2 days even with heavy use.

Said my dmesg.txt file was too large to attach for some reason, but here's my wakelocks file, sorted by mins.

The top few are:

vbus_present 441.9
main 163.8
svnet-dormancy 141.6
svnet 100.0
AudioOutLock 31.2
deleted_wake_locks 29.9
[P]_MAIL_SERVICE 26.6
[P]_FacebookService 23.8
sec-battery-monitor 14.5
[P]_DownloadManager 11.0
radio-interface 7.8
alarm_rtc 6.6
[P]_GTALK_ASYNC_CONN 6.5
[P]_ActivityManager-Launch 5.8
alarm 5.5
[P]_*network-location* 3.2
[P]_AlarmManager 2.6
power-supply 2.3
[P]_*sync* 1.9
vib_present 1.8
[P]_NetworkLocationLocator 0.8

EDIT: Here's the screenshots (I guess I was whaling on it harder than some of you guys that seem to barely use the phone...):



 

Attachments

Last edited:

Entropy512

Senior Recognized Developer
Aug 31, 2007
14,095
25,085
0
Owego, NY
There's nothing obvious in your dump - but the problem with having a good analysis it's clear you've been running for a VERY long time with mixed load, including many hours (443 minutes) on the charger.

(vbus_present wakelock = you're on the charger)

As discussed before, the best way to get a good idle drain baseline is:
Charge to full
Pull from charger
Reboot
Reset timers in CPU Spy
Let the phone sit for a few hours (I usually do an overnight test)

Pull data, most useful is:
Time since full charge
Battery % remaining after that amount of time
Deep sleep percentage (don't need a screenshot)
/proc/wakelocks contents
 
Our Apps
Get our official app!
The best way to access XDA on your phone
Nav Gestures
Add swipe gestures to any Android
One Handed Mode
Eases uses one hand with your phone