yashsingh1/xdaforums huggingface dataset:
[BetterBatteryStats] logrej:
Thanks for effort...

Here is what happened from start: I bought it one month old. It is locked to this carrier so no other sim. Guy sold it because of batt drain (but he use phone al the time so it was because of that, or we thought so). It was on GB, and discharged. I charged it to maybe 30% and ubdate to ICS poped out, so I updated it. After full charge it started discharging 10%/h... Then I started changing ROMs. First, reverted to stock GB and it was ok, but when plugged charger, it rebooted, then reboot in middle of phone call... So, I flashed ICS again, and no reboots but batt drain... After few ICS ROMs, I returned GB and drain was still there. Then I changed CSC code to my country, and batt drain disapered, but reboots... :( After that, returned to ICS, and since then, no combination helped. Even stock GB with CSC settings have batt drain...

And to add, I can't connect it as USB storage. PC recognize it only in download mode with Odin.

Phone is still in warranty, so if I don't fix it by the end of the week, I will try to reset counter (will research for that) and give it to service center...

And now about:

Do a ps | grep battery on a console (terminal emulator) and note the pid of the sec-battery process (the 4 digit right after root)

Then kill it --> kill -9 "pid"

I do that where? How? Never done that... :)

Thanks...
[BetterBatteryStats] Karpfenhai:
Ooh you are not Linux experienced?

Send it to the repair center :cool::D:p

The good old terminal... vintage..

Tapatalked from my Samsung GT9100
[BetterBatteryStats] gaui:
I'm guessing the top will be sec-battery-monitor along with eventX-1986 :o
[BetterBatteryStats] logrej:
and it gives me: cannot create process.txt: Read-only file system
[BetterBatteryStats] Karpfenhai:
Enter cd /mnt/sdcard and repeat the command, or remount /system as rw.. too complicated.. ;)

Tapatalked from my Samsung GT9100
[BetterBatteryStats] logrej:
Worked... But it was on charger half time, I disconnected it after 10 sec.
[BetterBatteryStats] Karpfenhai:
That's really interesting! The media server is running all the time, this probably indicates a faulty sd card, didn't you took it out as mentioned before?

As you can see now by yourself, sec-battery isn't your problem, its the Android system server, hopefully caused by the mediaserver process, pull out the sd card and check further, perhaps we got the cause?

Need too sleep, early shift this week.. Good luck!

Disclaimer: All these hints and manuals may also be useful to other people with unknown drain, just tried it guys!

Tapatalked from my Samsung GT9100
[BetterBatteryStats] logrej:
Thanks a lot... will try...
[BetterBatteryStats] chamonix:
As Karpfenhai said there is no trace from those event kernel wakelocks back to the cause, assuming is is related. You could try posting a dmesg. I think we may get more info about PM backouts. Anyway it's definitely not userland
[BetterBatteryStats] logrej:
It is not microsd. Without it, 11% deep sleep in 5 hours. Here are files taken in plane mode, and in normal mode (if that is dmesg, if not, how to get that?)... :)

I used linux 5-6 years ago, and only for short time, so I forgot commands in terminal...
[BetterBatteryStats] robbo89:
Posted a dump last week and was informed my high Android OS battery usage was due to facebook. However, I'm still experiencing quite a large awake time and I don't believe facebook can be solely responsible for it. Uninstalling facebook isn't an option for me as I use it frequently.

GTALK_ASYNC_CONN_com.google.android.gsf.gtalkservice.AndroidEndpoint sometimes causes issues, sometimes it doesn't. I've tried the fixes for it outlined in this thread but they don't seem to have worked. I removed GTalk completely as I don't use it.

I'd be grateful if someone could check my latest dump and help me find what else may potentially be causing problems.

Thanks!
[BetterBatteryStats] gaui:
Tasker is waking up your device, along with Exchange (I recommend using K-9 Mail with IMAP) and try FriendCaster (C2DM push notifications) instead of Facebook app (periodic polling).

Then you should be golden. Your ScreenOn/Awake ratio is pretty good, nearly 80% (the higher the better) but you can increase it if you follow my instructions above.

Good luck, mate. ;)
[BetterBatteryStats] robbo89:
Thanks very much for the advice! Delighted to find friendcaster has push notifications as this was the only thing stopping me from un installing the official Facebook app. I couldn't seem to get k-9 working with my Uni email in the past but I'll give it another go.

On the subject of tasker, does anyone know if there are certain profiles or tasks that wake the device more than others? At the minute I just use it to toggle Autosync every hour and have a scene to control certain profiles (home, uni, sleep etc.)
[BetterBatteryStats] 2qwaszx:
Thanks a bunch, i think its a must have. :D
[BetterBatteryStats] gaui:
Tasker Triggers: App, Time, Day, Location, Hard/Soft State, Event, Shortcut, Widget, Timer, Plugins

