FORUMS
Remove All Ads from XDA

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

147 posts
Thanks Meter: 31
 
By TheYar, Senior Member on 12th October 2010, 05:15 AM
Post Reply Email Thread
Some battery threads:

http://forum.xda-developers.com/showthread.php?t=978269

http://forum.xda-developers.com/show....php?t=1004760

updated tl;dr for most of you lately:
Your problem is probably that you flashed a new ROM or kernel recently, which causes battery stats to be very inaccurate. The most common symptom is that suddenly the battery drains like crazy, when before it just dripped. The opposite can also happen - you flash a new ROM and it seems like the best battery life ever. Until it suddenly jumps from 60 down to 10. This can happen even if you erased stats after flashing. You need a few days with your new ROM first, then you should see what your battery usage is really like. Do full charge cycles to speed up this process. (Bump charge, erase stats, drain, charge, don't bump charge or erase stats anymore, drain, charge, drain, charge, etc.) Simply put: you cannot judge battery performance after flashing a ROM. Often it can be a week or more before battery performance and battery level reporting becomes stable.[/tl;dr]

Every time a chef makes a new ROM available, or even among those using stock OS, there seems to be wildly inconsistent feedback on battery life. Many report catastrophic battery drain, while others using the same hardware/firmware/kernel/ROM say it's the best battery life they've ever gotten.

It would seem that a battery can run away on you for a variety of reasons, and flashing back, or returning to the store, doesn't have to be the first thing you do to fix it. This thread is to consolidate many of the complaints around xda about sudden battery drain, and discuss proven (or superstitious) fixes for it. This is not another discussion on tips and tweaks to extend battery life. There's a good wiki on that already. This is specifically about when you experience an unexplained dramatic increase in how fast your battery is draining, and the usual tweaks aren't having any effect.

And, in some cases, if you are experiencing battery drain associated with one of the "more interesting" issues below, you might be experiencing lag for the same reason. Please attempt all of the below to the best of your ability before making a post about battery drain or lag with a particular ROM or kernel.

We'll start with the simple.

Don't rule out your imagination or neurotic behavior as the main problem.
I hate to open with a "shut-up-noob," but this one is real. I know I've almost fallen victim to the disease of "let me turn on the screen just one more time to check the battery %." Or hours of "man this new lagfix is great watch how fast I can swipe screens and load apps over and over!" Both of which, obviously, result in more battery usage. Then there's also the case where you just installed a numerical battery meter for the first time, and watching it tick down is weighing on your psyche much harder than the previous, barely noticeable movement of the bar and making you think your battery is draining wildly. Which then can also then lead back to disease #1 in a vicious cycle of psychosomatic battery abuse.

It may just be the battery itself. Some are reporting an apparent quality control problem with the batteries. You might get a great one, or if nothing below helps you then maybe you got a dud. I can't help much there. Try reporting the problem to AT&T or Samsung. I hear AT&T is a lot better to deal with.

Check the basic battery usage stats. Settings -> About Phone -> Battery Use. This won't necessarily tell you a whole lot, it isn't always accurate, but it can give you an idea of what the system thinks is using most of the battery. Such as whether it's playing with the screen too much, or making a lot of phone calls, etc. Keep in mind... I'm pretty sure that these stats are only based on the time period listed at the top of the screen. A lot of people get confused when it shows the display using 90% of the battery. But if that's only based on the 30 seconds since you unhooked the charger, then it isn't all that confusing anymore.

Quote:

Be wary of the "battery full" status. I have repeatedly found, at least in leaked 2.2 ROMs, that this alert actually goes off long before the battery is finished charging. This bug often continues even after you've done all of the other various tricks and tweaks and recalibrations. It says "100" and that the battery is full and to disconnect the charger, but when you disconnect, it instantly drops into the low 90s and drains quickly from there. Rather, if you ignore the alert and keep charging for considerably longer, it will actually be at 100 when you disconnect, and will drain slowly.

I'm quoting out the above, since I can't find the strikethrough tag. With new accurate battery mods, this isn't true anymore. Your battery doesn't need to go to 100%. It will be high-90s when you unplug, this is normal.

Drain and charge.
Sometimes the battery meter will seem to plummet, but then sit at <10 for hours before it finally shuts off. Giving a full drain may help calibrate where the "zero" really is. Run a long video, or just leave the camera up, until it shuts itself off. Then charge it back to 100%.

The bump charge (now commonly referred to as recalibrating).
Maybe your phone forgot where zero really is, or maybe he forgot where 100 really is. Here's the bump charge. Read carefully; I did it wrong for a while before I got it right. Charge the phone to 100% while it's on. As soon as it hits 100%, unplug the charger and power off. Now plug in the charger while the phone is off, and charge to 100 again. As soon as it hits 100, unplug the charger and power on. Wait until it boots completely, then don't charge this time, just power right back off. Now charge to 100 one more time with the power off. Power on and you are bump charged. Many also consider a stats wipe to be essential to this process as well. See below.

See joeybear's post (linked below) for more info on bum charges and battery stats, such as different procedures for CyanogenMod.

Erasing the battery stats (for you rooters/flashers)
Sometimes you just want your phone to forget everything he thinks he knows about his battery, and re-learn it from scratch. Your phone maintains a file with statistics on battery usage, which in turn is used to help calculate battery life at any given time. Sometimes, especially if you've been playing with ROMs, kernels, and lagfixes, the stats in the file just aren't applicable anymore to how the hardware is being used, so you get crazy battery drain.

Clockwork Recovery has a simple function to wipe the battery stats. If you can't run Clockwork, use ADB or a terminal emulator (search the market) to delete that battery stats file located at /data/system/batterystats.bin. The link at the bottom to joeybear's thread has a little more info.

The general idea is to start by trying the above - make sure it isn't your own fault or maybe just a bad battery, then drain, bump charge, and wipe stats - in that order.

There are lots of ideas about what may or may not happen when you experiment with the above. Wiping battery stats after a ROM flash that already wiped them for you is at least redundant and may even contribute to a battery drain problem. Some say you should wipe first and then drain and bump charge. Be careful about wiping stats and bump charging too much, though. Over-charging your battery will hasten its demise.

HOWEVER, if you're like I was when I first started this thread, you've seen the above recommended many times, and none of it has ever helped you one bit with an actual sudden battery drain problem.

Now for more interesting work.
Occam's razor. The simplest answer is the most likely. Battery appear to be suddenly draining faster? Well, it could be that you need to retrain your phone (or your mind) by using the procedures above. It could be that your battery suddenly went bad. A more simple answer is that something is draining your battery. Something is abusing your CPU, your memory, or your network interfaces. Try to find out what, or at least stop it even if you don't find out what. Simply looking at the stock report of battery usage isn't likely to tell you everything you need to know, though.

If you've recently flashed something, try your flash again, and this time be more aggressive. Make sure you turn off any lagfixes you've installed beforehand. Make sure you've got the most charge you possible can before flashing (see above - you want a true 100% charge immediately before flashing). Take the plunge and opt for repartitioning, data wiping, formatting, master clearing, or any other options you may have to start with a clean slate with the new ROM. Even flash stock first. Pay close attention to battery usage as you re-install apps and get your phone set up again. It may be one app in particular that was responsible.

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.

Check your background syncs. Experiment with turning them off, one at a time, and see if there's improvement. The app may have gotten confused after all your flashing and is doing something crazy as it syncs. If you isolate one that makes a difference, reinstall it or try living without it.

Live wallpapers. They actually improve your battery life, no lie. Ok, actually that is a lie. Some of them look awesome, but many users, myself included, experience a significant increase in battery drain when there's a fancy full-screen animation running non-stop on the phone. Try getting rid of them and see. There are some nice, simple, dark wallpapers that don't animate but are still pretty enough to impress the ladies at the bridge club. Live wallpapers can also create some majorly noticeable lag in your other apps, too.

Install OSMonitor. Set it to sort process by load, descending order. There shouldn't be much in the list, the OSmonitor app itself should show up near the top, at around 20%. Other apps should be in a 0% wait state or occasionally grabbing a few %. If you recognize an app sitting consistently at 50%+, that could be your problem. Make sure you know what it is first (not a critical system service) and try uninstalling it.

Is kswapd0 taking a lot of CPU? This is the memory swap / page file process. It's normal for it to be grabbing little chunks of CPU here and there, but if it's sitting at a high %, or jumping in frequently to a high %, then something's going on with your memory cache. Unistall your lagfix and try a different one. If you aren't using a lagfix, get OCLF and use it to install EXT2 and then OCLF V2+. Despite the changelogs and debates that claim otherwise, several have found OCLF to be very useful after flashing to any Froyo ROM (unless that ROM already includes a lagfix such as voodoo or stumpy's). If none of that works, your kernel may be the problem. Swap it or go back to stock.

Look at data/network usage. If you have a router or other device on your home wireless network that can give you some info, try that. Does your phone appear to be trying to send or receive an unusually high number of packets/data even when you're not doing anything with it? Also, while off wifi, watch the little green and red data icon in you notification bar (the 3G / E icon). Are they spasming green and red constantly every 2 or 3 seconds, even when you don't think you're doing much data transfer?

OSMonitor can also again be your friend here. Under "Network" you can expand each interface and look at live data transfer #s. Does one of them seem to be really active despite you not doing anything in particular with your phone right now?

If you have any of these signs of heavy data usage, go back to OSMonitor and look at Connections. Turn on DNS reverse lookups in settings. Turn on some whois. Ignore any loopback (127.0.0.1) and likely you can ignore the 1e100.com stuff, that's just Google (get it? 1x10^100). Are there any other established connections? Does the reverse lookup (the domain name) indicate what application might have the connection open? For example, if it's weather.com, that might be a Weather Channel widget or app. That one was responsible for destroying my battery one time. Use whois and similar tools in OSMonitor and on the Internet to help you figure out what your phone is connecting to. If you've got heavy data usage and an app or apps have open connections, uninstall / reinstall those apps and see if the battery drain stops.

Under-volting. Xan's Voltage Control App. There's a lot more of this going around now that there are several overclocking and undervolting kernels available. There isn't a whole lot to be said here. Different CPU clock steps can be individually adjusted to pull a little less juice from the battery. Make sure you keep them as temporary settings and do not "set on boot" until you're sure you've got a stable configuration. If you set something to a level your phone can't handle and script-save it for booting, you might not be able to boot again. Anyway, under-volting will not suddenly revolutionize your battery performance, but it can help.

Also, switching UV settings can significantly affect your battery meter after reboot. If you've recently switched UV settings and rebooted, your battery meter might suddenly show 20% more or less batterly life than before. This is simply what the meter thinks to be the case, obviously your battery did not just jump 20%.

Backlight notifications. I don't have hard data to back it up yet, but I've noticed that when a backlight notification is active, my battery starts racing to zero.

Cyanogenmod. It's available on Captivate now. It isn't stable/supported. It has a lot of debug code enabled. That means it uses more battery than it will someday when it's stable RC and debug code is commented out.

I've successfully used all of the "interesting steps" above in different cases where I had sudden battery drain and the basic steps didn't fix it. Anyone else have success with these? Any other tactics to share? Please post.

Thanks to joeybear23 for good info on recalibrating the battery.
The Following 20 Users Say Thank You to TheYar For This Useful Post: [ View ] Gift TheYar Ad-Free
 
 
12th October 2010, 05:44 AM |#2  
Senior Member
Flag Auckland, New Zealand
Thanks Meter: 30
 
More
Great info on the battery.

And you mentioned Occams Razor... the simplest answer is the most likely!

Ok, maybe your batteries are actually no good. Many have found theirs to be faulty and that after replacing them all is well again.

I just got a spare and the new one is great!

Maybe a batch of samsung batteries has problems and they begin to lose charge quite quickly after they have been in use a month or 2 (Or they get confused after multiple Flash's of ROMS .

Basically, I bought a cheap aftermarket battery as a spare and decided to try it in my phone today. I have made several calls and installed some apps and have played around with the phone as per normal. After 7 hours it is at 53%. MUCH better than before. With old battery it would be at 10-15% after a day at work.

Only thing different is I did install the lag fix over the Beta 5.5 to see if it helps speed.

Is it the battery or the phones software causing the problem??? Well if they have a chip in them maybe it IS the battery...???
12th October 2010, 05:46 AM |#3  
Demented71's Avatar
Senior Member
Flag Philadelphia
Thanks Meter: 10
 
More
Great read there! I haven't really been having any problems with battery life lately, but installed OS Monitor anyway just to see what was running. Nothing too out of the ordinary, as everything seems as you say it should be. OS Monitor is up there at 15-20%, android system is at another 8-10%, and system/bin/sensorserver_yamaha is running at anywhere from 7-16%. I assume this is the sensor that monitors what position my phone is in. Other than that, I don't see any other process taking more than a small slice of CPU or so from time to time.

I have done all of the suggestions before; bump charging, draining, and wiping stats, but I also feel that there may be differences since I am using a few different batteries. If I seem to get amazing battery life from a battery after wiping the stats and then using it til it dies, when I put in the next battery, it may work differently, thus screwing with the stats yet again. I have tried to not be as worried about battery life, especially since I have multiple batteries, but it's still something of interest to me.

I'll be subscribing to this thread, and look forward to reading some other users' thoughts/experiences with their batteries.
The Following User Says Thank You to Demented71 For This Useful Post: [ View ] Gift Demented71 Ad-Free
12th October 2010, 12:26 PM |#4  
TheYar's Avatar
OP Senior Member
Thanks Meter: 31
 
More
Scott -

In my own experience, putting lagfix on cog 5.5 has a huge beneficial effect on battery drain. I'm not sure yet but I believe the Unhelpful kernel uses a lot of cpu trying to manage swap unless you put an ext cache on it.

However, it's also true that you can great great life out of a new battery for the first 2 or 3 charge cycles. But a battery suddenly draining faster than normal is probably something your phone system is doing and not a bad battery.

Sent from my SAMSUNG-SGH-I897 using XDA App
Cog 2.2 beta 5.5 with OCLF
12th October 2010, 12:32 PM |#5  
TheYar's Avatar
OP Senior Member
Thanks Meter: 31
 
More
Also, Demented, don't forget to look at antennae/network abuse, not just CPU. I once had a malfunctioning weather widget that wasn't using much CPU but was going berserk on my 3G and sucking batt juice so fast that you could hear the battery whimpering a little bit.

Sent from my SAMSUNG-SGH-I897 using XDA App
Cognition 2.2 Beta 5.5 with OCLF
12th October 2010, 04:11 PM |#6  
shiftylock's Avatar
Senior Member
Flag Columbus, OH
Thanks Meter: 31
 
More
There should be a college class on correct battery usage. :P

Thank you so much for this thread, my battery thanks you as well!
12th October 2010, 07:49 PM |#7  
Senior Member
Thanks Meter: 15
 
More
Sorry if i shouldnt be posting this here. But i just read that wiki link at top and i was wondering what you guys think about leaving use wireless networks and power saving mode checked on to save battery???

Sent from my SAMSUNG-SGH-I897 using XDA App
12th October 2010, 09:43 PM |#8  
Member
Flag Long Island, NY
Thanks Meter: 6
 
More
Good thread; subscribed. I'll be trying some of this stuff out and reporting back here.
12th October 2010, 09:52 PM |#9  
Member
Flag Long Island, NY
Thanks Meter: 6
 
More
Quote:
Originally Posted by roadrash7

Sorry if i shouldnt be posting this here. But i just read that wiki link at top and i was wondering what you guys think about leaving use wireless networks and power saving mode checked on to save battery???

Sent from my SAMSUNG-SGH-I897 using XDA App

Some of the stuff there is valid; not sure I agree with using the task killer or the advice about leaving "Use Wireless Networks" on and GPS off. I leave both off, and when I want GPS access I turn on the GPS from the power control widget.There's no need for your Wi-Fi adapter to always be searching for networks and associating with Skyhook, etc.

Regarding leaving Wi-Fi on rather than 3G, it does make sense when you are using data. However, if the phone is idle, I doubt leaving the Wi-Fi card enabled will actually save battery life, as it will have to maintain connection with the access point (see your Wi-Fi sleep settings). I think a few short bursts of 3G download/upload when syncing, etc. will be less drain on the battery than leaving Wi-Fi enabled just for those small amounts of data that will be used when syncing. But, if you always want to be ready to browse, or do a lot of DL/UL at a moment's notice, I could see how keeping it on would be justified.

If manually syncing is acceptable to you, then by all means turn off the background data and auto syncing... personally I feel like the phone is really being limited and you have to balance utility and battery life, so I leave those options enabled.

Just some thoughts, if anyone can correct me on anything, I'm eager to learn.
12th October 2010, 10:57 PM |#10  
Senior Member
Thanks Meter: 4
 
More
Quote:
Originally Posted by TheYar

I'm not sure yet but I believe the Unhelpful kernel uses a lot of cpu trying to manage swap unless you put an ext cache on it.

I'm not really sure what you mean by that? There is no swap in use unless you add your own script to mount a swapfile.

Sent from my SAMSUNG-SGH-I897 using XDA App
12th October 2010, 11:12 PM |#11  
TheYar's Avatar
OP Senior Member
Thanks Meter: 31
 
More
Update
Updated the OP with some other items I forgot.
Post Reply Subscribe to Thread

Tags
battery, charge, drain, stats, task killer

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes