yashsingh1/xdaforums huggingface dataset:
[BetterBatteryStats] D3VILG3N3:
Out of options...

Hello!

Thx for the quick reply :) I've already tried the following things:

I was on CM 9 Anzu with doomkernel (i think) and noticed the sudden drain of my battery...

So i switched to KTG kernel and flashed to Ultimate Xperia HD rom

I formatted my SD just to be sure (because i thought i had the media scanning bug)

with battery stats i had some huge wakelocks wich i solved trough solutions found on the forums here. but none of them realy improved battery life... they just removed the wakelocks.

I'm kinda running out of options now..

Cheers
[BetterBatteryStats] sasha007:
I keep getting a message saying : Battery infor service could not be contacted .
[BetterBatteryStats] Karpfenhai:
Reboot, ensure bbs is not moved to sd.

Tapatalked from my Galaxy SII
[BetterBatteryStats] tom0:
Try another time if happend.

Here from time to time the same.
[BetterBatteryStats] higginmi:
Hi I rebooted this morning and have had the phone in my pocket without going near it since. Can you look at my dumpfile and see if you can spot anything, thanks!
[BetterBatteryStats] D3VILG3N3:
Anyone has an idea what might be wrong?

Thx
[BetterBatteryStats] It_ler:
There is not much to optimize IMO.

Main wakelock from:

Facebook (try FriendCaster or use the web interface in a browser)

GpsLocationProvider (check that all location service options are disabled)

Gmail (try another email app with manual pull, and disable auto-sync of your accounts)

Google+ (if you don't need it, disable it)

Rest seems to be quite OK.
[BetterBatteryStats] guido_glx:
Ok, here's another log... now I've lost 0,4%/hr (which is much better than yersterday) but deepsleep has been 96,2%... weird!
[BetterBatteryStats] It_ler:
There seems to be a "bad" calculation:

Since 7 h 5 m 40 s Ratio: 100%

Deep Sleep (): 6 h 59 m 18 s (25158 s) Ratio: 96,2%

Awake (): 6 m 21 s (381 s) Ratio: 1,5%

I would say: 100% (Total) - 1,5% (Awake) = 98,5% (Deepsleep)

That sounds better :fingers-crossed:

And enjoy your phone !
[BetterBatteryStats] int0x13:
Hello, i have "NlpWakeLock" as partial wakelock that took me 17m45s. Any idea what it is and how to stop it?
[BetterBatteryStats] It_ler:
Have a look here or here.

Seems that most people could help to disable autostarts for GSF and Maps. (Links to the instructions are in post #3.)

Give it a try and report back !
[BetterBatteryStats] Karpfenhai:
Plus upgrade to the latest gapps to prevent incompatibility (no more latitude in New maps).

Regards

Tapatalked from my Galaxy SII
[BetterBatteryStats] jfriend33:
How the bloody heck are you guys getting such few Facebook wake locks?!

Sent from my DROID RAZR MAXX HD
[BetterBatteryStats] staffordniko:
Greenify!
[BetterBatteryStats] It_ler:
Disable all notification, greenify it, use an alternative social networking app (such as Friendcaster), use web interface in a browser ...

BTW, I have zero facebook wakelocks ... as I have uninstalled it. Don't use it at all. (I even have no FB account.)

If you use facebook and the facebook app a lot, you have to life with its battery consumption.
[BetterBatteryStats] jfriend33:
Loop

I suppose I could enable email notifications and greenify or un install the app. I think it's funny that after all these years Facebook is still an issue. I remember the days when notifications didn't work and apps like bloo for android and to be used.

I have Facebook set not to refresh but certain push notifications are enabled. Decisions decisions.

Does anyone here know how to change my time stamps on xda? Everything is always marked 6 hours ahead of what it should be. And under no settings can I find a time zone. Thanks in advance.

Sent from my DROID RAZR MAXX HD
[BetterBatteryStats] It_ler:
It's a setting in your User Control Panel.

Under Settings & Option you will find Edit Options.

Scroll a little bit down to "Date & Time Options" ... there you can specify your time zone.
[BetterBatteryStats] Ganapatya:
Hello gentlemen. Please appreciate help to distinguish it drains my battery, if my applications or custom rom and kernel , which I have installed.

My suspicions are for the rom.

Here my log, all night on screen off, with wifi on (not use):

View attachment BetterBatteryStats-2013-07-15_130438965.txt

It drain [6,3%/h] I think too much to let it all night without use. if I leave it in airplane mode (wifi off) does not drain anything.
[BetterBatteryStats] wood1978:
Excellent work!

Thanks you.
[BetterBatteryStats] peped94:
is it normal that i can only see the 'unplugged' and 'current' option ? no other option there .:confused:
[BetterBatteryStats] It_ler:
Awake (): 6 h 37 m 15 s (23835 s) Ratio: 55,3%

Screen On (): 52 m 46 s (3166 s) Ratio: 7,3%

The difference between your Awake time and the Screen On time is very big ... more than all your wakelocks together.

I see that your phone sent a lot of time in the lowest frequency step (instead of going into deepsleep):

200 MHz (): 6 h 2 m 23 s 50,4%

Maybe you should try another CPU governor (if you can change it) ... or flash another kernel.

---------- Post added at 08:46 AM ---------- Previous post was at 08:44 AM ----------

BBS shows only the available reference points.

If you set a custom reference, you will have "Custom" too.

So yes, it's normal.
[BetterBatteryStats] peped94:
another things is why my awake and screen on time have equal percentage ? i mean almost equal . is it suppose to be wakelock= awake - screen on time ?
[BetterBatteryStats] It_ler:
Let me repeat to avoid missunderstandings:

Your other stats:

Deep Sleep (): 5 h 21 m 25 s (19285 s) Ratio: 44,7%

Awake (): 6 h 37 m 15 s (23835 s) Ratio: 55,3%

Screen On (): 52 m 46 s (3166 s) Ratio: 7,3%

So Awake ratio is 55,3%, and Screen On ratio is 7,3%.

That is not equal ... not even "almost equal".

What I know is that Total time = Deepsleep + Awake.

Don't want to get too theoretical here.

But in ideal circumstances (for an idle dump), the difference between Awake time and Screen On time should be zero.

Then there would be no unwanted battery drainers, no wakelocks, no alarms, etc.

So speaking ... the lower the difference between Awake and Screen On time, the more battery optimized is your system.

The difference is normally caused by wakelocks and alarms.

But in your case, the difference between Awake and Screen On is so big, that it can not be explained by the wakelocks and alarms only.
[BetterBatteryStats] Karpfenhai:
Let me hop into this for a moment, afaik bbs reports only the "active" wakelocks caused by a certain app, it does not report the overhead caused by alerts, you phone needs around 6 seconds from deepsleep - awake - back to deepsleep.

Therefore the total count of alarms is important too.

And they are massive in this particular case...

Regards

Tapatalked from my Galaxy SII
[BetterBatteryStats] It_ler:
Thanks for enlightening me :good:

BTW, in his dump, I can not see "massive" alarm counts. Maybe I need new glasses :cool:;)
[BetterBatteryStats] rowlers:
I seem to be getting more drain during the night than I used too. I used to get 3% drain, now it can be up to 10% and I don't know why? :banghead:

Wifi/data/sync off through night.

Anyone point me in the right direction?

https://docs.google.com/file/d/0BzwQ41Bx6_lEc21YOS1ISUtYUjA/edit

Thanks
[BetterBatteryStats] smokarz:
Sorry, complete newbie here. But my phone seems to be awake all night. How do I find what's keeping it awake?
[BetterBatteryStats] Karpfenhai:
Post a dump..

Tapatalked from my Galaxy SII

---------- Post added at 01:54 PM ---------- Previous post was at 01:52 PM ----------

Invalid dump, read the op and come back.. :cool:

Tapatalked from my Galaxy SII

---------- Post added at 01:56 PM ---------- Previous post was at 01:54 PM ----------

Same for you new dump, but idle one please..

Tapatalked from my Galaxy SII
[BetterBatteryStats] Ganapatya:
Which do you recommend? Screen off Governor profile to force to deep sleep?
[BetterBatteryStats] It_ler:
Sorry, I don't know much about the CPU governors on your device.

It's just a suggestion to change it and check, if the deepsleep ration will increase.
[BetterBatteryStats] smokarz:
And here's the dump. let me know if you guys need anything else.

Thanks,
[BetterBatteryStats] smokarz:
Looks like msm_hsic_host is the culprit? What is it?

Kernel Wakelocks

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

msm_hsic_host (): 6 h 40 m 8 s (24008 s) Cnt:(c/wc/ec)6188/3936/0 89.0%

suspend_backoff (): 1 h 3 m 47 s (3827 s) Cnt:(c/wc/ec)383/0/383 14.2%

PowerManagerService (): 22 m 24 s (1344 s) Cnt:(c/wc/ec)2760/0/0 5.0%

mmc1_detect (): 13 m 10 s (790 s) Cnt:(c/wc/ec)4948/0/0 2.9%

alarm_rtc (): 10 m 32 s (632 s) Cnt:(c/wc/ec)860/0/205 2.3%

wlan (): 4 m 33 s (273 s) Cnt:(c/wc/ec)533/0/0 1.0%

sns_periodic_wakelock (): 4 m 4 s (244 s) Cnt:(c/wc/ec)167/0/0 0.9%

radio-interface (): 1 m 37 s (97 s) Cnt:(c/wc/ec)120/0/0 0.4%

alarm (): 7 s (7 s) Cnt:(c/wc/ec)1702/4/0 0.0%

power-supply (): 5 s (5 s) Cnt:(c/wc/ec)412/-9/0 -0.0%

PowerManagerService.Broadcasts (): 1 s (1 s) Cnt:(c/wc/ec)10/0/0 0.0%

qmuxd_port_wl_9 (): 1 s (1 s) Cnt:(c/wc/ec)24007/0/0 0.0%

smd_sns_dsps (): (0 s) Cnt:(c/wc/ec)42409/0/0 0.0%

KeyEvents (): (0 s) Cnt:(c/wc/ec)24077/0/0 0.0%

qcril (): (0 s) Cnt:(c/wc/ec)763/0/0 0.0%

mmc0_detect (): (0 s) Cnt:(c/wc/ec)4948/0/0 0.0%

sns_async_ev_wakelock (): (0 s) Cnt:(c/wc/ec)42527/0/0 0.0%
[BetterBatteryStats] Casanoaa:
It's network connection what i know and something we don't no.
[BetterBatteryStats] smokarz:
What did you just say?
[BetterBatteryStats] chamonix:
The governor does not make any difference: when you phone is in deep sleep the CPU stops
[BetterBatteryStats] chamonix:
The picture from that dumpfile is not clear. Can you start by turning off wifi and repeat the exercise of taking an idle dump
[BetterBatteryStats] chamonix:
No because wakelocks can overlap (each other and with screen on). The reason why we always as for an idle dump is because some wakelocks that can occur while you are using the phone may be cause by exactly that and so are not relevant because they potentially would not be there otherwise.

I also there is a time between the release of a wakelock and the time where the pm suspend cycle starts. The same for alarms: the wake-up cycle and the suspend cycle will keep your phone awake for some time even if no wakelock is held
[BetterBatteryStats] Casanoaa:
Sorry i said. What I know is msm_hsich has something to do with network data connectivity.

Also you can google it.
[BetterBatteryStats] billykhan:
Guys im attaching my dump file please let me know if its normal or not coz im having overnight drain issue thanks
[BetterBatteryStats] Karpfenhai:
Here are some homework for you,

- read the op with care

- enable root features

- take a longer reading

- ensure the dump is straight idle

- Post it again

In this order, regards.

Tapatalked from my Galaxy SII
[BetterBatteryStats] mistermidas:
How does one go about finding the cause of an "sns_periodic_wakelock" issue? When I look in my ROMs battery stats, nothing is really keeping the CPU awake. But my phone doesnt seems to go to sleep all of a sudden and that particular wakelock is the biggest culprit.
[BetterBatteryStats] ss4vegeta786:
Galaxy S2 I9100

Hi, I have a Samsung Galaxy S2 I9100. I got it like 3 days ago. It had gingerbread on it, I flashed it to the official Jelly Bean firmware. My battery life is extremely short even when I am not using my phone. I charged it to 100% and left it unplugged overnight sitting there and it was dead in the morning. After googling around I read about betterbatterystats. I ran it and noticed my phone is not going in to Deep Sleep. I've posted the Log file below. I disabled wifi while running this. Please help me on how I should fix this! Also, thank you for the help in advance.
[BetterBatteryStats] Karpfenhai:
go to chrome, settings, developer options, disable tilt scrolling, take another reading, suspend_backoff should be almost gone, good luck.

Tapatalked from my Galaxy SII
[BetterBatteryStats] ss4vegeta786:
If by Chrome you mean google chrome, I don't have that installed. I use the stock internet browser that comes with android. I tried looking in the browser's settings but I couldn't find what you mentioned.
[BetterBatteryStats] LouisLeonardo:
Hello, I never received any answer for my problem, and I would need help. Today I observed that whenever I use apps using wifi (instagram and facebook mostly) the battery life would drop and the phone would get very hot. Also, the wakelock MessageService (i think that's the name) used a lot of battery according to BBS last time I checked. Can someone PLEASE help me? I'm not familiar with all this but I would like to make my phone work better. THANKS
[BetterBatteryStats] vishal11in:
Pls find attached the idel dump
[BetterBatteryStats] r1akn:
Left the phone to night here is my dumpfile

is everything normal?
[BetterBatteryStats] undertrip:
what do u mean by plug/unplug? it means i charge the phone to 100%then unplug it and then leave it for 1-4hours?
[BetterBatteryStats] Casanoaa:
Provide an idle log. Unplug and leave phone 4 hours without touch and dump a file.

Enable alarms and network in bbs app.

Disable autosync of email app.

Disable autosync of viber.

Disable calmeter

For GSF look in OP

Provide an idle log. Unplug and leave phone 4 hours without touch and dump a file.

Enable alarms and network in bbs app.

Sendt fra min GT-I9300 med Tapatalk2
[BetterBatteryStats] billykhan:
Here is my dump file again please guys someone check this out and let me know thanks
[BetterBatteryStats] chamonix:
It us meant as written. BBS reacts on events and the unplug event is important here. The battery level us not relevant except if your phone uses the battery level to do something (eg some samsung phones can be configured to do some 'power saving' or turn off certain features below 25 pct). As this is device specific I can not recommend anything on that.
[BetterBatteryStats] undertrip:
i have htc one with 4.2.2, and GSAM battery monitor showed that wakelock is 17% draining, so i attach dumb file or screenshot for u to help me?
[BetterBatteryStats] Karpfenhai:
Oh shiat then, it will be hard to find, usually it's the proximity sensor going mad.. to prevent long time searches, do a clean install of your Rom if not to much effort.

Tapatalked from my Galaxy SII
[BetterBatteryStats] Ganapatya:
I have a question that haunts me head still. What affects more spending power in the system, the kernel or the ROM?

Can a particular rom on a specific "kernel power saver" also be responsible for increased energy expenditure?

Best regards.
[BetterBatteryStats] It_ler:
I'm not sure if I got your question correctly.

There are many, many different things influencing the battery life.

Some are from the ROM and others from the kernel (and many influences are either from the ROM nor from the kernel).

So both have an impact on your battery life.

IMO, the kernel's impact is higher, as this controls the basic interface to most of the hardware.
[BetterBatteryStats] nobnut:
Don't worry, it will be worth it in the long run :)
[BetterBatteryStats] miloytyn:
I didn't speak about wakelocks, I said processes. The partial wakelocks are shown correctly I assume, but the used process time shows only few second which is incorrect. The correct usage times are displayed e.g. from that menu which opens with *#*#4636#*#*.
[BetterBatteryStats] nobnut:
My bad. I didn't pick up on that correctly.

EDIT:

There is however possibly a simple explanation for this. You will see in BBS that you have three options for a timestamp of sorts... by that I mean from when you want the figures to be displayed.

If you set a 'Custom Reference'. Processes will be recorded from that time. Or they be be recorded from either when the device was unplugged, or last charged.

In this manner you obviously only see processes in this period, whereas the stats that are available in the menu from *#*#4636#*#* are from device boot.

So the former is a subset of the latter and therefore will be lower.

This is clearly not a bug. It is designed in this manner. You can always set a 'custom refernce' from the device start and therefore the figures will match :)
[BetterBatteryStats] miloytyn:
Unfortunately that doesn't work either. Also, I don't think that this is a bug in BBS since the same problem occurs in Battery Monitor Widget. It is probably something wrong in my phone and therefore I'll gladly welcome any ideas how to fix that.

Actually, Battery Monitor Widget displays different times than BBS. Currently it shows 2min 14s for email whereas BBS shows 11s+1s for it in since charged&unplugged stats.
[BetterBatteryStats] chamonix:
Pretty simple:

- the android battery service provides a layer to kernel wakelocks

- the battery service provides different references (since....), proc just totals

By 'crippled' I meant breaking the interface between kernel and userland, I didn't intend to offend anyone. Sorry if my comment came over too harsh

Edit: for those having logcat you may notice that there are two output for kernel wakelocks: one comes directly from proc, the other one from the battery service and stopping to work at some point in time. The comment about usb debugging is interesting because on my phone the kernel wakelock always work when plugged in (and debugging)
[BetterBatteryStats] yhrn:
Just as clarification; I never get any kernel wakelock stats. Reboot makes no difference for me.

P.s. Chamonix: Did you see the logcat I posted in post #1747?
[BetterBatteryStats] s2d4:
Fair call sir, thank you very much for the clarification. pity the discussion didn't progress much as nobnuts took it to some other tangents but ohh well.

btw, I might be going on a limb here but the only recent changes at a kernel level to do with battery stuff that I am aware off, entropy512 if you are also reading this, I was wondering if the patch introduced to do with the wakelocks of fuel gauge may have impacted on this?

https://github.com/Entropy512/linux_kernel_sgh-i777/commit/fc9eb85807302583259e27013ed184a43107bb67

To nobnuts, Please just healthy discussion, no finger pointing and over defensive argumentative rants, thank you.. :)
[BetterBatteryStats] phatboypat:
Wanted to add that I am also only receiving kernel stats when plugged in.
[BetterBatteryStats] chamonix:
Yes and it's very interesting:

D/BatteryStatsProxy(15233): getWakelockStats was called with params [iStatType] = 0[iWlPctRef] = 0
D/BatteryStatsProxy(15233): Kernel wakelock '"vbus_present"' : reading fields from SampleTimer: [currentReportedCountVal] = 1[currentReportedTotalTimeVal] = 4996182[unpluggedReportedCountVal] = 1[mUnpluggedReportedTotalTimeVal] = 4996182
D/BatteryStatsProxy(15233): Kernel wakelock: "vbus_present" wakelock [s] 0 count 0

As you can see there are two series of the same data (should be at least) logged. The second serie is what is displayed ans as you can see both values are "0" (filtering removes them from the list).

Now the first serie is something I added to 1.3.1 in order to narrow down the problem. Basically that data is the raw data coming from Android's proc parser. The difference is that that data does not have (as proc does not provide) the difference references (since....).

What this tells me: android is at some point in time losing track of the "charging/charged/plugged/unplugged" state and is not able to cumulate the right counters anymore, leading to zero values.

I will try to narrow down this a little further by:

- adding the raw data to another view in BBS

- add more logging of the current state Android believes it is in

and post this in a new version 1.3.2
[BetterBatteryStats] chamonix:
The huge awake time is obviously respobsible for the drain. On the other hand there are no partial wakelocks to explain this so your problem is not in the userland but somewhere below.

We are working on getting the kernal wakelocks fixed but in the meantime you could post the result of

cat /proc/wakelocks

here. I'm no specialist on non userland related stuff but there are some reading this thread who may help you finding out what's wrong.
[BetterBatteryStats] yhrn:
Ok, glad it was useful. I'll post a new logcat when 1.3.2 is up. Can't help more as I don't know much about Android or Linux development.
[BetterBatteryStats] ludoo:
Thanks! I'll monitor the phone tonight too, and post the output of /proc/wakelocks tomorrow if the problem persists.
[BetterBatteryStats] Entropy512:
Chamonix, I apologize for not stopping by since my last post. I've been extremely busy.

Kernel wakelocks are not showing for me in 1.3.1.0 (XDA edition). Totally blank.

I assume you're trying to filter them somehow based on "since charged" and the filter is broken. I recommend adding:

"Since boot" (i.e. no filter of /proc/wakelocks)

Convert sleep_time to minutes

Sorting by sleep_time (total_time is kinda worthless...)

Also, you MUST show the various count statistics (wake_count, count, expire_count) so that "long single wakelocks" can be isolated from "frequent wakeups".

To Galaxy S II users:

A drain of around 4-4.5%/hour and nothing showing in BBS or Settings->About Phone->Battery is consistent with a long-running kernel wakelock. SiyahKernel, my kernel, and a few others have a fix for the most common cause of this, but there could be other causes. (BTW, if you care about battery, don't use BLN - it holds a permanent wakelock while active on the I9100.)

A drain of 4-5%/hour with deep sleep at 50% and the remaining frequencies split around 50/50 between 200 and 800, with Android OS at 75%+, is consistent with something waking your phone frequently. Look for something with high sleep_time and count in /proc/wakelocks . Kernels patched up to 2.6.35.12 or above will NOT show high Android OS percentage, but you'll still drain just as fast.

For more:

http://xdaforums.com/showthread.php?t=1308030

http://xdaforums.com/showthread.php?t=1290020

Note that the first 10-15 pages of this one other than the rewritten first post are kinda useless
[BetterBatteryStats] nobnut:
I'll try. Maybe you can meet me halfway and keep up by adopting some logic and using a smattering of intelligence when formulating responses.

Maybe you could also try spelling my name correctly?

Let's see how we get on.
[BetterBatteryStats] chamonix:
New version 1.3.2

Ok, another attempt to narrow down the kernel wakelock problem. I have added some logging to try to understand where batteryservice gets lost whether the phone is plugged or not.

For those who like reading logcat it looks like:

Log.d(TAG, "Kernel wakelock '" + wakelockEntry.getKey() + "'"
+ " : reading fields from SampleTimer: "
+ " [currentReportedCountVal] = " + currentReportedCountVal
+ " [currentReportedTotalTimeVal] = " + currentReportedTotalTimeVal
+ " [unpluggedReportedCountVal] = " + unpluggedReportedCountVal
+ " [mUnpluggedReportedTotalTimeVal] = " + unpluggedReportedTotalTimeVal
+ " [mInDischarge] = " + inDischargeVal
+ " [mTrackingReportedValues] = " + trackingReportedValuesVal);

The both last values are the relevant ones.

This version also adds a second Kernel wakelock stat and I use an alternate method to retrieve the data, working around the state mismatch.

Obviously this version is for diag only as there are two stats now and they show different results.

I'd appreciate your feedback about consistency, availability of the stats and correctess of the values.
[BetterBatteryStats] chamonix:
Don't apologize, there is no reason... we are all spending spare time here and a healthy dev knows his priorities :)

I will study your feedback and add feature requests based on that
[BetterBatteryStats] yhrn:
Here's a logcat from 1.3.2. I first selected "Kernel Wakelocks" and then "Kernel Wakelock (alternate)" while logcat was running. If I can help more please let me know.
[BetterBatteryStats] chamonix:
Done my homework and read both. Interesting and sometimes funny stuff to read.

Now my plans:

On my phone the alternate (since charged) method for wakelocks seems to work consistently but I will keep on testing. In addition I will write some parsing code for proc/wakelocks and dumpsys alarms in order to get that data to bbs too.