I think each time the background Tasker service checks if the trigger has been triggered, it wakes up your device.

Thread on this matter:

https://groups.google.com/group/tas...02aa6935?lnk=gst&q=wake+lock#70e241a502aa6935
[BetterBatteryStats] CalPolyRock:
Thanks for the help. I'll keep an eye on it with Bluetooth disabled and get back to you!
[BetterBatteryStats] KallistiMan:
mipi_link

Hi!

I have most of my kernel wakelocks in mipi_link. I have no idea what it is, could find anything relevant when searching and don't know how to switch it off. Anyone know?
[BetterBatteryStats] MattRob:
Hello, hope somebody can help me out here. I have a high battery drainage, using latest Resurrection including (almost) latest kernel (see below). I use exchange server and it's important to me to get updated on email all the time (heavy user, work-related). Also I have Facebook, Twitter. Further I have Smooth Calender on Homescreen, Fancy Widget Pro for weather (two widgets, also the forecast, forecast every two hours) and Ministocks (updates stock markets every 2 hours). Gmail also on push (as Exchange email). Further Bluetooth always on (when I get in the car, automatically connected) and WiFi always on (for home use and company use).

Attached some screenshots, hope somebody can help me out. I can do about 8 - 10 hours on battery ... ? I always have spare battery with me, but remember that in the past (before ICS) I could make it one day on battery (about 14 - 16 hours). I know I am a heavy user, but if some 'easy' things can help me out considerably, that would be well taken ! Hope you guys can help me out !
[BetterBatteryStats] Tungstwenty:
Hi,

I've been trying to track down these infamous problems with Exchange but unfortunately my device is now stubbornly stable with that regard. Some time ago, it was frequent that it would use this amount of alerts and wakelocks, even with poll every 1h, but even on push mode working properly these counts are way too high.

I currently am not able to reproduce the problem.

However, and since you're also a proud owner of an SGS2 :), there's a tool I'm using to monitor the root cause of these alarms that awake the device, and then the WLs that hold it awake for a while before it can go back to sleep but quickly awake in the next alarm.

If you can also install this logging tool, it could provide precious info on where is this being generated.

Instructions for those who might help in this:

Install Xposed framework (SGS2 only, I guess). Fetch the latest version from here (XposedInstaller.apk)

Open the app and press the install button so that both core files are put in place

Install my mod from the included APK. Open the app and tick the 4 check boxes (2 in each of the sections: log wakelocks & log alarms)

Go back to XposedInstaller app and enable my mod in the 2nd tab

Reboot

You'll see in logcat that verbose info including the stack trace is logged whenever Email or Exchange Wakelock or Alarms activity occurs.

I attach 2 sample files from my phone, where you can see on the 1st one all the data (just filter logcat with "TT_Debug"), and the 2nd is just the headers. With the headers, one can identify the frequency of each of the activities, and after that we can go to the verbose file and see in the stack trace what is the code causing it.

To obtain the log after the mod is running and logging stuff, and after some idle time (e.g. in the morning), just run from the computer:

adb shell logcat -d | find "TT_Debug" > output.txt
or
adb shell logcat -d | grep TT_Debug > output.txt
[BetterBatteryStats] chamonix:
That would be 30 minutes awake in 10 hours. Is that what you call 'large'?
[BetterBatteryStats] chamonix:
I had this kernel wakelock on my gnex and I attribute it to the interface to the camera. There were android/kernel combos that were known to have a problem with GTalk initializing the camera at boot and keeping it 'open'. An open/close of GTalk after the boot was a workaround to this if I recall correctly. Of course I can't tell if that applies to your problem
[BetterBatteryStats] chamonix:
Your main problems in this reading are maps (location) and wifi. First you should make sure that gps is off and that your maps cache settings are to collect data only if wifi is on. Second you need to get used to turning off wifi when it is unused as it causes a huge overhead together with maps. Alternative would be freezing maps.

One this was done you will still suffer from the wakeups caused by mail / exchange but depending on the impact that is maybe something you could live with. Please feel free to repost one the two mentioned issues were fixed
[BetterBatteryStats] chamonix:
A little OT but interesting. I just noticed that freezing maps 6.8 on my s3 and using titanium does not survive a reboot. By survive I mean after a boot it is unfrozen again. I unfortunately have not other device with me to test so it would be great if someone could test and tell me if I should blame maps, samsung or titanium
[BetterBatteryStats] headshrinker139:
Hi, just a quick question here. Does freezing both affect stability in any way? Thanks.
[BetterBatteryStats] headshrinker139:
Sorry, I was referring to this one. Thank you.
[BetterBatteryStats] headshrinker139:
Damn can't seem to get it right. Obviously I just read stuff and rarely join the discussion.
[BetterBatteryStats] robbo89:
Maybe not. I guess I'm just getting greedy...
[BetterBatteryStats] Karpfenhai:
@chamonix, there was a recent update for titanium, the changelog says better support for the s3, maybe the Dev was aware of this issue.

Regarding maps... As i posted before, freezing is not necessary! Disabling ALL autostart is way enough, can be done with autostarts from market.

Tapatalked from my Samsung GT9100
[BetterBatteryStats] MattRob:
Txs for the advice, will start working on that. Will try to think of turning of WiFi and turning off GPS. Although I rarely use Google Maps, let's see what it achieves. Will report back later on my findings.
[BetterBatteryStats] Karpfenhai:
If you're lazy, get used with Llama, you can bind wifi and gps or even Bluetooth on several conditions like maps on =gps on or navigation on = gps on, or leaving home = wifi off.

Works like a charm and consumes almost no battery.

Good luck!

Offtopic i made it! Post number 5555 was mine :)

Tapatalked from my Samsung GT9100
[BetterBatteryStats] epeTm:
This app feels great, thanks! Now just to start studying how to read it...
[BetterBatteryStats] p107r0:
checked on galaxy note, latest TB, maps 6.8, the same effect
[BetterBatteryStats] cdmackay:
I see a few oddities in my log, on a Note running a recent nightly of CM9:

BetterBatteryStats version: 1.8.1.0
Statistic Type: (3) Since Unplugged
Since 44 m 33 s

Deep Sleep (): 39 m 30 s (2370 s) Ratio: 6.6%
Awake (): 8 m 43 s (523 s) Ratio: 19.6%
Screen On (): 60 s (60 s) Ratio: 2.3%

================
Kernel Wakelocks
================
"vbus_present" (): 7 h 58 m 27 s (28707 s) Cnt:(c/wc/ec)1/0/2 80.1%
"wlan_rx_wake" (): 1 h 31 m 14 s (5474 s) Cnt:(c/wc/ec)2461/0/2460 15.3%
"PowerManagerService" (): 1 h 57 s (3657 s) Cnt:(c/wc/ec)9912/0/0 10.2%

In particular:

- Why do I have any vbus_present wakelock, when this is a dump "Since Unplugged"? Should that by definition not be possible?

- The deep sleep ratio looks odd; 39 out of 44 is more than 6%, surely? :)

- How can the above kernel wakelocks be longer than the time that the log covers (i.e. "Since 44 m")?

thanks very much indeed.
[BetterBatteryStats] CalPolyRock:
I had Bluetooth and WiFi turned off and it happened again! Any other suggestions?
[BetterBatteryStats] LordManhattan:
Bug: Deep Sleep doesn't get registered at all. It says 0s, but i do know that it does indeed go into deep sleep.

(Galaxy Note w/ ParanoidAndroid v0.2 w/ CM9 kernel)
[BetterBatteryStats] mikeage:
Overnight (about 7 hours), I left my S2 ICS (4.0.3 official, rooted) running in airplane mode and created the following dump. I'm a bit worried that I see 25% awake with 0.1% screen!

In this particular log, I have tasker running (as well as plume), but I've run many others that do not include them and results seem similar. I have a LOT of partial wakelocks for Tasker, but they seem to be, on average, very short. I also have less than 2 minutes for Titanium Backup's nightly run(s), but I'm not worried about that.

What worries me (and maybe I'm wrong here, but this is how I'm reading it) is the amount of time in Alarms, though the actual alarms display doesn't seem to have that much going on.

