yashsingh1/xdaforums huggingface dataset:
[BetterBatteryStats] Tieum Tieum:
Hello,

I was recommended on another thread to come here for some battery drain issues.

I have add my phone for 6 month first with a stock Gingerbread and then with ICS 4.0.3 I9100XWLP7_I9100XXLPS_I9100XENLP3 rooted using CF-Root-SGS2_XW_XEN_LP7-v5.4-CWM5. For both configuration I never had a problem with battery.

Having problem with the Wifi on XWLP7 I decided to upgrade to XWLPT using I9100_XEU_I9100XWLPT_PRE-ROOTED_I9100XXLQ6_I9100XEULPA.

Since then the battery drains pretty fast: a typical hour with the phone sitting on my desk drains the battery by 15% or so with only a few minutes of Deep Sleep state.

Before going back to XWLP7 and possibly WiFi issues I would like to know if there is something that can be done to improve battery life with XWLPT. I am attaching a typical BBS log.

Thanks in advance.
[BetterBatteryStats] Karpfenhai:
Your Phone was awake due to background network activities (Exchange, K9, Maps)

Multidpd shows active downloads,

2 possible solutions, 1st. your network coverage is too bad, therefore the sync process takes too much time.

2nd. Disable unneccessary sync activity, use K9 only set to pull every 30 mins,

its not the ROM its your personal setup!

Good luck!
[BetterBatteryStats] Tieum Tieum:
Thanks for the reply. I did not change anything in my setup and use the phone in the same places as before upgrading the ROM. I always had Exchange set in Push mode and that did not drain my battery before.

I do not understand why Maps get activity as I do not use it. Is there a way to disable that?
[BetterBatteryStats] msquared:
If you are on JB it's a known problem,try matching your RIL and your modem using this app

https://play.google.com/store/apps/...t=W251bGwsMSwxLDMsImNvbS5zaWJib3IuZ2V0cmlsIl0.
[BetterBatteryStats] chantoine:
Not a single partial wakelock ? Weird...

Except that, not bad, i'd say some widgets are waking up the phone, that's all.

---------- Post added at 05:09 PM ---------- Previous post was at 05:06 PM ----------

Not bad i'd say... though it don't show any screen-on time !?

You should cut-off WiFi and ... do another dump :D
[BetterBatteryStats] Hilmesh:
Hi there,

I have recently solved the 800Mhz issue by installing Voltage control and making a init.d on boot script thanx to @sefrcoko & @pasquy85. now running Phenom 6.1 medium. Please find attached my Dump after one day usage. Apart from Gmail sync (Which is on manual but i do need the accounts) do things look good or can be further improved? Thanks in advance.
[BetterBatteryStats] alexinna:
The lock usually On when you are talking on a phone. Or maybe like in your case phone tried to find out the connection and if you are in a bad area this process will take lots of juice.
[BetterBatteryStats] superleeds:
Hello

Purchased BBS last night since my brand new S3 (unrooted, everything stock) has appalling battery performance. I'm not exactly new to Android so know about the things to look out for but this is ridiculous. I've read quite a bit of this thread to try pick-up the best way to seek help.

I've attached my dump from the last ~4hours since a full charge and I was down to 80% in that time period. I'm at work so on wifi (this used to be more efficient than 3G/HSPDA - is that still the case with the S3?) and the screen was mostly off apart from me checking a few settings like the power options in the WIFI section and other things. S voice, stay smart, motion, are all disabled. My screen brightness is on the lowest setting.

Prior to this dump, my problem seemed to be related to AlarmManager but having updated to the latest firmware (on 3 in the UK) via KIES, Google locations seems to be at the top. I've disabled all location options in Google Maps and the only thing syncing is my calendar and my contacts.

Over night, I left my phone on Airplane mode and lost around 4% which I suppose isn't too bad but I would have thought it would be better than that.

Any help would be much appreciated.

I've attached a screenshot from last night in case it would be of benefit.

