[Q] Battery Drain Causes?

Search This thread

PharmNerd

Senior Member
Oct 29, 2011
186
84
[EDIT 7/31/12 - Changed the title of the thread, since qkster asked nicely. :) ]

Running CatyRom 2.0 (Android 2.3.6; KK4 modem).

Whenever I'm at home and connected to Wifi, battery life is pretty awesome.

As soon as I leave my house (and my wifi), battery drain increases substantially, and continues even after I return home and reconnect to Wifi. Aside from the display, the main cause of this battery drain is always "Android OS".

If I reboot the phone, battery drain goes back to its previously awesome state. (See Screenshots below)

Any tips to avoid the battery drain every time I leave my house? Or am I stuck rebooting my phone every time I get back home?

AndroidOSBatteryDrain_zps1ce49c42.png
AndroidOSBatteryDrain2_zpsce6bf919.png
 
Last edited:
T

tmease1

Guest
I'd try another rom and see what happens.

Sent from my SAMSUNG-SGH-I997
 

dman3285

Inactive Recognized Developer
Aug 24, 2010
6,016
7,750
Rome, Ga.
Turn off your wifi when you leave the house...its not the rom ...I get amazing battery life away from the house

Sent from my SGH-I997 using xda premium
 

PharmNerd

Senior Member
Oct 29, 2011
186
84
Turn off your wifi when you leave the house...its not the rom ...I get amazing battery life away from the house

I figured it was probably an Android thing, and not necessarily a CatyRom thing. :)

Flashed KL2 modem. Will see if that changes things at all without disabling Wifi while away from home (hoping for things to be as brain-dead & hassle-free as possible).

If not, I'll see what disabling Wifi does.

Will post battery graph screenshots over the next few days.
 

Entropy512

Senior Recognized Developer
Aug 31, 2007
14,088
25,086
Owego, NY
Modem does nothing for wifi, the wifi driver is in the kernel.

Use Shark for Root to capture wifi traffic. Load the pcap file in Wireshark.

If you see a bunch of things that look like this in the capture:
Code:
No.     Time        Source                Destination           Protocol Length Info
    206 742.504839  06:46:65:da:c3:89     MurataMa_da:c3:89     0x886c   96     Ethernet II
    207 742.528310  06:46:65:da:c3:89     MurataMa_da:c3:89     0x886c   74     Ethernet II
    209 746.306143  06:46:65:da:c3:89     MurataMa_da:c3:89     0x886c   74     Ethernet II
    210 746.313237  06:46:65:da:c3:89     MurataMa_da:c3:89     0x886c   74     Ethernet II
    211 746.320438  06:46:65:da:c3:89     MurataMa_da:c3:89     0x886c   74     Ethernet II
    212 746.327563  06:46:65:da:c3:89     MurataMa_da:c3:89     0x886c   74     Ethernet II
    213 746.482617  06:46:65:da:c3:89     MurataMa_da:c3:89     0x886c   74     Ethernet II
    214 746.488186  06:46:65:da:c3:89     MurataMa_da:c3:89     0x886c   96     Ethernet II
    219 746.546120  06:46:65:da:c3:89     MurataMa_da:c3:89     0x886c   74     Ethernet II
    220 746.547299  06:46:65:da:c3:89     MurataMa_da:c3:89     0x886c   79     Ethernet II
    314 1624.841743 06:46:65:da:c3:89     MurataMa_da:c3:89     0x886c   76     Ethernet II
    315 1624.849232 06:46:65:da:c3:89     MurataMa_da:c3:89     0x886c   74     Ethernet II
    317 1628.634241 06:46:65:da:c3:89     MurataMa_da:c3:89     0x886c   74     Ethernet II
    318 1628.638958 06:46:65:da:c3:89     MurataMa_da:c3:89     0x886c   74     Ethernet II
    319 1628.644235 06:46:65:da:c3:89     MurataMa_da:c3:89     0x886c   74     Ethernet II
    320 1628.648762 06:46:65:da:c3:89     MurataMa_da:c3:89     0x886c   74     Ethernet II
    321 1628.783970 06:46:65:da:c3:89     MurataMa_da:c3:89     0x886c   74     Ethernet II
    322 1628.789124 06:46:65:da:c3:89     MurataMa_da:c3:89     0x886c   96     Ethernet II
    327 1628.829490 06:46:65:da:c3:89     MurataMa_da:c3:89     0x886c   74     Ethernet II
    328 1628.829993 06:46:65:da:c3:89     MurataMa_da:c3:89     0x886c   79     Ethernet II
And by a "bunch" I mean once a second for minutes on end - try the latest Daily Driver kernel release. That will HOPEFULLY fix the issue.

It's some weird **** related to a wacky mostly undocumented Broadcom feature. **** Broadcom.
 

kicker1

Senior Member
May 16, 2009
110
2
Hi mate interested in knowing your results, I got the same issue :(

Sent from my HTC Glacier using XDA App
 

PharmNerd

Senior Member
Oct 29, 2011
186
84
Modem does nothing for wifi, the wifi driver is in the kernel.

Use Shark for Root to capture wifi traffic. Load the pcap file in Wireshark.

If you see a bunch of things that look like this in the capture:
Code:
No.     Time        Source                Destination           Protocol Length Info
    206 742.504839  06:46:65:da:c3:89     MurataMa_da:c3:89     0x886c   96     Ethernet II
    207 742.528310  06:46:65:da:c3:89     MurataMa_da:c3:89     0x886c   74
And by a "bunch" I mean once a second for minutes on end - try the latest Daily Driver kernel release. That will HOPEFULLY fix the issue.

It's some weird **** related to a wacky mostly undocumented Broadcom feature. **** Broadcom.

Didn't see anything like that yesterday, but I had also disabled Wifi while away at my family's Christmas (which, by the way, did help battery life quite a bit).

Not sure if CatyRom 2.0 has the latest Daily Driver or not, so I flashed the 11/27 version.

Next time I go out, I'll toss together a pcap file and see if any of those MurataMa thingamabobs show up.

EDIT: Or is it the 0x886c Protocol I'm looking for (I didn't see any of those)? Sorry, I don't know diddly about network diagnostics...
 
Last edited:

PharmNerd

Senior Member
Oct 29, 2011
186
84
FYI.. Here's the battery graph showing how disabling Wifi can help cut down on battery drain when outside of a Wifi area.

My family's Christmas was in a fairly rural area, so my phone was awake quite a bit more than usual, trying to sync on a mostly nonexistent data connection. So, I imagine disabling Wifi will have an even more pronounced effect if you have good cell coverage.

DisabledWifi_zpsf9b7c381.png


ADD: This is running CatyRom 2.0 after flashing the KL2 modem (theme is Matted Blue, if you were curious).
 
Last edited:
  • Like
Reactions: albee320

PharmNerd

Senior Member
Oct 29, 2011
186
84
OK, entropy.. I think I see what you're talking about. Just got back from lunch, and my pcap was full of these...

Code:
21	17.410567	7a:d6:f0:97:50:71	SamsungE_97:50:71	0x886c	74	Ethernet II
22	18.435103	7a:d6:f0:97:50:71	SamsungE_97:50:71	0x886c	74	Ethernet II
23	19.458398	7a:d6:f0:97:50:71	SamsungE_97:50:71	0x886c	74	Ethernet II
24	20.481196	7a:d6:f0:97:50:71	SamsungE_97:50:71	0x886c	74	Ethernet II
25	21.504877	7a:d6:f0:97:50:71	SamsungE_97:50:71	0x886c	74	Ethernet II
26	22.564409	7a:d6:f0:97:50:71	SamsungE_97:50:71	0x886c	74	Ethernet II
27	23.554539	7a:d6:f0:97:50:71	SamsungE_97:50:71	0x886c	74	Ethernet II

I'm using your latest Daily Driver, so I'll keep an eye on what the battery does over the next few hours.
 

PharmNerd

Senior Member
Oct 29, 2011
186
84
Well, the 11/27 Entropy Daily Driver kernel didn't appear to eliminate the Android OS battery drain.

I tried a few things, and it appears that the only thing to stop the battery level from plummeting is a reboot. Cycling Wifi off and back on seems to help a little, but not completely.

KL2_Entropy11-27_zps9ba3eb45.jpg


As far as the 0x886c packets go, they appeared roughly once every second in a pcap sample taken shortly after the first "Returned to Wifi".

A few minutes after "Rebooted Phone", I saw a flurry of about 10 of them in less than a second. Random 1-2 minutes samples during the next hour or two showed an occasional 0x886c packet -- maybe 1-2 per minute.

I didn't see any 0x886c packets in samples taken immediately after the second "Returned to Wifi", "Cycle Wifi", "Cycle Data Network Mode", or "Cycle Flight Mode".
 
Last edited:

qkster

Retired Recognized Developer
Apr 5, 2011
3,276
4,422
USA
fwiw:

I notice a big drain on batter by Google maps even when i don't use it.
idk if uninstalling for you may be an option or not..or opt out of location request

modem and data can also take up a bit a battery as well.
from previous posts, i have recommmed DL a dataswitch app that stops background data - it's a toggler.
this leaves phone and text intact.
do this when you dont need constant background data sync.
it is not for everyone but it can be useful if you are looking to conserve battery in a pinch.
you can go for several days on a single charge.
ymmv
 

PharmNerd

Senior Member
Oct 29, 2011
186
84
I've used Juice Defender Ultimate in the past, but didn't really notice any improvement. In fact, it made battery life worse when on wifi.

With a constant wifi connection and sleep policy turned off, I can still have 100% battery 4hrs after unplugging from the charger(!).. Juice Defender disconnecting & reconnecting every 15 minutes killed a few percent every hour. Not to mention, I hate having to wait 10-15 seconds after turning on my phone to use the internet.

My only problem is when switching back and forth between wifi and cellular data.
 

Entropy512

Senior Recognized Developer
Aug 31, 2007
14,088
25,086
Owego, NY
****ING BROADCOM.

**** THEM TO HELL.

I thought removing BT-AMP support from the kernel would fix that wacked out **** but apparently it doesn't.

****ING BROADCOM.

**** THEM AND THEIR COMPLETELY UNCOMMENTED/UNDOCUMENTED CODE, ALONG WITH THEIR LACK OF DATASHEETS.

