yashsingh1/xdaforums huggingface dataset:
[BetterBatteryStats] fresh1treuk:
Can someone one read my dump file and help me please ?

hye everyone,

I'm a new to android and XDA. And i have been trying to find out what's causing my battery to drain pretty fast. My battery only last less than 1 day with normal use (say 1 hour of screen, no GPS, few hours of wifi, 30 mins of browsing the internet or sending a couple a text messages, a couple of phone calls, not even gaming).

I am running Liquid Smooth rom and the AGNi Kernel. I got to say that my phone is VERY smooth and fast, that's for sure.

Few things that helped were :

disabling google location history

putting the phone in silent mode

uninstalling google music player (which looks for google play music to sync via wifi, just like iTunes match)

uninstalling facebook (which wakes up the phone a thousand times even when notifications are off)

But still the phone's battery drains pretty fast...

Can someone read my dump file and tell me how to get rid of those anoying wakelocks please ?

Ps : I did search the internet for that audioOut_2 wakelock but didn't find a good answer to solve it...
[BetterBatteryStats] Xoib:
Ouch ! Does someone already seen something like that ?

That's crazy, and usually we are telling to look in partial wl but here there is nothing...
[BetterBatteryStats] It_ler:
Ok, no deep sleep at all:

Awake (): 8 h 26 m 21 s (30381 s) Ratio: 100,0%

Main culprit:

NlpWakeLock (Google-Dienste): 8 h 18 m 35 s (29915 s) Count:0 98,5%

You can try again with wifi turned off.

To disable autostarts of Google Service Framework (GSF) and hopefully reduce the amount of this Nlp wakelock, you have to root your phone.

If you want to do it, root it, come back here and follow Casanoaa's instructions linked in post #3 to optimize GSF wakelocks.

---------- Post added at 12:35 PM ---------- Previous post was at 12:28 PM ----------

AudioOut_2 has something to do with the phone's audio/sound/voice.

Playing music, sounds, phone calls, etc.

I see that you have enabled a lot of syncs:

*sync*_com.google.android.apps.plus.content.EsProvider_Account {name=d067a3a26dc02803a99e8448125e7baa, type=com.google} (com.google.android.apps.plus.Google+): 14 s (14 s) Count:5 0,1%

*sync*_com.google.android.location.reporting_Account {name=d067a3a26dc02803a99e8448125e7baa, type=com.google} (Services Google): 13 s (13 s) Count:167 0,1%

*sync*_com.twitter.android.provider.TwitterProvider_Account {name=4a022004aa3454cc0d1b40c1b4676c11, type=com.twitter.android.auth.login} (com.twitter.android.Twitter): 7 s (7 s) Count:2 0,0%

*sync*_gmail-ls_Account {name=d067a3a26dc02803a99e8448125e7baa, type=com.google} (com.google.android.gm.Gmail): 6 s (6 s) Count:3 0,0%

*sync*_com.google.android.ears.heard.EarsContentProvider_Account {name=d067a3a26dc02803a99e8448125e7baa, type=com.google} (com.google.android.ears.Recherche audio pour GoogleÂ Play): 5 s (5 s) Count:2 0,0%

*sync*_org.mozilla.firefox.db.browser_Account {name=d067a3a26dc02803a99e8448125e7baa, type=org.mozilla.firefox_sync} (org.mozilla.firefox.Firefox): 5 s (5 s) Count:1 0,0%

Please disabled auto-sync of your accounts.

And I see some location service wakelocks/alarms. Disable all location service options in system and Google settings.

