yashsingh1/xdaforums huggingface dataset:
[BetterBatteryStats] Tungstwenty:
Are you really using Siyah 4.0.1 as stated in your sig?

Can you check if you have a file "/sys/devices/system/cpu/cpu0/cpufreq/stats/time_in_state", what are it's permissions (it should be "-r--r--r--") and what are its contents?

This is definitely not a BBS problem but rather something related to kernel, and I find it strange that Siyah 4.0.1 would behave like that since I've been through all updates and didn't recall ever seeing this issue. Not that I monitor the cpu states every time ...
[BetterBatteryStats] Juanmiwow:
It helps me to watch what app were drinking my battery! Thanks!

Enviado desde mi GT-i9001 usando Tapatalk 2
[BetterBatteryStats] tigerphil:
i am using siyah 4.0.1. i've just followed the path to "time_in_state" selected properties and the msg as follows;

"property cannot be retrieved" :confused:

also after trying to open the file with file editor i get the msg "file not found"
[BetterBatteryStats] mmm286:
Hi.

Could you analice these log

many thanks and sorry for my english
[BetterBatteryStats] cerps:
Please review my dump file and the attached screenshot. I recently switched to a new ROM, it was good the first day or 2 and then something changed and now it appears to keep waking up and draining the battery. I've tried to figure it out on my own but had no luck. Weather is set for 6 hour refresh. Facebook set to never. Google Talk is signed out and not used. Thanks for the assistance.
[BetterBatteryStats] -earth-:
This is the message:

I get this, when i restart after the install of this app.

When i now close this app via trebuchet menu, i can start it without any error.

But if i reboot, i get the error again.
[BetterBatteryStats] alexinna:
Please make sure your phone is idle for the correct dump. In your case I see that you were listening to music:

AudioOut_1 (1013): 34 m 53 s (2093 s) Count:44 7,7%
android.media.MediaPlayer (mobi.beyondpod.BeyondPod): 31 m 54 s (1914 s) Count:9 7,0%
"AudioOutLock" (): 1 h 7 m (4020 s) Cnt:(c/wc/ec)41/0/0 14,7%

Based on information in the current file I would suggest to review account sync options because you have way too many of them. Also your google cloud backup is on. Better option exist like TB for example. Try these first and come back with a new dump if needed. Good luck!

---------- Post added at 05:14 PM ---------- Previous post was at 05:00 PM ----------

Yes GoWeather gives the biggest culprit. I never use it but check how it gets location and if you can't figure out just remove it. You can always find better one :)

Your

AlarmManager (Android System): 1 h 19 m 2 s (4742 s) Count:152 919.4%

is so high. Probably because other apps schedule too many alarms. Read wiki. PushPin would be another app to review.
[BetterBatteryStats] MBurns2:
as high wakelock i have only audio-out2 (10 min in 5 hours).Do i have to remove it ? ty
[BetterBatteryStats] o0boiboi0o:
Hi guys,

Is it normal that when you reboot ur phone, BBS wont rmb the previous data? ie after I rebooted, there is no info under SInce Unplugged or Since Charged. There is only info under Since Reboot. Bcos of this, I cannot capture the actual awake time and screen on time for the entire battery life. Is this a bug? or sth that I missed? Everytime I rebooted the phone, I only managed to capture data during the reboot period. Every reboot resets the data. :crying:
[BetterBatteryStats] cerps:
I think post #3 covers this. Since version 1.9 you need to plug and unplug your phone after rebooting to get "since charged" or "since unplugged" data.
[BetterBatteryStats] o0boiboi0o:
Yup, I did this and there is no problem capturing data for Since Unplugged. But after you reboot, data missing again. Left Since Reboot, U mean we must plug and unplug everytime we reboot? And also, what about Since Charged? I charged fully and then unplugged, so there is data for both Since Charged and Unplugged. But after I rebooted, data missing again? How?
[BetterBatteryStats] iamnotkurtcobain:
Damn what's wrong with RILJ?

Gesendet von meinem GT-I9100 mit Tapatalk 2
[BetterBatteryStats] Tungstwenty:
I see you've updated your sig to 4.1.2 (I'm also using it).

If the issue persists - either on BBS or by querying the file contents manually using file explorer app - please report that in the Discussion thread of that kernel.
[BetterBatteryStats] tigerphil:
Thanks for that. I'm stil facing the same problem so will post in the thread. Thanks for the link
[BetterBatteryStats] g3ckospy:
have you tried lpq modem?
[BetterBatteryStats] alexinna:
Please remember reboot wipes out all other references. Do you have "Fallback to Since Boot" checked on settings screen (v. 1.10.x)? If yes it should be used until plug/unplug (your default) reference is created. Just reboot and dump the file. It should show what references do you have.