Thanks!
[BetterBatteryStats] jelle2503:
looks like your kernel is waking your phone more than needed.

deleted_wakelocks and batterymonitor are holding your phone awake the most. try googling them
[BetterBatteryStats] superleeds:
Thank you. Will look them up and report back.
[BetterBatteryStats] truewt:
It'd be best if you post the idle overnight dumpfile than the active one. More helpful in the analysis by the experts here.
[BetterBatteryStats] superleeds:
Sorry I think I may not have taken that dump. I've attached the stats but I think they are pretty useless.
[BetterBatteryStats] alexinna:
"wlan_rx_wake" (): 14 m 46 s (886 s) Cnt:(c/wc/ec)684/0/684 5,7%

Please look at post #3 on how to deal with it.

"suspend_backoff" (): 3 m 9 s (189 s) Cnt:(c/wc/ec)19/0/19 1,2%

It was an excellent suggestion on how to modify chrome settings to avoid this one. Please search in this topic. other then that dump looks pretty good. Enjoy your phone!
[BetterBatteryStats] Karpfenhai:
Check post 3 for instructions how to adjust maps.

Note! It seems the latest version found a way to produce some wakelocks even with all autostarts disabled, about 10 pet day, I'm still investigating how to get rid of then too.

Tapatalked from my Samsung GT9100
[BetterBatteryStats] xelra:
The deleted wakelocks are most likely wifi. You said that you are at work. So you should turn off wifi and check again.

Also disable autostarts from maps. All of them.

You can disable backup, too.

After you did all that create an idle dump over night with wifi off, but data on.

Then we'll see if there's still a problem.
[BetterBatteryStats] Karpfenhai:
@hawkeye, don't post a dump! Attach it!

Google cloud backup is your main culprit, disable it and use titanium instead. Second seven.Z7 social hub causes to much wakeups, disable it.

Good luck!

Tapatalked from my Samsung GT9100
[BetterBatteryStats] superleeds:
I was connected to the wifi at work if that helps and backups are off.

Can I disable autostarts without root?

Will disable wifi and then report back after leaving overnight.

Am I right in thinking wifi is better for the battery than data?
[BetterBatteryStats] itsLYNDZ:
I've been having terrible battery drain lately. But my BBS I post here keep showing that nothing is wrong. I'm not syncing or using my phone much. Just sits on my desk. I've gone thru so many batteries trying to figure out what's wrong. I'm getting the sdio_al wakelocks but each charger I use shows a fast charge. Even replaced the SD card. What else could be wrong
[BetterBatteryStats] Noed:
Any idea why calendar is causing me so many alarms?

Already tried to turn sync off but still keep getting these alarms.

SGS2
[BetterBatteryStats] reymiortiz:
hellow, i register to this forum only for one thing, i dont know why but i update my rom rootbox 1.7 to 1.8 and now i have poor battery life, i see i have a lot "android os" percent on battery stats. so want to know whats my problem or i need back to 1.7 again ? please someone help me i really like this rom version
[BetterBatteryStats] Neutr1no:
Hi, I am struggling with poor battery life on my Galaxy S2. The reason of this all is, in my opinion, com.google.android.gsf (229 wakeups), com.google.android.intent.action.mcs_heartbeat to be precise. Any idea on how to reduce these alarms? I have tried uninstalling GTalk using Titanium Backup to no avail - GTalk alarms still exist. I have wifi turned on at almost all times but battery life should be higher, considering the fact that I am using 2000 mAh one. As to ROM version, I am using Resurrection Remix JB 3.0.6 with Siyah 4.1.2 kernel.
[BetterBatteryStats] chamonix:
Sorry for not releasing any rc today. The fix is done in the way I want to have it (caching not completely disabled) but I could charge to 100% yet so I have to postpone as it needs some testing.
[BetterBatteryStats] chamonix:
http://developer.android.com/guide/topics/providers/calendar-provider.html

