yashsingh1/xdaforums huggingface dataset:
[BetterBatteryStats] ajamxar:
So, I'll reboot and do the same steps again, right? I think it's Snapchat that wakes up the screen. Will uninstall it and post dump again.

Thanks, and cheers for the help!! :)

PS: The idle drain as per EX kernel manager is 2.5% usually, which is pretty high. That's why I'm so curious to find the root cause. Blocked the wakelocks through EX Kernel manager today. Will report my findings tomorrow. Thanks again!
[BetterBatteryStats] DB126:
With a few exceptions wakelock block simply masks the symptoms without addressing root cause. Really should be that last resort... especially during the investigative stage.
[BetterBatteryStats] ajamxar:
Oh, ok.. I flashed the latest version of the ROM without EX kernel for now. Also uninstalled the kernel manager.

Let's sort it out, eh! :)

Post the BBS dump file soon. Thanks for the insights.
[BetterBatteryStats] rignfool:
A quick Google sheets that wcnss is Qualcomm related for wireless communication... WiFi, Bluetooth, etc
[BetterBatteryStats] peterlee928:
[MENTION=8441994]BARGORESC[/MENTION]

if this is the case, then you may want to try changing some of your wifi, bluetooth, and location settings.

wifi

1) only leave it on when it is in use

2) turn off network notifications

3) turn off "keep wifi on during sleep" (or the equivalent function)

bluetooth

1) only leave it on when it is in use

location

1) only leave it on when it is in use

2) turn off wifi scanning

3) set to "device only"

google maps (if you use this and/or have this installed)

1) turn off all notifications

you can also try wiping cache and dalvik cache, then restarting your phone.

hopefully others can provide further specifics on this wakelock and/or alternative solutions.

EDIT

once you try the aforementioned steps, you can take another proper idle dumpfile. then you can assess whether your battery drain has improved and/or whether that specific wakelock has been reduced/eliminated.
[BetterBatteryStats] ajamxar:
So, here's the dump file for last night. Aa you can see, the phone was awake 33% of the time while untouched. Idle drain is usually even higher.

What I don't understand is that under Partial wakelocks, I see almost every app in the same time (13 odd minutes). Is this normal? I'm at my wits end... It wasn't like this earlier.

Could someone help, pls? :crying:
[MENTION=5488402]Davey126[/MENTION], [MENTION=6089972]peterlee928[/MENTION], [MENTION=1631192]githyanki[/MENTION]
[BetterBatteryStats] peterlee928:
1) try wiping phone cache and dalvik cache (in twrp). then restart phone.

2) alter your app sync/auto-sync settings.

3) forgive me if i am wrong... but i swear i saw your phone has fast dormancy. if so, you may try disabling that and using the hibernation modes in greenify. i have read of fast dormancy users of other phones have wakelock issues that were solved after disabling this service.

4) social apps - consider lite alternatives if available.

5) if there are apps that you dont use, consider disabling them (eg health apps... bring this one up as i know no one that uses them).
[BetterBatteryStats] ajamxar:
How do I disable fast dormancy? I tried googling it, but found nothing concrete...

Also, what app should I use to disable other apps? Is greenifying them enough? Thanks for replying promptly!! :)
[BetterBatteryStats] peterlee928:
1) regarding *alarm* and *launch* - see this post for possible solution https://xdaforums.com/redmi-note-3/help/od-alarm-launch-wakelock-t3470264/post70439818

forgot to include this in my first post.

2) fast dormancy - https://xdaforums.com/showthread.php?t=2382680

different phone, but may be similar process.

3) assuming your phone is rooted, you can disable apps via titanium backup, disable services, my android tools, sd maid, among others. several derivatives exist, but those are all pretty common. just be very careful when using them - recommend reading multiple threads on process, risks, etc. and creating a backup before you starting doing ANYTHING.

also i would wait to see if smarter folks than myself have any other thoughts before proceeding with my steps. some should be innocuous (eg wiping cache/dalvik cache, changing sync settings).

but some might be more "dangerous" (eg disabling apps).
[BetterBatteryStats] ajamxar:
Thanks!

Disabled fast dormancy through the Disable Services App. How do I block the wakelocks, though? Amplify doesn't work in Nougat.

Edit: Ok, I've disabled "*alarm" and "*launch" in the built-in wakelock disabler in RR Rom. Will report observations.
[BetterBatteryStats] paco_ramirez:
Google services is killing my battery

