yashsingh1/xdaforums huggingface dataset:
[BetterBatteryStats] bhhalu:
Galxay S5 + LineageOS + BBS

Hi folks,

I don't know if I should post my problem here or in the LOS section.

My battery stats are quite terrible.

3h 44m Bat: -13% (3,5%/h)

Deep Sleep 45% 1h 42m

Awake (screen off) 45% 1h 41m

Screen On 9% 21m

How can I find out which task or service is the culprit?

The phone is nearly half of the time awake (screen off).

Should I look in kernel wakelock? (bluesleep or msm_serial_hs_dma are really high)

What do you guys think?
[BetterBatteryStats] peterlee928:
see link below for step-by-step directions on how to make a proper dumpfile. that is needed to see if there are any bad actors. note that screen on time must be 1 minute or less (your stats show screen on time of 21 min).

https://xdaforums.com/showthread.php?t=1179809&p=72467976
[BetterBatteryStats] prosnz:
Hey.

I'm pretty pissed about one wakelock. It's called qpnp_fg_memaccess. I did a little Google search, but it doesn't seem to bring success.

Do you guys know something about it?
[BetterBatteryStats] DB126:
That's nice. What evidence suggests it's a battery drainer or otherwise problematic?
[BetterBatteryStats] prosnz:
I don't know - that's why I'm asking. It's even there in idle. So I tried to find something, something relating.
[BetterBatteryStats] hawkerpaul:
*** deleted ***
[BetterBatteryStats] It_ler:
Ok, I understand. Good idea BTW !

But when switching between different views/stats, e.g. from "Other" view in "Since charged" to "Other" view in "Since Custom Ref", the displayed stats should be refreshed IMO.

I just installed BBS 1.6.0.0 on my wife's SGS2 (XWLA4 stock ROM), and the displayed stats seem to be not refreshed even when switching the views/stats.

Is this also a feature or just my (personal) problem?

Maybe I am doing something wrong ... will try BBS 1.6 later on my phone again and report back.
[BetterBatteryStats] SkoreK89:
Can someone answer me about BBS? I ask here http://xdaforums.com/showpost.php?p=22317839&postcount=3193
[BetterBatteryStats] chamonix:
Good point, that should be like that. Testing that together with the "since charged...." ref thing and hoping to be able to post 1.6.1 soon
[BetterBatteryStats] chamonix:
I believe I answered already but am too lazy to search.

Fist I need a translation of the right screen as I can't tell what those labels say. My guess about the difference:

- BBS uses references like "since unplugged" or "since charged"

- whatever reference of that stock dialog may be "since boot"

-> Different references mean different values

On the other hand I can only tell you what are the BBS refs.
[BetterBatteryStats] SkoreK89:
Right screen say: Processor use time: 1h 2min 1s.

I do test againt tomorrow, and write, because time of stock dialog is much largen than BBS charged + unpluged. I only have the same time for phone and screen.
[BetterBatteryStats] chamonix:
V1.6.1

1.6.1 is up:

- service removed

- refresh is performed when changing stat/stat type

- removed "hide since" preference

This version is being rolled out on market
[BetterBatteryStats] nickk67:
Hi, I'm on miui rom. Just wanted to ask, how do I enable the battery service? By battery service do you actually mean turning the battery monitor option on? I have it on but BBS wouldn't show me any readings whatsoever.
[BetterBatteryStats] chamonix:
Please search the thread, this has been answered many times
[BetterBatteryStats] :
I've been using your app for months now, had always meant to donate, I tend to blow through my "donation budget" fairly quickly however, so you were on the top of the list for when the moratorium was lifted ;)

No donation link under your user name however, so I bought the app, left a glowing review. I know you're likely not in it to get rich and retire early, but many would likely send some appreciation your way in the form of $, I know I would.

Awesome utility, as essential as CWM IMO.
[BetterBatteryStats] chamonix:
This is OT but I can't resist sending you a teaser of a new app coming soon

Command Center brings you the power of shell without having to use the terminal
[BetterBatteryStats] :
OMG, must have it :eek:
[BetterBatteryStats] chamonix:
:) in a few days I'll open a thread and publish. It will be free with ads.

If you like that first screen shot you will like the features I didn't show even more
[BetterBatteryStats] chamonix:
Wow, _thank_ you sir!
[BetterBatteryStats] nickk67:
Okay I searched. I have the battery monitor turned on. However, each time I open BBS I get a message "The 'batteryinfo' service could not be accessed. Known reasons: MIUI settings allow to turn them off, making MIUI incompatible with android standards". What should I do?
[BetterBatteryStats] mrrogers1:
Nice work man!

