yashsingh1/xdaforums huggingface dataset:
[Samsung Infuse 4G] PlacidCat:
My scenario this morning...

So, wondering if the issue might be related to getting to 100% charge rather than jumping WiFi hotspots I thought I would reboot my phone immediately this morning after taking it off the charger. Looking at my battery usage when I first got to work, I was encouraged. Wakelocks were not an issue...

Then I noticed something odd. My battery was draining faster than usual. Then my device was locked in an awake state, AFTER the drain began. Again, "Android System" was the predominant factor here. What confused me was the lack of a correlation between the persistent awake state and the steepening of the drain slope.

Looking at the history details, however, I think I pieced it together:

1. The initial drain is when I rebooted. Man that sucks power - I think I might change my boot anim

2. Notice the nearly flat slope for the first hour and a quarter to an hour and a half after that. That would be me doing a quick trip to the gym followed by a trip to work. The gym has open wireless, though I haven't configured my device for it yet.

3. Here's where it's interesting. The slope suddenly changes around the time I arrive at work. Work uses an enterprise Cisco wireless network using WPA2. The persistent wake state starts a bit after that.

This leads me to wonder if perhaps the type of WiFi hotspot is partly at fault and, perhaps, the wake state is indirectly a result of it. I'll try again tomorrow to see if I can see more of a pattern.
[Samsung Infuse 4G] PlacidCat:
I should mention that when transitioning from my work WiFi to home last night that I didn't encounter a sudden drop in battery. So far it seems to be only one way.
[Samsung Infuse 4G] qkster:
Yeah..more often than not (most actually) -I have a full charge to 100%. Unplugged. On wifi somewhere - drain startes within a 1 or 2.

jdt's screen shots suggest similar.

I'm going to try all wifi and no cell data for a few charging cycle.

Then maybe all cell data and no wifi for a few days to see if that makes any difference.
[Samsung Infuse 4G] jdt352:
At Home.. The odd thing is I am aware usually of CPU usage, always checking to make sure the phone has quieted down to a low level after fully booting. I think I just turned off WiFi, because I wasn't going to be using it. Data was on, GPS probably was on.

When I noticed the warm phone, I rebooted, and things seemed fine after that.

That's when I got the screenshots.
[Samsung Infuse 4G] qkster:
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?
[Samsung Infuse 4G] PlacidCat:
Another update. Based on the comment of Maps maybe being a culprit, I decided to open Maps on my phone. You can see the GPS spike around the time I opened it. Oddly enough, it wasn't long after that that my device was in a persistent wakeful state. The time it started was when I changed rooms (and went from one WiFi hotspot to another) to go to a meeting.

That said, I haven't done anything with Maps explicitly in the mornings when I have had this issue. Again, the sudden persistent Awake status (and increased drain) may simply be a symptom of some other root cause. I'll continue to update if people find this at all helpful.
[Samsung Infuse 4G] jdt352:
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.

Same 3 culprits.. wifi was OFF as I was leaving the phone to sit all nite without charging.

The long descent ...

Notice the CPU Spy reading.. Deep Sleep, then straight to 1600mHz, did not pass go..
[Samsung Infuse 4G] PlacidCat:
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...
[Samsung Infuse 4G] qkster:
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
[Samsung Infuse 4G] jdt352:
Leaving wifi off all day yesterday, except for a couple quick toggles on and then off, there was no instances of excess battery drain. All day long and power was still 80%.
[Samsung Infuse 4G] PlacidCat:
Back again...

Unfortunately, my experience has shown little pattern to this issue. I actually had one instance of going 20+ hours on a charge with more than 30% remaining at the end. That's spectacular in my past experience. Then, immediately after charging to 100%, the persistent wake state started, forcing a reboot.

In subsequent days, the wake state was supposedly caused by different applications with no real pattern indicating a specific "cause." Most recently (this morning) I noticed a greater than usual drain on the battery. The device was getting woken up at a greater than normal rate with the wake timeline getting progressively more and more solid. Interestingly enough, Sygic navigator was the app pulling the most juice, despite the fact that I had not used Sygic for a couple of days (and the fact that I had rebooted and fully recharged since using it, resetting the graph).

