yashsingh1/xdaforums huggingface dataset:
[BetterBatteryStats] Mesmurized:
Thanks. Data+Cache it is :)

This old ex-Xenix/iPhone programmer loves the fun and challenges of N & MM. But I'll heed your warning, for sure. I often do full BU's whenever I make any significant changes.
[BetterBatteryStats] kurtisherzog88:
Hey all, wanting to do this right, so I'll delete if needed. Have Nexus 5x. Battery went from good to terrible when I went from MM to N. Tried going with Pure Nexus and Elemental, still no change. Posting a dump, hopefully it has the information needed. Will alter in whatever way needed. Thanks for any and all help!
[BetterBatteryStats] githyanki:
Please take an idle log. We cannot help you when you have used the phone since there is no way to tell what usage was you and what was not.
[BetterBatteryStats] kurtisherzog88:
I do not mean to clutter the thread and ask a stupid question but is posting an idle log as simple as letting the phone sit for 20 min or so and creating a dump from that?
[BetterBatteryStats] h_maharaj:
Nope. To get a proper idle log, fully charge your device then unplug and do not use device for at least 6 hours. Ideally, screen on time should be less than a minute so when you use device again immediately open BBS, tap on the share icon and save dumpfile.
[BetterBatteryStats] M@31:
Thanks for taking your time to help me out.

I have attached a screen shot of the "more-raw kernel wakelocks" for you.

I have installed the things I need for adb, but I really do not know how to do it....Im sorry.

The Kernel and Rom developer are Nakyup....they are a Korean group.

Im pretty sure that they do not speak English...it is a Korean ROM/Kernel because I have the Korean Galaxy S (M110S)

Thanks again!
[BetterBatteryStats] jeremysherriff:
No SU issue, but certainly other problems. Check these screenshots. All stats are empty, including the alarms (almost, the kernel wakelocks shows some weirdness) but more->raw alarms shows data.

Note, this is a MIUI ROM.. lol

Edit - I see a quick toast-style popup message as I open BBS, with the warning about couldn't connect to the battery monitor service blah blah. Battery Monitor is definitely running, I can see usage stats via it that go back about 3 days. Am gonna reboot, and see what happens..

Edit 2 - a reboot resolved it, but things are not consistent. The first time I opened BBS after the reboot, I got stats. I switched to a different view (processes) and got nothing. Exit and re-open - no stats. Repeat, same issue. Exit, and leave for a minute - stats. Now, no matter what I do, it works.
[BetterBatteryStats] longfeng:
Good so far... try wifi off for better set of data?
[BetterBatteryStats] M@31:
Ill try this tonight while I sleep to see if there is a noticeable difference.

Thanks again so much for all of your guys' help.

Ive tried to say THANKS many times, but I always run out of THANKS' buy the end of the day!
[BetterBatteryStats] shinew:
No that's what I meant by saying it's strange, because applock's "misbehavior" seems to be kernel dependent. It seems to "misbehave" in the Faux kernel(the one i was using) and another, but not in stock kernel. I've just installed another complete new ROM with a different kernel and Applock also doesn't "misbehave" under it, in fact it doesn't even show up under "Alarms". However, "sec-battery-adc" remains high at 43%, my "wlan_rx_wake" was also the next highestest at 37%, so my guess is that this time "sec-battery-adc" could be reflecting the draw from "wlan_rx_wake".

Anyway, it was a relatively short 39min test. I'm going to leave the ROM to settle a bit, then do an identical test as before when I go to bed tonight and report back.
[BetterBatteryStats] longfeng:
My guess your phone will consume 2-4mA.

Remember not to add new app to confuse the equation.

---------- Post added at 04:13 PM ---------- Previous post was at 04:06 PM ----------

I think there are many factors which affect wakeup. Kernel, ROM (or worst cROM), governor and scheduler may indirectly affect either the performance or voltage of the phone. They are the fixed factors so we usually ignore.
[BetterBatteryStats] Th3lmuu90:
Nice app, so useful :)
[BetterBatteryStats] sp8y:
Yes refresh does seem a bit hit & miss eg when I open BBS it sometimes displays previous stats, although for me it was like this on the last version & a manual refresh sorts it.

On my sons Atrix running GB 2.3 when opening BBS it sometimes doesn't show stats until a manual refresh is performed.

Other than that all the stats seem to working fine :)
[BetterBatteryStats] chamonix:
Ok, the raw kernel wakelock figures confirm behavior. What is intriguing is the count that speaks for somethink software specific causing a "flapping" wakelock as if the kernel would believe that you have plugged/unplugged hundreds of time.