It's on top of consumption. 9% in less than one hour. Here is the report of BBS (no update was being running). What can I do? thanks
[BetterBatteryStats] peterlee928:
this dumpfile is unusable. please submit a proper idle dumpfile per the instructions in the link below. screen on time must be less than 1 minute.

https://xdaforums.com/showthread.php?t=1179809&p=72467976
[BetterBatteryStats] *justintime*:
On the HTC U11 I get no kernel wakelocks "no stats been collected yet"

Saw another post that this had been addressed a lot of times.

But i cant find the solution.

Bbs has root access and Magisk module is installed.
[BetterBatteryStats] shaggyskunk:
Try rebooting your phone - I had the same issue with BBS and Magisk until I rebooted after Flashing an update to my Rom - You might want to double check that BBS has been granted Superuser permission... Just in case ;)

From Down the Rabbit Hole by:

My SM-G930W8 ??
[BetterBatteryStats] Al Gore:
I am on a new ROM (Resurrection remix) and I get good times despite not using amplify or greenify so far. However I've never seen such long wakelocks in years. Can someone explain how are they so long yet drain so little battery? And how to deal with those.
[BetterBatteryStats] *justintime*:
Thanks, but rebooted several times. Installed as a system app. Because of the Magisk module.

Also turned on the API kernel option in advanced mode.
[BetterBatteryStats] paco_ramirez:
6 percent in one hour