And Maps is using your internet connection ... maybe you want to optimize Maps like described by Karpfenhai (link in pst #3).

---------- Post added at 12:42 PM ---------- Previous post was at 12:35 PM ----------

No deep sleep at all:

Deep Sleep (): (0 s) Ratio: 0.0%

Awake (): 7 h 13 m 6 s (25986 s) Ratio: 100.0%

And your stats only show the generic kernel wakelock:

"PowerManagerService.WakeLocks" (): 7 h 11 m 27 s (25887 s) Cnt:(c/wc/ec)0/0/0 99.6%

Hmm ...

You have many alarms from Facebook:

com.facebook.katana (): Wakeups: 75

And disable auto-sync of your email accounts.
[BetterBatteryStats] stinkfist1:
Ha that was exactly the problem, I had a night mode app installed. Uninstalled and now its working like a champ. Thanks man
[BetterBatteryStats] sfrique:
Thanks a lot!

About the states I thought in doing it manually.. Maybe not be the better choice..
[BetterBatteryStats] Xoib:
Yes that the weird part.

It's not FB who keep the WL.

Neither the auto-sync. That's why I don't understand who keep the WL and don't release it.
[BetterBatteryStats] chamonix:
Well if you can do it manually and can describe it then there is a chance that I could do it automatically. Please feel free to suggest here or on github
[BetterBatteryStats] chamonix:
This is out of norm indeed. Power manager is not supposed to show in KWl without a counterpart in pwl. Now here would be some possible reasons:

- a bug in bbs : to confirm please try to reproduce, provide a logcat (with debug press on) and take a look into the raw wakelocks to see if they are consistent with the finding

- a bug in the way android releases partial wakelocks leaving to kernel wakelock not to get released on that device

- a bug in the way android remembers partial wakelocks leaving it to forget about that specific one

- a part of the system holding a kernel wakelock with that name despite the fact that it does not come from userland
[BetterBatteryStats] Xoib:
Ok I will let you know tomorrow if this behavior is still present after the next night.
[BetterBatteryStats] KaizenY:
Thanks!

My phone is now rooted and I tried to follow Casanoaa's instructions but I can't deny every GSF autostart. The ones that start with "com.google" are not visible for me.
[BetterBatteryStats] Casanoaa:
Press menu and untick all
[BetterBatteryStats] guido_glx:
Getting rid of GSF wakelocks

Ok, here we go...

I've tested this on my GT-I9100 with stock LSW firmware and Philz kernel

Before this, I had already frozen ChatON, Google+ and Hangouts with Titanium Backup

1st, the phone has to be rooted

2nd, make a Nandroid backup, just in case...

3rd, get System Tuner, it's free https://play.google.com/store/apps/details?id=ccc71.pmw

4th, start System Tuner, go to "Startups", then go to "Google Services Frame"

5th, you will see lots of check boxes, uncheck all of them, except the ones I left checked

6th, enjoy your phone without GSF wakelocks :D

Note that Gmail app and Hangouts won't work! Google Play Store and Maps do work.
[BetterBatteryStats] undertrip:
hi

GSAM battery monitor shows that 23% wakelock

so i attached dumbfile , can anybody read that and help me

appreciate it
[BetterBatteryStats] guido_glx:
Disable location services

Disable wifi

Disable googlequicksearchbox

Try to bring down GSF wakelocks

Then make another log
[BetterBatteryStats] Casanoaa:
Thanks for sharing and contributing. I try these settings and add it to OP, if they work.
[BetterBatteryStats] Musko:
[MENTION=4705372]Casanoaa[/MENTION] [MENTION=4355376]Karpfenhai[/MENTION] [MENTION=5294162]guido_glx[/MENTION]

OK.

Thank you.

But when I use and need Hangouts app, is any way to minimize GFS wakelocks without kill Hangouts app?
[BetterBatteryStats] guido_glx:
Great!

It worked for me, but we'll need to know if it works for somebody else

As I don't use Hangouts, I really don't know... but you can try disabling some and seeing what happens!
[BetterBatteryStats] Musko:
Thank you,

I will try some setting and maybe [MENTION=4355376]Karpfenhai[/MENTION] or [MENTION=4705372]Casanoaa[/MENTION] help with this.

And one more question. I have a lot of GMS (200) and Android (176) wakeups.

Can anyone help? What I must do for minimize this wakeups?

Thank.

com.google.android.gms (): Wakeups: 200
Alarms: 15, Intent: com.google.android.gms.nlp.ALARM_WAKEUP_ACTIVITY_DETECTION
Alarms: 1, Intent: com.google.android.gms.nlp.ALARM_WAKEUP_CACHE_UPDATER
Alarms: 0, Intent: com.google.android.gms.icing.INDEX_RECURRING_MAINTENANCE
Alarms: 68, Intent: com.google.android.intent.action.SEND_IDLE
Alarms: 116, Intent: com.google.android.gms.nlp.ALARM_WAKEUP_LOCATOR
Alarms: 0, Intent: com.google.android.gms.nlp.ALARM_WAKEUP_BURST_COLLECTION_TRIGGER

android (): Wakeups: 176
Alarms: 1, Intent: android.intent.action.DATE_CHANGED
Alarms: 45, Intent: com.android.server.LightsService.action.UPDATE_SVC_LED
Alarms: 453, Intent: android.intent.action.TIME_TICK
Alarms: 20, Intent: com.android.server.action.NETWORK_STATS_POLL
Alarms: 56, Intent: com.android.server.ThrottleManager.action.POLL
Alarms: 90, Intent: android.appwidget.action.APPWIDGET_UPDATE
Alarms: 3, Intent: com.android.internal.policy.impl.PhoneWindowManager.DELAYED_KEYGUARD
Alarms: 0, Intent: com.android.server.NetworkTimeUpdateService.action.POLL
Alarms: 9, Intent: android.app.backup.intent.RUN
Alarms: 29, Intent: android.content.syncmanager.SYNC_ALARM
[BetterBatteryStats] jhuff83:
I have Gemini app manager and autostarts. I have totally disabled Facebook and I still have over 600 wakeups in 8 hours. Facebook needs to fix that garbage.
[BetterBatteryStats] Casanoaa:
With my autostarts settings hangouts should work.
[BetterBatteryStats] It_ler:
+1

Can confirm that Hangouts work fine with your autostarts settings for GSF on my phone.
[BetterBatteryStats] Casanoaa:
then use friendcaster or browser.

---------- Post added at 05:51 PM ---------- Previous post was at 05:46 PM ----------

1.For gms disable all locationsservices in rom settings.

If it doesn't help, i should upload autostarts for google play services

2. For android

disable your lightssensor, notification led.

disable autosync of accounts.

use static ip for wifi

---------- Post added at 05:58 PM ---------- Previous post was at 05:51 PM ----------

First of all event log has to be check on. I got huge partial event log wakelock, when it is ticked off.
[BetterBatteryStats] Musko:
Thank for excelent help.

I will try your autostart setting and report back.

For gms I disable all locations from setting. but you may publish autostarts for google play services

For android I disable notification led. but you mean lightsensor as turn off autobrightness?
[BetterBatteryStats] Casanoaa:
I mean led notification.
[BetterBatteryStats] o0boiboi0o:
What about Whatsapp and other apps that require CDM to work?
[BetterBatteryStats] chamonix:
Then you should take this to the gsam support thread because looking at the dumpfile it is not correct
[BetterBatteryStats] oae08:
Anybody know what this wakelock? Draining my battery as hell.
[BetterBatteryStats] It_ler:
NlpWakelock ... Google related ... could be caused by Google Service Framework (GSF).

So try to minimize it by disabling its autostarts like described by Casanoaa (link in post #3).
[BetterBatteryStats] undertrip:
dumbfile shows audio_4 out draining 9% , even in GSAM audio_4 out mostly draining? what is that?
[BetterBatteryStats] chamonix:
Well if even GSAM mentions it it must be true ;)

http://xdaforums.com/search.php?searchid=206704936

Edit: But note it is not relevant anyway as you posted a dumpfile without reading the OP on how to start analysing
[BetterBatteryStats] Waldos:
My last question here: ¿What settings i have to use to minimize the gfs?

Option 1: http://xdaforums.com/showpost.php?p=35755907&postcount=11160

Option 2: http://xdaforums.com/showpost.php?p=43785764&postcount=17834

Im on 4.3 JWR. Thanks!
[BetterBatteryStats] GermainZ:
They're more or less the same, although the first one isn't limited to GSF wakelocks only.
[BetterBatteryStats] chamonix:
I promised an update after testing for a few days.

I can confirm that disabling Wifi/Cell location resolves all the nlp wakeups/wakelocks. The bad news is that GPS location is no good as long as you are not outdoor. Yesterday's trip over 650 Km was into two location points in my history: before I entered the train station and when I got out.

I will now test my theory and see if he poor handling of Wifi or cell info/changes is the cause (I bet on cell).
[BetterBatteryStats] Karpfenhai:
I'll upgrade to 4.3 this weekend and publish a newer setup for gsf, just be patient.

Tapatalked from my Galaxy SII
[BetterBatteryStats] Waldos:
Thank you very much for this!!! +1000
[BetterBatteryStats] gaich:
It is much easier to

1st, disable ALL autostarts for GSF, Hangouts, G+, Maps and Gmail.

2nd, it won`t do any harm to any application, you just will not be able to receive push notifications and use Chrome to Phone

3rd, you can always open any of the apps above manually and work with them (or just use non-Google apps)

4th, no GSF wakelocks at all!

My experience.
[BetterBatteryStats] suku_patel_22:
Adding the below for each activity in androidmanifest, does the trick.

<activity android:name=".AutoTaxtFareCalculatorActivity"
android:label="@string/app_name" android:configChanges="keyboardHidden|orientation">

---------- Post added at 05:34 AM ---------- Previous post was at 05:12 AM ----------

What are kernel locks useful for? My understanding is that it will help in debugging the root cause where kernel is raining the battery. It will help in kernel development and in case anyone finds an issue in the kernel he can switch kernels.

Any other advantage of this?

Also what are "WIFI Locked" and "WIFI scan" that show up in "Other"?

My WIFI is off but it still keeps increasing.
[BetterBatteryStats] yhrn:
Thanks for all the info! Made me realize that I forgot that proc/wakelocks survives full charge/unplug. Rebooted after charging full now :o

By the way, isn't this the kind of stuff that would fit nicely in the knowledge base linked to from BBS?
[BetterBatteryStats] chamonix:
Kernel Wakelocks are indeep useful for kernel devs to spot misbehaving drivers / periperals but those are not the only causes. You may have followed the discussion about wifi wakelocks where incoming packets keep your phone wakeing up or even awake. Without kernel wakelocks you would still see the awake in "other" but no counterpart in partial wakelocks. So kernel wakelocks makes the inventory of causes for "awake" complete. Depending on the device you are using the partial wakelocks from userland will show as one kernel wakelock in total or be detailed in kernel wakelocks (depending on implementiations).

About the wifi locked / scan: those are values telling you how much time your wifi was locked to an AP / scanning for APs. Of course there is no reason for those values to be changing when your wifi is off and that's a bug (well spotted again!).

I added if (#54) and fixed it already. The cause was I was taking the bluetooth time as a counter and not the corresponsding wifi state time.

It will be fixed in next release together with the other fixes I've been working on.
[BetterBatteryStats] chamonix:
Release 1.3.3

New version is out, fixes kernel wakelocks and a few more bugs (see post #2). Added KB articles about kernel wakelocks too, credits go to Entropy512
[BetterBatteryStats] chamonix:
Indeed, and of course added ;)
[BetterBatteryStats] alphaola:
When one install it ,it still show 1.3.2.0 instead of 1.3.3.0
[BetterBatteryStats] :
Mine showed 1.3.3

It doesn't

replace

the previous version however.
[BetterBatteryStats] alphaola:
Yes thanks just found out as I had the previous one on my home screen. Sorted
[BetterBatteryStats] suku_patel_22:
The graphs look fine now, thanks

Is it possible to cache the graph data when BBS is started?

It takes a while for the graphs to load on my phone.

Why do we have separate namespace for each version since 1.3 ...?

Looks like wifi scan/lock is not working as expected.
[BetterBatteryStats] chamonix:
The namespace thing is a bug in some script, it's supposed to be com.asksven.betterbatterystats_xdaedition for all xda versions. That's only to differentiate with the signed market version.

I'll have a look into wifi as I now have a kernel with working wifi again.

About the caching: I'd rather start doing some profiling again as I haven't been since early versions. It's always a balance act between features and performance :)
[BetterBatteryStats] Szczepanik:
Version 1.3.3.0

Updated perfectly from the Market and shows the latest version. Link to the Wiki page is good and the pages are clear. Thanks!

https://github.com/asksven/BetterBatteryStats-Knowledge-Base/wiki/_pages

Cheers

Tom
[BetterBatteryStats] dmulligan:
Does Betterbatterystats report which apps are holding a wifilock?

I recently found out that one of the apps I use was preventing wifi from turning off even though the screen was off. I want a better way to monitor for such problems than to guess which app caused it even though my device is set to use wifi only when the screen is on.

D

Sent from my Samsung Galaxy S
[BetterBatteryStats] bradld:
[Q] default Gingerbread battert stats and BBS reset?

OK so my default battery usage and also BBS stats seem to have just been reset after a reboot. This morning I completed a full charge and all was counting well until I rebooted upon which my stats went from 12 hours of usage back to what would be the equivalent of just taking the phone off the charger. Anyone know what would cause this?? Now it also appears my stats in the stock GB app arent updating with any rate that seems normal - graphs seem to be not showing what has actually happened with usage.

Ideas please? Can this be caused by my recent installation of BBS? Any way to fix this?

Thanks in advance.
[BetterBatteryStats] tbob18:
I'm not sure what is going on, but on wifi I seem to get a lot more drain than on 3g. I can't help but notice the ridiculous count for "deleted_wake_locks". Screenshots attached.
[BetterBatteryStats] Entropy512:
Hmm... Something's a little weird there. I'm going to upgrade tomorrow evening to test, but based on looking at your screenshot it looks like BBS is displaying total_time and sorting by it - I have never seen the "main" wakelock have more than a few tenths of a second of sleep_time.

sleep_time is what really matters - those are wakelocks held when the screen is off. Main holds a lot of total_time but rarely (if ever) any sleep_time.

Sometimes things can get REALLY weird. See the attached zip as an example, these are controlled drain tests done by executing the following command overnight:

ping -i 5 <wifi ip address of phone>

One is with a 2.6.35.7 kernel, one with .14

The most interesting is the wakelocks OpenOffice spreadsheet (.ods) in the .7 directory - To make this, I opened up a /proc/wakelocks dump as tab-delimited text, converted sleep_time to minutes (divided by 60e9), then sorted by sleep_time.

What's odd is that the phone decided, "Oh, I'm awake, I'm going to go do some other stuff I guess" - so it went and did a LOT of radio management routines, causing svnet to go WAY up - however - svnet has a wake_count of 0 - so it never actually caused the phone to wake. That honor is reserved for wlan_wake and sec-battery-monitor.

So sometimes hunting root cause can be a REAL pain until you get a "feel" for things, such as in the case of the attached zip file where incoming wifi traffic was the root cause of drain.

You'll also see that in the .7 dump, "main" has a decent amount of total_time, but zero sleep_time - it never was holding a wakelock when the screen was off.
[BetterBatteryStats] chamonix:
It is indeed total time as this is the only thing together with count the BatteryService is keeping track of. I'm currently working on implementing my own parser where we will be able to decide on the right info to show and I guess I will deprecate the current representation once done.
[BetterBatteryStats] chamonix:
There is no simple answer to that. If the app keeps a partial wakelock yes it will be accounted to that app. If an app by its behaviour is causing the system or a service to hold a partial wakelocks no because there is no track from the service to the owner. For kernel wakelocks caused by an app the chain is one step longer so that would be the same as case two.

In your case it's mostly improbable to find the cause by programme logic as an app, except if it's a system app, would never require WLAN but use a data connection. btw this brings me to an idea: certain wakelocks are related to permissions that must be declared in the app's manifest. Using this info may help to narrow indirect causes (going to give this a shot)
[BetterBatteryStats] chamonix:
That's a tricky one and reading your post raise lots of questions.

To start with what configuration are you running (kernel, android version, device)? On what observations is your feeling about stats not updating at a proper rate based? Are all stat types (since....) affected? What stats are affected? What graph did you look at (stock from gb or bbs)?
[BetterBatteryStats] yhrn:
I'm about as far from an expert as you can get but I've experienced very similar behavior on my SGS2 (don't know what phone you have though); high "suspend", huge "deleted_wake_locks" count and much worse drain on wifi than on 3g (5-20%/h vs 1-2%/h idle drain).

For me it turned out to be the combination of phone and router (SGS2 and D-Link DIR-655). It's probably more complex than that but I used to connect to that router model on two completely different networks with my SGS2 and also another android phone and the only combination there that gave me crazy drain (and it always did it) was SGS2/DIR-655. Recently I replaced the router at home and I now have better battery on wifi at home than on 3g - as it should be.

It's definitely more complex than that as there are people confirming that they get no extra SGS2 drain from a DIR-655 but I have also read about others with the same problem as me.

Of course, in your case it could also be some poorly implemented app set to only do things on wifi that is causing the trouble. And Skype is supposed to be pretty nasty if you are logged in all the time.
[BetterBatteryStats] tbob18:
I'm running an Epic 4g with 2.3.5 on it. I had actually just logged into Skype, so it can't be that.

Funny that you say that because I have a DIR-655 too. Today it is not nearly as bad (8h and it's at 85%), there are no "deleted_wake_locks" at all, but it is still awake far more than it should be (screen has only been on for 45min, but the phone has been awake for 2hrs).

There is really nothing running, I froze K9/Voicemail/Maps before taking it off the charger, and I have very little installed. I'll try freezing the Market/Alarm as well, even though they aren't in the wakelock list. :confused:

Edit: now that I look at it closer..

ActivityManager-Launcher 93s Count: 283 0.3%

AlarmManager 17s Count 1603 0.3%

sleep_broadcast 14s Count:358 0.0%

Doesn't the count look a bit high?

Yeah, I really have no idea what was going on. Some cleaner stats are attached. I might try a few other kernels and see if I have the same issue. I know that the phone should not be awake so much.
[BetterBatteryStats] GermainZ:
Simply disabling background data (and Maps from autostarts) does that for me (No Gmail/Hangouts/G+ apps). ;)
[BetterBatteryStats] Ty07allstar:
Could someone let me know what is keeping my phone awake. I don't know why the dump is saying that I had no data connection because I did. Also my phone was in my pocket with mobile data turned off for about 7 hours while I was at work. The only time I touched my phone was to check the time. Hopefully somebody will be able to help me. Thanks
[BetterBatteryStats] guido_glx:
Whatsapp works fine, others... I don't know any others :rolleyes:

Sure! Each one has to find his own "best set up". I only shared mine, just in case someone else finds it useful.

Autostarts didn't work for me.
[BetterBatteryStats] Astegal:
Hi !

I think I really need your help to improve my battery life. I tried to do it myself without any success so that's why I post my bbs file:

http://db.tt/CkwlnPeh

Thank you very much for your support.

Envoyé depuis mon GT-I9100 avec Tapatalk
[BetterBatteryStats] undertrip:
what is this link u provided?

i open it it says Sorry - no matches. Please try some different terms.
[BetterBatteryStats] chamonix:
Search for "audio_"
[BetterBatteryStats] acmilanisti:
hi guys, do you have any idea how to check what apps that keeps my screen ON ?

Even i have set the screen to turn off at 15sec, i still have to turn it off manually.

I did restart the phone, and it works for few times, but again the screen keeps ON.

It sucks my battery..
[BetterBatteryStats] danger.mouse:
battery drain

Hi everyone!

My phone used to consume about 2% of battery during night in flight mode. Now it's consuming more than 20%! Please, could anyone help?

Thanks in advance and good day!