How to isolate and fix battery drain (and maybe lag, too)

drancid

Senior Member
Sep 26, 2010
1,031
129
63
Monterey Park
Could someone plz share ur batterystat file?
By bettery life is BAD now..
It goes down like crazy..
And fully charged in 6 hours from 0%.
I sun think this is normal status..
I tried everything but still the same..
Wanna try to copy someone's stat file to see how that works for me.

Sent from my SAMSUNG-SGH-I897 using XDA App
 

tytdfn

Senior Member
Jul 29, 2010
303
10
0
New York
Could someone plz share ur batterystat file?
By bettery life is BAD now..
It goes down like crazy..
And fully charged in 6 hours from 0%.
I sun think this is normal status..
I tried everything but still the same..
Wanna try to copy someone's stat file to see how that works for me.

Sent from my SAMSUNG-SGH-I897 using XDA App
Knock yourself out :D
 

Attachments

TheYar

Senior Member
May 27, 2008
147
31
0
Could someone plz share ur batterystat file?
By bettery life is BAD now..
It goes down like crazy..
And fully charged in 6 hours from 0%.
I sun think this is normal status..
I tried everything but still the same..
Wanna try to copy someone's stat file to see how that works for me.
Did you really try everything in the OP? What is your CPU and network utilization like? I would expect that really bad drain would only be caused by a flawed app installation that is hogging CPU or network connections. The only other possibility I know of is a bad battery.

Can you point them out?

Thanks
What I meant is that with lagfix installed, the battery usage during the demo was slightly less.
 

Dankenstein

Member
Aug 30, 2010
36
1
0
50
Queens, NYC
Excellent thread. Will definitely be following it and posting here, since the battery BRAINSTORM thread is has got me mesmerized. The battery is my only problem remaining. And it's not that bad, really. Annoying, yes.

CurrentWidget is also a fantastic diagnostic tool to have -- especially since I'm annoyed as hell at not being able to get any kind of usable dmesg battery logs from OS Monitor. Of course, CurrentWidget is only awesome at measuring charge levels for the Cappy at the moment. But the dev is very responsive and helpful and already got it working on the Vibrant. And it even allows you to measure actual charge with "operation on value" -- the dev tells me that the Cappy requires you to divide by 1.897 to get a true charge level. But that's just too damned convenient, and I think he's just having a little fun at my noobish expense.
 

TheYar

Senior Member
May 27, 2008
147
31
0
After running well on Cog 2.2 beta 6 for a few days, kswapd0 is back in effect. It's frequently maxxing out the CPU (though I've seen worse) and my battery life is suffering for it. Killing running apps from the Android application manager seems to help, but i'm not certain. Anyone have any ideas what this is?
 

spartan062984

Senior Member
Oct 8, 2010
249
7
0
So i just noticed that with bone stock OS (i'm currently using a replacement one btw) ...No root...no Hacks...nothing...i seem to gain the MOST batt life i've ever seen on the Captivate. My setup:

1) Background data off
2) Added only google account. No Facebook/ twitter/ etc
3) gps off
4) brightness to Zero
5) Power Saving mode On
6) Wifi On
7) Screen Timeout = 1 minute
8) All Animations On
9) Blue tooth off
10) All widgets Off except for the stock Android Power Management

Usage:
1) LOTS of texting
2) Moderate - Average phone usage (voice call = 26%)
3) Even has blue sea live wallpaper on (2%)
4) wifi (2%)
5) phone Idle (21%)
6) Cell standby (29%)
7) Display (20%)

- See attached image Below for confirmation-

Can you believe i have gone 1 day 12 hours 53 mins and my battery is STILL at 48% ? I know that may not be a lot, but still

ALso, i know that in the image it shows the phone charging, but that is also due to the fact that i had to actually plug it in...in order to use sdk. :p

What do you think?
 

TheYar

Senior Member
May 27, 2008
147
31
0
That is pretty impressive. My best battery experience was about 36 hours. That was with gmail syncing, taking photos, large uploads, and a couple phone calls a day.

My worst was when I would go to bed at 100% and nothing running, and wake up 6 hours later to a dead phone.

Anyone have ideas on what kswapd0 is?
 

Smallsmx3