Sent from my Evo3D with XDA Premium App (but I still know how to search)
[BetterBatteryStats] It_ler:
Thank you very much !

BBS 1.6.1 now works as wanted ;-)
[BetterBatteryStats] Braneless:
ICS graphs working well since the update. Thanks!
[BetterBatteryStats] yhrn:
Thanks for the new update!

Working very well so far. I have not had a single freeze in the new alarms view since 1.6.0 rc1. Maybe too early to say it's gone for sure but it's at least more stable than the previous alarms view on my phone.

I might have found a small bug in 1.6.1 though. The "since ..." text does not appear when I open BBS. After switching to another main screen view or changing reference it appears and stays there until I exit.
[BetterBatteryStats] aashgaur:
Plz. Help ...

im on siyah 2.6.12
[BetterBatteryStats] DB126:
Likely not a drainer. Grab an idle dump for analysis/confirmation.

https://xdaforums.com/showthread.php?t=1179809&p=72467976
[BetterBatteryStats] prosnz:
Ye I know I posted an idle log some time before. U said there were no smoking guns, and maybe the 0,9 % / hr is coming from device and/or battery age. So I changed the battery, but it's not really getting better so this part is locked out. Now I am looking forward to get it lil better. Thanks anyways! :)
[BetterBatteryStats] rignfool:
qpnp is something kernel interface related...

memaccess seems self explanatory...

I'm going out on a limb and going to say

fg is probably foreground...
[BetterBatteryStats] Amcray_86:
Hello.

Im have problem with increased battery consumption on ASUS ZenFone 3 (ZE520KL). BBS shows kernel wakelock 7000000.ssusb which doesnt allow to enter to deep sleep mode.

Can you help me pls?

Android 7.0
[BetterBatteryStats] TNSMANI:
Without a log, the best I can do is guess. I would say that you may have an OTG issue if you use it.
[BetterBatteryStats] Amcray_86:
I dont use OTG.

log : dropbox .com/s/7tukqgddk21thnt/BetterBatteryStats-2017-07-17_182245847%5B1%5D.txt?dl=0
[BetterBatteryStats] peterlee928:
2 comments regarding your dumpfile:

1) screen on time must be less than 1 minute

2) idle time must be at least 6 hours

see link below for instructions on how to create a proper dumpfile.

https://xdaforums.com/showthread.php?t=1179809&p=72467976
[BetterBatteryStats] grega_slo:
Hi!

HTC U11, rooted BBS latest is not able to obtain kernel wakelocks. No stats have been collected yet.

Known issue?

BR
[BetterBatteryStats] TNSMANI:
Check whether OTG is toggled on, if so switch it off.

Though a proper idle log would help, in your case I see that your phone was awake almost the whole time. The reason seems to be OTG and something called 'mobile manager service'. If it is an app, uninstall and check. Do a reboot also.

After checking these, post a proper idle log.
[BetterBatteryStats] peterlee928:
this is a proposed workaround for a similar problem https://androidforums.com/threads/usb-kernel-wakelock.887461/
[BetterBatteryStats] DB126:
Nice find, [MENTION=6089972]peterlee928[/MENTION]

I had the exact same problem on a 2013 Moto Mini (2nd gen Moto X varient). Disconnecting power at the source before removing the USB cable from the phone usually prevented the kernel wakelock from appearing. A full, not soft, reboot took care of the rest. Stock Kitkat ROM and kernel on that pup.
[BetterBatteryStats] Amcray_86:
I tried it. Unfortunately, didnt help.
[BetterBatteryStats] peterlee928:
https://www.google.com/amp/s/xdafor...2-1-n-7-1-1rxx-lenovo-p2-t3576216/page10/amp/

additional info here
[BetterBatteryStats] DB126:
May seem obvious (sorry) - after accessing the linked thread do a XDA search on "wakelock" to see relevant posts. All appear to be some variation of the solution that worked on my Moto Mini. Assuming it's a charge/OTG related issue ...
[BetterBatteryStats] Amcray_86:
Proper dump : dropbox.com/s/4h4w5za3y7nz097/BetterBatteryStats-2017-07-20_083551459.txt?dl=0
[BetterBatteryStats] orlans21:
Just started happening a few days ago. Analysis would be greatly appreciated. Thanks.

https://drive.google.com/file/d/0ByzhyGGdnR3mb1dZRFpILTNkMnM/view?usp=drivesdk
[BetterBatteryStats] pjadec:
Log is no good. Screen on time too long 36min. Read OP again then do as instructed.
[BetterBatteryStats] fossils-n-dents:
Your 'Screen On' time is 27m...This renders your idle dump useless. 'Screen On' time should be a minute or less.

