yashsingh1/xdaforums huggingface dataset:
[BetterBatteryStats] RASTAVIPER:
I face enormous number of wakelocks at my OP3T because of these:

*job.deadline*

*job.delay*

But I use only FB and Whatsapp from the apps mentioned above.

Are there any specific wakelocks that I can block, as in Amplify there are no such items to block.
[BetterBatteryStats] Portgas D. Ace:
Hmm, as said before, I haven't found a solution yet for those wakelocks, maybe [MENTION=1330150]chamonix[/MENTION] can help you out here. Some wakelocks are indeed a good thing, despite them having a large number, so don't just blindly assume they are bad because they have a large number.

I don't have those wakelocks on my device on a large scale, but on a side note I don't use FB, but its other app FB Lite. Maybe you could give this app a try and report back.
[BetterBatteryStats] RASTAVIPER:
Ok I will give FB lite a try.

What about messenger?

Unleashed by ONEPLUS 3T rooted
[BetterBatteryStats] Portgas D. Ace:
Don't know, haven't used Messenger at all. But from my experience in the past with BBS and other battery saving threads, it drains quite some battery. FB Lite also offers messaging, so I use this.
[BetterBatteryStats] jimbomodder:
If you mean FB messenger then you don't need it, you can message via the FB lite app
[BetterBatteryStats] RASTAVIPER:
But through FB lite are there notifications for new messages?

Or I will only see them whenever I open the app?

Unleashed by ONEPLUS 3T rooted
[BetterBatteryStats] rignfool:
I don't know too much about those...

But from what I understand... Those are job scheduler related wakelocks...

The job scheduler is supposed to que up a bunch of requests for wakelocks for various reasons... And fire them all at once... Rather than have them fire when originally requested...
[BetterBatteryStats] rignfool:
Now...

The important part of those wakelocks is missing...

We would need to know which apps are causing the job scheduler to go crazy...

If BBS is not giving you enough information... I would recommend [MENTION=7087071]GioBozza[/MENTION]'s wakeblock...

It's available in the play store... Caveat: you have to modify your services.jar or services.odex for it to work proper... But the app does it for you...

That app gives you almost too much information... But you'll see the individual breakdown for the wakelocks you're talking about
[BetterBatteryStats] jimbomodder:
If I remember correctly you have to open it, I could be wrong as im sure I blocked the notifications from coming though but I'm currently not on FB for a while

---------- Post added at 05:36 PM ---------- Previous post was at 05:34 PM ----------
[BetterBatteryStats] Portgas D. Ace:
You can set up push notifications within the app for new messages.
[BetterBatteryStats] Salty Wagyu:
Sorry for late reply. Here's the output:

oneplus3:/ $ su

oneplus3:/ # mntP=$(grep /sys/kernel/debug /proc/mounts | awk '{print $2}')

sh: awk: not found

127|oneplus3:/ # if [[ "${mntP}" != "/sys/kernel/debug" ]]

> then

> mount -t debugfs none /sys/kernel/debug

> fi

Something about awk not found
[BetterBatteryStats] hawkdown77:
Hi, why my deep sleep reference wasnt created? What should i do? Im root and using miui 8 global stable.
[BetterBatteryStats] loginsvarios:
That's it!

Sir, you hit the nail!

It seems that the problem is directly related to the fingerprint sensor. I've been testing the phone for a few days with the fingerprint unlock disabled and, for now, the phone goes into deep sleep without issues.

Now I need to figure how to disable that feature only when the phone needs to "sleep" and re-enable when it awakes...

Maybe with Tasker? Any ideas?

Let me thank you again for your help!
[BetterBatteryStats] DB126:
Wow - I'm humbled. Was taking semi-educated guesses at dusk. Very happy you are on the path to addressing this annoying issue. Thanks for letting the community know; undoubtedly your post will help another member.

As I recall your device is running a Lollipop (Android 5.x) based ROM. If accurate you can install Xposed Framework and an automation module like Xposed Edge. Or you could try MacroDroid which does not require Xposed. Tasker should also work but it has steeper learning curve. In the end you may find it easier to set up a couple widgets to disable/enable the fingerprint sensor.