We definitely need to look at dmesg. If I gave you an app to dump dmesg to a file on the sdcard, would you manage to download it from the phone and upload it here without having to learn adb first?
[BetterBatteryStats] chamonix:
As 1.6 is just an attempt to make things with MIUI work more in harmony would you say it is better than on 1.5 or still as inconsistent? I'd be interested in seing a logcat.
[BetterBatteryStats] chamonix:
Thanks for clarifying. Abstracting applock that makes sense: an rx wake wakes up the the kernel, causing the battery status to get updated.

If the combo you have now resolved the alarm problem we can focus on rx wake. I see different possibilities here:

- wifi screen off policy to off

- try if using a static IP instead of DHCP resolves the problem

- use wireshark to capture the traffic in the hope to find where the incoming traffic causing the wakeups come from and see if there is a way to turn that off
[BetterBatteryStats] chamonix:
we are takling about secific wakeups here. Possible causes are the TCP/IP stack, the wifi sleep policy and factory outside of the phone like the router e.g. but I don't see any of the above as part of the equation. Doesn't mean they should be kept stable during the analysis to avoid that new behaviors mask the problem or distract.
[BetterBatteryStats] chamonix:
Could someone using an non-ICS phone confirm that the height of the spinners on the main view are fine as they are? I had to adjust the minHeight because of the hollow style defining them as too small for a good usability but want to be sure that that has no negative sinde effect on any 2.3.x phone not using hollow
[BetterBatteryStats] yhrn:
A bit big (thick) I think but works
[BetterBatteryStats] chamonix:
with "spinner" I meant the height of the comboboxes at the top of the screen.

Your log shows still the same amount of rx wake, meaning the wifi policy didn't change anything for your device being woken up by incoming traffic.
[BetterBatteryStats] chamonix:
OK, I will reduce by 10 dp.

Waiting til tomorrow for any feedback on the refresh behavior and I guess the RC will be released.

Thanks for your time guys!
[BetterBatteryStats] shinew:
Ah, then spinner looks fine on my phone(screenshot added).

Sorry I completely missed your reply, I'm heading to the gym for a bit so that gives me an hour to log it without wifi. If I remember correctly, I've done this before and it did not change the result for sec-battery-adc, but we'll see. thanks!

EDIT: Screenshot attached
[BetterBatteryStats] jeremysherriff:
I can't make it fault now, so definitely better than 1.5.1.

If I can get it to fault, and fault in a repeatable way, i'll try a logcat - not something I've ever done before!

---------- Post added at 10:44 AM ---------- Previous post was at 10:41 AM ----------

Yeah, a bit too tall, see screens in this post. Is it something you can link to the advanced option of the graph bars height, or an additional option in there? Then we can set our own as best suits our particular screen dpi and finger sizing :)
[BetterBatteryStats] shinew:
I'ved static IP, it made no difference.

Just logged it for about an hour with wifi off(attached), "wlan_rx_wake" was gone and awake time % has definitely decrease, "sec-battery-adc" was still at the top of the list though. could it be that it overlaps with pretty much all the wakelocks?

I'm going to try Wireshark to see if I can find out anything about why wlan_rx_wake has been called so many times.
[BetterBatteryStats] Colnart:
Can anyone please explain the "adapt the package name" when giving permission using adb ? if i installed the BetterBatteryStats_xdaedition_2.2.2.0.apk how would the command changed ?
[BetterBatteryStats] Mesmurized:
[MENTION=5488402]Davey126[/MENTION] Update. Was out-and-about again for a couple hours today and never saw that message and Battery Usage / Deep Sleep appear normal. Hoping I never see that message again :) Thanks again for the help.
[BetterBatteryStats] DB126:
Great! Nice when the simple solutions work. Appreciate the update; hopefully the exchange can benefit future visitors (re: device not sleeping).
[BetterBatteryStats] Mister_Diamond:
0,0%/h battery drain

I have a significant update:

Seems that my phone was prone (maybe a carrier issue?) to have a timeout of the data connection after a certain time of inactivity: in facts I used to have an issue about delayed push notifications: yesterday I installed PNF (Push Notification Fixer) which also claims to keep the connection alive, by sending more frequently an heartbeat (a sort of "ping"?)

well, i still see the "knet_wake_lock", but after about 9 hour of inactivity I had a 0% battery drain. The most interesting thing is that this time, in the BBS log I don't see "No or Unknown Signal" and "No Data Connection", as if the data connection was keep always active, and whatsapp gave me just 1 wakeup (under Alarms section). The most - still - present alarm wakelock seems to be

Alarms: 352, Intent: android.intent.action.TIME_TICK.. Which i guess could be related to the date widget (which only display the currente date, not the hour, so is not frequently update)... But Hey: with a 0% battery drain after 9 hours I don't care so much :)

Some hints, however, about "Awake (Screen Off) (): 24 m 52 s 4,6%"?

Yesterday was "Awake (Screen Off) (): 30 m 36 s 6,4%" in facts, this percentage seems exactly the amount of battery which I lost after that i start to use my phone when I wakeup.

I attach the new log.
[BetterBatteryStats] DB126:
Interesting find that may yield benefits beyond idle power consumption. Be interesting to see if results repeat over several test cycles. 25m awake time (screen off) with 0% mid-cycle reported loss seems a bit odd.
[BetterBatteryStats] Mister_Diamond:
You're right.. Seems very odd: moreover, most of the time, as i've said, I lost the percentage indicated in the "Screen off" section after I started to use my phone, also only by opening whatsapp. This morning I had 54% of charge (with a 0% battery drain) and a screen off percentage of 4,6 %: after I opened whatsapp and reply to a message, the battery immediately falls to 49% (54 minus about 4%). Now @ 17:16 I still have 49% of charge (I replied to some whatsapp message and I received a pair of email).

I suspect that this can be a behaviour of GingerBread and it's way to calculate and guess the percentage of the battery: in the past I also noticed this behaviour.

I will keep test cycles in the next days. Thank you for your friendly attention.
[BetterBatteryStats] Callliope:
Any idee what can i do to lower the job delay and wifi alarms?

Htc one m8, rr remix, 7.1 Nougat, team m8 kernel
[BetterBatteryStats] kurtisherzog88:
Thank you so much again. Here is a dump from overnight last night. Thank you to any and all that can help me figure out why my battery drain (especially idle) is so bad.

