yashsingh1/xdaforums huggingface dataset:
[BetterBatteryStats] DiamondJohn:
The "PS" shell command allows selecting columns, including "cmd" which may help.

You could try my app TeMeFI which has the above built in (ie run by clicking a menu) at

Currently Running>Running Processes>PS All Super Detailed

You could then filter the results for "Mmap" by holding down the "magnifying glass" icon in the fly-out toolbar and entering "mmap" (its not case sensitive).

The thing with the PID in /proc/ is that if the PID changes or dies and is recreated, it isnt valid for possibly the exact second you are checking.

This check for PID in /proc/ is also wrapped in TeMeFI in the menu under:

Currently Running>Running Processes>Selected Running Process Details

It will list all running processes, then you can filter that list by holding down (ie long press) the"X" and entering "mmap" to filter down the list in the returned menu.
[BetterBatteryStats] TNSMANI:
Poor mobile signal is a heavy battery drainer, for sure. However, I can't say if 0.8% is good or bad without further details, like an idle dump. Restricting the idle drain may result in a better drain rate during screen on.
[BetterBatteryStats] peterlee928:
hello all. glad to see this thread is alive and well! some of the most helpful and smartest xda folks in this thread. much thx to all for all your support!

i am currently on pixel 3 xl (google variant) running non-rooted android 11 newest beta version. i noticed my idle drain continues to get worse even pre-install of latest os. any thoughts on if there are any red flags?

my bbs log was run for 4 hr 55 mins starting from about 73%. i know that is not exactly the standard for what is needed from a log. i can run for the standard 6 hrs at a higher charge percentage if that will make a difference.

much thx in advance!

bbs log here: https://drive.google.com/file/d/1mz_JyQABBw-6DP0E0YwVFD340xgGXFaW/view?usp=drivesdk
[BetterBatteryStats] TNSMANI:
Access to file denied. Please open it.
[BetterBatteryStats] peterlee928:
oops my fault. it should be open now. for avoidance of doubt, here is the link again: https://drive.google.com/file/d/1mz_JyQABBw-6DP0E0YwVFD340xgGXFaW/view?usp=drivesdk
[BetterBatteryStats] TNSMANI:
You only have 0.6% drain per hour. For a beta version of the OS, it is very reasonable.

In use drain depends on various other factors, the main one being your screen brightness, and what you do while the screen is on. Your mobile signal is only moderate and for some time there was no data connection. I don't know about Android 11 but you should have a switch for 'mobile data always on' in Developer Options. Disabling that coupled with locating the phone where the mobile signal is better may help.

Ambient Display seems to be on. Restricting it may help. Instagram was another drainer as are all social apps.

Your wifi also seems to be iffy since the phone switched to mobile data for some background downloads. Reset the wifi (switch off the wifi router, wait for 10 seconds and then switch on). Also check whether you have any other devices connecting to the same wifi, especially printers and if so disconnect them for the duration of the next dump.

You seem to have too many apps. If needed, you will have to learn to live with this drain.

Hope this helps.
[BetterBatteryStats] orlans21:
Has this app stopped working for Samsung phones? I see people having the same problem on the google play page.
[BetterBatteryStats] Oswald Boelcke:
As usual and as to be expected working perfectly on my Samsung SM-G955F with LOS 16.0! No complains at all.
[BetterBatteryStats] orlans21:
I think it does not work for samsung devices running oneUI
[BetterBatteryStats] Aveon:
Hello,

I'm Currently using HavocOS 3.7 on my Oneplus 3 and the kernel with it is pretty good and the battery is saved pretty good tbh, but sometimes during at night when i charge it to 100% and use WhatsApp for 5-10mins the battery drops pretty fast from 100% to 90% within 5-10 mins which isn't normal. So I have added the BBS logs in the link below.

so what's causing such a sudden drop?

Thank you in advanced.

Logs here:BBS
[BetterBatteryStats] DB126:
Samsung devices running Android 10 based ROMs appear to experience the greatest difficulty (especially 'stock')
[BetterBatteryStats] Icetea:
i try to use the last available version now. ( from play store / on Android 10 )

Shall i remove bbc app from battery optimization list, or is it equal to get better results?
[BetterBatteryStats] tutaf:
Hi. I'm using Pixel Experience Plus (10) on my Zenfone Max pro m1, and the battery discharges too fast. Can you help me? Dump file: https://drive.google.com/file/d/11dyRlwFOZ4vlvnEj6Ya_QLjyaL-t9Uyy/view?usp=drivesdk
[BetterBatteryStats] TNSMANI:
Not necessary to remove it from battery optimisation. Those days are gone.
[BetterBatteryStats] TNSMANI:
Your phone never went into deep sleep.