---------- Post added at 01:39 AM ---------- Previous post was at 01:33 AM ----------

If you were in a zone with a bad connection your phone was trying to connect again and again. This process usually use lots of juice. Full dump will show connection stats to confirm this theory.
[BetterBatteryStats] Masa6GCS:
Damn what's wrong with RILJ?

Gesendet von meinem GT-I9100 mit Tapatalk 2[/QUOTE]

I would agree that it is presumably your phone attempting to reconnect to a cell signal. Do you by any chance get a screen shot of the standard android systems battery window that will show the state of your cell signal
[BetterBatteryStats] guiltyxsin:
Is it possible to help me identify the culprit?

Hi,

I have been having battery drain of 2-3% per hour when my phone is in deep sleep for over 95% of the time.

I am not sure what's wrong and couldn't seem to find my way around it.

Please help me analyse my dump file and give me a little direction as to what may cause it.

I am using neutrino 2.8 and OC to 1.3 but setCPU keeps it max at 1.1 only.

Thank you in advance.
[BetterBatteryStats] alexkno:
During that 5h your wifi was switched on.

And eBay and Facebook raised many alarms.

And do you use a battery monitoring widget? Delete that

sent via Tapatalk
[BetterBatteryStats] Karpfenhai:
You dump looks pretty weird and incomplete, could you try to produce a new one?

make sure you unplug your device right before you start the reading.

Ebay plus Facebook are the winners, tell them to behave or get rid of them, for FB, use Friendcaster, Ebay use browser;)

BTW, are you using LTE?

Good luck!
[BetterBatteryStats] John P:
Good morning all,

Hopefully I have posted this in the correct forum.

I am new to this forum and joined up recently in the desperate hope some of the knowledgeable members will be able to help me with my battery drain whilst in standby mode issue as I'm completely at and end with it. I have had the phone for just over two months and I cannot seem to fix it, it is my first Android phone, and its great other than this battery drain.

Sorry for the long post, but I will try to explain the problem as best I can.

I have read many, many battery drain issues on this forum and many other forums, I have also contacted Samsung directly regarding the issue. The battery life is good when I'm using the phone, the problem occurs every time the phone is in standby mode.

I have been testing my battery drain each night and the average drop is 6.21% per hour, so 50% drain over the course of an 8 hour period. This is always done with the phone on my bedside cabinet, and not using the phone what so ever. So when I am out and about and the signal is rising and falling the drop is even higher.

I know I can turn off features such as data, Bluetooth, GPS, Sync, but this is not practical to do every time I put the phone in my pocket. I always have wi-fi turned off. I am only syncing my gmail calender and contacts, nothing else. I had K9 mail installed and the BBS stats showed a lot of partial wakelocks caused by "com.fsck..k9.K-9 Mail" so I deleted K9 and installed Maildroid instead but the drain problem still persists. I have three email accounts which are all imap accounts so are set up to push rather than sync periodically with the server, they are only syncing one weeks worth of emails. I do need these business emails to come through so am reluctant to reduce the sync frequency. I have not routed my phone.

I was offered advice by some helpful members of various forums, and they advised me to download BetterBatteryStats and cpu spy. I have done this and from reading this forum I can see that the betterbatterystats app was written by a member on this forum so I was hoping somebody will be able to help me with the results and hopefully help me to solve this problem. I have attached the dump file, hopefully I have done it correctly.

I really hope and would be very grateful if somebody can shed some light on this as I have been trying to fix it since I bought the phone and its becoming quite frustrating as I don't no what else to do.

If I have missed any information, or you need to know something else, please ask.

Many thanks, John :)

Screen shots below, I have not included 'Network' or 'Alarms', because they did not show anything, perhaps because my phone is not routed?
[BetterBatteryStats] iamnotkurtcobain:
I have the ld3 modem. Only modem on my S2 with (almost) zero signal drops on cm10...

Gesendet von meinem GT-I9100 mit Tapatalk 2

---------- Post added at 09:23 AM ---------- Previous post was at 09:23 AM ----------

BBS told me I had good signal for hours... so :/

Gesendet von meinem GT-I9100 mit Tapatalk 2
[BetterBatteryStats] It_ler:
Yes, network and alarm need root.