Why Sygic was supposedly called up randomly is undetermined. It sounds suspiciously like jdt's Google Maps issue, albeit with another app.

Is Jelly Bean randomly launching apps? Is the battery graph misinterpreting data? I'm not sure and I don't know that I'll be able to find an answer.

The drains seem to be happening less on average now. I don't have to reboot more than once every other day or so. I can live with that - my battery life overall is comparable to what I got with Froyo, which is saying something given the new graphics engine of Jelly Bean.

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

Thanks, everyone for sharing your data thus far!
[Samsung Infuse 4G] qkster:
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
[Samsung Infuse 4G] Zen Arcade:
I've seen unknown error 40 from wl_iw_event in many of my battery drain events. Not much supporting info found on web. Here's one that references the brcm sources... (note that this is not specific to our version of Linux, but points toward source files that likely contain similar code)

http://lxr.free-electrons.com/ident?v=2.6.38;i=wl_iw_event
[Samsung Infuse 4G] qkster:
Is there anybody out there?

Testing continues.

From yesterday, Maps was removed. Phone is charge via wall charger to 100% overnight. Unplugged in the morning. Wifi, Cell data, Background and Sync were off overnight.

1. Wifi was turned on and allow to connect to home network. NO issues.

2. Went to work. Wifi is on to scan. Cell data, background data and sync were off.

3. Arrived at work. Wifi picked up new network and connected. No data transfer until user accept term and conditions.

4. No drain when not accepted.

5. Half hour later, terms accepted. Drain starts.

6. Drained allowed to continue.

7. Wakelocks and dmesg obtained.

8. Screens obtain of active apps and drain.

9. Rebooted and wipe cache and dalvik. But this time, drain persisted.

10. Airplane mode toggle for 1/2 hr. Drain stop. Usage graph leveled off.

It appears reproducible. Cell Data off. (I'm not sure if this makes a difference or not) Wifi was connected to one source. Lost connection. Forced to scan for new source. New source found. Uncontrolled data or wakelocks keeping phone awake and drains battery in process. Drain is much faster than normal usage.

Attachedments.
[Samsung Infuse 4G] jdt352:
I am reading this with interest. I hope you can figure out wherein lies the problem. My phone is usually good about battery usage.. until it is not.

I remember when people were saying bad things about app killers.

Said that the battery restarting processes that were basically 'dormant' used more battery than they saved when left alone.

But in this case, sometimes I think a kill process might snap the phone out of a drainage problem.. when something is going nuts.

I dunno, just wondering. ;)
[Samsung Infuse 4G] electricpete1:
I have had seemingly random occurences where my battery would drain very fast, sometimtes up to 25%/hr. I can tell somethings up because the battery gets hot.

I got powertutor app to try to figure it out.

http://powertutor.org/

Once I caught it in the act (using power tutor). Dolphin HD browser. It was continuing to draw ton of power even though I was not actively using Dolphin (I had exited using the back key I think). I switched the wifi and data off and it STILL kept drawing some power. Don't ask me what it could possibly have been doing. That app does happen to use a ton of memory as well.. don't know if that's related. At any rate, I think that is an example of an app going bezerk (rogue app)

Powertutor seems like a good tool to catch these things to me because it allows you to see how much power each app is using. I can't compare it to other tools... it's the only one I've used for that purpose, but I like it. (and it's free). It also allows you to see whether power is going to LCD, CPU, WIFI, AUDIO etc for each application.. Some of the results I found about performance of my Infuse are posted here:

http://androidforums.com/samsung-infuse-4g/582376-power-tutor-samsung-infuse-results.html
[Samsung Infuse 4G] Pony Express:
qk,

I know you are very thorough at going through many threads, just throwing up in case it got overlooked - most likely you already know....

http://xdaforums.com/showpost.php?p=30419435&postcount=3176
[Samsung Infuse 4G] qkster:
Thanks, Pony. I saw that. I've seen that on other threads also.