Also check for an update from the device vendor; might have been fixed in a later release. Your device forum/thread is another good resource.
[BetterBatteryStats] Spinvis:
I am experiencing this exact same issue, tried it on my Note 3 across different ROMS (LOS, RR with SuperSU / Magisk) had to eventually uninstall it since it is not reliable at all anymore. It started happening after upgrading to N if i remember correctly. And now on my brand new Oneplus 5 (stock ROM with Magisk) i am experiencing the same issue again, BBS works for a couple of days and then stops. The only thing i found that helped was to uninstall and reinstall but the problem occurs again after a couple of days. If it actually eventually opens then the stats are all wrong, if it doesn't open it just keeps on hanging until you have to force close it. I also downgraded to 2.2.1, 2.2.0, but the problem occurs there as well.

[MENTION=1330150]chamonix[/MENTION] is there anything you need from me to troubleshoot this further. I love BBS and have been using it since the beginning but if the app is not usable i will uninstall it again.
[BetterBatteryStats] DB126:
Quick suggestion: exclude BBS from battery optimization. While this shouldn't be necessary it may help [MENTION=1330150]chamonix[/MENTION] issolate the issue.

Although not a robust as BBS you may find GSAM a reasonable stand-in. I use both (usually not on the same device) depending on owner and application.

Magisk may also be culpable. We've all see reports of various anomalies with Magisk and SuperSU - some more credible than others. Something to keep in mind.
[BetterBatteryStats] Spinvis:
Forgot to mention, it already is excluded from battery optimization. Thanks, i will check GSAM out.
[BetterBatteryStats] hawkdown77:
I need install BBS like system app to works correctly? Cause my deep sleep stay only 0,0%. Im using redmi note 3 stock miui 8 Android 6.0.1 global stable and kernel stock.
[BetterBatteryStats] Limakos:
It's no longer required to install it as system app. If your phone is not rooted you need to follow instructions in 3rd or 4th post in this thread.
[BetterBatteryStats] hawkdown77:
But my phone is rooted..... anyway BBS is not working like it should.... it stay 0,0% in deep sleep status..... WHat should i do??

Im using lastest version.

Thank you.
[BetterBatteryStats] Oswald Boelcke:
By "it stay 0,0% in deep sleep status....." do you mean that the phone doesn't sleep at all?

Just to have a look if this is really the case and probably to see any culprit, please take a idle dump in accordance with this recommendation.
[BetterBatteryStats] Roman91:
I'm on last pa android op3 .. The phone is rooted, but no allarms at all ..ideas?
[BetterBatteryStats] hawkdown77:
Awake status (screen of)....whats de best value?
[BetterBatteryStats] TNSMANI:
Best value is "0". However it is not achievable. So it should be as low as possible.
[BetterBatteryStats] hawkdown77:
Please, can help me? This is my dump. What can I do to improve the battery?

Thank you
[BetterBatteryStats] DB126:
There is nothing in this idle dump that suggests changes are needed. 0.3%/hr average drain (2-3% loss over 8 hours) is excellent. Enjoy your device.
[BetterBatteryStats] hawkdown77:
But my wifi was off..... if i turn on it drain more.... its normal? I will take another dump this night with WIFI on and will post here.
[BetterBatteryStats] DB126:
Sometimes yes, sometimes no. Depends on the device, signal strength(s) and several other factors.

Why do you care? Disable WiFi radio at night and profit. I rarely enable WiFi on my mobile devices unless installing large apps or consuming video content.

I realize data plan size can be a concern for some but most devices consume little while 'sleeping'.
[BetterBatteryStats] hawkdown77:
Hum... i have an email notifier, etc.... but anyway i will try this night with WIFI ON.

Thanks for help me.
[BetterBatteryStats] fossils-n-dents:
Wrong info, i shall return....
[BetterBatteryStats] BlueLightning09:
Trying to optimize my device battery life

Hi! Good evening.

I have a Nexus 5 with almost four years of usage. Currently is unlocked and rooted, running Pure Nexus 6.0, with ElementalX kernel and with most of the Extreme Battery Life Thread(Greenify+Amplify+Power Nap) settings that are available.

I'm trying to optimize my battery life, could you help me to identify if there are issues in the energy consumption. Here are the files required by the OP. For some reason, I can't find the "attach file" option, perhaps because I just registered. Here are the files on my google drive.

BetterBatteryStats-2017-08-30_141726561.txt

dmesg-2017-08-30_141727058.txt

logcat-2017-08-30_141726854.txt

