yashsingh1/xdaforums huggingface dataset:
[BetterBatteryStats] docslate:
Newbie needs some advice

I am about 1 week into BBS. Seem to have 1 of 2 situations. Either I have acceptable, not great battery use with limited awake times which seems to persist most of the day.

On other days, I burn through battery more quickly with awake times approaching close to 100%. Can't seem to isolate the cause despite similar active usage.

Enclosed is log.

Sorry if this situation was answered but I couldn't find it when searching forum.
[BetterBatteryStats] chamonix:
I confirm, that wakelock is either on when screen is off and you listen to music or overlapping with screen on for any kind of notifications or key sounds.

To sum it up, can be ignored as not a root cause
[BetterBatteryStats] Clarkkent434:
On ICS SDM Partial wakelock of Android system. Its going through 99% of my battery.
[BetterBatteryStats] mattallica76:
Yes, it seem that turning off touch input sounds has reduced the wakelock greatly. Puzzling to me as I still don't understand how touching a couple of keys can cause all that wake time.
[BetterBatteryStats] Clarkkent434:
I turn my off on my Galaxy Nexus I don't get the Audio out drain at all. I don't understand how vibrating keys could cause so much drain.
[BetterBatteryStats] chamonix:
Post a dump please
[BetterBatteryStats] jonny68:
Thanks for latest updates chamonix i purchased this app a long time ago and it gets better and better.;)
[BetterBatteryStats] chamonix:
Believe me, I always have a handful features to be implemented.

To name a few:

- feature to show the awake / sleep ratio during last screen off period as a widget, with drill down

- timed logging (automatic snapshots) with drill down

- overview screen for a faster analysis

- usability

- causes of network traffic (svnet) in the hope that the code in android was fixed as this feature was buggy
[BetterBatteryStats] Clarkkent434:
Here you go. If you look it is at 105% of Partial wakelock of Android system are SDM Partial wakelocks.
[BetterBatteryStats] betoNL:
Fast Dormancy

So...for battery efficiency...disable or enable it?

How can I check if my Provider supports it?

Googling for it didnt help ...gonna try the KPN forum again

Or shall I disable it anyway to make sure?
[BetterBatteryStats] bojler:
great app! but i would like to have option to disable betterbaterystats service when i don't need testing battery. i solved my drain but i dont want to uninstall this great app, because someday i might need it again. but until then (appearing of new drain) i would like to have service disabled. (as i have older phone)
[BetterBatteryStats] chamonix:
Starting from version 1.6.1 there is no service anymore because I found an alternate design so the code was deleted (not that it consumed any resources)
[BetterBatteryStats] pilililo2:
Phone not going to deepsleep

Well im looking for help please can someone tell me what is keeping my phone asleep and how to fix it :confused: thanks all

Sent from my badass Samsung Galaxy SII :)
[BetterBatteryStats] dejanxxxx:
Ok, understand. Thanks.
[BetterBatteryStats] Againstt:
I have clean flashed multiple times on two different RR roms and now cleared app data, no difference :/
[BetterBatteryStats] patrickdrd:
not on flight mode though,

wifi and mobile data should be turned on
[BetterBatteryStats] dejanxxxx:
Ok, phone dont been on flight mode. Wi fi only been turned on, I turn on and data.
[BetterBatteryStats] gvelev:
[MENTION=4138220]fossils-n-dents[/MENTION] My new log with wifi off while sleep
[BetterBatteryStats] Oswald Boelcke:
Just for information: On our both Samsung GT-i9305, all Firebase services and broadcast receiver are disabled in all applications (both system and user) without any implications to functionality and expressively not regarding reception of GCM notifications; however, please be aware that both phones are GApps-free and working with microG.
[BetterBatteryStats] patrickdrd:
ah, maybe that's the reason!

I told you, I found out by testing live with inoreader

(forcing push mobile notifications from my laptop using a web browser),

that FirebaseInstanceidReceiver is needed,

when I disabled it I wasn't getting them, when enabed I did!

I've got google play, google play services, maps, etc though,

maybe because it seems that firebase notifications are google dependent:

https://firebase.google.com/docs/cloud-messaging/

so, I decided to leave all FirebaseInstanceidReceiver in "broadcast receivers" alone,

I don't how this is implemented in your case when this or similar apps install,

do they find another route or you don't get them at all?

I don't know (yet..)

However, cloud notifications I would say are "problematic" because I've got 2 mobile devices/phones and

I have to receive them in both each time in order for them to get synced,

I wouldn't say that's the best implementation obviously

edit: I think I understood what's happening:

just saw some apps implement GcmReceiver (e.g. Skype),

so you should be getting that way your notifications,

but I'm not that sure that any app has GcmReceiver included,

e.g. Inoreader I was talking about doesn't,

so you got to have FirebaseInstanceIdReceiver enabled

in order to receive them
[BetterBatteryStats] fossils-n-dents:
I have the same 'Wi-Fi Always Running' even though it's disconnected problem also. It's a new issue for me, I don't know the cause of it. But, it does not affect the device.

*Make sure ForceDoze and Greenify is set in 'Power Options' as 'Do Not Optimize'. Settings> Power> Battery Optimization> Do Not Optimize. My apologies for not clarifying.

Wakelocks: Your fitness app and Facebook (Is killing you). Google Quick Searchbox (A known battery drainer), are the top offenders. With Twitter close by. I personally deleted FB, and use my browser, and disabled Google Quick Searchbox.

Kernel Wakelocks: 'fpc_ttw_wl' -Try enabling 'Pocket Protection' on your device to disable the fingerprint scanner to remove this wakelock.

'wlan_rx_wake' -This is a wakelock caused by network traffic. The easy solution would be to just turn off Wifi, but be careful doing so! If an app goes to sync and it sees that Wifi is off, it will search for a mobile data connection (which causes the ConnectivityService wakelock). This wakelock can also, deceptively, be caused by the Wifi network itself as it refreshes connections or refreshes IPs.

You can try reseting (Turn off/ on) the Wi-Fi modem/ router, switching networks (2.4GHz- 5GHZ), setting up a static IP address for your device, or auditioning Franco Kernel which does pretty well with this wakelock *Always make a backup before switching kernels..

'IPA_WS' -An emergency broadcast wakeup. Turn device comepletely off, then reboot (Temporary fix), or audition Franco Kernel which disables this wakelock completely. But let's not touch that right now.

Let's try another run without FB and Google search Box.

As far as I can tell, something is keeping your mobile data connection open 'bam_dmux_wakelock'. Your device sleeps very well yet seems to have a glitch. Network traffic may be an issue.