I'll see if I can duplicate this with the parents' phone. Interestingly enough, it only seems to happen with AT&T leak bases - I had it happen multiple times after getting my GS2 (which is when I started playing with UCKJ2) but never beforehand. (Edit: I'm wrong - it does also happen with UXKG3 base, such as Infused 2.x - but it seems to not happen on Hellraised ROMs to my knowledge, nor on CM7.)

This may possibly be related to the weird wifi issues (including battery drain) affecting UCKK6 for the Galaxy S II - It's some weird bug in /system and not the kernel.

Edit: To those having issues, do you own any other devices with Broadcom wifi chipsets? (Such as other Samsung phones, Samsung Tab 10.1s, etc)?

https://www.youtube.com/watch?v=eQBjQs07wbw - sing along with me! When they say "**** Martinez", I say "**** the Broadcom!" (Yes, I know that is a bit weird - but it has the correct syllable count and rhythm.)
 
Last edited:

qkster

Retired Recognized Developer
Apr 5, 2011
3,276
4,422
USA
I've used Juice Defender Ultimate in the past, but didn't really notice any improvement. In fact, it made battery life worse when on wifi.

With a constant wifi connection and sleep policy turned off, I can still have 100% battery 4hrs after unplugging from the charger(!).. Juice Defender disconnecting & reconnecting every 15 minutes killed a few percent every hour. Not to mention, I hate having to wait 10-15 seconds after turning on my phone to use the internet.

My only problem is when switching back and forth between wifi and cellular data.

We are all set in our ways. If you're open to suggestion, unistall juice def.
download from market: dataswitch by tomatoX.
run it for a day and see what happens.


Entropy..I feel the anger of your rant, but it was way over my head to appreciate what it was about.
 

Entropy512

Senior Recognized Developer
Aug 31, 2007
14,088
25,086
Owego, NY

Yes, they are one of the least open source friendly and least developer-friendly companies out there.

They don't comment the code of their crappy kernel drivers (and this thread PROVES they are crappy) at all, and they don't provide ANY documentation on their chipsets.

So when their drivers flake out like they are here, there is no way to fix them.

The evidence is clear in the wireshark captures - some wacky proprietary feature of theirs (Bluetooth AMP) is flaking out and malfunctioning (despite this phone not even USING the BCM4330's BT features) and waking up the Infuse once a second in many cases. This kills battery life.

The feature misbehaves even when BTAMP is completely disabled in the kernel.

Sent from my GT-P7510 using Tapatalk
 

qkster

Retired Recognized Developer
Apr 5, 2011
3,276
4,422
USA
Yes, they are one of the least open source friendly and least developer-friendly companies out there.

They don't comment the code of their crappy kernel drivers (and this thread PROVES they are crappy) at all, and they don't provide ANY documentation on their chipsets.

So when their drivers flake out like they are here, there is no way to fix them.

The evidence is clear in the wireshark captures - some wacky proprietary feature of theirs (Bluetooth AMP) is flaking out and malfunctioning (despite this phone not even USING the BCM4330's BT features) and waking up the Infuse once a second in many cases. This kills battery life.

The feature misbehaves even when BTAMP is completely disabled in the kernel.

Sent from my GT-P7510 using Tapatalk

I'm gonna give you the 1700th thank
 

Entropy512

Senior Recognized Developer
Aug 31, 2007
14,088
25,086
Owego, NY
I tried to reproduce this with my parents' phone (Infused 2.2.3, Daily Driver 11/27) - no luck, it's working fine. :(

Makes it a pain in the butt to debug.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 4
    Interesting process from yesterday:

    I backed up my sdcard yesterday. Had it on microSD. Took it out. Boot up phone into UI.
    I had factory reset from within the phone. It did delete most stuff but not all.
    The reseted ROM did not have Gtalk installed as part of system file.
    Booted into CWM. Wipe data, cache and dalvik. FORMAT SD again. Format micro-SD too..just for kicks. :) I knew there was nothing there.
    Factory reseted again. :)
    Booted in to UI.
    Waited and skipped setup.
    Phone did good -no issue when connected to wifi at work. No issue when connected to wifi at home.

    Charged to 100% overnight with wifi and data off.
    Took it off charger.
    Turned to wifi for a brief connect at home.
    Went to work.
    Arrived at work, Drain may have started then..not sure. Connected to work with acceptance of condition of use.
    Drained definitely continued,
    No gtalk installed.
    No Amazon apps or Amazon AppStore installed.

    Possible culprits (aside from suspected wonky wifi drivers):
    1. connected to pc last night. Created /sdcard/app folder.
    2. Copied over /apps - cpu spy, cpu master, root explorer, sms backup, xda app, TE, g-Voice. Mind you, these are just copied over. None were installed.
    3. Last night, after connected to home wifi, (no drain) several app showed update available. I tried to run Market to get to settings to stop updates and notification. Market updated to Play Store. Pop up menu wanted me to accept Google Terms. I declined and it turned itself off. With this, I suspect Google/Market at least has gotten a hold on my phone - even without permission.
    4. If this was the case, would the key be not installing Market or Google Play? Would the key be not to have any apps in your Google account so it will not update? Odd thing was, during setup, it did asked if I wanted this device for backup with google. I DECLINED that too.
    5. All location service were declined and set to off. GPS is off.

    6. Oddity: this time, toggling off wifi seemed to stopped the drain...will need to see in a few hours. I'm thinking that google market or having some google apps (Gmail) may be contributing factors.

    7. I highly suspect google as the source. Either Google Market or Play Store.
    Not sure why it would try to update without permission.
    Not sure why it would try to update on a different wifi system not the wifi previously established.

    Anyway, I took off marketupdater and market and phonesky.
    Amazingly, with only background data running, the "awake" when screen off coincides with screen off...that is the phone sleeps and no activity when the screen is off.
    The true test is when I connect to a different wifi or data source..will have to see.


    edit: 8.29.2012: I have tried running the phone off wifi and only cell data. It has been running pretty well without the AOS drain that we saw on WiFi.
    The wakelocks aren't seen as much. The phone enters more deep sleep cycles.
    However, I'm seeing some hint of "mid range signal" causing more a different but slightly less steep decline in power use that levels off after reboot. idk..
    4

    Yes, they are one of the least open source friendly and least developer-friendly companies out there.

    They don't comment the code of their crappy kernel drivers (and this thread PROVES they are crappy) at all, and they don't provide ANY documentation on their chipsets.

    So when their drivers flake out like they are here, there is no way to fix them.

    The evidence is clear in the wireshark captures - some wacky proprietary feature of theirs (Bluetooth AMP) is flaking out and malfunctioning (despite this phone not even USING the BCM4330's BT features) and waking up the Infuse once a second in many cases. This kills battery life.

    The feature misbehaves even when BTAMP is completely disabled in the kernel.

    Sent from my GT-P7510 using Tapatalk
    4
    Back again...

    I'll continue to post if I notice anything new. Until then, I might be quiet.

    Thanks, everyone for sharing your data thus far!

    Thanks.

    I've tried running the phone with wifi off and cell data off for the most part. I turn it on only when I need it. Off when not using. It is running 2ds with 62% left.

    Here is a few interesting thread:

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

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

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

    sgs2 device
    4
    For you, it seems like Maps and Phone or dialer went nuts when the phone lost an established wifi connection.

    About 6 months ago, I started taking Maps out of my app list because I thought it was the cause of the drain. It seems like if Maps was gone, Android OS takes over.
    do you think you can boot into cwm, wipe cache and dalvik. reboot. Charged to 100% and run the phone a few charge cycle without wifi?

    Yeah, I'll try to live without WiFi for a few charges.. This happened last night. I just don't get it, as it hasn't happened before. I had a good charge on my battery so I left it off the charger all night. And woke up to a hot phone that only had 1% battery life left. Mind you, this is a 3500 ma battery, so that's a lot of drainage.

    snap20120808_081641.jpg
    Same 3 culprits.. wifi was OFF as I was leaving the phone to sit all nite without charging.
    snap20120808_081656.jpgsnap20120808_081703.jpgsnap20120808_081717.jpgsnap20120808_081725.jpg
    The long descent ...
    snap20120808_081812.jpgsnap20120808_135922.jpgsnap20120808_135959.jpgsnap20120808_140046.jpg

    Notice the CPU Spy reading.. Deep Sleep, then straight to 1600mHz, did not pass go..
    3
    Ugh. I'm about to give up on finding a pattern. See my shots below.

    Last night I set about trying to calibrate my battery so I could get more accurate stats. I tried charging to 100% but missed my opportunity when I put one of my kids to bed. The charge was turned off and dropped to 98% and refused to go back up. I tried to get back to 100% by forcing some drain followed by another charge. I rebooted a couple of times, ran Sygic (which accounts for the big bar in one of the shots) and such to try and get myself down. After another failed attempt to get to 100% I thought I would just let my phone stay unplugged to drain overnight and try again in the morning.

    6 hours later I got up and had less than 15% drain. No persistent wake state.

    "No problem," I thought. Going to work would trigger a WiFi switch and a persistent wake state.

    No dice. As you can see, 10 hours later, I've lost just over 25% charge. I should be ecstatic but it doesn't help me discern any sort of pattern. (This is some of the best battery life I've had, period, on any ROM.)

    I'll keep watching.

    Also, I wonder if calibration is even necessary now. What I did last night is, apparently, called a "jump charge" which often causes the system to re-calibrate statistics automatically, which might account for my sudden jump in (apparent) battery life; I didn't have this good of battery life after my flashing this ROM before, even when the drain was minimal.

    More to come...

    That's the frustrating part...i'm still not sure what the trigger is.
    I get it more when I have wifi on, cell data on. charged to 100% from wall plug.
    then whether wifi or data...but a change in the zone or toggle off/on sets it off...still not sure