With just 39s of SOT. The timing is 1h17m (sorry, I had to take a phone call so I couldn't have a longer log). Hope it helps. Thanks!
[BetterBatteryStats] peterlee928:
needs to be at least 6 hours per the instructions that i sent you. this dumpfile is invalid.

EDIT

also - screen off to screen on.
[BetterBatteryStats] DB126:
Wakelocks represent a request with a max timeframe. The request itself does *not* wake the device, trigger activity or delay sleep. The receiver determines what actions, if any are taken. If no action is initiated (often the case) the associated wakelock instantly expires. If an associated activity concludes before the max timeframe (almost always the case) the wakelock is released. Not completely accurate but good enough. Therein lies the rub with raw data reported by BBS and similar apps. Average drain rate is far more relevant than the slew of individual data points that are usually misinterpreted.
[BetterBatteryStats] finalista:
Same here. Is magisk the culprit?
[BetterBatteryStats] Oswald Boelcke:
Running a Samsung GT-i9305 with Resurrection Remix-N-v5.8.3 and Magisk v13.3; BBS is installed as "regular" user app i.e. at /data/app. BBS is running as advertised and perfectly.
[BetterBatteryStats] *justintime*:
Strange that some people can't get it working than.
[BetterBatteryStats] ithorien:
Toss me into this basket. July PN, r54 Franco, Magisk 13.3, BBS won't show any wakelocks.
[BetterBatteryStats] *justintime*:
OK... A system dump is also not necessary. Because a system dump is only useful when kernel wakel are working.
[BetterBatteryStats] Mikahlo:
a little help with my log

Hello together!

I made a log with bbs and 1 thing I don't understand: there is one app (kernel-adiutor mod) that shows a wakelock. To be precise: the count is 0 but the duration is over 4 hours. What exactly does this mean?

Thanks for helping in advance!
[BetterBatteryStats] DB126:
See here. Obviously didn't have much of an impact given log stats.
[BetterBatteryStats] rocky78:
[MENTION=5488402]Davey126[/MENTION]

i saw some reference of links to a guide that you made in how to take a dumpfile (#32150).

can you explain in short word's what exactly dumpfile do i need?

there is:

screen off to screen on

unplugged to screen on

unplugged to current...

etc

how exactly do i set it in order to take the right one('s)?
[BetterBatteryStats] Mikahlo:
Nice. So this is a common thing. Thanks!
[BetterBatteryStats] DB126:
- believe this is the post you are referencing

- my preference is for screen off -> screen on

- following instructions in linked post will enable From/To spinners

- after waking device set the left spinner to 'Screen Off'; right to 'Screen On'

- then select 'dumpfile' from the BBS share menu

- practice a couple times to get the hang of it; ask questions as needed
[BetterBatteryStats] ajamxar:
Thank You Guys!!!

Your solutions worked! Im now getting ~1% drain overnight, with much better deep sleep and lesser wakelocks when sleeping.

Much appreciated...
[BetterBatteryStats] peterlee928:
glad to hear it! enjoy you new extended battery life ?

but confused on what your screenshots are supposed to represent... :confused:
[BetterBatteryStats] rcharliesam:
Getting some terrible drain. Have changed firmware, roms and still getting bad battery life. Can someone take a look at my stats?
[BetterBatteryStats] ajamxar:
Haha, thatz actually to show that the Awkae time when sleeping is much improved (from 40% earlier).
[BetterBatteryStats] Oswald Boelcke:
I apologise; don't have much time currently. But I know others are going to jump in.

Affirmative, poor drainage; device never went to deep sleep.

My initial observation:

Sensor: Significant Motion(13), wakeup=true, Time: 4 h 37 m 37 s

Sensor: Significant Motion(13), wakeup=true, Time: 30 m 2 s

Do you use Greenify or something else to get the device into doze?

Additionally, I assume your WiFi network cobtributes to the drainage. Was the dump taken while connected to your home network?

If affirmative, I suggest to assign afixed IP in your home WiFi router to your device and to switch in your device's WiFi settings from DHCP to Static IP.

Finally, I'd try to clear data and cache of Google Play Service - and reboot.
[BetterBatteryStats] rcharliesam:
Thank you for the feedback. Yes, wifi was on. The drainage happens when wifi off or on, but I understand that wifi will cause some drain. I will have to look in to the static ip assignment in the future. I don't currently use greenify or anything to get the device to doze, trying to resolve the problem at the moment instead of covering it up with an app. Also, I had previously cleared cache and data of google play services/rebooted before setting it aside for the six hours.
[BetterBatteryStats] DB126:
This 'feels' like a corrupt Google Play Services cache issue; see preceding post by [MENTION=7408621]noc.jfcbs[/MENTION]. Other thoughts:

- try disabling WiFi overnight (as a test); have a suspicion around switching data connections while travelling between defined APs

- consider disabling/dumping "My Verizon" app; very chatty and disrespectful of device state; otherwise verify it is not exempt from battery optimization

- also try flushing caches from device recovery menu (occationally helpful)
[BetterBatteryStats] rcharliesam:
Will do on the wifi, my verizon now gone. Have flushed caches on last rom (rr 5.8.3), RUU's in between (N to MM then MM to N) and with the installation of current rom (leedroid), but will clear again. Same for google play services as per noc.jfcbs' post.
[BetterBatteryStats] bigknowz:
For the past week unplugged stat doesn't reset after charging. Already reinstalled and set up again from scratch. Thoughts appreciated.
[BetterBatteryStats] rcharliesam:
Here's mine from last night. Wifi was turned off, but accidentally left bluetooth on. Still appears to be the accelerometer/significant motion issue.

I checked the sensor with a sensor monitor app, and the accelerometer appears to be functioning normally compared with other devices that I have. So I am somewhat relieved that it may not be a hardware issue. As for google play services and the possibility of corruption within the file... I don't have any option to uninstall updates, but I am wondering if there is a way to update it or uninstall/reinstall manually?
[BetterBatteryStats] ithorien:
Couple days passed, and BBS is finally working normal again. Have no idea what changed, I did not reinstall or redo anything else... I'll take it though.
[BetterBatteryStats] DB126:
Really no improvement; device never slept and pulled a fair bit of power while 'resting' with the screen off. Best course of action IMO is to reinstall the ROM. You could try a 'factory reset' if stock/custom recovery supports that. Really a tough thing to track down just looking at logs.

You can always flush Google Play Services/app/framework/etc caches; no need to uninstall updates. While there are multiple ways to accomplish this perhaps the easiest and most comprehensive is to perform a global cache flush from the recovery environment. Sometime this labeled dalvik wipe or something similar.
[BetterBatteryStats] rcharliesam:
If that is the case for google play services, than it is likely not the cause as I have cleared caches in twrp a bunch of times since first noticing the issue, same to be said for reinstalling rom/changing rom etc. Being that the issue has carried over different roms/firmwares I am very confused as to what would be the problem outside of hardware. Could a bad SD card possibly cause this kind of problem? Not that I know if mine is bad, but it is the only common add-on to the phone since the problem started.
[BetterBatteryStats] DB126:
Sure - anything is possible. You should jettison the SD card and SIM for a test run. Given the problem has persisted across multiple ROMs your issue likely with hardware, bootloader or kernel assuming you have tested ROM behavior before signing into Google and/or loading any apps.

Dumps show the device is modestly busy during screen off (elevated CPU) with no obvious culprits. That in itself is concerning. You'll need to do some local detective work to eliminate possibilities.
[BetterBatteryStats] Oswald Boelcke:
Adding to @Davey126's advice just above: How about a six-hours-idle dump in airplane mode?
[BetterBatteryStats] rcharliesam:
Thanks. I pulled the sd card after posting and still appear to be getting the same drain... I am going to pull the sim for now, clear cache again. If it does persist, I will RUU back to initial launch software/firmware and let it sit for a day with no apps or sign-in

---------- Post added at 10:26 AM ---------- Previous post was at 10:23 AM ----------

I can try that. If I don't end up starting over with the launch firmware/software, I will do that next.
[BetterBatteryStats] peterlee928:
have you tried uninstalling google play services updates... then reinstalling updates in google play store...then reboot.

it makes no sense, yet ive read accounts where this restored the phone to normal.
[BetterBatteryStats] rcharliesam:
I am not showing any installed update, just a greyed out "Disable" and a greyed out "Force Stop".
[BetterBatteryStats] peterlee928:
check in google play store
[BetterBatteryStats] rcharliesam:
The app doesn't show up when searched in play store/installed or "purchasable". However, I just found a side method to see it on the store with the deactivate button clickable..... get a message about it being a device administrator and needing to be deactivated as admin to continue... go to admin's, and it's not listed as an administrator. Bah.

Just dl'd the apk of the same google play services that I have installed and installed it over it to maybe correct the installation or anything that maybe be messed up in there. There is also a newer beta version that I may try to install if the drain continues.
[BetterBatteryStats] DB126:
Sharing for reflection/thought: in my limited experience a borked install of Google Framework or Play Services can not be sucessfully repaired through updates. Typically needs to go in fresh with the ROM. This is especially true with CM/LOS based ROM.

I also think this remediation path will be fruitless give the same behavior has been observed on multiple ROMs. What evidence is there that suggests this particular install is any different than previous attempts?

Flushing Google caches is a Q&D that often yields positive results. Surgical replacement is another matter.

Edit: stay away from betas; why add yet another variable to a muddy well.
[BetterBatteryStats] rcharliesam:
Edit noted. I get what you're saying regarding the issue being carried over from other roms, do you think full restore back to launch firmware/software and then accepting verizon's ota updates to current would be a wiser path to resolution in this case? I don't want to keep muddying up the thread with post after post on my part, so I will refrain from posting further until resolved.

Thank you for your input, it's very much appreciated.
[BetterBatteryStats] DB126:
Yes, If you feel confident in your ability to navigate that path without borking the device. Would first pull SIM to see if situation changes; have seen more than a handful of VZW SIMs go south with unpredictable outcomes.
[BetterBatteryStats] TNSMANI:
Sorry for being late to the party but my observations may not be different from the other observations.

It is the first time I am seeing such a confusing dump. Despite wifi being off, there are a lot of kernel wakelocks associated with it. Though you say that wifi was off, the dump shows wifi running the entire time. Battery , USB and charger also contribute a lot.

Where was the phone, on a bedside table or on the bed itself? Reason for the question is the very high significant motion sensor reading.

Did you clean flash the ROM, deleting internal storage also? I am unable to pinpoint a particular reason for the huge wakeup reading. May be a full clean flash of the stock ROM with stock kernel may help.
[BetterBatteryStats] rcharliesam:
Phone was on bedside table. I too noticed the WiFi activity on the log and it seemed of to me. The phone was on the bedside table with another phone next to it for my morning alarm.

I ended up going back to the launch software and took a couple of ota updates, everything seemed back to normal until I took the final mm update which I then noticed my rapid/quick charging went away again, and then took the nougat updates and after looking at my battery history on nougat, the phone didn't sleep at all while on the charger. I will take the final ota updates to see if anything got resolved through carrier updates and then just go back to the second to last mm software and possibly stay there or go to nougat from there.

edit - The issues persisted with the final nougat ota's. Reverted back to launch mm (quickcharge working again/battery holding), tried a nougat fw update then nougat rom, lost quickcharge and battery drain started again. On vzw, MM - 1.85.605.9 is where we lost the ability to root, I previously rooted on 1.85.605.8, so I wonder if there is something within that is causing the problem for me there and on later firmware. I had used a version of nougat previously that worked great up until this issue began for me, so I will have to try to recall what version I was using...
[BetterBatteryStats] SvEgiiVEteR:
CPU States reset

hi

2.2.2.0

Redmi 4X MIUI Global 8.2.0.2 MAMMIEA Android 6

Always reset the CPU States if I lock the phone, even for a couple of seconds

I tried all the recommendations that would befriend BBS and MIUI - does not help.

I tried as system app and root and settings MIUI for power saving turned off

Can tell what can be done?
[BetterBatteryStats] DB126:
OT for this thread - check in your device forum. BBS has nothing to do with setting/resetting CPU states.
[BetterBatteryStats] SvEgiiVEteR:
I asked - who does not say anything or does not know. Decided here as a last chance

Okay thanks, so here they do not know
[BetterBatteryStats] rocky78:
is that ok?

can you check it out and tell if that is good?
[BetterBatteryStats] DB126:
Excellent idle performance - no action needed. Enjoy your device!
[BetterBatteryStats] 7thelement:
Hi,

I've installed the BBS on non root S7, just giving permission to battery stat, but on alarms tab I have few positions like "android".

Is that becouse of non root, or this is some specific process without more information?

[IMG="bbs"]https://iv.pl/images/60772193420374842192.png[/IMG]
[BetterBatteryStats] brunolopes446:
There is something draining out my battery, which I can't figure out.

Dump attached.

Thank you
[BetterBatteryStats] DB126:
Dump includes 90 min of screen-on time invalidating idle analysis. Follow guidance below and repost.

https://xdaforums.com/showthread.php?t=1179809&p=72467976
[BetterBatteryStats] BARGORESC:
I clear cache and dalvik cache I did as you wrote but nothing helped
[BetterBatteryStats] DB126:
Persist wakelock from original dump is almost certainly related to WiFi radio or Wireless (Qi) charging curcitry; I'm leaning toward the latter. Thoughts:

- assume problem persists in airplane/flight mode

- have you looked to disable wireless charging (not all G3s have this feature)

- try powering off device (wait 5 sec before restarting)

- consider upgrading to Marshmallow via LG OTA which will score a refreshed stock kernel; flashing a different/custom ROM will likely use the same kernel

- if neither helps there may be a hardware fault with your device
[BetterBatteryStats] moi123:
EDIT : Reposted into correct thread
[BetterBatteryStats] merc1ful:
please. could someone check my dumpfile is everything normal or there is any excessive wakelocks? I attached 2 dump, one is unplugged and the other is screen off
[BetterBatteryStats] peterlee928:
key culprit is ssp wakelock. the linked thread below provides a couple of potential solutions: https://xdaforums.com/galaxy-s6/help/ssp-wake-lock-battery-drain-t3093221

no definitive answer based on my readings as to whether this wakelock is caused by a samsung-related app or something else. perhaps others may have more experience with this to provide insight as to the root cause.
[BetterBatteryStats] peterlee928:
to all the brilliant minds here - would it be too much to ask to take a quick peek at my idle dumpfile? i didnt see any bad guys in particular and the average drain rate seems perfectly acceptable. but would love to see if im missing something. ?

the only thing that jumped out to me was the netmgr wakelock. any insights as to what is causing this one... and potential to reduce/eliminate this wakelock (assuming it is a bad guy)?

much thanks in advance ???

idle dumpfile link https://www.androidfilehost.com/?fid=673368273298977790
[BetterBatteryStats] DB126:
Well, don't qualify for the position but will offer a few thoughts:

- average hourly drain rate is within expected range for Android 7.x

- screen-off wake time is a bit high but also characteristic of Nougat

- take note of low voltage drop; indicator of a happy/stable battery :)

- netmgr wakelock *may* be related to a 'Quality of Service' setting

- some report success with the following build.prop tweak:

persist.data.netmgrd.qos.enable=false

- unfortunately, I do not know the ramifications of this setting so can not recommend it; note a reboot is required to activate

- everything else looks good, at least by 80/20 (preferably 95/5) guide posts
[BetterBatteryStats] peterlee928:
if it gets the [MENTION=5488402]Davey126[/MENTION] seal of approval, then i am a happy camper ?

googling how to make a build.prop change with root explorer. figure i will give it a shot. if it causes probs, ill just reflash factory image.

thank you for providing your always insightful thoughts on my idle dump!! ?

EDIT

ok likely a super dumb question... but if i dont see anything in build.prop that resembles that edit, then do i just copy-paste that line into the build.prop? if so, can i slap it in anywhere? much thanks as always ?
[BetterBatteryStats] RASTAVIPER:
Just bought a new Oneplus 3T yesterday.

After I rooted it and installed all my favourite apps I left it last night after charged it at 100%.

The results: lost 2.8%/hour in 6:32 hours, which is a lot.

What can I do?