Senior Member
Jul 28, 2010
4,052
757
243
So I've had some issues with my battery draining after flashing roms. It hasn't been so bad lately but I usually can get about 12 hrs. Which I've been contempt with...lately I've been flashing from 100% which has been helping....I recently received a refurbished and the battery life has been the same with the new phone. I flashed the aosp beta 3 rom yesterday and I decided to do a couple of drain and fills. Today I ran it iltill it died. I turned it on and let it die again. After plugging it in for a minute I turned it on to show that I still have 30% of my battery left. Anyone have any ideas? I'm going to let it die again and try it over.

Sent from my SAMSUNG-SGH-I897 using XDA App
 

Demented71

Senior Member
Sep 5, 2010
449
10
0
Philadelphia
So I've had some issues with my battery draining after flashing roms. It hasn't been so bad lately but I usually can get about 12 hrs. Which I've been contempt with...lately I've been flashing from 100% which has been helping....I recently received a refurbished and the battery life has been the same with the new phone. I flashed the aosp beta 3 rom yesterday and I decided to do a couple of drain and fills. Today I ran it iltill it died. I turned it on and let it die again. After plugging it in for a minute I turned it on to show that I still have 30% of my battery left. Anyone have any ideas? I'm going to let it die again and try it over.

Sent from my SAMSUNG-SGH-I897 using XDA App
So you're angry at getting 12 hours battery life? ;)

I think you meant 'content', not 'contempt'

As far as calibrating, try this:

While your phone is on, charge it until it says 100% (Full)
Turn it off and charge again until it says 100%
Turn it on, let it boot fully up, then turn it off again and charge it to 100%

Then if you can do it, leave it off, and let it stay charging past 100% for at least another hour or two.

If you have Clockwork Recovery on your phone, unplug it and boot into Clockwork Recovery mode. Under advanced you will see an option to 'wipe battery stats', do that, then reboot normally.

The use your phone as normal, but try not to plug it in at all, via USB or wall charger. Let it fully drain to 0% until it shuts off, then plug it in (while off) and charge to 100%

If you don't have Clockwork Recovery, you can also just delete the batterystats.bin file from /data/system using Root Explorer, Astro or some other file manager once you boot up.

See what your battery life is like then. It also helps to spend $10 on eBay and get the 2x batteries and charger. They're not Samsung brand batteries, but they work phenomenally for me. Plus, then you always have a full battery to swap.

http://cgi.ebay.com/ws/eBayISAPI.dll?ViewItem&item=320590303274&ssPageName=STRK:MEWNX:IT
 

spartan062984

Senior Member
Oct 8, 2010
249
7
0
That is pretty impressive. My best battery experience was about 36 hours. That was with gmail syncing, taking photos, large uploads, and a couple phone calls a day.

My worst was when I would go to bed at 100% and nothing running, and wake up 6 hours later to a dead phone.

Anyone have ideas on what kswapd0 is?
Good Question! Where did you find "kswapd0" ?
 

Dankenstein

Member
Aug 30, 2010
36
1
0
50
Queens, NYC
. . .I think you meant 'content', not 'contempt' . . .
I thought the same, and chuckled with a tinge of unfortunately human judgment. But then I tempered that natural reaction with equally natural -- albeit augmented by nurture -- perspicacity.

. . . Which I've been contempt with... . . .
Sent from my SAMSUNG-SGH-I897 using XDA App
Predictive text. More slack needed.
 

jdsatyr