Mobile signal is the biggest issue. Choose some other place where you have a better signal and take another dump.

MicroG was trying to connect, lot of alarms (signal being weak).

Location was on or scanning was on. BT was also on or scanning. Do you require them while sleeping?

Xiaomi Health app caused some alarms.

Network info is not available.

If the mobile signal can not be improved, you have to be prepared for this kind of drain. Or look for some other provider whose signal is better, if that is an option.
[BetterBatteryStats] Aveon:
Any help here?:confused::)
[BetterBatteryStats] mrjuniork:
According to your logs there is nothing out of the ordinary.

You got an idle drain of 0.4% over a period of more than 7 hours, which translates to a percentage loss of 3%.

So there is nothing major draining your battery in idle state.

Once using your phone actively, many other factors weigh in, but that's pretty individually different from device to device, from user to user.

Once there is an idle drain above 1%, then a more deeper and thorough analysis should be initiated.

Till then, enjoy your device and keep an eye open for applications that might keep your device active more than they should.

Cheers mate :good:
[BetterBatteryStats] TNSMANI:
Apart from what my fellow Moderator said above, if the battery is not new, it is quite common for it to drop from 100% to 90% quickly.

That is why you are instructed to charge it to 100%, use it for sometime so that the percentage comes down to 90 or 85 and then initiate the taking of the idle dump.

Enjoy your device!
[BetterBatteryStats] KZekai:
Is There any quick writeup how to use the stats it provides? What should I be looking at/monitor?

And yes, I've read first 2 posts (OP and the follow-up) from the creator(?).

Info here

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

was updated 9 years ago

Here:

https://better.asksven.io/betterbatterystats/how-to/

stuck in 2 years ago on 2.2.x
[BetterBatteryStats] Nekromantik:
is it normal for better battery status process to be using 10% battery?

In process view I am seeing its own processes with the most usage often
[BetterBatteryStats] TNSMANI:
No, it is not normal. Maybe an uninstall, reboot and reinstall will help?

And it can't be 10% of the battery, it may be 10% of the total drain. :confused:
[BetterBatteryStats] Nekromantik:
will try that thanks
[BetterBatteryStats] miskokupuje:
Hello all, I am currently struggling with higher idle drain of roughly 1,8%/h up to 2,5%/h on my Mi9t (custom Rom: TitaniumOs) this idle drain exists unfortunately for quite some time now. Other TitaniumOs user get about 0,3-0,5% idle drain, which would be great for me..

I have only a few apps installed and over night the battery went from 100% to 84% in about 8 hours.

I hope that I did take the attached dumb file correctly and if someone could maybe help me to find the culprit of the idle drain i'd be really thankful.

Dump file:

https://drive.google.com/file/d/1-7TbPMDNs6wYMgnC36jeGrElXM7Z0mwn/view?usp=drivesdk

Edit:

https://drive.google.com/file/d/1-AWBlW__BtMexIxJVo7Bh_irnzKN98Ts/view?usp=drivesdk

This is the dump file after getting to 26% battery left and an idle drain of 2,22%/h according to FKM.

I would be really thankful if someone could help me here.
[BetterBatteryStats] TNSMANI:
The dump has more than 6 minutes of screen on time. The stipulation is to have as less as possible and definitely under one minute. Please save the dump as soon as you unlock the screen and post the fresh dump here.
[BetterBatteryStats] miskokupuje:
Hi TNSMANI, great to know that someone had the time to look into my case. THANKS A LOT. And sorry for providing the wrong dump. I will post the correct dump tomorrow morning and quote you with it, if that is okay.

Your help is much appreciated and I'm really eager to learn what's going on.

Cheers!
[BetterBatteryStats] miskokupuje:
Hi TNSMANI, Here is the dump file I've created today in the morning.

https://drive.google.com/file/d/13McdyevYEJvB1l8rUA72Wt2OYP6Yvalw/view?usp=drivesdk

Oddly this file shows at the beginning a battery start of 91% to 85%. But when I created the dump file, the phone was at 91% coming from 100% during the night (100% sure about this one). I hope that BBS took the correct dump file.

My idle drain was round about 1% during the night, which for me is way better than it usually is. During low usage now the idle drain rises again to 1,6%.

Does a dump file after let's say 25% battery left help you in any way to find the culprit?