What I was really hoping for was to find out exactly what app or way in which this drain was initiated.

I know so far that being on wifi itself is not the trigger.

Being on wifi at one source and then changing to another wifi source triggers some sort of wakelock, data pull or media scan that keeps the phone awake and increase cpu usage and drains the battery.

Having cell data on does not appear to make any difference.

I'm not sure if it's is just the sdcard or the external micro SD card too.

Some of the Shark for Root packet suggests multiple packets going to Google registered ip addresses. Some wakelocks also cause by Amazon.venezia.

It would be nice to know if it was thumbnails, hidden data, certain app or whatever that was doing this.

Anyway, i did factory reset. Wipe the sdcard, boot into cwm, format sdcard, and the factory reset again.

I'm going to see if this will stop the wakelock issue. if it does, I'll have to re introduce crap and clutter a few at a time to see if/how/why it happens.
[Samsung Infuse 4G] Pony Express:
I like your process and I am hopeful it will provide a clear-cut answer.

I would be glad to help except that I don't seem to have this particular issue.

When I hit the power button to turn the phone on, well that's a different story. :D

All the best.
[Samsung Infuse 4G] qkster:
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..
[Samsung Infuse 4G] Pony Express:
qk,

Here is another post on the topic, this one from an HTC perspective.

http://xdaforums.com/showthread.php?t=937080
[Samsung Infuse 4G] electricpete1:
I just tried out better battery stats when recommend by another member.

The whole purpose of that tool is to track down what keeps your phone awake when screen is off.

Seems like a great tool.

And supposedly it uses data already in the phone...doesn't add any extra collection overhead (although it does add a continuously-running service and application)

EDITED TO ADD: Sorry, you guys probably already knew about that. Never mind...

I would delete this post if I could, but can't find any delete button in these xda forums.
[Samsung Infuse 4G] electricpete1:
Effect of charging on short/long term battery life

That's interesting. I think it would be completely expected if Android determined %Battery remaining soley from voltage, without considering the charging history. The reason is that the state of charge depends not just on current voltage but on history... the longer we have been at voltage the closer the state of charge comes to reaching it's saturation. So slow increase of voltage means higher state of charge when we reach a given voltage like 4.2 volts. More info on saturation in the 2nd table here:

http://batteryuniversity.com/learn/article/charging_lithium_ion_batteries

But also as I understand it, Android uses an algorithm to compute %Battery remainng that depends not just on voltage but on charging and usage patterns. If the algorithm was perfectly accurate, there should be no difference in how you charged to get to a given %Battery, like 100% (algorithm takes it into account). But I think the algorithm is not perfect... for one thing it makes assumptions based on your historical patterns. If you change your pattern (for example using different charge method), that can affect the accuracy of the algorithm, and therefore affects how much you really have available when it says 100%.
[Samsung Infuse 4G] PlacidCat:
I wonder if that explains why the battery graph actually goes up sometimes (without charging!). Perhaps if usage pattern changes sufficiently, the system needs to adjust its expectations causing an uptick in the graph rather than steady drain.

If I ever see a graph like that again I'll post it - I've seen similar results in the Nook Tablet forums.
[Samsung Infuse 4G] qkster:
I think there is an algorithm for calculated rate of use. The reported display is based on rate of decline.

When the current rate is disrupted, the calculation changes. The displayed report will show an increase or flatten out effect.

my own situation:

I have since resorted to an odexed official firmware.

Rooted.

Running with stock kernel.

Running with Samsung RFS files system.

I have also formatted the sdcard several times as well.

The drain is not as consistent as before. I can connect to different wifi and not seen it as much.

I have not seen this drain on cell data when I ran the phone without wifi on for several days.

I think it is due to a combination of apps, app chatters, wifi connections.
[Samsung Infuse 4G] PlacidCat:
I would agree. I think the fundamental issue lies with a core interface (in this case something to do with the WiFi code and/or drivers) and how apps make use of that interface. Some apps don't seem to be affected by the issue but I think those apps are predominantly those that don't perform automatic/background updates.