Charge to 100%...unplug from charger, let phone idle (Don't use the device) for a minimum of 6 hours. Immediately save dumpfile afterwards.

Re-post your proper idle dump.
[BetterBatteryStats] DB126:
Device held awake (idling at low CPU frequencies) by a kernel wakelock for 98% of the 7¼ hour monitoring window. Likely cause and possible mitigations have been discussed in previous posts. It is an uncommon but known issue associated charging via USB. Exact cause is unknown...or at least not yet identified by XDAers who follow this (and similar) threads. Might have a hardware element to it, possibly a contaminated or malformed USB port (just guessing). Bottom line: following a different post-charge procedure will likely break the wakelock and allow your device to sleep.
[BetterBatteryStats] orlans21:
Could clearing cache in recovery possibly fix it?
[BetterBatteryStats] DB126:
Anything is possible; that said I see no correlation between this kernel wakelock and cached info.
[BetterBatteryStats] orlans21:
Worth a try but thanks for the help
[BetterBatteryStats] peterlee928:
that was one of the solutions in my linked thread. it was specific on what the person did to remove the wakelock.
[BetterBatteryStats] Amcray_86:
Thanks for the help!

I have tried many times clear cache and reboot device after charging - no result. Maybe factory reset help. I will try it.
[BetterBatteryStats] Salotor:
Hello. I can not understand why the processor runs at 800 MHz from time to time, and the smartphone does not sleep until reboot.

My dump: pastebin.com/0JH1PPVy

Analysis would be greatly appreciated. Thanks.
[BetterBatteryStats] peterlee928:
per my second link, this may be worth trying if you havent already:

"I rebooted into twrp, cleaned four times dalvik/art cache. No wakelocks for now, they're all in deepsleep."

---------- Post added at 06:38 PM ---------- Previous post was at 06:06 PM ----------

your dumpfile must be at least 6 hours with less than 1 minute of screen-on time. see link below for details:

https://xdaforums.com/showthread.php?t=1179809&p=72467976

that said, here are some things that jumped out and proposed solutions:

1) packagemeasurementservice wakelock - see this post for solution:

https://xdaforums.com/oneplus-3/how-to/guide-stop-google-play-services-t3549760/post70853146

2) wlan_rx_wake kernel wakelock - see this link:

https://www.google.com/amp/s/xdafor...etting-rid-wlanrxwake-wakelocks-t2519294/amp/

3) radio-interface kernel wakelock - see this link:

https://www.google.com/amp/s/xdaforums.com/redmi-note-3/help/radio-interface-wakelocks-t3500921/amp/

note this may not be an issue... but worth checking

4) 12_hsic kernel wakelock - see this link:

https://xdaforums.com/showthread.php?t=2684295

5) noticed a couple of others, but they may get solved with the corrections noted above and/or i couldnt find any solutions to them

high level, there seems to be some sort of connectivity issue which is causing some/all of these kernel wakelocks. try giving those proposed solutions a try. then resubmit a proper dumpfile per the link above.
[BetterBatteryStats] x.trinity:
Is this roughly normal left time with 4g/3g activated?
[BetterBatteryStats] peterlee928:
difficult to tell anything from this. if u want a more accurate read, post a proper dumpfile. directions are in the link in the post immediately above yours.
[BetterBatteryStats] buffer overflow:
"Something" keep you mobile Awake.
[BetterBatteryStats] x.trinity:
Yes, but what I've meant was 'roughly', not accurate..(in regard 3g/4g is activated). Anyway, I have to dive in deeply on this matter. Thanks.

I'm on RR Nougat, RN3Pro [kenzo], stock kernel.

Sync and Location are always on. Yes, I switched off Location WiFi and Bluetooth scanning.

So, thats an answer, it's unusual to remain just 8-9hours, in total, regardless 4g/3g is always on.
[BetterBatteryStats] peterlee928:
your screen was on most of the time if im reading your screenshot accurately. if this is the case, it is unknown what you were or werent doing during that ~2 hr timeframe. were you running 1 app? 2? multiple? no apps? what apps were they?

using the phone introduces noise to the process that makes the question essentially impossible to answer (roughly or otherwise) as there is no baseline from which to measure whether the battery drain is "roughly normal".

hence the idle dumpfile. start from the same baseline, put the phone under the same conditions, then read the results to assess your phones drain rate and its normalcy.

but if you want a rough answer - sure... 20% drain for screen on a majority of the time over a 2 hr is "roughly normal".

recommendation - for a rough answer, it may be optimal to either do a quick google search or check the thread for your phone.