Thanks a lot in advance!
[BetterBatteryStats] miskokupuje:
Hi TNSMANI, a quick update that I hopefully got the right BBS dump file now immediately after unlocking and it is showing the over night idle drain from 100% to 81%.

I would really appreciate your or any other help! Idle Drain is about 1,9% over night :(

Dump file:

https://drive.google.com/file/d/14E4h4m7ejTb58GCnJrHgDPSFfHjqLtTF/view?usp=drivesdk
[BetterBatteryStats] RomainD2:
Hi,

I have a problem of battery drain during the night when I charge my phone with the smartcharging mode enable. It doesn't go into deep sleep mode. The only kernel wakelock which seems to be active during this time is the following :

c440000.qcom,spmi:qcom,pm8150b@2:qcom,qpnp,smb5

You can see that in the attached picture.

Do you have an idea how to resolve that?

Thanks
[BetterBatteryStats] mrjuniork:
You'd need to take an idle dump as well. That offers more room for having a closer look at your specific case.
[BetterBatteryStats] TNSMANI:
I am not answering the earlier post because that dump file is wrong and not according to instructions. This dump is as per requirements.

As far as I can see, you have too many apps draining battery. May be a clearing of Dalvik cache and cache, if not a factory reset, may help. Or even a clean flashing of the ROM. If that doesn't help, you have to find ways of curtailing the activities of the apps in the background and go app by app.

You had BT on, may be a smartwatch? Can you disable it while sleeping?

You also have Location or wifi/location scanning on. Do you require it while sleeping?

Nearby was on. Do you require it while sleeping?

Your wifi also seems to have an issue. When was the last time you reset the router by powering off, waiting for 10 seconds or more and then powering on? Also are there any other devices connected to your router, especially something like a printer? If so, switch them off for the next dump.

You had most of the apps downloading/uploading stuff in the background ( a result of too many misbehaving apps).

You also had sns_smd wakeup sensor awake almost the full time of the dump. I think that it is related to charging. Seems to be stuck. If you can charge to 90 or 95% and then take a dump, this sensor is likely to go quiet. This is only an assumption and anyway for idle dumps, the starting point of battery is not 100% but 95 or 90% or even less upto 50%.

Take another dump after attending to the above and post here.
[BetterBatteryStats] RomainD2:
Here it is, I have done it after charging, without the smartcharging mode, without using the phone. Should I do anything else?

Thanks
[BetterBatteryStats] TNSMANI:
The dump is for less than 4 hrs. Please read the OP and the first page of this thread relating to idle dumps and post another dump as per requirements.
[BetterBatteryStats] M7mdA7md7sein:
Hello [MENTION=5656100]TNSMANI[/MENTION],

thank you so much for your effort.

I have uploaded my files as I am having Poco f2 pro, that others are enjoying a 36 hours of 1 full charge including 12 hours of SOT.

but for me the SOT barely exceeds the 6 hours with a 1 day full charge.

I have uninstalled the ordinary Facebook app as it might be a problem, and installed the FB lite app.

If you could help me with any other tips, I would be grateful.

Thank you so much.
[BetterBatteryStats] DB126:
Lol - anyone claiming "12 hours of SOT" on this device is high on poo pie. Even with a 4,700mAh battery the 865 Snapdragon SOC and jumbo panel will tax the power management system which already runs rather 'hot'. Expect half of what others boast even with aggressive countermeasures.

Don't always believe what you read. Although hard to believe some folks like to exaggerate, make things up or otherwise fail the 'fact check' sniff test. I know, I know...hard to believe. What's this world coming to :rolleyes:
[BetterBatteryStats] M7mdA7md7sein:
I see what you mean :D

But when I have checked the forum for Poco F2 pro, I've found many screenshots of 12 hours of SOT!

Most of them actually are between 10 to 12 hours!

So I am trying to get the best of which I can get and then will accept the truth of my max capabilities :D
[BetterBatteryStats] DB126:
Oh - you mean dudes who set a long screen timeout with half the "SOT" sitting on a table/pocket/whatever with no user interaction? Does that fit your usage profile?
[BetterBatteryStats] knpk13:
I'm on a 7T Pro and I get 10-12 hrs if I only use it for local video playback. For my normal use its 8 hrs. I was kinda surprised that video playback was consuming less power than my normal usage.
[BetterBatteryStats] DB126:
Video playback is quite efficient on modern hardware and ROMs. I'm going to step back from the SOT wars as it's an endless discussion topic better suited to other threads. Should have never opened that can of worms ...
[BetterBatteryStats] TNSMANI:
Your dump has nearly 2 minutes of screen on time. I think that you know it should be as less as possible with one minute as the outer limit.

Please post another dump.
[BetterBatteryStats] RomainD2:
Here it is, according to the first page protocol :)
[BetterBatteryStats] TNSMANI:
This again is not as per requirements. This seems to be an in use dump, not an idle one. The screen on time is 37 mts. It should be as less as possible (in seconds) and definitely under a minute.