First of all, please disable bluetooth and have another run for recording the battery stats.

Then we may see the other culprits better.
[BetterBatteryStats] r7s:
com.google.android.location (): Wakeups: 410
Alarms: 410, Intent: com.google.android.location.ALARM_WAKEUP_LOCATOR

From where can it come from? I don't have Facebook for Android installed and it isn't caused by Endomondo, because it showed up a few hours after I was running.
[BetterBatteryStats] John P:
Hi, thank you very much for your reply. Yes,no problem, I will turn bluetooth off and do a re-run tonight and post the results up in the morning. I would do it now but its a bit difficult during the day when I'm in and out of the car connecting via bluetooth.

I shall look forward to tomorrows results and to see what/if you are able to find the culprit. Fingers crossed :)

Thanks again, John.
[BetterBatteryStats] It_ler:
Check if you have disabled all loaction services in menu Settings > Location services and UNTICK all options.

(Only enable GPS if you want to navigate, then disable it again.)
[BetterBatteryStats] r7s:
Oh, I don't even remember turning these options on, I turned them off some time ago, maybe they were resetted by flashing a new CM nighlty.

Anyway I untick all but the first one and I'll se if it helps. If not, I'll untick the first one too.
[BetterBatteryStats] alexkno:
looking on your stats, I will focus on the most evil ones.

First: turn off bluetooth if not needed!

second look at this: this kept your phone alive:

multipdp means there apps/widgets that sync and keep your phone alive. If you use weather, ebay,, sprorts ticker apps (or widgets) or widgets for facebook etc: remove them or set the sync time to 5 hours or similar.

fd_interface: check whether your network provider offer 'fast dormancy', if not switch it off! (*#9900#* - just search the forum)

suspend_backoff: do you use wifi? if yes switch off 'notify me on open networks'. Else check your apps running background/foreground.

l2_hsic: additionally it seems your phone switches oftern between networks (3G-2G), it may be worth to enable 2G only

"multipdp" (): 4 h 36 m 35 s (16595 s) Cnt:(c/wc/ec)1796/0/1797 49.3%

"secril_fd-interface" (): 3 h 10 m 11 s (11411 s) Cnt:(c/wc/ec)3643/0/0 33.9%

"suspend_backoff" (): 2 h 13 m 35 s (8015 s) Cnt:(c/wc/ec)802/0/802 14.9%

"l2_hsic" (): 1 h 51 m 32 s (6692 s) Cnt:(c/wc/ec)15798/237/15799 19.9%

"alarm" (): 57 m 30 s (3450 s) Cnt:(c/wc/ec)88102/0/0 10.3%

"alarm_rtc" (): 39 m 41 s (2381 s) Cnt:(c/wc/ec)10332/4/126 7.1%

"rpm_hsic" (): 32 m 11 s (1931 s) Cnt:(c/wc/ec)7968/0/0 5.7%

---------- Post added at 11:48 AM ---------- Previous post was at 11:45 AM ----------

whatever your order is but disable the one which is called 'use networks etc to locate...', this is next to gps the worst
[BetterBatteryStats] Karpfenhai:
Discussion: Not delete ref. after reboot

Hi there, i would like to ask Sven and you Guys whether its useful to keep the since unplugged and since charged ref. after a reboot?

Imho, the deletion causes more trouble than benefit.

Not sure whether there is a risk, but the condition "Since unplugged" and "Since charged" do not change after a reboot, so why do we need to delete them then?

Sorry sven if this bothers you, but i mean to discuss, not to flame, good weekend to you!

So, my vote for keeping the Refs after reboot!

Who else?
[BetterBatteryStats] It_ler:
+1

I would also prefer keeping the refs for "Since unplugged" and "Since charged".
[BetterBatteryStats] alexkno:
+1...maybe an option to choose (like now the fall back to since boot) would be a trade off.

Specially taking into account that the usb port of my sgs2 is known to break I do not like plugging/unplugging too often
[BetterBatteryStats] Tungstwenty:
On a first glance, it might look like a step back not having this info retained across reboots in the newer versions, and it was also my initial reaction.

But it you think about it, the reason Sven did the change (probably aware that many people would miss that behavior) was so that the numbers were accurate and consistent for all the different types of stats. It's also the same reasoning for the more recent change of not having info while the charger is active.

When the device reboots, lots of things get zeroed out and even if you store the refs prior to shutdown, I'm not sure whether they can be loaded at boot and added up from then on as if the device never went down.

Perhaps Sven can share some thoughts about this, and even how feasible would it be to take an extra reference immediately before shutdown so that it could be "resumed" after boot.

IMO the "since boot" reference was a very useful addition and that pretty much eliminates the problem that's being brought up.
[BetterBatteryStats] Karpfenhai:
I think i know what you mean, since BBS is not using any active monitoring the data must be inconsistent somehow.

But, maybe there is a way like "dump current stats" manually before rebooting to keep them, which would not be to much effort for the users, or bringing up a bbs service which dumps them by automation as soon as a reboot occurs?

I got you point, thx for this ;)
[BetterBatteryStats] uf21:
Ebay never used to cause me problems, I wonder why it is now and I think I'm getting rid of fb.

I don't use any battery monitor widgets, wonder what it is?

Sent from my GT-I9300
[BetterBatteryStats] GoJo ^^:
Dunno well the app, what does each color means on the widget bars?
[BetterBatteryStats] dontezuma:
New dump upload

Chamonix and others,

Attached is a dump from last night, which shows 10 hours of pure inactivity (by me, anyway) and a 29% battery drain. I see a lot of wlan wakeups, gtalk (which I am not using, but maybe is set to run on startup?), and some others. I think I fixed the maps thing, but any additional thoughts you have would be appreciated.

I thought I had this dialed in, but I guess not. I'm not sure if the dump shows CPU speed, but I found that it had reset from ondemand to performance, but I switched that back.

Thanks.

Don
[BetterBatteryStats] chamonix:
The procs listed in the ref are definitely an unwanted side effect (#265).

The timestamps are "time since boot". Maybe a weird way to show time but it makes some substractions faster to to everything in milliseconds.

The logcat on tasker would be great. Obviously I have caught one bug but another is burried somewhere ;)
[BetterBatteryStats] uf21:
What maps thing?

Sent from my GT-I9300
[BetterBatteryStats] chamonix:
#266
[BetterBatteryStats] chamonix:
Then your kernel does not support cpu states. Did it work before and if yes what have you changed in between?
[BetterBatteryStats] chamonix:
If none works then your kernel does not provide that info
[BetterBatteryStats] chamonix:
f both BBS and CPU spy do not show any info then your kernel does not provide it
[BetterBatteryStats] chamonix:
Working on that, expect an update soon.
[BetterBatteryStats] cerps:
Go Weather helps a little. I have to test it some more, but it appears that the wakelocks stop when my phone is on the charger and it stays asleep. Anyone have any idea what app/service/process would stop waking the phone while on the charger?
[BetterBatteryStats] Rob2222:
Sent you the data via PM. :)

BR

Rob
[BetterBatteryStats] chamonix:
Tungstwenty got it all right.

The problem is indeed related to the fact that BBS does passive monitoring and uses snapshots. Each snapshot (reference) describes the stats of the stats at a given point in time, in terms of counters (e.g. alarms), volumes (network) and times (plus combinations).

All those counters are based on userland / kernel counters that do not have any history and are reset at boot.

Now imagine following situation (over simplified):

ref "since unplugged": time = 12:00 alarms a1=500 wakeups, deep sleep = 10 minutes

reading at 12:30: time = 12:30 alarms a1=510 wakeups, deep sleep = 11 minutes

-> since unplugged: time=00:30, alarms a1=10, deep sleep = 1 minute

I guess you get the picture.

Now happens a reboot, and all counters are reset to 0. Keeping the previous refs (I could just remove the handling at "on boot").

reading at 13:00: time = 13:00 alarms a1=12 wakeups, deep sleep = 1 minutes

-> since unplugged: time=00:30, alarms a1=-488, deep sleep = -9 minute

I guess you get the picture...

What would be needed to support stats with boot in between would be:

1. a ref stored just before the reboot

2. a logic knowing that "since unplugged" is not just "current" - "since unplugged" but "current" - "since boot" + "at reboot" - "since unplugged"

Pretty tricky heh? Now add that there are many ways to reboot and not all will be proccessed by ACTION_SHUTDOWN (e.g. removing the battery) so sometimes there will be a continuity in the stats sometimes not.

Now that said I am willing to consider that as a feature and think of a logic to implement that continuity but I hope you understand that it's a little more than just commenting out the deletion of the references at boot: https://github.com/asksven/BetterBatteryStats/issues/267
[BetterBatteryStats] alexkno:
your log showed "battery-monitor" (): 18 m 13 s (1093 s) Cntc/wc/ec)1102/0/1102 5.4%