Look for any third party accounts syncing the calendar
[BetterBatteryStats] alexinna:
Ok. I think to start with I’ll summarize above information: BBS needs to support Novice and Expert modes.

I'll continue with use case in Novice mode the way I see it.

When new user starts BBS he/she wants to know what is going on with their battery usage. First time users will probably benefit from short overview of the application and how it can help with battery usage diagnostic. Current initial page has basic summary already but I would suggest adding pure awake time (current awake - phone - screen). After seeing this information user wants to know what is causing this so I think natural way would be to allow user just press on it to open next page with additional details. In our case it's probably will be Kernel wakelocks page. Some of the information there can lead to Partial wakelocks, Alarms page and so on. So the idea is to lead user through the process and provide help/suggestions on the way with well known wakelocks. Is it making sense?

I'm not describing something completly new here but I hope with some modifications new users will feel more comfortable from the first time.
[BetterBatteryStats] Computoncio:
I fixed that alarm my installing Jorte Calendar available on play store for free and deleting calendar.apk.

No more calendar alarms :D
[BetterBatteryStats] alexinna:
No rush. Take your time. ;)
[BetterBatteryStats] xelra:
In theory wifi is easier on the battery. At least until the next generation of smartphones that will have lte and wifi integrated in one chip. Maybe 2 generations.

For now, the wifi chip is more energy efficient. But like so often the devil's in the details.

That detail has to do with firewall settings and other software decisions that reach deep down into the system.

Your home or work network might be very dirty and your phone might not shield well against calls from your network.

The bigger the network, the higher the risk. You can fix your home network, if you got some modifiable network equipment.

But that's not possible for your work network. Although most of the time the network itself might be well maintained, there are other employees that might introduce bad elements. That could be a windows notebook that is badly configured and sends out broadcasts. These broadcasts might keep your phone awake, if the firewall doesn't ignore them completely.

I don't know about Samsung Roms, but cyanogenmod fixed that about a month ago.

You see, that's a lot of mights and coulds. It's tedious and requires a lot of time and know how to "clean" a network.

So the easiest thing to do is to just disable wifi and see if it makes a difference. From there you'll know where to go.

For example, whenever a friend of mine comes over with his notebook, I can see a huge drain on my battery.

I guess, in court, one could maybe proof that he was at my place, from the logs of my battery drain. :D
[BetterBatteryStats] carlos67:
Thanks Nobnut, an interesting analysis from you (as usual). I have just deleted my screen off profile. Don't have any profiles running now. Also, I noticed you running ninpo 2.1.3 - I too was running this upto an hour ago but have decided to downgrade to ninpo 2.0.5 because I have my suspicions (based on anecdotal evidence from some xda users) that 2.1.3 is slightly thirstier than 2.0.5 because it's based on update2 sources.

So, I'm going to see if 2.0.5 is "noticeably" any better. In any case, the later versions of ninpo's kernel don't really give us much more unless your into overclocking your GPU or want to make use of fuse / cuse (which I don't).

BTW have you used Fugu Tweaks on your SGS2? If so, can you recommend its use?

Thanks.

p.s. very interesting that CPU Spy shows deep sleep state but SetCPU doesn't even acknowledge it's existence.
[BetterBatteryStats] nobnut:
I have tried Fugu... Meh.

I am just this second about to hit the 'Go!' button on LINK REMOVED though!

They made a boob however... the zipalign script needs 'zipalign' to be in system/bin before it will work. They missed it out :eek: If you want to try it, unzip the attached and paste into system/bin before flashing the zip linked above.

EDIT: They made a bigger boob!! They set the wrong blocks in the updater scripts. Some people are reporting the files are flashed ok. But they weren't on my device. I've attached a revised updater script to overwrite the one they had in their zip :rolleyes:

EDIT 2: Ignore this post... this script is totally screwed. The whole thing is badly flawed, files missing from the package... a load of cr@p. Amateur hour on XDA :mad:

Links removed.
[BetterBatteryStats] nobnut:
There's nothing quite like a big dump on a Friday afternoon ;)

Indeed Andy, if you fancy running a few more, check out:

dumpsys | grep DUMP

That will give you a whole long list of them to play with, including:

export PATH=/data/local/bin:$PATH
$ export PATH=/data/local/bin:$PATH
$su
# dumpsys | grep DUMP
DUMP OF SERVICE AtCmdFwd:
DUMP OF SERVICE FMPlayer:
DUMP OF SERVICE Hdmi:
DUMP OF SERVICE MhlRcp:
DUMP OF SERVICE SurfaceFlinger:
DUMP OF SERVICE accessibility:
DUMP OF SERVICE account:
DUMP OF SERVICE activity:
DUMP OF SERVICE alarm:
DUMP OF SERVICE application_policy:
DUMP OF SERVICE appwidget:
DUMP OF SERVICE audio:
DUMP OF SERVICE backup:
DUMP OF SERVICE battery:
DUMP OF SERVICE batteryinfo:
Error dumping service info: (Unknown error: -1) com.lifevibes.ma.ipc
DUMP OF SERVICE bluetooth:
DUMP OF SERVICE bluetooth_a2dp:
DUMP OF SERVICE bluetooth_hid:
DUMP OF SERVICE bt_fm_radio:
DUMP OF SERVICE clipboard:
DUMP OF SERVICE clipboardEx:
DUMP OF SERVICE com.lifevibes.ma.ipc:
DUMP OF SERVICE connectivity:
DUMP OF SERVICE content:
DUMP OF SERVICE cpuinfo:
DUMP OF SERVICE datarouter:
DUMP OF SERVICE device_policy:
DUMP OF SERVICE devicestoragemonitor:
DUMP OF SERVICE diskstats:
DUMP OF SERVICE dropbox:
DUMP OF SERVICE eas_account_policy:
DUMP OF SERVICE encrypt:
DUMP OF SERVICE entropy:
DUMP OF SERVICE hardware:
DUMP OF SERVICE hdmi:
DUMP OF SERVICE input_method:
DUMP OF SERVICE iphonesubinfo:
DUMP OF SERVICE isms:
DUMP OF SERVICE location:
DUMP OF SERVICE media.audio_flinger:
DUMP OF SERVICE media.audio_policy:
DUMP OF SERVICE media.camera:
DUMP OF SERVICE media.player:
DUMP OF SERVICE media.yamahaplayer:
DUMP OF SERVICE meminfo:DUMP OF SERVICE misc_policy:
DUMP OF SERVICE motion_recognition:
DUMP OF SERVICE mount:
DUMP OF SERVICE netstat:
DUMP OF SERVICE network_management:
DUMP OF SERVICE notification:
DUMP OF SERVICE package:
Permission [android.permission.DUMP] (40650008):
perm=Permission{40652eb0 android.permission.DUMP}
android.permission.DUMP
android.permission.DUMP
DUMP OF SERVICE permission:
DUMP OF SERVICE phone:
DUMP OF SERVICE phoneext:
DUMP OF SERVICE power:
DUMP OF SERVICE roaming_policy:
DUMP OF SERVICE samsung.theme_service:
DUMP OF SERVICE search:
DUMP OF SERVICE sensorservice:
DUMP OF SERVICE simphonebook:
DUMP OF SERVICE sip:
DUMP OF SERVICE statusbar:
DUMP OF SERVICE telephony.registry:
DUMP OF SERVICE throttle:
DUMP OF SERVICE tvout:
DUMP OF SERVICE tvoutservice:
DUMP OF SERVICE uimode:
DUMP OF SERVICE usagestats:
DUMP OF SERVICE usb:
DUMP OF SERVICE usbstorage:
DUMP OF SERVICE vibrator:
DUMP OF SERVICE wallpaper:
DUMP OF SERVICE wifi:
DUMP OF SERVICE window:
#
[BetterBatteryStats] carlos67:
Hey Nobnut, I was reading about that "bad boy" myself before. However, I will let you "guinea pig" it for me before I flash it ;) Please post how it feels for you. I am hoping it will improve ui responsiveness (not interested in wether it will improve silly quadrant speeds). Not that my sgs2 is a slouch as it it - no, far from it but any further improvement is always welcome!

Yes, thanks for the zipalign file, not sure if I need it though - I'm running Leomars Revolution v2.6 so not sure if I need it?????? Any idea?

Also, I have attached my alarm manager dumpsys.txt - pretty please (with the obligatory sprinkles on top :)) could you "waste" 2 mins for me by having a brief look through it. It looks ok to my untrained eye, but to your expert eye??????

Thanks buddy and btw, if your ever up in Manchester I would be delighted to treat you to a few beers.
[BetterBatteryStats] ranova:
I took a quick look and it seems that you just unplugged your phone, as there arent really a lot of alarm stats yet.

The service that has the most in your list is Go Weather:

com.mediawoz.goweather

543ms running, 53 wakeups

Im not sure how often you have it update. I would re-dump the alarm thing later tonight after it has been off the battery for awhile.

Maybe chamonix can update BBS to allow more detailed info when you tap on AlarmManager (it would pull from this log to show you detailed services), it would help greatly in troubleshooting wakelocks.
[BetterBatteryStats] nobnut:
Hi,

Check my earlier post about that 'bad boy' aka 'turnip'. It's a load of ****. There is a good chance that it didn't flash properly. Check your etc/init.d folder to make sure the files were copied. The wrong blocks were set in the updater.script. The script is also incorrect.

I figured if they couldn't include all of the required files (zipalign) and made such a balls of the updater.script then I would give it a miss. Wouldn't flash on my phone anyway... it cr@pped out during the flash.

The zipalign is useful as it checks all of your apks (data and system), so if you install an apk in the future which isn't zip aligned, no worries ;)

Manchester eh? I was born in Wythenshawe. Small world. I now live in Surrey but I'll give you a holler if I venture that way anytime soon.

Nothing really jumps out at me with regards to your dumpsys.txt. All I would say is 'Go Weather'. It's not bad but when I ran it for a while, it caused some wake but hardly earth shattering. If you want a beautiful weather app, if you haven't seen it, check out BeWeather... absolutely beautiful (but a paid app). It blows Go Weather's animations into the weeds!
[BetterBatteryStats] CekMTL:
Ouch! I'm testing it right now with leomar 2.6 and the zipalign was where you said it should be and the updater script went ok. I manually checked if the files were copied, and in deed they were..

Hummm...... dint detect anything wrong for now (hope my S2 won't explode in my face!)

Enviado desde mi GT-I9100 usando Tapatalk
[BetterBatteryStats] nobnut:
Not to worry. I note that some users had no problems. Must be a ROM specific thing.

I am suspicious about the zipalign file in bin.

There is no bin/zipalign file in the flashable zip! (In my version at least)

You must have flashed a similar script before that copied it for you. Just as well... it wouldn't work without it!

Anyway, I hope the scripts work well for you. Have a good weekend!!
[BetterBatteryStats] CekMTL:
Yeah you are right, it must be something else that did copy it. For now all is good, but anyways thank gods for the existence of Nandroid backups :)

You too have an ossom weekend!!

Enviado desde mi GT-I9100 usando Tapatalk
[BetterBatteryStats] carlos67:
Thanks for the heads up - not bothering with it now then. Just checked and I already have a zipalign system file in my /system/bin folder and also my /etc/init.d folder so maybe my apps and system files are zipaligned already? Is there any way to "tell"?

Wythenshawe hey? 4 miles from me. Well Surrey is just about as "far" as you can get from Wythenshawe mate. How'd you manage that one???? (never mind, this isn't facebook - perhaps tell me over that beer if it ever happens. My guess is that you copped lucky with a nice "posh" girl with rich mummy and daddy:D).