[the bad battery life] Started with my update to stock Nougat. Then went to Pure Nexus, and then added Elemental kernel. Have tried different governor profiles with Elemental to no avail. Nothing makes a difference to the around 2% idle drain and overall poor battery life. I have also tried multiple factory resets as well as multiple dalvik/cache wipes. Thanks again!
[BetterBatteryStats] DB126:
Log shows 0.5% loss per hour when idle which is not unreasonable for this device. There are some modest drainers that contributed to the 15m of wake time over 8.5 hours. Some of those could probably be trimmed but really wouldn't make a huge difference. Possible you have a failing battery if SOT is significantly less than when the device was new or on Marshmallow. Again - no smoking guns in the log.
[BetterBatteryStats] kurtisherzog88:
Wow, thanks so much for the quick reply! Ok, so that's what was disappointing was that the time I finally put a log together, there isn't much actual drain. Have had nights where up to 15% of the battery is drained. I saw a post connected to this app (on the Nexus 6p Pure Nexus) that had me cycle 10 minutes on and 20 minutes off a few times and then post a dump. Would that work? I posted that a few days ago but was told (understandably) that it was hard to use it. But when I do that, the idle drain is consistently around 2%. Thanks so much again!
[BetterBatteryStats] DB126:
The short on/off log would likely be inconclusive. Suggest looking at what apps are left running or are likely to run while device sleeps. If you wake to bunch of notifications and a full inbox you have your answer. Also, turn off WiFi and Bluetooth radios for a night or two to see if there is any change. Same with location services (disable overnight). There are other 3rd party tools such as Greenify, ForceDoze and Wakelock detector that can prove helpful (not to mention Nougat's build in tools) but many times the answer is closer to home. Try to eliminate the simple things first. Finally, given the variety of ROMs/kernels you have tried it still remains possible the battery is the culprit.
[BetterBatteryStats] terragady:
Hey, I have a problem that bbs report different screen on time than my phone and I am not sure now which is right. Please see the ss.
[BetterBatteryStats] kurtisherzog88:
Thanks so much, Davey126! Cannot tell you how much I appreciate you taking the time to both help and educate me. I will try some of the things you mentioned and report back any issues I can find. Thanks!
[BetterBatteryStats] Joern85:
Hi,

my device stops sleeping after a while. For me partial wakelocks aren't showing any unusual. It occurs randomly so it's difficult to capture a "clean" log where the device wasn't used. So I know the attached log is not optimal. However, maybe someone could find the culprit. Thx!

https://drive.google.com/file/d/0BzxhXpyDzX8ydzhzTzBrbFFPVGM/view?usp=sharing
[BetterBatteryStats] githyanki:
There's a lot of location wakeups. Something is using location services a lot, perhaps Facebook or Instagram....
[BetterBatteryStats] Mesmurized:
[MENTION=5488402]Davey126[/MENTION] It's back (haha) - the 100% awake while screen off notification. Using stock doze settings for 2 days. Changes: added & tested a VPN last night and noticed it about 1 hour later. Rebooted, went to sleep, so far so good. BTW: 5X, PN 6.0.1
[BetterBatteryStats] DB126:
Yep - poorly designed VPN apps can impose persistent wakelocks that block sleep. Consider another vendor if the problem persists/repeats. Alternatively, shut down the VPN when not in use.
[BetterBatteryStats] Mesmurized:
Forgot to mention I set the VPN up manually. Did not use an app.
[BetterBatteryStats] Joern85:
Location access is disabled for fb and insta. But it just happened again, my phone stopped going to deep sleep at all. I've attached a log taken for around 30mins. Maybe it helps and someone could find out what's causing it. It's driving me nuts. :(
[BetterBatteryStats] DB126:
Hum...gotta a sneaking suspicion WhatsApp may be the culprit (accelerometer). Add it to Greenify for a few days to see if cures the insomnia. This isn't necessarily supported by the log data so may be completely off base.
[BetterBatteryStats] ConanOBrien:
Posting this log after wiping cache partition, full charge, and using for a few hours today.

This is a rooted Galaxy Samsung S7 Edge, running Xposed with Greenify and Amplify. Using the "interactive" CPU governer.

I need to wipe the cache partition every few days, otherwise the phone starts to lag and drain battery extremely fast.

Regardless, this is a "clean" log since I wiped the cache partition and phone runs ok, but the battery life is no better than stock. I still average about 3 hours SoT by the end of the day.

If anyone sees any glaring culprits sticking out, please advise!

Other notes:

I notice wifi tethering drains battery compared to my previous phone (Sony Xperia Z3V). On the Xperia I could tether and as long as the screen was off the battery drain was minimal. It's much higher on the Samsung S7 Edge even with the screen off, very unfortunate. Is there any fix to reduce battery drain with tethering?

Can't attach logcat as it exceeds filesize, so here's the upload to google drive:

https://drive.google.com/open?id=0B8atSjlaN6JiWkJoNmZxSGxjSlU
[BetterBatteryStats] connerESP:
I'm trying to understand what is going on in my phone because it never gets to deepsleep and the battery runs out very quickly. What I see is a Kernel wakelock called mmc1_detect almost halft the time the phone has been working. Anyone could please give a glance at the log and confirm that that is the problem? :confused:

Thanks you in advance.
[BetterBatteryStats] DB126:
Smartwatch phone? Appears it was looking for a data connection for a large chunk of the rundown period. Referenced wakelock is from kernel; not much can be done. Doubt there are custom kernels/ROMs for device. Referenced wakelock is typically hardware/storage related. Some reference a corrupt SD card; I'd be suspect of that given device is self contained. Sorry couldn't offer better guidance.
[BetterBatteryStats] connerESP:
Yes you are right. It is a watch phone. The funniest thing is that it hasn't any SD card inside..... Don't know which data connection is searching for, It has a SIM inside and a good signal..... :confused:

Thanks you.
[BetterBatteryStats] Vlad Paul:
Hi! I have BetterBatteryStats instaled as system app and i can't add it on App Lock built-in from xiaomi rom( Mi-4c is my device). I cant lock this app, BBS showing sensitive information like Cerberus(for example) , i installed as system app cerberus disquised version, cerberus disquised version have another name under app icon but when i open BBS disquised version appear in Process tab like com.lsdroid,cerberus. I want to hide this by locking BBS with default MIUI app lock but i can't do this. [MENTION=1330150]chamonix[/MENTION] ,please add any option to can lock by pattern or pin BetterBatteryStats app. Lot of thanx.

Best Regards,

Vlad
[BetterBatteryStats] moi123:
Drain on 6p on 7.1.1

Hi everyone, BBS log attached. Using Greenify for most of the "wakeup" apps that I dont use often and Naptime.

"Android" appears to have the largest wake-up's, followed (unfortunately) by whatsapp - how much benefit will there be if whatsapp is greenified, and will there be any adverse affects?

Thanks,

EDIT : Log attached.
[BetterBatteryStats] DB126:
- forgot to attach log ...

- Greenify WhatsApp (you'll likely loose instant notifications; no other affects), assess the battery savings and decide what's right for you
[BetterBatteryStats] moi123:
Oops thanks for the reminder @@Davey126 log attached.
[BetterBatteryStats] Oswald Boelcke:
Tough to evaluate as "Screen On (): 21 m 16 s 2.2%". Please try to provide an "idle dump" i.e. charge to 100%, disconnect from charger, and let the device rest for at least 6 hours. "Screen On Time" has to be less than one minute.

Check this post
[BetterBatteryStats] chamonix:
First, why are installing bbs as system app in the first place. This method is not required anymore so deprecated.

Locking apps is not something supported by the Android api so there is nothing I can do without having a spec of what is supposed to be implemented to support that
[BetterBatteryStats] Vlad Paul:
Thank you much for reply. Everything is ok now, i installed BBS normaly, not as system app. Now i can lock BBS successfuly. Lot of thanx!

Best Regards,

Vlad
[BetterBatteryStats] ConanOBrien:
Bump, any help would be appreciated
[BetterBatteryStats] moi123:
Hey everyone, BBS stats attached, from overnight with big wake-up's from Android related stuff. Please help! :(
[BetterBatteryStats] DB126:
Not a great log as device was awake for ~140 min. That said, device never entered 'deep sleep' and idled for 16+ hours at low frequency with the screen off. Most likely culprit is a Google Location Services wakelock (14+ hours). Thoughts:

- toggle location services off (temporary)

- clear Google Play Services cache and data (important)

- immediately reboot device

- see if idle drain persists

- if all good toggle location services back on again

- recheck drain rates (will be higher but device should still enter deep sleep)

If the drain continues to be excessive you may want to consider Amplify (as a last resort) which can limit the offending wakelock.

---------- Post added at 04:36 AM ---------- Previous post was at 04:18 AM ----------

Think you need to simplify your config a little before anyone is going to dig into a huge logcat. Disable Amplify, flush Google Play Services cache/data, reboot and see what happens. Guessing Amplify may be a contributing factor; side effect of limiting wakelocks. If the problem persists post an idle BBS log.
[BetterBatteryStats] moi123:
Thanks for the quick reply [MENTION=5488402]Davey126[/MENTION], how do you see the 140min awake? location is off normally except when using gps. From the main stats :

Deep Sleep (): 8 h 19 m 19 s 96.1%

Awake (Screen Off) (): 20 m 2 s 3.9%

Screen On (): 18 s 0.1%

Wifi On (): 8 h 39 m 41 s 100.0%

Wifi Running (): 15 m 22 s 3.0%

Doze Interactive Time (): 18 s 0.1%

Sync (): 32 s 0.1%

Screen dark (): 18 s 0.1%

Thanks again!
[BetterBatteryStats] Oswald Boelcke:
I apologise I don't recognise "big wake-up's from Android related stuff". And overall, I personally assess 0.8% drainage per hour pretty decent.
[BetterBatteryStats] moi123:
Was hoping to get it down to <0.5% - is there anywhere in the logs where the wakelocks can be reduced/eliminated?
[BetterBatteryStats] TNSMANI:
Considering that you are on Nougat, there is not much you can do except using Greenify.

There were background downloads from Gmail and Google app amounting to 9MB approx.

Check with another idle dump where there is no background download.
[BetterBatteryStats] githyanki:
I'm sure he opened the wrong log on accident, my phone has done that to me before where I download a log, click on it and a different one opened.

Your log shows decent stats, Google play store is the main user of power. You could try turning off any updates, and set it to not check for updates. Other than that, looks good.
[BetterBatteryStats] DB126:
Yep - that's exactly what happened! Sorry for the bad read. As others have since commented there are no smoking guns in the log. You could give Greenify a whirl but I don't think it would help as native doze appears to be working as intended. Anything else such as changing mail or messaging clients is just nibbling around the edges and could have the opposite effect.

[MENTION=7408621]noc.jfcbs[/MENTION], [MENTION=2669423]gith[/MENTION]yanjki - thanks for having my back. :)
[BetterBatteryStats] blak24:
I'm running nougat on my OnePlus One, app installed ad system app, also forces the use of the API to see kernel wakelocks, but nothing works.. Can't read kernel wakelocks, only partial and other stuff! Any idea? I searched the thread but didn't find anything useful. Thanks
[BetterBatteryStats] gaich:
[MENTION=1330150]chamonix[/MENTION], could you please look through this bug?

Anyone else with constant "Calculating" message when opening BBS?
[BetterBatteryStats] realista87:
i have the same alarm draining my battery on nougat.

WifiConnectivityManager Schedule Periodic Scan Timer

can i kill it? is it an important alarm? on resurrection remix i see a built in option to disable alarms... i could use it to stop this but i have to know if it's an IMPORTANT alarm to keep, or not
[BetterBatteryStats] DB126:
Why do you believe this alarm is "draining my battery" - because it shows up? Leave it alone unless there is a proven correlation between alarm/wakelock and excess power consumption.