cheers
[BetterBatteryStats] DB126:
LOL - nothing in the tiny snippet suggests that.
[BetterBatteryStats] x.trinity:
No, I was just constantly using phone during that ~2h while I noticed that only 7hours left.

Yes, I agree but 7h left, leads me to the question that there is something suspricious.

No doubt, that would be next step.

Yep, thats what Ive meant. Thanks.

:highfive:

dump file will tell the truth.

10x2everybody:good:
[BetterBatteryStats] Benny100:
Project is deat no Updates!!!!!!
[BetterBatteryStats] DB126:
Hardly.
[BetterBatteryStats] orlans21:
https://drive.google.com/file/d/0ByzhyGGdnR3mM3AyaE01RlZlS2c/view?usp=drivesdk

Is this accurate enough to tell me? I only turned on my display to check the time
[BetterBatteryStats] Oswald Boelcke:
Why do you assume that including six exclamation marks and no rationality provided at all?

That's a post that better suits a communication on Twitter with the PotUS.

The application itself hasn't been updated quite a while as it's simply running perfectly and alive. And this corresponding thread is really active and not dead as flipping to the last e.g. 100 pages would prove.
[BetterBatteryStats] DB126:
Screen shots are unnecessary and in this case do not match BBS dump.

Device is being held awake by significant motion sensor and possibly an 'active screen' app/setting that briefly illumunates the display on notifications and other events. You have some control over the latter if it exists; the former is a device/kernel issue that is best addressed in your device forum.
[BetterBatteryStats] orlans21:
I don't know how I can figure out the kernel problem in my phone forum if I don't know where exactly it's coming from
[BetterBatteryStats] githyanki:
You don't know where your rom is from?

Perhaps you should visit your devices forum and load a rom from there. Then if you still have the issue with the significant motion sensor holding your device awake, you'll know whom to talk to about it.
[BetterBatteryStats] Haswell4200:
Can anybody help me with this dump file? It seems like the awake with screen off is high.
[BetterBatteryStats] peterlee928:
measurement time must be at least 6 hours. this dumpfile is less than 2 hours. see linked post below for instructions on how to do a proper dumpfile:

https://xdaforums.com/showthread.php?t=1179809&p=72467976
[BetterBatteryStats] orlans21:
Sorry I worded that wrong lol. I know my rom and everything about this phone. I just don't know if people in that forum could figure what the kernal problem is. But anyways I think I fixed it. I turned airplane mode on/off and the the awake time is way down.
[BetterBatteryStats] Haswell4200:
I thought on the op it said between 1-4 hours. Has it changed?
[BetterBatteryStats] githyanki:
Since nougat it takes about .5 hours for the phone to enter deep sleep, shorter than 4 hours really doesn't give an accurate picture. The OP is somewhat outdated.
[BetterBatteryStats] [Jaco69]:
I am on OnePlus 3T nougat, not able to install as system app. Should I flash from recovery or what?

Inviato dal mio ONEPLUS A3003 utilizzando Tapatalk
[BetterBatteryStats] MrWasdennnoch:
You don't need to make it a system app anymore, that info is outdated.
[BetterBatteryStats] [Jaco69]:
Great! Can you please explain? I don't find clear information in op. So you mean the option to install as system app in advanced preferences is outdated? Thank you [emoji6]

Inviato dal mio ONEPLUS A3003 utilizzando Tapatalk
[BetterBatteryStats] DB126:
Sorry - replied with irrelevant info (since removed). BBS works fine as placed by the installer. There is no need to make it into a "system app".

---------- Post added at 07:21 PM ---------- Previous post was at 07:17 PM ----------

Do this: https://xdaforums.com/showthread.php?t=1179809&p=72467976

---------- Post added at 07:28 PM ---------- Previous post was at 07:22 PM ----------

That as true on many/most Android 6 ROMs in the absence of 'doze on the go' or equivalent. Nougat has this baked in. In my experience devices running Android 7 based ROMs drop into doze/sleep shortly after screen-off assuming everything is performing normally.
[BetterBatteryStats] m0han:
did i get it right this time? thanks for any help. :good:

kenzo_N2-OS_21-Jul BBS Stats: https://pastebin.com/Pr4fCDbz

screenshot: http://www81.zippyshare.com/v/yyuk8VBZ/file.html
[BetterBatteryStats] DB126:
Yikes - device remained awake (screen off) at low frequencies for entire monitoring period. In that regard phone idles quite efficiently for an older device: 1.3% per hour. Not too shabby. :)