You could try disabling Deskclock (Or checking it's update frequency) and see if that provides some relief. Try clearing data in Google Play Services, rebooting to recovery and clearing Davlik/ Cache. With Lollipop, there may be an older kernel that addresses these issues, I'm not sure. You may be able to find an Xposed Framework/ Amplify solution.

*Always make a backup before switching kernels, or installing Xposed framework.

If all else fails...Reflash your rom. I'm sorry I could not be of more assistance.

I'm running stock GAPPS with all Firebase removed, and in every app, disabled with no problems. I'm even running (Testing)

[MENTION]pactrickdrd's[/MENTION] tips. So far...all is well.

You have a more 'Exotic' configuration. Most users are dealing with the basic Android setup. You're the first to have an untoward experience with Firebase I am aware of.

Also, by prodding around in 'Activity' and 'Content Provider' in MATPro that you made me aware of (An excellent find), I was able to make Words With Friends totally ad-free, with no ads between moves. Through your research, I can provide a comprehensive disclaimer should I post your findings after my testing.
[BetterBatteryStats] gaich:
Does anybody know what leds wakelock can mean? On the phone that has no LED indication at all, even the navigation keys aren`t backlighted! It`s the second time I encounter such a problem, last time, if I remember well, I cured it with cache and dalvick wipes, but there should be some reason for it, the phone didn`t go to sleep all the night, working at 1,04 GHz. Any ideas?

View attachment BetterBatteryStats-2017-10-03_070037429.txt
[BetterBatteryStats] fossils-n-dents:
Cause: Poor rom quality.

'leds wakelock' may become temporarily cured due to a reboot, but may return when a notification is recieved.

Possible fixes:

1. Disable all LED notifications from within your device settings.

2. Try Notification Light Widget from Play Store.

3. Find a rom that disables LED notifications.

4. If you are adventurous...

Use Apache's "SQLite Editor" to enter the database, and edit the registry...

/data/data/com.android.providers.settings/databases/settings.db

Once inside the database you have to access 'System' and edit the registry entry 'notification_light_pulse', set it to 0 (Disabled) and save it. Restart the device. To re-enable, follow the same procedure, set to 1 (Enabled).

Downside: No LED notifications. Upside: Device sleeps properly (Unless you have other issues).

*Always make a backup before changing roms, or operating SQLite Editor.
[BetterBatteryStats] gaich:
Sorry, as I said earlier, this device has NO LED, no led notifications either. Phone's construction doesn't include LED at all.
[BetterBatteryStats] fossils-n-dents:
Given that you have no LED, you may have a rom that carries instuctions for LED. Maybe the upgraded model for your device that has LED shares the same firmware as your device, or the same rom is in every device. A cost cutting measure possibly.

I would treat the situation as if I have an onboard LED, and try to disable it anyway, since the wakelock for LED actually exists, and actually suspends your device at 1.04GHz in the abscence of a physical light, and the system can't seem to figure that out. Applying logic may not work here.

Try Notification Light Widget.
[BetterBatteryStats] gaich:
Well, thank you, I relly appreciate your intent to help me, I'm in touch with my ROM developer, it's the only rom they have, I will ask them about the leds thing.
[BetterBatteryStats] dejanxxxx:
Here my dump file. Not possible that screen on after wake up phone working 3m 22s. I make dump file when wake up phone, go on app and save dump file. I hope that is good dump file.
[BetterBatteryStats] TNSMANI:
Your statistics are totally messed up. There is no way a phone which had so much of network (internet) activity drained so less. Also according to the stats, your phone was charged while you were taking this dump. I have never seen such a long networks stats list in my life.

Force stop BBS, clear its data and cache and then uninstall it. Reboot preferably wiping dalvik cache and cache and then re-install BBS and grant the necessary permissions to it using adb. Reboot and charge your phone to 100% and let it idle for 6+ hours and then save a fresh dump and post it here. Hopefully it will show the correct values at that time.
[BetterBatteryStats] dejanxxxx:
Belive me, i chracg on 100%, in 8:15am today, I unplug device and dont touch phone. I awake phone in 2:15 pm today. Dont touch and charg belive me. I do how you say.
[BetterBatteryStats] fridrik:
It is a bug?

[emoji7] [emoji23]

Enviado de meu Xiaomi Mi5 usando Tapatalk
[BetterBatteryStats] fossils-n-dents:
Yes, something is off. Follow these steps provided from post #33006

ADB permissions not required if you are rooted. Just follow the uninstall/ re-install, and idle log posting procedure.
[BetterBatteryStats] fridrik:
But it was the cell phone that had caught up with 62%. After a lot of the hours that dropped to 61%

Now is all ok.

Sorry for my english.

Enviado de meu Xiaomi Mi5 usando Tapatalk
[BetterBatteryStats] Mister_Diamond:
Hi @fossils-n-dents

this time, after 12 hours of idle (while I didn't doing nothing: I've left the phone alone) I've lost 10% of battery. The phone was set to DND mode.

Deep Sleep (): 11 h 16 m 30 s 90,0%

Awake (Screen Off) (): 1 h 14 m 35 s 9,9%

Level lost [%]: Bat.: -10%(72% to 62%) [0,8%/h]

Voltage lost [mV]: (4003-3918) [6,8%/h]

One of the main culprit, looking at the BBS log, seems

GCM_CONN_ALARM (Google Play Services): 3 m 46 s Count:438 0,5%

but especially

alarmtimer (*api*): 1 h 4 m Cnt : (c/wc/ec)1924/0/0 8,5%

I attach the BBS log, maybe is more clear :)
[BetterBatteryStats] rohitdave:
I think the best way of avoiding all these wakelocks and alarms is to go completely Google free.

Just install MicroG.

Works great for me.

Use Yalp store and FDroid instead of Google play
[BetterBatteryStats] fossils-n-dents:
It seems Whatsapp has gone into overdrive. It woke your phone 32. 8 times per minute (Alarms) Your main culprit.

Ryosoftware Notifications Manager checks in second with 5. 4 wakeups per minute. (Alarms) Your main culprits' sidekick.

Google Cloud Messaging is doing it's job properly while handling heavy duty cloud messaging from Whatsapp, Ryosoftware Notifications Manager, Hangouts, and Calendar. Your device is not broken.

Here's how it works...lots of messaging/ push notifications will increase GCM stats (Naturally), Google Play Services is a middle-man for all activity between the app and your device. Gcm, gms, packagemeasurement, net scheduler, ect, coming from the (GCM) GcmNetworkManager, which schedules network-oriented tasks so that Google Play services is able to batch network operations across the system. This will make Google Play Services stats increase, and Android System will work harder trying to make sense of it all. *net_scheduler* should decrease once you get a handle on the messaging/ push notification rate.

Solution(s)

1. Remove/ disable any and all apps you do not need/ use. Ease the load on your system.

2. WhatsApp: Force Stop> Clear Data> Uninstall. Upon Re-Installation, lower notification frequency within app settings.

3. Is Ryosoftware Notifications Manager really needed? If so, Force Stop> Clear Data> Uninstall. Upon Re-Installation, lower notification frequency within app settings.

4. Update Google Play Services. (Unless already updated).

5. Clear Cache/ Data in Google Play Services Framework (May be a temporary fix, can't hurt trying).

6. Use Greenify.

When done...

7. Boot into your devices' Recovery Mode. First power off the device. Hold the 'Up' volume button, then hold the 'Power button. While holding both, it should boot into device recovery mode. While in recovery, wipe 'Davlik Cache' and 'Cache' 5 times each...reboot.

Try another idle run at your convenience. There is not much we can do without root.
[BetterBatteryStats] Mister_Diamond:
Thank you, again, for your detailed answer :good:

Some consideration:

Ryosoftware Notifications Manager is really needed because leave me able to customize the color of led for every application, and I also mean that there are apps which doesn't allow this; furthermore this app is able to repeat notifications.

I have a license of GreeniFy (I've bought it on the playstore) but on such phone is not installed; by looking at the lst BBS log, what would be good to greenify? I heard that if I greenify whatsapp I will not receive its notifications..

However I followed all your advices about the uninstallation/reinstallation/cache cleaning; tomorrow I will check again the BBS log hoping that such battery drain will not occurs again :)
[BetterBatteryStats] fossils-n-dents:
Ryosoftware Notifications Manager will lead to excessive device wakeups just by repeating notifications. However, it is a necessary evil for you.

My personal (Paid Version) Greenify settings...

Shallow Hibernation, Automated Hibernation, Greenifying System Apps. I don't 'Hibernate' any individual apps, but you can experiment so with those you rarely use. 'Greenifying' is to stop an apps background processes until the app is called on by the user. Make sure you select 'Do Not Optimize Greenify' in your devices' Power Options.

You are operating at 0. 8% /h drain. That's pretty good considering what you have going on. An ideal target is 0. 5% /h, but any drain under 1. 0% /h is okay.

P.S. Get WhatsApp under control.
[BetterBatteryStats] skiely666:
I can't seem to get any stats ever since N & now O. Any help would be great?

Pixel XL stock rooted magisk 14.2

Thanks
[BetterBatteryStats] fossils-n-dents:
Have you tried using the Magisk Better Battery Stats installer?

https://xdaforums.com/apps/magisk/collection-magisk-modules-t3445257
[BetterBatteryStats] skiely666:
That thread is closed & that module is out of date & doesn't work but you are right but the way to do it now is with the app systemizer module, for some reason it's not working. I'll hop over to magisk thread & see what's up..

Thanks anyway..
[BetterBatteryStats] ipredatorv:
How to get WhatsApp under control, may I ask for your advice? Or WeChat, for that matter?
[BetterBatteryStats] fossils-n-dents:
I was alluding to lessening push notifications within the WhatsApp settings (Or WeChat). But, if you are heavily into social media, don't worry about it.
[BetterBatteryStats] MACHEK:
This to me doesn't seem normal. I did a dump before and was told basically that my phone sleeps well but look at all this activity during sleep, is that to be expected? Or should I do another dump?
[BetterBatteryStats] fossils-n-dents:
The graph seems to represent background activity before device first enters light doze from 100% to 99%. At 99%, device enters light doze. At 99% to 98%, screen is active, plus background activity breaks Light Doze.

Device enters Light Doze again...

Then the phone came on 98% to 96%, breaking Light Doze, leading to more background activity/ battery use.

Just as it re-enters Light Doze...the phone comes on again, opening up more background activity and battery use (96% to 94%). Once left untouched, the device enters normal doze fully at 93% (I'm estimating percentages).

Each break in Light Doze ( Phone usage, Sensor usage, Screen On or Dim) means the system will take advantage to do tasks, re-enter Light Doze again, and use battery on the way to full Doze where maintainence periods are spaced out to save power.

This device was never allowed to pass from Light Doze to full Doze in one pass, due to restarting the Light Doze/ background processes cycle 3 times. The battery will pay for that.

This is not an idle graph. It's a usage chart that ends in idle.
[BetterBatteryStats] MACHEK:
Thanks. Where you see the doze start I set it down to actually sleep and didn't touch it until the screen came on. Wouldn't it just go to sleep with the inactivity or is that not normal with nougat? I used to remember old phones that would show only activity with the screen on but this just looks like it keeps on waking. I have pretty much all sync shut off and only sync manually so not really sure what is waking so much
[BetterBatteryStats] fossils-n-dents:
In Light Doze (Where one Doze bar is lighter than the Normal Doze bar in your chart) background processes still occur that can awaken the screen (Notifications, texts, system quirks). In Nougat, the system gradually eases into Light Doze allowing for processes to operate before spacing out maintainence windows while in full Doze, so as not to have them all clamoring for attention upon awakening (The price of progress?).

These erratic symptoms have occured in pretty much every iteration of Android, thus giving birth to 3rd party solutions such as Xposed/ Amplify. Further along came Greenify (Which hibernates certain apps processes during Doze Mode), Doze app (Which kills all radios during Doze through onboard VPN), ForceDoze (Which can be set to start Doze Mode as soon as screen is off, plus kill sensor usage), and many other apps with similar function to a degree. Most are root solutions.

Killing sync stops certain processes, but not all apps processes.

Usually it's Google Play Services, social media apps, sports apps, weather apps, or notification managers that chatter/ wakeup incessantly in the background. A random rogue app, or even network issues can also hold wake.
[BetterBatteryStats] Mister_Diamond:
As promised I update the situation after that I wiped the cache and especially I uninstalled the Recurrent Alert Manager, but due to the fact that I faced another kind of issue (which I also reported to the developer):

During these 8 hours I also received some emails which has been notified.

This is the usual behaviour which I had the first week; wiping the cache has restored the normal consumption of the battery. So: there is the need of often clean the cache?
[BetterBatteryStats] mrjuniork:
[MENTION=4138220]fossils-n-dents[/MENTION]

I have encountered a weird situation. After disabling package measurement in service and broadcast section with MAT, I realized that lately the gms wakelocks came back (see the Screenshots).

To get rid of them, I have to delete cache and data of GPS and then to deactivate with MAT the service and broadcast setting. Throughout Throughout the day, gms is coming back...

Any ideas?
[BetterBatteryStats] fossils-n-dents:
I wipe my cache every 3-4 days (Mainly because I enjoy a fresh reboot more often than most).

'PackageMeasurementReceiver' and 'PackageMeasurementService' will reset themselves on any Power Off/ Reboot. You must manually re-enable both after any reboot situation. It's outlined in my list, but many overlook it.

If you follow my list in it's entirety, you will encounter no problems.

Use MAT to re-enable both, and you should be okay.
[BetterBatteryStats] mrjuniork:
Thx for your reply mate, but I was totally aware of the necessary steps after a reboot. My situation is different. That wakelock is coming back without a reboot.

So I disabled thru MAT, wakelock disappeared from BBS, but after a while (without a reboot) it shows back up in BBS and reaching again for 20+% in consumption under alarms section...
[BetterBatteryStats] fossils-n-dents:
My apologies, if you can, generate an idle log and let's see what it may be.
[BetterBatteryStats] Mister_Diamond:
So: why the cache, which seems important for Android, can cause battery drain? if I understand correctly the cache on Android is very needed because it helps to load apps fastly, but looking - at least on my experience - has also a downside.

There is a way to delete the cache by using an automate way? I also have the App "Automate" which is similar to Tasker.
[BetterBatteryStats] githyanki:
It would force Android to load a fresh version of info, rather than use something old. If something is updated through google play (Or elsewhere) the old info may cause an error with the new software. That would be my guess.

Cannot delete the cache while booted up and using it. There may be a way to automate it using flashify or something, but it will still require booting to TWRP.
[BetterBatteryStats] aeonix_05:
For OP5 users here, does anybody know net.oneplus.odm/.insight.MDMJobService wakelock? Aside from IG, it's also keeps my phone awake when I froze IG on TB. I'm running the latest stock OOS 4.5.11
[BetterBatteryStats] iamnotkurtcobain:
Can this be improved?
[BetterBatteryStats] ralfbergs:
Why?
[BetterBatteryStats] mrjuniork:
Yes... "com.google.android.gms"

Probably more, but this is what jumped at me, since I'm struggling with this myself lately..
[BetterBatteryStats] iamnotkurtcobain:
It's Google Play Services right?

Battery life is absolutely horrible lately. Even in standby mode.
[BetterBatteryStats] fossils-n-dents:
I do it just to make sure it's done.
[BetterBatteryStats] ksterjo:
Hello all

Does anybody have any experience with wakelocks and could tell me what the first wakelock actually does? I've been using better battery stats now for a while now cuz battery life hasn't been the best. Apparently this wakelock keeps the phone awake the whole time. On the Android battery stats graphic it looks the same, i.e. the phone is awake all the time.

Many thanks in advance ✌?