If I am not mistaken it means that something tried to read battery info. This can be an app tracing the data or for example widgets or apps that post info about battery in screen or notification area (like percentage, temp etc)

for ebay: there was an update recently. check whether you have any notifications activated there etc...otherwise simply use the mobile web page...it's the same :)
[BetterBatteryStats] chamonix:
Well that was a full week, in my dayjob as well as at night to bring out 1.10.1.

The good news is the fix went well and I have now kept up with reading and I did some coding in between.

The stuff I am working on:

"unknown error" and cause for widget to sometimes show n/a: I got some good logcat reports showing that the "other stats" sometime fail in retrieving wifi values or signal values. In the current error handling this leads to the "other" stats to fail completely, returning no data. I have now changed that to:

- retrieve only required data for the widget and skipping all other data to minimize the chances of errors

- make sure that an error only skips the section (e.g. Wifi) and not the whole stat.

What I was not able to find is the real cause of batteryinfo being *****y on some stats but I am under the impression that it may be related to some JB roms using unstable drivers. The errors hat I have seen are not related to batteryinfo failing completely but only the access to the data stack (wifi, bt, radio) failing. The error handling takes this into account.

I will see how many other bugs I can fix in a timebox of two hours and will be publishing 1.10.3 for testing once time is over. There will be a few patch releases after that to reduce the bug-backlog after that before I do the next functional iteration.
[BetterBatteryStats] alexkno:
"wlan_rx_wake" (): 1 h 31 m 14 s (5474 s) Cnt:(c/wc/ec)3725/0/3725 13.5%

did you by chance download something or had an app for transfer active before (samba or ftp server/client)?
[BetterBatteryStats] o0boiboi0o:
If so, then how do users know their exact Screen On and Awake time during the entire battery life with reboots along the way? BBS used to retain this info, thus no matter how many reboots user went thru, ultimately they still know the full Awake and Screen On data by just choosing Since Charged option.

EDITED: After reading thru the previous few posts, glad that Sven explained and I think i understand what he is trying to explain. Nevertheless thanks for taking this feedback as well as the effort you put in for this app!
[BetterBatteryStats] alexinna:
BBS will not collect information when phone is on charger so it's no way for you to know what is going on. Also because phone is on charger it's not that important anyway unless when that something consumes more energy then charger can deliver ;) In my opinion phone is working the same way when on charger and even sometimes harder (depends on configuration).
[BetterBatteryStats] o0boiboi0o:
me me! I second it too! i missed the ability to view data for Since unplugged and Since charged. After just one single reboot, I can no longer keep track my actual awake time and screen on time. :crying:

EDITED: After reading thru the previous few posts, glad that Sven explained and I think i understand what he is trying to explain. Nevertheless thanks for taking this feedback as well as the effort you put in for this app!
[BetterBatteryStats] alexinna:
Reboot and plug/unplug after that. If needed charge to 100% again. Also keep in mind that after reboot lots of processes will be started and this process will use some juice so if you need to monitor phone behavior I would suggest to skip first 10 min after reboot. Again it shouldn't drastically change the picture but I usually interested from a day-to-day prospective and not rare case of reboot.

---------- Post added at 06:18 PM ---------- Previous post was at 06:16 PM ----------

Please read this post
[BetterBatteryStats] dontezuma:
Google Maps is a known wakelocker, and Chamonix has detailed instructions on dealing with that (I think in Post 3?). Disabling location services is a big part of that. Clearing cache, too, I think.
[BetterBatteryStats] polobunny:
Just bought BBS. Been using the XDA version for a while and it's definitely my to-go app whenever I have to troubleshoot battery drain. There's so much work and updates put into this app I'd feel bad not spending a cent for it.

Cheers!
[BetterBatteryStats] o0boiboi0o:
Read already so edited my posts as followed :o Thanks! btw what do you mean "interested frm a day-to-day propsective"?

Also, is RIJL really caused only by poor network connection and phone trying to search for network? bcos there are incidents whereby the signal bars are full but my RIJL keep increasing and batt becomes hot. Of cos, these happened not that often.
[BetterBatteryStats] dontezuma:
No, I charged my phone completely, rebooted, turned the screen off, put it on the shelf for the night, woke up in the morning, turned on the screen, executed the file dump, and posted it. No phone calls, no texts. Email was active, as you can see from the Exchange services, but that was it, to my knowledge. Wi-fi was on and connected all night to my home network. I was surprised to see that level of activity.