Thanks in advance.
[BetterBatteryStats] peterlee928:
gonna need an idle dumpfile per these instructions https://xdaforums.com/showpost.php?p=72467976&postcount=32150
[BetterBatteryStats] Perseus:
I can't see the files due to firewall issues. Can you pm me the contents of BetterBatteryStats-2017-08-30_141726561.txt since you can't attach it here ? Mind you, Don't paste the Machine readable part of that file. Perhaps you might be able to attach the file to a PM ?
[BetterBatteryStats] BlueLightning09:
Can't see the option either. Can I upload it to another cloud service that you are enabled to use?

EDIT: Let me review the file, to send you the relevant info in text.

---------- Post added at 09:47 PM ---------- Previous post was at 09:30 PM ----------

I'll also will do that as soon as I can. Thanks.
[BetterBatteryStats] Perseus:
when you do Idle Dump, make sure to charge fully, unplug restart for good measure and leave it alone for at least 12 hours. No listening to things with screen off.

The log you sent me is barely 3 hours. That's not very useful at all. what limited I do see

1. Set WiFi to be on when plugged in only. This is set in advanced wifi settings.

2. You appear to have spotty Data Connectivity. Hence the ask above to reboot.

3. What do you have going on with Bluetooth ? Can you turn that off when doing idle dump ?
[BetterBatteryStats] BlueLightning09:
I followed the instructions of the original poster:

I counted the time, perhaps there was a problem with the app, since I measured for four hours.

For your bluetooth question, I have a Pebble watch currently enabled. Since it is required 12 hours for the dump file, I will disable it too.
[BetterBatteryStats] emperor8696:
Can someone analyze my dump file? My phone is consuming ~1% battery per hour.
[BetterBatteryStats] DB126:
12+ hours is not needed; 4-6 hours (prefer 6) is more than sufficient. Nor does idle monitoring need to start when the device is fully charged if the

procedure posted by [MENTION=6089972]peterlee928[/MENTION] is observed. In fact, results are often more accurate (certainly more repeatable) when starting at a charge level other than 100%. Finally, don't disable/disconnect your Pebble watch or any other peripherials unless that is your long term intent.

The objective of generating an BBS "idle dump" is to assess how your device is performing at rest in a normal/typical configuration vs. an artifically state with radios/sensors disabled. Same for duration. 4-6 hrs is usually acheivable given typical human sleep patterns.
[BetterBatteryStats] emperor8696:
Hey, can you take a look at my dump file to see if there's something odd about my phones power consumption when idle?
[BetterBatteryStats] DB126:
Device was 'awake' for ~75% of the monitoring window (~4½ of 6 hours). The dump offers a few clues to the source, none of them definative. That said, me thinks WhatsApp may be the culprit. Try disabling for a few hours to see if idle performance improves. If so there are various strategies for reining in the bad behavior.

There are also indications of network issues that are a bit more challenging to track down/remediate. Let's see happens with WhatsApp before going that route.
[BetterBatteryStats] Drakones:
W,afgazYqafzztd,t€t

Inviato dal mio A0001 utilizzando Tapatalk
[BetterBatteryStats] BlueLightning09:
OK. Could you give me instructions on how to perform a more accurate dump file for better results?

As I understand:

- 6 hours of phone inactivity.

- Keep the functionality that I use while idle (In my case, bluetooth and data connectivity)
[BetterBatteryStats] DB126:
Looks like the link didn't take (sorry): https://xdaforums.com/showthread.php?t=1179809&p=73602615
[BetterBatteryStats] Oswald Boelcke:
Davey126, we all know that you're the greatest one in saving juice; I mean that absolutely honestly. Please don't be so shy that you link to a post, which contains a link to your superb procedure how to take a dump.;):D
[BetterBatteryStats] DB126:
I see you received my check...and cashed it! :)

A controversial woman of politics in my country penned a tomb entitled "It takes a Village". Regardless of whether you subscribe to her views (many do not) the over arching principle remains sound. Many hands make short work with each contributor bringing a different perspective to the table. That's the beauty of XDA and similar communities (sans 'fanboys' who paint life with a limited pallet).

tl;dr: Thanks to everyone who helps out in these forums. A great group of coleagues!
[BetterBatteryStats] BlueLightning09:
Oh! Thanks! I'll do that as soon as I can.

EDIT: Quick question. The watchdog settings are default?
[BetterBatteryStats] shaggyskunk:
Speaking of taking a..... ?

From Down the Rabbit Hole by:

My SM-G930W8 ??
[BetterBatteryStats] emperor8696:
I've tried to disable whatsapp and line (another quick messaging app) through forcedoze and it doesn't seem to resolve the problem. I still get a 4% drain in 3 hours.
[BetterBatteryStats] rjm831:
I apologize in advance for this question, but I've tried reading the thread info & am too noob to understand..

I've a rooted (Kingroot) Logic X1 w/stock rom & 4.2.2, BBS has root permissions but says SELinux n/a. So I get no kernel wakelock reading.

What can I do? Please point me to proper thread if there is one. Thanks!
[BetterBatteryStats] DB126:
Drat - was hoping that would be a quick fix as other paths are not as inviting.

[While not a regular ForceDoze user I don't recall it having an option to fully disable an app. ForceDoze appears to be a recent add to your app portfolio; didn't see it in your original dump. Careful not to aggravate the situation by throwing tools at a problem that may introduce new issues and complicate resolution.]

Let's assume for the moment that it is not a messaging app...or any app for that matter. That leaves three less attractive but still plausible options:

- Google Play Services is borked

- a hardware sensor is keeping the device awake

- kernel is corrupt

Sometime clearing Google's cache can fix persistent wake locks/time:

- navigate settings->apps->Google Play Services

- click storage->manage space (or just manage space)

- select "clear all data"

- reboot

Any difference?

Edit: next stop is fitness and/or fingerprint sensors.
[BetterBatteryStats] emperor8696:
Hmm, I'll list some major changes I've done to save my battery. I hope you can trace the culprit from here:

-Installing greenify and greenifying my quick messaging app. I also enabled shallow hibernation.

-Installing 'enable doze for google play services' module for magisk

-blocking some wakelocks and alarms when screen is off from the ROM built-in wakelock blocker: nlp_wakelock, nlp_wakelock_locator, alarm_wakeup_activity_detection, alarm_wakeup_locator.

-installing force doze, enabling it with built-in settings

I don't have any fitness tracker on my device though, but my phone does have a fingerprint scanner.

By the way, I have also cleared data for google play services. I think I am going to provide another dump file.

Thanks for helping anyway.
[BetterBatteryStats] DB126:
Sure, not going to chase a moving target. Realize you are trying to resolve the problem and hope for positive outcomes. The best learnings take place through self-help, trial and failure and ultimately success. That said, several actions taken are not indicated by the previous dump (eg: limiting location services wakelocks) or counterproductive (eg: shallow hibernation). Let data drive actions verses the presence of knobs and dials. Good luck.
[BetterBatteryStats] githyanki:
Shallow Doze really messed up my phone. You may want to turn it off.

The doze of Google play services delayed messages for me, so I stopped using it. Really seemed to help battery life though.
[BetterBatteryStats] -Arturo-:
Good afternoon Gents.

I'm having some battery trouble. Pretty much I lose close to 4% battery charge per hour with screen off.

Could someone take a look at the dump file and shed some light on potential causes, please.

Out of 4,5 hours I have 40ish minutes of phone being awoken with screen off.

I have both google's doze and Greenify active with WIFI,data , bluetooth switched off when display is off.

In kernel wakelocks list I see MSM_hsic_host and Powermanagerservice.wakelocks both having 30ish minutes of total run time.

What could be the problem?
[BetterBatteryStats] DB126:
Dump contains 19+ min of screen-on time making it unusable for idle analysis. The latter is the starting point for identifying power management issues. Try to capture another dump using the approach outlined here. That should eliminate the unwanted screen-on time.
[BetterBatteryStats] githyanki:
You have about 20 minutes of screen on time in your log., and almost 7 minutes of phone use. Please make a new dump with less than one minute of screen on time, and no phone calls. Preferably over a 6 hour period also.

Thanks
[BetterBatteryStats] -Arturo-:
Ok guys thanks. Will recharge it and leave it running overnight. Will post a new dump file when it's ready.
[BetterBatteryStats] Haswell4200:
Hey guys. I just installed this on my rooted Galaxy S8, snapdragon version. I have it installed as a system app and it has root privileges and everything. However, when I try to view general, or partial wakelocks, it says that no stats have been selected. I have watchdog enabled as well. Did I miss something? I'm confused because I had it working fine before I rooted.
[BetterBatteryStats] DB126:
No need the install as a system app. Move it back to user space, reboot and then give it a couple hours for data collection.
[BetterBatteryStats] kevindd992002:
I installed this on my Galaxy S8 as I really need help in determining which apps are causing high battery drain on my device. I already followed the instructions in using adb to have the software working on a non-rooted device. My question is how do I even create a dumpfile? I read the initial posts repeatedly and cannot find anything that instructs me on how to create a dumpfile. I pretty much have the default settings. Please help. Thanks.
[BetterBatteryStats] DB126:
You already have several tools on your S8 to monitor app/battery usage:

- battery panel under settings

- memory panel under settings

- running services under developer options

BBS goes a bit deeper. First step is to create an idle dump following this procedure; attach to future post for analysis.
[BetterBatteryStats] kevindd992002:
Thanks. I was trying to follow your procedure and stumbled in some roadblocks.

Before I slept last night (gmt+8 timezone), I plugged/unplugged my device and only gad around 77% batt left and now it still has 68%. Your guide says to start from a 95%-charged batt. Is this step important even though my device has enough juice for staying at idle anyway?

Also, why do I need to set the FROM reference to screen off and the TO reference to screen on? When I checked it earlier, that time range is like just 4 minutes. I thought it was supposed to be FROM unplugged TO current?

Here's the dumpfile anyway:

https://www.dropbox.com/s/3ot9ardzuuk4xli/BetterBatteryStats-2017-09-06_084654192.txt?dl=0

---------- Post added at 08:58 AM ---------- Previous post was at 08:48 AM ----------

I figured I also post the unplugged to current dumpfile. Here it is:

https://www.dropbox.com/s/a3jhnajsjvgyybc/BetterBatteryStats-2017-09-06_085655891.txt?dl=0
[BetterBatteryStats] DB126:
Quick responses:

- monitoring period can begin at any battery level provided device has sufficient juice to make it through the run (6 hours)

- first dump (screen off -> screen on) is only 14 min in length; 4-6 hours is needed to analyze behavior while device is idle

- second dump contains ~30 min of screen-on (active use) time which distorts the data making it unusable for idle analysis

Best time to catch a dump file is while you are sleeping. Once awake (with a cup of java) unlock the device, fire up BBS, set the references as instructed (screen OFF and screen ON, respectfully) and then save the dump file. This will effectively capture all device activity while you were sleeping minus any activity while you were unlocking the phone and capturing the dump file.
[BetterBatteryStats] kevindd992002:
The first dump was taken after I slept, so overnight. Around 4.5 hrs or so. I thought the 14m screen off to screen on time is normal because all the time I was sleeping the screen was off and then when I woke up I turned the device on and used it for 14 mins and took the dump. Wouldn't screen off to screen on time be longer if used extensively? Sorry, I'm confused here.

Edit: Oh wait, I think I got it. So the screen off reference starts when the screen STARTS to turn off and then the screen on reference when the screen starts to turn ON. What you're saying makes sense now but ehat I don't understand is why is it only 14 minutes? Probably because I turned the screen off forcefully before taking the dump (I forgot)?
[BetterBatteryStats] DB126:
Hum...doesn't jive with the data submitted. Give it another whirl tonight. Hopefully will get a good dump. Keep in mind the objective: BBS dump should only include the period where your device was not in use with minimal 'screen on' time (<1 min).
[BetterBatteryStats] kevindd992002:
Gotcha! I'll do it again tonight. Thanks for the help!
[BetterBatteryStats] -Arturo-:
Ok guys new file attached. Seems like something has kept my phone awake for more than an hour.
[BetterBatteryStats] Oswald Boelcke:
I guess it's the same as in your post of 2017-09-04: MSM_hsic_host. Here's some more information regarding this kernel wakelock (a bit old but I'm convinced still valid).
[BetterBatteryStats] fossils-n-dents:
Wakelocks: Swiftkey & Textra are known battery hogs, find replacements. Zegar, TV show Favs, Sklep, Kontakty, IKO, ect should be disabled, then create an idile dump without them enabled. Process of elimination is needed, as you have many, many apps checking into your battery in the backround.

Kernel Wakelocks: msm_hsic_host (): 1 h 1 m 25 s Cnt:(c/wc/ec)1755/357/0 15,7% This may be your main culprit. You should try a different kernel, create a backup first. Read this...http://xdaforums.com/showthread.php?t=2155461

You should also try turning off location, sync (If possible)), and Bluetooth when not needed. I see you use Disable Service. PM me, and I can give you a few tips to safely squash certain background processes (In each app) if you wish.

I personally use ForceDoze for it's option to kill all motion sensors during Doze. It works.

Overall, it looks like Android is behaving in a manner consistent with tons of apps present, and all device features enabled.