As I recall this pup originally provisioned with Lollipop. There was a radio patch that supposedly fixed the ProxyController wakelock that appears to be the culprit. You'll need to do some Googling and visit your device forums to see if that patch (or another) can be applied to the Nougat build currently installed. Note this may involve updating the kernel or applying radio fixes directly via TWRP or other custom recovery.
[BetterBatteryStats] peterlee928:
:good::good::good: got it right this time

so your phone was awake almost the entire time ☹️

from what i gather, the primary culprit is this wakelock:

ProxyController (Phone Services): 97.5%

... which i suspect is the key driver behind this:

PowerManagerService.WakeLocks (): 100.0%

potential solution - https://www.google.com/amp/s/xdafor...5/help/strange-unknown-wakelock-t3056238/amp/

while the phone in this thread is different than yours, the solution may be the same (ie change your radio).

separately:

1) aquamail wakelock - only way to work this down while continuing to use aquamail is to play with your app settings. ultimately this comes down to what your email preferences/needs are.

2) qpnp_fg kernel wakelocks (3 separate ones) - this is the most helpful info that i could find (see 2nd to last post in this thread): https://www.google.com/amp/s/xdaforums.com/g4/help/qpnpfgmemaccess-wakelock-t3321518/amp/

hopefully someone smarter than i will have more background/solutions on these kernel wakelocks
[BetterBatteryStats] DB126:
Great responses; you're the expert in the room on this one! ;)
[BetterBatteryStats] peterlee928:
amazing that im even halfway coherent right now. running on 3 hrs sleep after drinking almost the entire day yesterday. was hunched over a toilet about 6 hrs ago. another successful saturday lol. sorry for tmi - likely still a little hung over.
[BetterBatteryStats] DB126:
Get some rest dude. Need to replenish the millions of brain cells that made the ultimate sacrifice.
[BetterBatteryStats] hampa:
Hi. Hope I got it right.

Deepsleep is a real issue and I can't find what causing it.

SOT is 2hours on PA OP3

https://drive.google.com/file/d/0By8me8R4BaVCOHc0Q1ZqQ1lhU2s/view?usp=drivesdk

https://drive.google.com/file/d/0By8me8R4BaVCOHc0Q1ZqQ1lhU2s/view?usp=drivesdk

Dmesg;

https://pastebin.com/XTRjcN3m

Logcat;

https://pastebin.com/hmxZjJ8e

Dumpfile;

https://pastebin.com/7mUWzn4a
[BetterBatteryStats] peterlee928:
wheres the dumpfile? you need to make a dumpfile according to the instructions in the linked post below:

https://xdaforums.com/showthread.php?t=1179809&p=72467976

---------- Post added at 08:37 AM ---------- Previous post was at 08:29 AM ----------

@davey126 [MENTION=7408621]noc.jfcbs[/MENTION]

is there a way to amend the OP to include the updated instructions on how to do a proper dumpfile?
[BetterBatteryStats] Oswald Boelcke:
Is a superb idea but can only done by @chamonix (last active end of June) as the OP or a moderator.
[BetterBatteryStats] hampa:
I've updated my post with a dumpfile pastebin link. Thanks for the heads-up.
[BetterBatteryStats] Oswald Boelcke:
That's not a proper i.e. not usuable dump. Please take @peterlee928 advice.
[BetterBatteryStats] peterlee928:
to add 1 detail to what [MENTION=7408621]noc.jfcbs[/MENTION] said - screen on time must be less than 1 minute. repost the proper dumpfile and the brilliant minds here (present company excluded) will guide you in the right direction.
[BetterBatteryStats] anmar21:
Hi,

I'm getting the following issue : "Selected 'from' or 'to' reference could not be loaded. Please refresh."

Sometimes it works and sometimes it doesn't. Any idea ?

OnePlus 5 - OOS 4.5.6 - Magisk 13.3

Thanks!
[BetterBatteryStats] peterlee928:
https://xdaforums.com/showthread.php?t=1179809&p=61226355

see if that works.
[BetterBatteryStats] Oswald Boelcke:
Unless @peterlee928's advice works you might want to try to set BBS back to delivery/installation defaults. Occasionally (and I haven't recognised the reason yet but once I hadn't white-listed BBS in Force Doze), I have to to that, too. I normally just use SD Maid Pro for such purposes but a wipe of cache and data of BBS should also do the purpose.

Additionally, the first two steps of @Davey126's great advice how to log might support you.
[BetterBatteryStats] anmar21:
Thanks, it worked.

---------- Post added at 10:45 AM ---------- Previous post was at 10:42 AM ----------

Thanks, his tip worked. I will try to whitelist from doze as well to avoid it being blocked.
[BetterBatteryStats] Haswell4200:
How does this work? I wasn't able to get a full 7 hours but I got pretty close.