My battery life hasn't been nearly as nice as it was starting out and it doesn't have anything to do with the original issue. I'll have to take stock of what I have running again and see if I have any new services or apps that run. I now regularly dip below 50% battery mid-afternoon (< 12 hours use). I had been staying above 60% not too long ago. :confused:

-Edit- Ooh. I'm a senior member now. :D
[Samsung Infuse 4G] qkster:
i997: Froyo and GB, from my own limited experience, is easier on the battery. With light to moderate use, I get 2-3 days. On CM9 or CM10 based firmware, I get 12hr with 1.5hr display.

T959: I found the Sprint sgs2 battery to work better than stock:

http://xdaforums.com/showpost.php?p=30679394&postcount=36

Using Slim Beans - there is a decent 3+ to 4+ days standby. 3+hr display with heavy use. The best battery would be a stock froyo based firmware, though.

edit:

here is an interesting tidbit:

http://xdaforums.com/showpost.php?p=31231561&postcount=3768
[Samsung Infuse 4G] PlacidCat:
I promised to post odd power happenings. Here's a great example. My power was going down rapidly, so I thought a reboot was in order. I was at 20-some percent before booting and in the past I noticed rebooting can severely affect remaining power so I thought I would plug into a USB port to deliver power when booting.

After boot (a couple minutes) power shot up to over 50%. That's way too much in such a short period given 1) it was just a couple minutes, 2) it was booting which traditionally seems to be a massive drain and 3) it was on a low power USB port.

Yeah, I kind of loathe the battery estimates now. :)
[Samsung Infuse 4G] onexuan:
if your android rooted,you can try "One Power Guard",it can make wifi sleep well.downloaded app from http://xdaforums.com/showthread.php?t=1889740 or discuss your problem.
[Samsung Infuse 4G] electricpete1:
PlacidCat - are you leaving Wifi on when you are out and about and not connected to a wifi network?

That will suck up a LOT of battery power as the wifi constantly searches for network to connect to.

And yes, that creates a lot of wakelocks as shown in your screen.

(Note that leaving wifi on while connected to network doesn't take a lot of powr, but leaving wifi off while not connected does).

There are lots of ways to auto-disconnect your wifi when you leave home or work and a few ways to auto-reconnect (that's a little trickier).

Free apps: Autowifi toggle app. Auto wifi on/off app.

I use a Tasker profile to auto-disconnect when it senses that I'm leaving home (based on cell tower signal). Then I manually re-connect when I'm at home or another place with wifi and I need my connection.

As for battery reading weird when reboot after heavy usage, was discussed here:

http://xdaforums.com/showthread.php?t=1885614&highlight=battery

I tend to think the reading before reboot is reliable and reading after reboot is suspect but comes back to normal quickly.
[Samsung Infuse 4G] PlacidCat:
Absolutely, I leave it on. As I get texts through Google Voice and email notifications from work, background data is essential. I don't have a data plan (data turned off with APNDroid) so WiFi is necessary. I've always had this and even with background data on, my battery could last upwards of 30 hours with moderate use on FroYo. The issue isn't the wakelocks alone, rather, it's the fact that, unpredictably, the system will go into a "persistent wakeful" state where it remains awake CONSTANTLY, rather than occasionally when data requests are made or when the system searches for Wifi hotspots. This issue is peculiar to my experience with Jelly Bean.

Unfortunately, I'm not willing to deal with this issue any longer. After weeks of unpredictable battery drain and odd issues with lag (memory usage was awful) I've moved to CM7.2. Initial indications are that, while I gave up some flashy UI elements and cool JB-specific features, my battery life will be greatly increased with an acceptable compromise of UI performance and lag that is better than my FroYo experience and, while not as buttery as JB, is smoother than FroYo. Memory usage also shows early promise as well, as I now have 140MB+ free RAM regularly, even with my normal widgets and services. With JB I had less than 70 regularly causing tons of swapping/thrashing.

If I ever come back to JB, I'll be sure to come here again. Until then, my apologies for bowing out of this thread and I wish you all the best.

Cheers!