I have have 35 minutes in suspend_backoff (what's that?), 32 minutes in sec-battery-monitor (I have no idea what that is; I was running BMW Pro (ccc71.bmw.pro), but I froze that for this test), and around 32-33 minutes in events0, 1, 2, and 3 for process 1978 (which ps says is system-server).

How can I improve this? [it's a company device, and b/c of the flash counter, I'm not willing to replace the kernel or anything else that requires a flash update]

Thanks
[BetterBatteryStats] gpz1100:
@mikeage I'm just starting to learn how to interpret these logs, but it looks like tasker might be causing quite a bit of over head. It doesn't have a high partial wake, but look at the counts. Quite high. Disable it and see what happens.
[BetterBatteryStats] mikeage:
It is a bit high, but (a) I have no shortage of dumps with tasker disabled showing the same ~25% awake time, and (b) the actual number of wakeups seems very low; the developer claims it takes a LOT of wakelocks but they're mostly while the device is otherwise running
[BetterBatteryStats] Karpfenhai:
Nope, unfortunately not from my side ;(

Normally BT should not turn on by itself, sounds like a kernel / rom bug to me..

try a fresh unmodified ROM.

---------- Post added at 06:52 AM ---------- Previous post was at 06:22 AM ----------

Hey there, after some research about the suspend_backoff i have to ask what kernel / rom you are using?

Some time ago this seems to be an kernel / rom bug on early AOSP builts, but it should be fixed oin the meantime, maybe you should try to use another kernel / upgrade your rom to get rid of it. <-- Update, just seen you are running an "official" rom, so provided by kies?

Upgrade to an LPD Rom (my recommendation Litening ROM 3.2) if you want to stay close to stock (No Wipe needed)and use Phenomenal Kernel (5.5 medium).

Maybe (just a blind guess) its related to kies / FOTA Client, please disable OTA Updates and all unnecessary sync.

In my signature you will find a post with some pics what else can be frozen safely.

Dont use tasker, try Llama instead. com.levelup.touiteur .. hmmm, no clue on that, could you try another twitter client instead?

Good luck!
[BetterBatteryStats] mikeage:
OTA, but same difference. As I mentioned, I don't want to flash anything onto it that's not official, b/c it's not completely my phone.

Done. You had a great list; I also froze a few other things that I thought might be causing issues.

It seems that the number of wakeups from tasker's alarm (not wakelocks) coupled with the total time used suggests that the majority of the wakelocks are taken for a very short time while device is already awake.

That said, I'll run for a few hours today with tasker and plume (touiteur) frozen and get a new log
[BetterBatteryStats] CalPolyRock:
I can't find any info anywhere on RXNET_MSL_LISTENER_WAKELOCK. Are you sure it's related to the bluetooth stack?

Any pointers to where I can find out more on it or how I can dig into this problem any more?

Here's the latest log today attached.

Thanks again!
[BetterBatteryStats] Karpfenhai:
No im not sure, rxnet and MSL are both registered trademarks of Novell ;)

Do you have an app installed like "Rx Networks PGPS downloader" ? If yes, freeze it!

It could also be some unusual messenger app, dor you receive any push notifications from any messenger service?

Investigation stopped, need to work ;)
[BetterBatteryStats] chamonix:
Confirm that with CPU sleep please.
[BetterBatteryStats] o0sYkOo0o:
Hi Chamonix,

thanks for your reply!

Any tips for a battary monitor app?
[BetterBatteryStats] fratermus:
You can change the intervals Tasker uses to check on things under Menu | Preferences | Monitor. That might affect how often it wakes the phone.

Once awake, you can minimize Tasker's power consumption by ANDing in a low-power check. If the low power consumption criterion check fails the higher-power criteria will never be tested.

More and better info can be found on the Tasker mailing list and the associated archive.
[BetterBatteryStats] logrej:
New info:

Installed modem KI1. That is modem from GB that came with this phone. On Abyss kernel, no deep sleep (10%).

Installed SpeedMod kernel, didn't helped. Deep sleep only 6%.

After that installed Siyah kernel 3.3.1, and finally phone goes into deep sleep. After 10 min there is 70% deep sleep (before never had deep sleep above 11%). Will test it during day... And will add apps and widgets (afraid not to trigger that Android OS bug again).

So wining combination is, at this moment, Stock ICS for my carrier, modem from stock GB for my carrier, and Siyah 3.3.1 kernel (tried before 3.2.5.x, 3.2.6.x, so it must be something in them...).
[BetterBatteryStats] Karpfenhai:
Im glad you made it finally!

Don't forget to make a nandroid backup first! :D

But its weird anyhow...

I think its the csc-kernel relation, not the modem.

Tapatalked from my Samsung GT9100
[BetterBatteryStats] Birba:
@chamonix: what could then be the reason for the drain?
[BetterBatteryStats] MattRob:
Been playing somewhat with the above. It seems GPS was not the issue, but Locationservice from Google was. Been playing with WiFi and BT now with Llama, so seems fine.