Also charge the phone upto 80 or 90%, not 100%. Any percentage above 50 is ok to start the dump. This is because some batteries drain fast between 100 and 90%.

So please post another dump.
[BetterBatteryStats] RomainD2:
Sorry, I have updated the wrong file! I have charged it to 100%, use it for few minutes in order to reach 94%, and then sleep and data from screen off to screen off.

The first one was from unplugged from 100% to screen on.
[BetterBatteryStats] M7mdA7md7sein:
Thank you.

Should we keep the WiFi on our off??
[BetterBatteryStats] TNSMANI:
Whatever settings you normally have let them be there. After analysing the dump, if any further changes are required, at that time we will change it for the next dump, if necessary.
[BetterBatteryStats] TNSMANI:
As far as I can see, your mobile signal is the biggest culprit. See whether you can locate the phone somewhere else (while taking the dump) where the signal is better. Usually it is a huge drainer.

Then BT was on. May be a smartwatch? See what happens when you switch it off for the next dump.

Nextcloud is the one after that. A lot of wakelocks and alarms. I don't know what it is but see whether you can alter its behaviour.

Then comes Location. Either Location or Location/wifi scanning or both are on. I don't think you require it even while sleeping. In the nearly 4k pages of this thread, yours is the first case where I see so many location related alarms. They are simply overwhelming.

I am surprised that you only have a drain of 0.7% per hr even with all of this.

Try to correct whatever you can from the above and post another dump. Let us see.
[BetterBatteryStats] M7mdA7md7sein:
Thank you so much.

Would you kindly check this one for me?

I couldn't upload it separated as the ".txt" file exceeds the forum limits!

Thank you.
[BetterBatteryStats] TNSMANI:
The mobile signal was not very good. Usually it is a big drain. Try to locate the phone where the signal is better while sleeping. Though the mobile data seems to have been switched off the whole time, your phone tried to connect to data continuously.

Too many apps. Every single app you have seems to have been active at least for some time. WhatsApp/GBWhatsapp, IMS, Facebook, Instagram top the list.

A smartwatch seems to have been connected to your phone. Is it necessary while sleeping?

Your wifi signal also was not ok. Your phone alternated between wifi and data continuously. This happens if you have a problematic router. Switch it off for 10 seconds and then switch it on. If any other devices, especially like printers are connected to the router, disconnect them for the night.

Background downloads of all apps under the sun.

Always On Display - is it on?

Sar_detector sensor was active for more than 10 hrs.

In my opinion, you have too many apps (most of them misbehaving), a less than ideal wifi and mobile connection.
[BetterBatteryStats] schlunk:
hi,

i have an A3 running lollipop.

i blocked froze most of the apps, google etc.

over night i put it into airplane mode and have like zero partial or kernel wakelocks shown with 100% deep sleep

and still the battery is drained 0.7% in one night 9h from 100% to 93.

i made also a complete loadcycle before this.

how can this be?? i dont now what to look for anymore..
[BetterBatteryStats] M7mdA7md7sein:
Thank you so much for such detailed analysis, it is really appreciated.

If you don't mind, I have a couple of Qs.

1- "Your phone tried to connect to data continuously" ! Is this an ordinary thing? I have checked all settings and it was switched off and not wasn't looking for better accuracy or whatsoever that could bring the data usage on!!

2- IMS app? what is this?

3- No printers are connected to the router! Just PCs and smartphones!

4- Sar_detector sensor! do you know what is this ?

5- Background downloads of all apps under the sun, sorry but what do you mean by this?

6- Finally, regardless the number of active social apps. Is this the usual usage -for each- on other devices? or shall I uninstall/reinstall each one ?
[BetterBatteryStats] guhvanoh:
I'm guessing that's a pretty one device with a pretty old battery. If that's true, then expect that to happen. Your battery is going to lose its charge quicker than a new battery. Sorry old chap, but that's life. But an overnight dump is still needed to verify that.
[BetterBatteryStats] RomainD2:
Hi,