Senior Member
Sep 17, 2010
104
18
0
Saugerties
just got a replacement captivate for my bricked one... and since I have had this one (with my original batter am now getting between 18 and 24 hours of use as compared to 12 to 14 hours on my rooted phone, I did root this one but have not done anything else to it.
 

TheYar

Senior Member
May 27, 2008
147
31
0
Good Question! Where did you find "kswapd0" ?
OSMonitor shows it using CPU. Usually just a bit here and there, but sometimes it maxes the CPU for long periods of time, which obliterates the battery.

On some *nix systems, kswapd0 is a memory management process, managing the disk space that is used as virtual memory. I assume that's what it is here, but I can't find anything about kswapd0 on Android. I do know that in at least two cases I experienced massive battery drain (and lag) that was almost certainly due to kswapd0 using a constant 90%+ of the CPU.

By the way, I've added an item to the OP that I've found very interesting: the "battery full" alert on my phone seems to be way too aggressive. It fires off and tells me to disconnect long before the battery is actually charged. If I disconnect right away, the meter drops to 93 or so, and declines rapidly from there. If I leave it in until the alert goes away, and then even longer (like overnight or at least for another hour or so), then when I unplug it, it sits at 100 and drains very slowly (or normally anyway) from there.
 

polarbee

Senior Member
Feb 5, 2009
82
10
0
Alaska
Uninstall all task killers. Yes, uninstall. I know task killers are supposedly battery savers, but 99% of you (including me) don't know what we're doing when we get our hands on a good task killer. It is very possible you've got one service that is constantly trying to load and call home, and another that is constantly auto-killing it. If you really want to include task killing as part of your phone maintenance and battery tweaking processes, then download an app that is specifically designed and configured just for battery efficiency, not a general-purpose task killer that will allow you to hose up your Android system.
Do you have any suggestions for good battery efficiency apps?
 

spartan062984

Senior Member
Oct 8, 2010
249
7
0
OSMonitor shows it using CPU. Usually just a bit here and there, but sometimes it maxes the CPU for long periods of time, which obliterates the battery.

On some *nix systems, kswapd0 is a memory management process, managing the disk space that is used as virtual memory. I assume that's what it is here, but I can't find anything about kswapd0 on Android. I do know that in at least two cases I experienced massive battery drain (and lag) that was almost certainly due to kswapd0 using a constant 90%+ of the CPU.

By the way, I've added an item to the OP that I've found very interesting: the "battery full" alert on my phone seems to be way too aggressive. It fires off and tells me to disconnect long before the battery is actually charged. If I disconnect right away, the meter drops to 93 or so, and declines rapidly from there. If I leave it in until the alert goes away, and then even longer (like overnight or at least for another hour or so), then when I unplug it, it sits at 100 and drains very slowly (or normally anyway) from there.

90%?!?! :eek:

I read the update. I feel the same way about the "battery full." Now that you mention it, I actually have been following through with the "bump charge" method.....However....My methods include:

1) Prior to charging, I turn Everything off (auto-sync/ wifi/ everything)
2) Let it charge while phone on (works best when i sleep)
3) Once i hear the "batt full" notice (if i can wake up to it) i turn it OFF for the rest of the remaining charge. If i dont catch it, i just turn it off as soon as i get up and make coffee + shower+ etc. Thats about 45 mins- 1 hour itself.
4) I also notice that after you turn it on (and anytime you restart) that the "Battery Use" list is usually populated the most (almost 2% of everything minimal) (ex: android os + wifi + dialer + cell standby) you get the idea. In addition, if i leave the phone off and un-touched for a good hour, they eventually go away and i am left with core processes.
A - Cell Standby < (40%)
B - Display < (30%) <---Proof! :D
C - Phone Idle < (30%)

I do notice that my battery does NOT drain as fast (stays at 100% for a max of 2-3 hours + ).

Update: There is a thread in here somewhere with the debate of Wifi vs 3G = batt drain. I tested myself and found that WITH wifi on = more battery drain. Wifi OFF = Less. To me it does make sense. Whether its a fact or not, who knows. Like i said, I could just be one of the lucky ones who has a good/ decent battery.

FYI: I have only flashed twice since i got my cappy (1- OC kernel + Voodo/ 2 - Cog 2.2 Beta 6). Once i decided to go back to stock (with a few mods of course :p ) and just wait out Froyo (if it ever comes out), I will then start my Modding Addiction. Since then, and after wiping batt stats + bump charging once a month, my battery experience has been Excellent.




Edit: @The Yar: What is your take on SetCpu? Yes/ No? Thats actually what i was going to experiment with while I am on stock.
 
Last edited:

TheYar

Senior Member
May 27, 2008
147
31
0
Do you have any suggestions for good battery efficiency apps?
IMO, the best battery efficiency app is not to use any. I'd heard a lot of good things about Power Manager but I think the dev stopped paying attention to that app like a year ago. A lot of people swear by the Juice apps - JuiceDefender, JuicePlotter, and UltimateJuice.

Edit: @The Yar: What is your take on SetCpu? Yes/ No? Thats actually what i was going to experiment with while I am on stock.
Haven't used it, but I assume that it caps CPU utilization? I don't know, I could give it a whirl, but I love my zippy fast phone. My gut reaction is that if SetCPU does wonders for someone, then the problem is probably a bad/corrupt app or config, like a problem that might be addressed in other things I mention in the OP, and SetCPU is simply masking the problem. I don't know. Thanks for the info in your post.