Battery drainage is still high. When (only) looking at Partial Wakelocks, high are now my Exchange Services (but I need those, so let's not focus there), count 300 2,9% and then AudioOut_1 count 132 2,1%, RILJ count 2484 0,6%, Alarmmanager count 2951 0,6%, ConnectivityService count 2955 0,2%

So where should I look for, the 'counts' or the percentages ? Do they influence the drainage pro rata, or is that not true ?

Am now 7hours working, phone has 45% left. So it looks a little improved over yesterday.
[BetterBatteryStats] LordManhattan:
CPU Spy says it does indeed go into deep sleep. BBS also reported that the phone had been awake for 2h 40m or so with a screen time at around 2h 20m. Total uptime was 13h or so. If it doesn't go into deep sleep the awake time would be 13h and not 2h, which almost matches the screen time.

Update: Took a while (15 hours) but it works now :)
[BetterBatteryStats] o0boiboi0o:
I think what Chamonix means is that what you got from ur phone is considered very good. U cannot possibly aim 0 min of awake even when u are not using ur phone right? Certain background services are necessary to make sure that when times come, you got a functional phone to use. Not a dead one after sleeping too long! ;)
[BetterBatteryStats] Birba:
Yes, I understand that. But what'is strange that i lost nearly 10%battery during 7 hours airplanmode and with nothing strange in my logs. So how can i determin what is causing the battery drain?
[BetterBatteryStats] o0boiboi0o:
Hmm. How old is ur batterty? perhaps it may be sth to do with ur hardware? ie battery in this case?
[BetterBatteryStats] Birba:
I also thought about that and ordered the samsung 2000mAh battery last week. This battery drained about 7% compared to the 10% with the smaller battery. So its still the same:confused:
[BetterBatteryStats] MaluNoPeleke:
Great application!

Do you have plans to release it to the market?
[BetterBatteryStats] chamonix:
Indeed. I have started preparations yesterday and am currently reviewing a few warnings from motodev appchecker. It will definitely be this week, I hope to get a grip on an issue related to density/resolution prior to releasing
[BetterBatteryStats] nobnut:
I can't really suggest what you should keep and what you should stop from running automatically. A general rule of thumb is as follows:

1. If you don't recognise the app, either google it or leave it alone

2. If you do recognise the app, do you want it running all the time? For example, Google Maps, if you are not signed in to Latitude, what is the point of having it running? Email on the other hand, I would suggest you keep it running unless you want to check and sync manually.

From within Gemini, the screen you see when you open the app shows the running processes. Have a look at it every now and again and see what you don't like the look of ;)
[BetterBatteryStats] chamonix:
Release 0.8.1

I just pushed v0.8.1 with logging for pinning the display / density problem in redenring the graph bars on EVO 3D / Desire HD.

Can you please post the result of

logcat | grep GraphableButton

after rendering?
[BetterBatteryStats] LandUzu:
a stunning application/tool...

What a fantabulously useful application. Congratulations chamonix, its bloody brilliant.

Great basic concept but intricately employed. Well done.

I have had some great results although still learning myself, this single application coupled with nobnut very ably assisting people at every available opportunity just makes for a great user experience and implementation of your product & talent (S) :)

Thanks very much to you both :) Keep it up. You are both what i believe XDA to be about. :D
[BetterBatteryStats] exhilaration:
Thanks for the tip about Google Talk. I'm trying to track down what's causing my battery to drain.
[BetterBatteryStats] ithehappy:
Got it other than the Email part ;)

I check my Emails manually, so I can put it out from Auto Start like GMaps, right?

Regards.
[BetterBatteryStats] nobnut:
Yes. If you want to do it manually (i.e. if you have no push accounts or syncs set up) you will have to start it manually and then perform a manual sync. Then I would advise ending the app when you are finished.

No more partial wakelocks caused by email!! \o/

@LandUzu I have run out of Thanks presses right now but I will make amends tomorrow. It's just that sort of comment that makes XDA worthwhile sometimes and restores one's belief in humanity again.

Thank you!

EDIT: I just got one back... you got it ;)
[BetterBatteryStats] chamonix:
That looks like really interesting stuff, thank you for sharing. I will have a look at that tool once finished with the release process and my get in touch the the dev to discuss a direct link from bbs for analysing AlarmManager issues.

Once I have got a grip on the tool I'll report here
[BetterBatteryStats] chamonix:
Market publish is done, waiting to be crawled and will update the second post with the link.
[BetterBatteryStats] defnz:
Hey thanks for the great app chamonix

Is it possible to add the ability to see what application is causing the gps to turn on momentarily when the screen is off?

I've noticed over the last few weeks this happening at various times and I'm not using any latitude or other gps applications. It's not constantly on, just a blip
[BetterBatteryStats] cordell12:
Here you go! Evo 3D

http://pastebin.com/ajGn3aAt
[BetterBatteryStats] chamonix:
Are you sure you have taken the log with 0.8.1? the log shows onDraw and I added the canvas sizes to 0.8.1 (canvas = colored bars)