yashsingh1/xdaforums huggingface dataset:
[BetterBatteryStats] henry8668:
It happened to me a couple times in the past year, sometimes over night the battery went down from 100% to 0% and not able to find the cause. Usually it went down 3-4% over night standby. In those bad battery consumption cases, there was no app installed or any setting changed the day before. Even worse, the phone was shutdown because of out of battery so can't really have BBS log.

This morning I woke up earlier and found the battery was at 3%, down from 95% last night!

============

Level lost [%]: Bat.: -92% (95% to 3%) [12.4%/h]

Voltage lost [mV]: (4176-3437) [99.3%/h]

===========

Other Usage

===========

Deep Sleep (): 7 h 7 m 47 s (25667 s) Ratio: 95.8%

Awake (): 18 m 48 s (1128 s) Ratio: 4.2%

Screen On (): 15 m 15 s (915 s) Ratio: 3.4%

The full BBS log is attached too.

Autosync was off, data was off, wifi was off. Most of the apps were in greenify. 95.8% of time was in deep sleep, how came it lost 12.4% battery per hour?? Anyone can help me? Thanks!
[BetterBatteryStats] Lucius1972:
[MENTION=4828464]Sandman-007[/MENTION]

[MENTION=3639717]Perseus71[/MENTION]

Good morning,

I made a logcat overnight hooking up S4 to PC and guess what? No SOD this morning.

I had my suspisions and they came true, now could it be that no SOD occured because:

- S4 constantly gets "charged" via USB port

- S4 is too close to my router, as a result signal is optimal?

My router is only a few feet away from my bedroom, i checked the signal when i usually have my S4 on my desk in my bedroom and it`s 2-3 bars (wall in between), should be enough, so it isn`t a bad signal.

Hmmm weird stuff, any suggestions besides trying "aLogcat, catlog" next night?

Btw logcat from last night attached, don`t know if it makes any difference.

Edit: I will make a new log this night with catlog, as soon as it records it saves the file, should work in case of hard reset.
[BetterBatteryStats] themaximillian:
Many thanks to you all that contribute to making my phone last longer!

Unchecked things according to Karpfenhai posted list, my phone slept like a baby last night draining a mere 0,3% per hour!

I can live with that :)

I use Greenify on some of the processes like Google Play Services and a couple of others and the results are great.

Keep up the good work!
[BetterBatteryStats] Sir_gpm:
Guys I really need help. My phone did not go to deep sleep during all night. Was awake all the time. The drain for an awake phone is not bad. But I need the phone to go to deep sleep. sns_async_ev_wakelock is te reason. Any advice?.

http://pastebin.com/RX22eg7H
[BetterBatteryStats] Wh1t3Rose:
This can be nasty one :/. All the android sensors are connected to your phone. The sensors give analog signals, and are being processed to a digital signal. This is done by a DSP, but using a separate DSP for every sensor is too much work.

So there is a hub, this is: smd_sns_dsps, SMD is shared memory device (no idea what that is actually). SNS means sensors and DSPS is "dedicated signal processor subsystem" and interrupting this thing will make it go berserk.

I had this glitch too and this was because Viper4Android interrupted my audio signal, but this could basically happen with every sensor, and as soon as it goes berserk every sensor signal WILL make it go berserk. Disabling other sensors will also decrease the wakelocks (that's why disabling the auto rotation decreases it a bit).
[BetterBatteryStats] nobnut:
Thank you for v0.6.0. It's working well for me. All appears to be fine and I believe that the app is intuitive to use. It might be however that for a future version, for new users, some basic descriptions and definitions could be included in the 'About' screen e.g. what does 'wakelock' mean.

The only issue that I can find is that after the file has been dumped, when I exit BetterBatteryStats, I receive a popup error stating "Wakelock Stats: an error occurred while recovering the previous state". It does appear to work well however.

The following was written to my file:

===================
General Information
===================
BetterBatteryStats version: 0.6.0.0
Creation Date: 2011-08-01 07:53:59
Statistic Type: 0
VERSION.RELEASE: 2.3.4
BRAND: samsung
DEVICE: GT-I9100
MANUFACTURER: samsung
MODEL: GT-I9100
===========
Other Usage
===========
Awake (): Sys: 1 m 28 s (88 s) Ratio: 14.7%
Screen On (): Sys: 57 s (57 s) Ratio: 9.6%
Wifi On (): Sys: 1 s (1 s) Ratio: 0.2%
=========
Wakelocks
=========
GTALK_ASYNC_CONN (Google Services): 6 s (6 s) 1.1%
ActivityManager-Launch (Android System): 4 s (4 s) 0.7%
AlarmManager (Android System): 2 s (2 s) 0.4%
E (net.dinglisch.android.taskerm.Tasker): 1 s (1 s) 0.3%
GTALK_CONN (Google Services): 1 s (1 s) 0.2%
=========
Processes
=========
events/0 (0): Sys: 3 s (3 s) Us: (0 s) Starts: 0
suspend (0): Sys: 2 s (2 s) Us: (0 s) Starts: 0
[BetterBatteryStats] chamonix:
Thank you for the feedback. I have seen this error as well and know where it comes from but am still looking into the cause: when you leave the main screen the app is saving any "custom reference" you may have set to a so called Bundle (Android slang for application state) in order to be able to recover it from there if android decides to cycle the app out of memory. Now in order to make sure that Bundle was created properly I try to read it directly after the save action and that seem to fail sometimes (I suspect that there is something wrong with serializing the data).

I have also found a bug that was always there but noone noticed: the wakelock stat is supposed to tell us the number of times that wakelock was active as this is, besides the time, an important information.

I have added both issues to the git issue tracker.

As I am working on doc now it will be easy to summarize something as help within the app. I have been thinking about the form and I would like to make some facy overlays like in Pulse reader (I have no idea how though).
[BetterBatteryStats] c4Lvin:
hi nobnut I was using Batista70's 3.2 when I had that drain. It's a great ROM but I guess I didn't do everything right or something as those drainage stats are really unacceptable for a phone as great as the SGS2. The new rom is the LeoMar's 2.3 which gave me over 30 hours of standby and usage which is FAR enough for anyone. I assume if I was on the road and using HSPA/H+ i would get about 14-15 hours. I have NEVER gotten such long run times. I really do hate disabling this and that just to save some "%" which is BS. I didn't buy a ferrari to drive 50mph!!! Good luck guys!

Forgot to add that before flashing that new ROM, i did do full wipe as stated but I did do that on the Batista's ROM too. One thing I did on the new ROM was I did NOT install VIBER! I don't think it's the culprit or should I try to install it and see if there's a big diff in drain again?
[BetterBatteryStats] nobnut:
You could test your theory by installing Viber and see if your drain returns. Some of these Skype type applications do cause drain. Skype does unless you exit it fully.

See how you get on :)
[BetterBatteryStats] fabsen:
can you read out the actual drain? or did you just calculate the "2-10mA" by yourself?
[BetterBatteryStats] yupo72:
Problem

Hi there, I've 2-3 FC when exiting the app (Failed to recover the previous status) and finally a forced reboot of the device. I'm on GS2 Lite'ning 4.1. I've removed it but I'd like to have it back as I want to understand too many awakes. Any suggestion?
[BetterBatteryStats] nobnut:
https://market.android.com/details?id=ccc71.bmw&feature=search_result
[BetterBatteryStats] c4Lvin:
I will install VIBER tonight as I have to charge my phone up for tonight (away from home). Regarding current drain readings, those aren't really REAL TIME as they are delayed for a minute or so. I do notice that the current would go higher or lower when you have auto contrast on for display. That is common sense. You can verify that when you have a widget like Brightness level or whatever and set it to ZERO, then on standby or sleep you will get 1-2mAh after sometime of sleep. If you set it to say even 10%, it would jump to maybe 10-30mAh even while sleep, etc.
[BetterBatteryStats] nobnut:
That is a badly coded widget. When the screen is off and the device locked it shouldn't make any difference what the screen brightness level is set to. IF that widget is causing extra drain, it is not behaving properly.
[BetterBatteryStats] c4Lvin:
I did notice it also and not just that, the stock browsers brightness feature can also play some part to different current draw.
[BetterBatteryStats] nobnut:
That should only affect the first few minutes of sleep. After the device has entered true deep sleep, all that should be irrelevant.
[BetterBatteryStats] ithehappy:
Have two questions,

1- Should I update to version 0.6? or wait for bug fixes?

2- What's the purpose of Battery Monitor Widget? Is it needed to show my battery stats or could it save some juice?

Regards.
[BetterBatteryStats] nobnut:
1/ Update to v0.6.0

2/ BMW can monitor your battery usage. It is especially useful for showing how much drain (mAhours) your device suffers during sleep. I don't use it anymore since my device doesn't drain having sorted out all of the issues that used to cause drain.

If you own a SGSII, you will manually have to enter the correct battery capacity in the settings. The correct capacity is 1650 mA.
[BetterBatteryStats] ithehappy:
Thanks. Updating.

About BMW, well I have GSII, so it will show mA stats during sleep time. My back up is OK, so I think I could skip it.

Regards.
[BetterBatteryStats] yupo72:
Can anyone explain me why I get that message after closing the app? :confused:
[BetterBatteryStats] Aiakio:
Thats weird.. oO

I unplugged today morning. Now its evening and Lookout got "45s (45s) 0,1%" on Wakelock (over 12 hours) ;)
[BetterBatteryStats] chamonix:
The message is a known error that I'm working on to fix but no reason for an FC. I'd be happy if you could post a logcat for me to get more info and finally fix it.

Pushing a fix (0.6.1) now
[BetterBatteryStats] efishta:
It turned out to be a fluke because it hadn't happened again since I posted it. Alarm manager is currently my biggest wakelock cause and over 10 hours since unplugged, it's only caused about 40 minutes, which is fine by me.

It was a lot longer when I was using Battery Monitor Widget, which I've since removed.
[BetterBatteryStats] Aiakio:
Wow... Alarm Manager is my biggest wakelock too. But it has only "1m 9s (84s) 0,2%" in over 12 hours...^^

So, what is Alarm Manager exactly? :D
[BetterBatteryStats] carlos67:
+1, what is alarm manager cos it's my biggest wakelock now too.

I have 2 alarms set in the stock alarm app, however they are not active. So why the wakelocks for this if they are not active i.e. I have unticked both alarms to de-activate them (as opposed to deleting them)

:confused::confused:
[BetterBatteryStats] suku_patel_22:
Potential

I see a potential issue in the way BBS reports awake times

From the stats I collected I think that the awake time and percentage should be much lower....

Battery stats from Android

Stats from CPU spy, shows phone was sleeping for most period

Other stats from BBS

Kernel Wakelocks

Partial wakelocks

Graphs from BBS
[BetterBatteryStats] chamonix:
The reading you took is a little too short. The cause of the awake is data traffic (see kernel wakelocks) but there is no partial wakelocks to attribute this to. I suggest that you take a new longer reading and repost
[BetterBatteryStats] ambrar12:
So yesterday evening I uninstalled system monitor and froze Battery Monitor Widget Pro (with TB). Then I charged my phone to 100%, unplugged it and let it sit in standby all night (with all radios and background sync disabled). I woke up this morning and found it had drained 16% over 11 hours (with the extended battery! on a normal battery this would be 32%). So I dumped BBS stats and alarm stats again (attached).

Sorry for the dumb question but how does one take a screenshot of the graphs?

I only have 7 major wakelocks spaced among a night where the screen was off. I just don't get what is draining my battery.
[BetterBatteryStats] mfish123:
Inconsistent mA during sleep

I have a Galaxy Nexus running under the configuration in my signature. I was on wifi the whole time, in the same location in my office (consistent signal strength). Sometimes my phone sleeps with 2 mA and other times its significantly higher. I know my Android OS is a high percentage of battery drain but can't really figure out why and/or if that's the primary cause of the inconsistent drain

Attached is a battery monitor widget log, cpu spy screen shot, betterybatterystats screenshot, and android stock battery stats screen shots.

If anyone can help me track down what is causing these inconsistencies I'd be very appreciative.
[BetterBatteryStats] vudu:
Wow... 2mA when sleeping? I have a Rezound and my phone is 181mA at the lowest when sleeping. Trying to find out what the heck is going on... Reading through this thread to get ideas in what to look for...

Any Rezound users here?
[BetterBatteryStats] mfish123:
Yea but only sometimes I'll get a streak of 2 Ma. Most of the time its anywhere from 18mA - 60mA. And ussually it takes 5 min to 30 min from the time I turn the screen off until it gets into that really low mA sleep state
[BetterBatteryStats] s2d4:
unless nexus has a current sensor, those estimates from battery monitor widget is absolutely useless.

For some reason, the nexus guys keep using it and isn't up to speed with the existence of wakelocks..
[BetterBatteryStats] Braneless:
My Nexus idles at -2mA and my Evo 4G idled at -6mA, but I always run a custom kernel and light aosp roms.

Question - forgive me if already answered, I browsed a bunch of pages and can't search through the app:

My graphs are all blank and no combination of settings will enable them. I'm running an aosp 4.0.3 rom/kernel on my Nexus S 4G (this behavior was consistent across 3 different roms). Any ideas?
[BetterBatteryStats] mfish123:
Thanks for chiming in. I'm actually unsure if it has a current sensor or not - is there a way to find out for sure?

I tried using current widget and it gave me "no data" but I'm not sure if that's cause there is not a current sensor or because that widget is not compatible with ICS.
[BetterBatteryStats] CRXed:
I don't see anything wrong in the BBS-stats. Only 2 min. awake time in 11 hours is amazing! :eek:

Still I agree you should not have lost 16% of battery.

I have noticed with my SGS2, that after a reboot, my phone will drain 2mA consistently. When I DON'T do a reboot, it drains with >50mA.

So you can try to do a reboot right after you unplug and then let your phone sleep.

Also, unfreeze BMW and set it to an interval of 10 min and see what your drain is over night.

For screenshot, you can use a screenshot app, but you need root for that.
[BetterBatteryStats] jeremysherriff:
@ambrar12 I agree with this - looks like nothings wrong (to me) but you shouldn't have lost 16% on an extended battery.

My approach for next steps is differnt though. I'd suggest two things:

clear battery stats - do you know how?

charge the battery fully with the phone off - I find on all my devices that when charged with the phone running, it'll drop off to anywhere between 80-90% within an hour of unplugging. If I charge overnght while off, and power on while still plugged in, then let the phone settle (prepare SD etc) before I unplug from the charger, that massive drop doesn't happen.
[BetterBatteryStats] CRXed:
I have the same problem with my SGS2.

But for me, it only drains 2mA for a certain period of time after a reboot.

Once a certain app/services/broadcast/thingy gets fired of during sleep, my drain goes up to 20-50mA and stays there, never to return to that 2mA. There is no pattern in timing either.

There must be something going on in the background, but I have no idea what is it. Is there al logtool that has timestamps for everything going on in the phone?

---------- Post added at 02:54 AM ---------- Previous post was at 02:49 AM ----------

Read more on that here: http://xdaforums.com/showthread.php?t=871051 ;)

PS: I can't even charge my SGS2 with CM7 rom when it's turned off, because when I plug in the usb-cable, it will automatically boot up.
[BetterBatteryStats] jeremysherriff:
Love it, this should be mandatory reading for anyone before posting in this thread!

@chamonix is this something worth adding to post #4?

Yeah i had the same on my Unofficial CM7 (7.1) port, but didn't really think too much about it. I assume its a kernel thing.

The powered-off charging is not something I do often, but occasionally its necessary in order to reassure myself that the battery is OK when I'm troubleshooting poor battery life.

I stand by my recommendation to @ambrar12 as confirming this effect will help reduce fears that the phone and/or battery is actually faulty. Let me know if I'm wrong on that?
[BetterBatteryStats] radicalgel:
No Luck

Ok I've tried everything and still can't get satisfactory battery backup. I've stopped market notifications, removed FB sync, UV, dark wallpaper, low brightness, stop background data/sync at night but no luck. I barely get a day and 10 hrs tops. That too with like 2.5hrs of screen time. :( I've attached the dump file. Really hope someone can help me.
[BetterBatteryStats] jeremysherriff:
First thoughts: 1d 11h is pretty damn good. Much better than me, yet your battery is the same size and your screen is bigger by 15%.

Second thoughts;

get rid of Go Launcher!! See these threads: http://xdaforums.com/showthread.php?t=1175664 and http://xdaforums.com/showthread.php?t=1216068. Try ADW Launcher instead.

turn off backup to Google account, use Titanium backup on a schedule instead

freeze Social Hub and any associated "SNS.xxx" apps if you don't use them (need Titinium backup pro for freeze, otherwise back up and uninstall).

Edit - seriously, Go Launcher did the same to me, I spent weeks trying to work out why my flash phone was so sh*t. Removed Go, and BAM all was good again.
[BetterBatteryStats] s2d4:
disable fast net dormancy if you have it enabled, or vice versa.

get rid of widget locker

if you use bluetooth, and if you call others for nearly 2 hours, don't expect it to act like a nokia..

EDIT:GO launcher wasn't your problem according to your dump
[BetterBatteryStats] radicalgel:
Dude thanks for that but I like Go Launcher way too much to ditch it. :(

I have turned off google backup like u suggested

I'm on criskelo so no bloatware anyway!

Thanks for the Go Launcher info. Love this launcher. Glad it's not the one causing issues.. :)

Fast dormancy disabled. Should try with it enabled?

Don't use too much bluetooth but do make quite a few calls.

Just installed gemini app manager to stop some game from auto running. Should help. lets see. :)
[BetterBatteryStats] jeremysherriff:
Despite that I'd recommend you try a day or so without it, I know the log file doesn't support that view but it didn't on mine either. I stumbled on those threads about Go & battery drain, gave ADW a try for a day, and it was like a different phone. Features are awesome though, I still miss them 3 months later!

---------- Post added at 07:18 PM ---------- Previous post was at 07:02 PM ----------

Dude, thought I should update you.

I went back to the standard MIUI launcher (I was using ADW) and changed a setting in "X5 Settings" (a phone-specific project menu - option is called "Activity/Process Management" - changed it from aggressive to normal).

Anyway, now BBS works 75% of the time. Still FC's occasionally. But definitely usable.

I'm going to experiment a bit and see whether it was ADW, the setting, or both, that caused the instability.

I've also heard back from the MIUI dev I contacted, he was also unsure of what you were asking for but is going to try to replicate the issue, and grab logcat output if he can.

Cheers for all your good work with this app.
[BetterBatteryStats] ambrar12:
I agree standby drain is much better after a reboot. Unfortunately though that's not a satisfactory solution, as rebooting itself can drain significant battery.

For whatever reason the drain's been much better during the day today on standby. Like 1%/hour (though I guess that equates to 2%/hour on a normal battery). I dumped BBS stats and alarm stats again (attached).

Based on what was previously discussed in this thread, I figured Time-Tick was the "update time" option in settings, so I disabled that.

I don't know what "247 alarms: flg=0x4 android" is, or what "com.android.server.ThrottleManager.action.POLL" refers to.

And why am I getting 48 alarms from this: "com.sec.android.internal.ims"? Is that an instant messenger? I don't even use IM, and I froze Gtalk with TB long ago.
[BetterBatteryStats] chamonix:
Thanks for the update. I'll try to formulated the question so you can pass it on if required.

BBS uses Android's non public api provided by 'batteryinfo'. On some (or all, I don't know) miui installs users are experiencing FCs or no data. The reason for the is in bbs, the cause is that requesting for 'batteryinfo' returns a null reference, the reason for no data is unclear but from the logs it looks like data simply stops being delivered back from the api. If needed I can provide the api methods bbs calls.

What I am looking for is a way to tell users what to do to avoid the problems or some hints on what I could change in bbs in order to better support miui.

I'd hate to tag miui as unsupported as I know many users use it but on the other hand I can't afford the amount of support generated by one rom/branch and not having the proper answers.
[BetterBatteryStats] Sir_gpm:
[MENTION=219258]SandMan[/MENTION]—007 do you think if I change the kernel will help?. Or why those are activated (sensor).
[BetterBatteryStats] Wh1t3Rose:
I guess anything is possible with kernels by I highly suspect it's a user app causing the to happen. Doesn't hurt to try though

See if wakelock detector or GSAM will tell what app is activating these sensors
[BetterBatteryStats] maorly:
IDLE logs

i made two different logs for you

1) with mobile data on for 6 hours.

2) with airplane mode and wifi on for 7 hours

both cases ended up with -7%. both cases the phone was awake for 10 minutes more than "screen on".

at first i also checked my phone in idle during 4 hours with airplane mode, without wifi, no drain at all(battery stays on 85%) and almost no wakeloks, so i didn't save a log.
[BetterBatteryStats] Perseus:
We have

"wlan_ctrl_wake" (): 10 m 41 s (641 s) Cnt:(c/wc/ec)644/0/644 0.7%
"l2_hsic" (): 6 m 22 s (382 s) Cnt:(c/wc/ec)765/0/765 1.5%

That tells me, you have chatty device on Wireless Network. You have Avast! Although a reasonably good Security, it does take a toll.

In the other Log I see

"secril_fd-interface" (): 2 m 43 s (163 s) Cnt:(c/wc/ec)57/0/0 0.8%
"multipdp" (): 2 m 2 s (122 s) Cnt:(c/wc/ec)22/0/22 0.6%
"l2_hsic" (): 1 m 32 s (92 s) Cnt:(c/wc/ec)270/12/270 0.4%

Which is telling a similar story. This time with your Data Connection.
[BetterBatteryStats] maorly:
so avast and whatsapp are the causes? not this rilj thing? i checked with getril and it says that my ril and baseband doesn't match...
[BetterBatteryStats] Perseus:
Whatsapp wakes a lot but otherwise its harmless. The Baseband issues are a big deal.

EDIT - The Wakelocks caused by Network Connectivity issues that I referred to in my previous post can be a menace. Chanign baseband or RIL may not fix them. Particularly those caused on Wireless network.
[BetterBatteryStats] Karpfenhai:
Hold on! Stop! wait!

Do NOT change your ril!!!

It's perfectly fine this way on cyanogen!!

You will render your phone unusable if changing ril with getril, do not attempt this!

Cm is using openril.

If you want you can change your baseband to match the ril but not other way round, please.

Regards
[BetterBatteryStats] maorly:
do you think that changing my baseband will reduce some battery drain? i tried to google it the other day, i found out that i shouldn't change my ril but i couldn't find a proper baseband.

So while it may help with 3g data, wifi will always drain that much? when i'm actually using my phone, sometimes i loss up to 1% a minute, using only whatsapp.... that's not fun at all :(