yashsingh1/xdaforums huggingface dataset:
[BetterBatteryStats] Portgas D. Ace:
Please read the OP about how to produce a proper log file. In your case, do the following:

- charge your phone to 100%

- unplug your phone from charger

- leave it idle ( = don't use your device!) for some hours (best way: to do it over night while you sleep)

- after you wake up, open BBS and save the log file immediately (don't use your device for anything else before you save the log file)

- post the log file here, so we can have a look at it

This way we can see what's going on while your device is idle and what might cause the huge battery drain.
[BetterBatteryStats] BaumerS4:
Nexus 6 running 7.1.1. Battery life has been awful the past week or two. Top process is always "media.codec" but I can't seem to find anything on what that is...
[BetterBatteryStats] githyanki:
Your log only tells us what you know, and you also have about 1.5 hours even on time so it's not a useful log. Read the post above yours for how to make an idle log.

Try another rom? Media codec should not stay on like that.
[BetterBatteryStats] githyanki:
Your system is not sleeping at all.

BatteryServiceUpdateStats_3 (Android System): 47 m 54 s Count:1570666 8.4%

https://xdaforums.com/htc-10/help/batteryserviceupdatestats3-wakelock-t3416643

NETLINK (): 1 h 44 m 4 s Cnt:(c/wc/ec)1982702/1446539/0 18.2%

HVDCPD_WL (): 1 h 41 m 17 s Cnt:(c/wc/ec)1607835/980438/0 17.7%

PowerManagerService.WakeLocks (): 1 h 39 m Cnt:(c/wc/ec)1495040/973542/0 17.3%

NETLINK (): 1 h 10 m 58 s Cnt:(c/wc/ec)1997373/1451590/0 12.4%

Lots of network stuff going on. Try turning off WiFi and getting a new log.
[BetterBatteryStats] mnhs1010:
What should i do.
[BetterBatteryStats] mhnx:
Hello, I have a lot of battery drain from some services but I don't know how to get a proper log. I took some screenshots from my phone, I can provide logs if you explain me how to do it. I barely used the phone and I have these wakelocks. The drain is too much this is why I posted here. I have marshmallow rooted phone. Thank you in advance.
[BetterBatteryStats] Portgas D. Ace:
Check this post about how to produce a proper log file:

https://xdaforums.com/showpost.php?p=70914963&postcount=31702
[BetterBatteryStats] akarol:
Good morning gents.

I've been noticing quite horrible battery life with my N6P lately and figured I would leave to the experts here to take a look as I have been unable to identify the culprit(s).

I charged to 100%, rebooted, waited 5 minutes, unplugged the device, and let it idle for 4.5 hours. The files are attached.

Thank you guys so much in advance.
[BetterBatteryStats] DB126:
A quick pass through the logs suggests Bluetooth was pretty active.
[BetterBatteryStats] mnhs1010:
Please Help

No deep sleep.

Im not able to understand what is the problem with my device.

i did wipe & flash new firmware still no deep sleep:confused:

:eek:
[BetterBatteryStats] DB126:
Look back a few posts for information on creating a proper log.
[BetterBatteryStats] githyanki:
That's the exact same log as yesterday.

You need to follow the recommendations and get a new log.
[BetterBatteryStats] ranchu-panchu:
mystery

First, a big thanks for this excellent application.

We're trying to understand with the help of BetterBatteryStats, how to wait on accelerometer while still getting into sleep mode.

We didn't find a way for that with our mediatek device (4.4 android). It seems that accelerometers are not significant motion sensor, so we not sure if it's possible to wait for accelerometer events.

Yet, the watch (NO.1 D5) as internal feature which makes it wake whenever we move the watch:

https://drive.google.com/file/d/0B22GsWueReZTVXpPNGVkMU53Vms/view?usp=sharing

checking with "uptime", it seems that the watch gets into sleep (and yet gets awake on moving the watch!)

So, it's still a mystery how mediatek achieved this feature. We try to solve this mystery with BetterBatteryStats.

Yet, on doing this recording I did not find additional alrams, wakelock or even process.

Attached is recording while using this feature.

If anyone have any idea how to solve this mystery , please tell me.

Thanks,

Ranchu
[BetterBatteryStats] ThomasEAKyle:
Ever since I upgraded to Nougat (via resurrection remix+ ElementalX if that matters) my Partial Wakelock screen seems off - every app reports the exact same %drain and running time down to the second. The other stats on that page (NLPWake, RILJ, etc) seem normal. Makes it very difficult to track down what's keeping my phone awake. Any one else seen this? Any solutions?
[BetterBatteryStats] diamond1711:
s5 g900f+cm13+boeffla kernel
[BetterBatteryStats] TNSMANI:
Google app was active. If you rely on it, try to see whether you can reduce its background running.

Bluetooth was also active as already informed by Davey126.

Alarm Wakeup Locator, Context Manager Alarm Wakeup, Checkin-Eventlog Service Receiver, App Widget Update, WhatsApp, Bluemail, Weather app your watch etc were active and drained battery. Without Xposed and Amplify, you may not be able to do much to control them. You can try to disable, freeze those that you are prepared to sacrifice.

There was a background download of about 2MB by Play Services.

All these contributed to the drain. Being on Nougat has its price.
[BetterBatteryStats] ashjas:
[MENTION=1330150]chamonix[/MENTION]

Can you please look into this log? The app can't show any stats... Please check screenshot.

Thanks for your time.

OS: nitrogenos 7.1.1 device kenzo,redmi note 3

BBS v2.2.2.0
[BetterBatteryStats] mhnx:
Hello again, I did get logs from around 8 hours of sleep. The device did wake up 2-3 times from me an the clock alarm. I have to say that when wifi is disabled I get 10~days sleep mode while with enabled 2 max 3.
[BetterBatteryStats] sas_sas:
I have Xiaomi mi5/64gb and excessive battery drain with it.

This is almost same with many stock and custom roms. I purchased a new battery and replaced it but, the result happened the same too.

I also need some experienced pals to evaluate my enclosed dump file and to comment about battery and what may suck my battery so much (average 4% per hour) in when idle.

Thanks a lot in advance..
[BetterBatteryStats] DB126:
Related post: https://xdaforums.com/android/general/guide-0-0-hour-idle-battery-drain-stock-t2973588/post70999752

While the the 3.5%/hr drop on your latest log remains largely unexplained a new device specific wakelock was revealed. Seems to be an Xiaonmi update and/or location tracking service. That said, the 13+ min of wake time at low CPU frequencies does not fully explain the massive loss over 13 hours. Your battery remains suspect as noted in earlier posts.
[BetterBatteryStats] matssa:
Did you manage to fix it? I have the same issue on op3 on LineageOS + ElementalX.
[BetterBatteryStats] sas_sas:
I already ordered USB powermeter as you suggested. But can you give me little info what to check?

I assume I am going to measure of current (mAh) to find out if it is close to 3000 mAh when the battery is fully charged , correct?
[BetterBatteryStats] DB126:
Yep. The meter must be capable of tracking charge delivered over a period of time, not just instantaneous. You're looking for a value that is 80-85% (min) of rated capacity for a full charge.
[BetterBatteryStats] ThomasEAKyle:
No, I removed and reinstalled BBS, DL and have tried with and without the system app setting. Still shows all the exact same time & % on partial wake locks.
[BetterBatteryStats] matssa:
Crap, can it be from the kernel?
[BetterBatteryStats] matssa:
Well it seems like I made it work. Updated to 2.2.2.0 and removed a setting (do not detect as system app or something like that).
[BetterBatteryStats] henry8668:
My phone is using 0.7%/h overnight idling with "battery saver" mode on. Is there anything that I can do to improve battery consumption? Attached log file was created with fully charged phone after about 6 hours idling.

Thanks!
[BetterBatteryStats] ranchu-panchu:
Hello,

Does anyone have a guess how mediatek can sleep while waking with accelerometer ?

That's a big mystery for me.

We're trying to understand with the help of BetterBatteryStats, how to wait on accelerometer while still getting into sleep mode.

We didn't find a way for that with our mediatek device (4.4 android). It seems that accelerometers are not significant motion sensor, so we not sure if it's possible to wait for accelerometer events.

Yet, the watch (NO.1 D5) as internal feature which makes it wake whenever we move the watch:

https://drive.google.com/file/d/0B22...ew?usp=sharing

checking with "uptime", it seems that the watch gets into sleep (and yet gets awake on moving the watch!)

So, it's still a mystery how mediatek achieved this feature. We try to solve this mystery with BetterBatteryStats.

Yet, on doing this recording I did not find additional alrams, wakelock or even process.

Attached is recording while using this feature.

If anyone have any idea how to solve this mystery , please tell me.

Thanks,

Ranchu
[BetterBatteryStats] Dekz:
This app stopped working for me a while ago. I've installed/uninstalled and rebooted in between many times.

App anyways just gets stuck here when I try to open it:

Note that this happens before it even asks to install as a system app.

*OnePlus 3 on stock OOS 4.0 (7.0) rooted.
[BetterBatteryStats] woodman:
Do you use latest bbs v2.2.2.0 from post #2?

Also please read here: https://xdaforums.com/showthread.php?t=1179809&p=70199105

If no luck try to use the in-thread search function to find a solution and if still no luck, logs will be needed :)
[BetterBatteryStats] Dekz:
Interesting! Your link pointed me in the right direction.

Even installing the latest 2.2.2.0 XDA version had the same problem. I solved it by removing BBS access in SuperSU, then when I ran BBS again it asked for SU access so I granted it again and then it worked :good:
[BetterBatteryStats] Dekz:
Okay, I spoke too soon. I can open the app now, but it still can't do anything useful.

The only reference points that I can choose are Charged or Unplugged, which are pretty much the same thing. There is no "Now" or "Current" option (I forget exactly what it was called when the app was working)
[BetterBatteryStats] voroxda:
Stop the app via app manager. Delete cache and data. Grant as root:

pm grant com.asksven.betterbatterystats_xdaedition android.permission.BATTERY_STATS

pm grant com.asksven.betterbatterystats_xdaedition android.permission.DUMP

Start the app again.

Good luck.
[BetterBatteryStats] Dekz:
That did the trick. Thank you very much!
[BetterBatteryStats] masri1987:
Running 7.1.1 AOSP on Nexus 6p, bbs always shows erroneous stats for me. For example in screen shot, I charged to 100% turned it on and immediately it gave me outrageous stats for the battery drainage.

Is this normal?

[IMG="BBS Screen Shot"]https://dl2.pushbulletusercontent.com/x3lYJ9caAGHprL9cHI7GVp8zrZJa2Wr4/Screenshot_20170216-162956.png[/IMG]
[BetterBatteryStats] githyanki:
Change from boot to unplugged.
[BetterBatteryStats] iamnotkurtcobain:
Is this normal?
[BetterBatteryStats] Pavononer23:
Hi! I'm running BBS on my OP3T, stock with Franko kernel and I cannot change which stats I should receive(If it is since boot, unplugged, etc) because when I click on Unplugged, nothing else is showing for me. Any idea on why is this happening?

Thank you in advance
[BetterBatteryStats] DB126:
Relative to what?
[BetterBatteryStats] masri1987:
i consistently dont have unplugged
[BetterBatteryStats] githyanki:
Try clearing app data. If you still don't have unplugged as an option, try uninstalling and reinstall.
[BetterBatteryStats] henry8668:
Lots of wakelock overnight... Is this too much? Are those top ones in "Wakelocks" section the culprit? should I stop life360 and FolderSync, and stop GPS?

Thanks.
[BetterBatteryStats] masri1987:
that worked @ clearing data, it created a unplugged reference.

Thanks
[BetterBatteryStats] Avencore:
Hey all,

Can anybody tell me what "wlan_pm_wake" is?

Its under kernel wakelocks and keeps my device awake when connected to my home wifi

Greetings avencore
[BetterBatteryStats] DB126:
Well that's a new one (assuming no typos). Generic guidance:

- try to set a static IP on the device and/or router

- set router to use a single narrow band (eg: 2.4Ghz w/20Mhz width)

- if kernel/ROM permits limit device radio to 2.4Ghz band

Last two may not be desirable/permanent solutions but could help isolate the problem. Good luck.
[BetterBatteryStats] ryantorch96:
hi gud am, i have oneplus 3t running FreedomOS v1.3 and Franco Kernel r12.

Please advice if my device stats are ok/normal and if there's improvement that can be done on my battery

thanks!
[BetterBatteryStats] Lownita:
Why do they all have the same duration? Running latest Resurrection Remix on Oneplus3. Maybe I need to install BBS as system app again?
[BetterBatteryStats] ThomasEAKyle:
I've been having the same issue on Resurrection ( hammerhead here) as well, you're the 3rd to mention it. Bring it up to your local RR dev. Maybe someone here knows what causes it.

If you find anything that works let us know!
[BetterBatteryStats] Nimueh:
Just use the wakelock blocker that RR has built in and block those launch + alarm wakelocks. They don't use any battery (or at least not much), so "ignoring" them is the easiest option. :)

AFAIK it's the built in wakelock blocker that either causes them or somehow makes them visible. I've had them on RR roms for at least 2 years now, first on my S4 and now on the G5.

Edit: I've blocked those Icing wakelocks too ... no idea what they are but blocking them didn't seem to break anything.
[BetterBatteryStats] mhnx:
Could someone help me with this drain?

There are attachments on the post quoted.
[BetterBatteryStats] DB126:
While there are various minor drains the big culprit is WiFi as you observed. General guidance:

- be sure WiFi scanning is off (device)

- set a static IP on the WiFi connection (device)

- if possible set a static IP on your home router

- try to disable multicast on your home router

- disable GMail auto-sync (typically NOT a major drainer)
[BetterBatteryStats] Fir3lordZuk0:
Thanks, it's working now...How can I set Screen Off reference?
[BetterBatteryStats] DB126:
Settings->Watchdog
[BetterBatteryStats] kelly66:
Hi,

Can anyone tell me what is vbms_cv_wake under kernel wakelocks? It always keeps my Lenovo Vibe P1 phone awake after I unplug after 100% charge, even when screen is off. Only workaround I found to get deep sleep back is to reboot the phone after I unplug the charger. Thereafter, I don't see this wakelock at all.

Any views/suggestions?
[BetterBatteryStats] DB126:
Being a kernel (likely HW associated) wakelock it will be difficult to rein in. A custom kernel can sometimes help if one is available for your device. Some other things to try:

- disconnect power source before unplugging cord from device

- turn off any unneded radios/sensors before charging

- switch USB cables (a dodgy cable can trigger wake locks)

- make sure USB port is free of dust/debris

None of these are likely to help but easy to check/try. Good luck.
[BetterBatteryStats] bym007:
Hi, I just came across this app. After reading the first post, I don't see Android 7 Nougat mentioned anywhere.

I have Huawei Mate 9, stock on Android 7 Nougat B156 firmware and unrooted. Will this app work?
[BetterBatteryStats] DB126:
Mixed reports on Nougat; functionality will be limited w/o root (workarounds are available if tech-savy). You will find most of what you need in the forums. Make use of the search function to hone in on topics of interest.
[BetterBatteryStats] skivnit:
I have a terrible battery life on my s7e nougat. Heres a 6hrs dump on Wi-Fi
[BetterBatteryStats] ArtOfSnaila:
Getting some pretty weird *alarm* wakeups across all of my apps, no idea what's causing them. HTC 10
[BetterBatteryStats] githyanki:
Need idle log, you used the phone for 48 minutes.
[BetterBatteryStats] DB126:
Wow - lots of activity including bluetooth (radio on?), an offline Google Maps download and a bunch of smaller stuff. Still, should not amount to 90+ min of wake time. As a quick test try switching off BT and WiFi radios during sleep and take another dump. Not a long term fix but I am suspicious of rogue WiFi wakelock.
[BetterBatteryStats] skivnit:
Yes i think bluetooth wakelock is triggered by my gear s2 as for wifi i never had any problems with it before. My router is well configured. I will investigate tonight
[BetterBatteryStats] ArtOfSnaila:
Here is a fresh log from a day of use
[BetterBatteryStats] githyanki:
Please read the OP about idle log.

No one can analyze this log but you since you know what you did on your phone, we don't. We can tell you what your phone did, but only you would know if that's right.

Idle log means don't use the phone for 6+ hours then take a log.
[BetterBatteryStats] ArtOfSnaila:
Those wakelocks I'm talking about, Icing, CMWakelock, and *alarm* happen irregardless if the phone is in use or just sitting there, that's the reason why I was confused and posted here. I'll make an "idle log" later during the night for this purpose, but can you not even give a hint as to what the issue is?
[BetterBatteryStats] DB126:
Wakelocks are irrelevant when device is in use and can be ignored. Wakelocks that occur when the device is idle may or may not be benign. An idle log is the first step in determining whether a problem exists. If seeking longer 'screen on' time this probably isn't the right forum.
[BetterBatteryStats] Mister_Diamond:
Battery drain while asleep

Hi,

I noticed that every morning, when I wakeup, my GT-S5570I lost the -6% in few minutes.

Eg: I turn off the screen when the battery is @ 98% of charge, i go to sleep and when I awake, about 7 or 8 hours later, (maybe during the sleep I've received a whatsapp message, or an email) the battery falls to 95%, then I reply to mails or whatsapp and the battery falls to 92%; this behaviour also occurs with any other percentage of the battery.

The phone properly goes to deep sleep (as we can see from the BBS log attached to this message).

The most revelant wakelocks seems to be:

"knet_wake_lock" (): 18 m 2 s Cnt: (c/wc/ec)115/1/115 3,8%

"bcm_sdhc.3" (): 12 m 41 s Cnt: (c/wc/ec)2257/47/1222 2,7%

About the first one I didn't find so much on Google; someone said that is related to fast dormancy, but I go with 2G, and this wakelock is present also if I disable the fast dormancy; the second wakelock seems related to the SD card'drivers: I have a 2nd partition formatted as EXT3; previously was formatted as EXT2 and such wakelock was higher: seems to be a bug of this phone.

However I attach the full dump/log file:
[BetterBatteryStats] DB126:
Ancient device; not going to find much detail on Gingerbread era wakelocks. That said, consumption/drain pattern does not seem out of the norm. As an aside might consider jettisoning ES Task Manager and File Manager which spawn power sucking background tasks. Google is your friend here.
[BetterBatteryStats] ArtOfSnaila:
Grabbed a near 9 hour idle log finally. A full reboot after a full charge. Again, the wakelocks Icing, *alarm*,CMWakelock, all happen regardless of I opened those apps or if i even used the phone.
[BetterBatteryStats] DB126:
Good log. Device awake (screen off) for ~2 hours. Primary culprit was Google Maps followed by Google App (search box) which may be a side effect of the former. Try uninstalling/disabling Google Maps to verify that indeed is the source. Can then discuss options for controlling idle drain. This assumes you did not have maps running in the background; this is one app that should always be swiped away when not in use. Native doze does not always rein in background activity.
[BetterBatteryStats] Mister_Diamond:
I only have an old version of ES File Explorer, and furthermore, using the hosts file (I have root access enabled) I blocked the internet access to its servers; as you can seen from the log, Es file exlporer have a very small, unnoticeable impact.

What keeps the phone awake (30 mins in about 8 hour), are "knet_wake_lock" and "bcm_sdhc.3"; the last one is related to the SD card driver, but the first one "knet_wake_lock" is the most noticeable (about 20 mins); do you have an idea to what could be related, looking at the log? Obviously, looking at the "net" part, seems related to data connection; in facts if I go with Wifi, I don't see this wakelock.
[BetterBatteryStats] DB126:
As noted old device/old rom spawning an infrequently seen wakelock. Given the modest drain I would ignore it.
[BetterBatteryStats] ArtOfSnaila:
Upon disabling Maps, another app grabbed the Icing/CMWakelock, this time the Play Music App. So I disabled that app, and then another app popped up taking that wakelock, the Keep app. So it keeps on changing up. I checked this with hour intervals. Any idea what to do? Flash a new ROM?

EDIT: Each wakelock time would be around 20-25 mins per hour. Sorry I can't provide logs at this moment, but each interval had the phone in a perfectly unused state.
[BetterBatteryStats] DB126:
ROM or Google Play Services (here). You can run through the standard flush of Play Services caches (don't forget to reboot after) before taking bigger steps. Many folks with ROMS based on Android 6.x and below head to Amplify to block such wakelocks which typically involves a fair bit of effort and compromising side-effects (obviously not an option for you). I prefer to go after root cause although that can be an equally time consuming journey.

My sense is an incorrect/corrupt install of Google Play Services is the culprit. Might consider visiting your device forum to see if others are seeing the same thing.
[BetterBatteryStats] Mister_Diamond:
You've totally right: in facts, apart of these wakelocks, I have a good battery life :)

I will live with this, but since I cannot figure out what exactly is the "knet_wake_lock", just for the sake of the knowledge, I am however and still curious what is causing this wakelock; i'm guessing that this could be a driver's issue.
[BetterBatteryStats] DB126:
Driver, kernel, modem or interaction between them. If I were to guess the device is being held awake after a brief burst of activity; not uncommon in days-gone-by. Might verify your phone isn't looking for updates that will never come. Again, just a guess...
[BetterBatteryStats] Mesmurized:
While I was out and about today, I received 4 or 5 BetterBatteryStats - 99% awake while screen off notifications. Never seen this before. My 5X has been sleeping like a log for a looong time, including last night!! The only difference, is running around for about 4 hours and one 5-min call.

Note:

1) Early this morning, Deep Sleep and Battery were both 97%, and Awake (Screen Off) was 0/1%

2) This afternoon Deep Seep: 58% and Battery: 67%

3) Installed Doze Settings Editor (using GeraldRudi's profile) about a week ago.

From the BBS stat pages, it appears system related, not app related. Am I understanding correctly?

I suspect Dose Settings Editor because it was the last app installed. No actionable info could be found in DSE's thread.

Any ideas what might be going on? If you also suspect DSE, I'll go there with my question.

Mes
[BetterBatteryStats] DB126:
Looks like a classic Google Location Services gone berserk scenario. Suggest clearing Play Services cache followed by an immediate reboot. Don't think DSE is the culprit. That said, not much reason to mess with doze parameters on Nougat. If still rocking Android 6 the only thing needed is 'doze-on-the-go' or equivalent.
[BetterBatteryStats] Mesmurized:
Thanks for the suggestions.

In Settings/App/Google Play services: do I clear just Cache, or Data (150MB) + Cache (3MB)? If I clear both, what settings will I loose? BTW: I'm on MM. I like DSE because it makes a permanent change to the doze settings and then the app can be removed.
[BetterBatteryStats] DB126:
Data + cache. You should not loose any settings although you may be re-prompted for certain 'permissions' (eg: location services). Understand DSE operation (nice); my comment was focused on minimizing changes to stock settings. Unless clearly beneficial just turns into another variable that must be accounted for if/when something goes wrong.