Thanks for your answer. It takes me few days to do it again because I failed with screen off / on multiple times and loose the correct data...

So, I haven't any smartwatch, but a bluetooth toothbrush, however, it is not paired with my smartphone. And thats all, I need to keep the blutooth because I am using it in my car. I removed it for the dumpfile

Nextcloud is like google drive, but it is a personnal cloud. I removed all the sync for the following dumpfile.

For the location, I have removed some permissions for the HomeAssistant application which monitoring some sensors. But I would like to keep it in the future, don't know how to limit that alarms location.

I haven't found better place for mobile signal, so I keep it at the same place.

So you will find the file Idle - BetterBatteryStats-2020-08-28_073050873 according to the previous modifications.

Is it better ?

Then, my original concern was a Kernel Wakelock which stay active and prohibit the deep sleep mode to be enable. This appear when I am using the smartcharging mode which is a great feature I think. It automatically disable the charging when reaching a certain percentage of the battery, for example 80%. So the dumpfile Smart-charging - BetterBatteryStats-2020-08-28_081233865.txt is an example for this problem, from the unplugged reference (which is triggered when smartcharging mode is detecting when the battery reach 67% in this example) to the screen on. And with this dumpfile, we can see the Kernel Wakelock c440000.qcom,spmi:qcom,pm8150b@2:qcom,qpnp,smb5, which I think, is related to this problem. Because of that, the smartphone doesn't enter into deepsleep mode, so when I take my phone again, the battery lost from 2 to 4 % per hour which is a lot when charging my phone during the night.

Do you have an idea how to resolve that ?
[BetterBatteryStats] TNSMANI:
How old is the battery? Original or third party?
[BetterBatteryStats] TNSMANI:
1. No. That is why I blame the apps. Though the apps tried to access data, they were not successful since the dump shows 0 kb download via data. This should not happen. If wifi is on, all apps must compulsorily access only wifi, not data.

2. Instant Messaging.

3. Reset the router. Also disconnect all others other than your phone for the next dump.

4. Specific Absorption Rate - a measurement of how much of the cell signal energy is being absorbed by the body. Any setting related to it? Or you have sensor block? Try to block it if you can. I have not seen this active so far.

5. While sleeping, Google controls the downloads required by various apps. Normally a few apps will require it and Google manages them well. In your case, it seems as though all the apps on your phone tried to download something (updates or sending something out etc).

6. It is not only the social apps. All apps on your phone seemed to be active.

There are a couple of things you can try. Try a factory reset after uninstalling unneeded apps. If that doesn't solve the problem, clean flash the current ROM installing only those apps that you absolutely need.
[BetterBatteryStats] TNSMANI:
Is it better, the man asks! It couldn't be any better than this. The drain was as low as 0.2% per hr. Don't do any further tinkering and enjoy your device.

Regarding the kernel wakelock, it is related to the battery and charging. Does it occur at all levels of charging? I mean, now you have set it to 67%, does it happen if you set it to say 80%? Try various combinations. May be at a particular level, it may atleast reduce. Otherwise either live with it or forget smart charging. I have no other solutions.
[BetterBatteryStats] RomainD2:
Thanks for your answer.

Yes, I tried different values, 70%, 80% and same problem appears.
[BetterBatteryStats] One Twelve:
Thanks for pointing out this fix for bbs app starting in the system page with the APPOPS_USAGE_STATS as not granted and being highlighted in red.

Despite granting the required permissions stated using adb

The fix is as mentioned. Tap ok, and you end up directly in the permissions page of your phone. Look for BBS in the list. Toggle permission off and then on and this error goes away.

Works on LG V20 stock with Nougat.

Now if only BBS would show network stats with Wifi it would be great.

To date network stats with wifi has never worked on the V20.

Only mobile data shows up in the network stats.
[BetterBatteryStats] TNSMANI:
On second thoughts, in smart charging, there may be an option to treat whatever percentage you set as the 'full' charge and to reset the counters. Toggle it both on and off and check for any differences.
[BetterBatteryStats] RomainD2:
I try it, same result...

Someone else on MSM Xtended ROM try the smartcharging charging mode, and it has the same problem. He even try to manually stop the charge by editing the config file related to that and the kernel wakelock still appear!

Is there is a way to "kill" a Kernel Wakelock when it become active ?

Thanks again
[BetterBatteryStats] Oswald Boelcke:
I don't know any means that is able to "kill" anything triggered by the kernel. The one and only chance I see is to switch the kernel.