I have GoWeather set to update every 3 hours but suspect it doesn't achieve this because Green Power only enables the data connection 2 minutes in every 2 hours when screen off (pondering wether to dump Green Power or not - maybe more trouble than it's worth?)

Cheers dude.

(Goes off to check out BeWeather).......
[BetterBatteryStats] nobnut:
Yes Sir! Go to the data folder and look for zipalign.db and zipalign.log. Have a look at the contents of the log file and make sure the time tallies with your last boot time.

I'm in Surrey because I decided one day that I was going to make something of my life and that I wanted to live like the other half. I packed a bag, left and vowed to myself to never take no for an answer. It's working out OK so far ;)

Have a good weekend.

EDIT: As for Green Power (and other restriction apps) it is entirely up to you. For what it's worth, my view is they should only be used to restrict data, if you are on a limited plan. With a well set up phone, there should be no need to restrict app updates for sleep purposes etc. That can all be done from within the app concerned.

Your call.

Sent from me to you using stuff
[BetterBatteryStats] sowen222:
I gave you a "thanks" just now. Not because this post helped me, but because you are just so damned helpful to people on this forum. You provide assistance, are considerate and generous, and don't fob off every question with an angry "google it" remark.

All in all, this forum could do with a lot more of your genre! :-)
[BetterBatteryStats] kkkbigcia:
really nice apps for ginger!

Thank you for your sharing!
[BetterBatteryStats] chamonix:
at least I can confirm that the transition to deep sleep is related to saving the cpu registers as I debugged that part for xdandroid in a previous life. What I can't tell because I'm no processor specialist is if the cpu is really disconnected or if it running when it is inactive.

about the theory about a cpu freq preventing the deep sleep: I don't see a relation because the change in state just requires an initial state (I vaguely remember some intermediate sleep state before deep sleep) and no wakelocks being held. What may be is that the 200 MHz prevent the transition into this previous state. all this is pure theory and based on a bad memory of mine.

You should indeed ask someone who knows for sure means a kernel guy.

Or grep dmesg for all PM related log entries and check for the transitions.
[BetterBatteryStats] chamonix:
same here, a little bit better but still far more than acceptable for me (8 estimate the consumption to be qround 30mAh in my test scenario). I'll post a comparision with a creation of mine that updates my lovation to latitude much cheaper when I get near a pc
[BetterBatteryStats] nobnut:
Ouch.

What is needed, either within Android location settings, or as a third party app which overrides Android Settings (probably via root), is the ability for the user to specify both the type of location (coarse or GPS) and the sync interval required. Even better would be to set up a schedule. For example between 8.00am and 10.00am every 15 minues and then every 60 minutes thereafter etc.

The real sweet spot would be the option to tick a little box next to the line...

Do not wake device to obtain location

I love it when I see that setting in apps. Yes indeed!

EDIT: Or how about this for an idea? Updates location on ScreenOn only if selected.
[BetterBatteryStats] XlAfbk:
long-time reader (actually subscribed on day 1 of this thread) but first-time poster:

Since I went from official ROMs to CM (nightly) I've been seeing some really bad battery drain ever 3-4 days. 3h ago I noticed it was happening again so I set a custom ref.

Now looking at the "other" group I see that my phone has been Awake for 3h, 100%

In Partial wakelocks however there's just Tasker with 266 locks, 20s and AlarmManager with 283 locks, 16s, there's a few others but with really tiny numbers.

There's no active processes listed either (suspend with 14s in the lead, followed by kswapd0 with 4s).

In Androids battery app it shows Android System top with 28% and a large keep awake number.

From alarm dump:

android

944463ms running, 1990 wakeups

4 alarms: act=android.intent.action.DATE_CHANGED flg=0x20000004

6561 alarms: act=android.intent.action.TIME_TICK flg=0x40000004

Any idea what this could be/how to debug further?