New Battery Theory - Bad Percentage Reading - Samsung Galaxy Nexus

Hey all, so I have a different theory on the GNex battery issue but I'm not sure how to test it. It also might explain why there has been such a discrepancy in people's battery stats.
My theory is that there is something wrong with the way ICS/GNex is charging/reading/identifying battery information. Here are a few of the reasons why I think this is the case.
1 - My phone will occasionally charge absurdly fast, like 20 percent in 10 minutes... but then it will die equally as quick. My first thought was that the phone just charges and discharges quickly... BUT
2 - After charging for, say an hour, when I do a battery pull and let it sit for a minute or two before putting it back all of a sudden my super quick battery charge to 62% is now only at 37% (actual numbers that happened to me tonight). So why did I do a battery pull...?
3 - Because I noticed that after 10 minutes my phone had gone from 62% to 56% and I thought that was absurd. Once I did the pull and was back to my (as I like to call it) normalized battery percentage I have only dropped 15% in 2 hours and that includes heavy data usage on maps, navigation and texting. And another strange thing
4 - I have actually seen it go the other way! I once was around 30%, rebooted the phone and it jumped to 50%. Now that I'm thinking about it I often see weird fluctuations in my battery reading. One minute it will be 28%, then I turn it off and turn it back on and it will be 29%. Oh... and for those of you wondering
5 - This has happened both on a stock rom, rooted stock (although not like that would make a diff) and a custom rom ARHD. But still there is one last question...
6 - Why is there so much disparity on the issue? My theory is because this battery madness is so unpredictable you, you don't know when you get a normalized charge or an inflated charge. And lastly...
7 - I think it's gotta be a SW issue, why else would Nexus S owners be seeing the issue as well? (So that's good news... hopefully).
Soooo, that's my little rant. I think part of the problem is people are getting distracted by all these other theories with kernel drivers and etc because of the absurdly high Android OS issue (although in all fairness my theory could be more misdirection).
So why post? Well if people could try their luck validating/disproving my theory I would really appreciate it!
Here's what I'd like (and what I am going to do).
Charge your battery for an hour, if it charges really fast note the percentage.
Optional: Play with the phone for a while and see if it discharges quickly.
Do a battery pull, let it sit for a sec and put it back in and note the percentage.
If the percentage is significantly lower (10+%) start using the phone now and note the time to discharge.
Thanks!
EDIT: Also a good thing to mention, I am not disagreeing about the Android OS bug - I think that's also very real and something I have experienced as well. BUT if you look at the other battery thread you'll see a lot of people posting battery success images with high Android OS utilization. I think it could be an indication of multiple issues contributing to a negative experience.
Oh and I submitted a bug report to Google.
http://code.google.com/p/android/issues/detail?id=23311

I've also noticed crazy battery drop after reboots or pulling battery. Easily drops 10%+ at times. Reminds me of my great blackberries back in the day
Sent from my Galaxy Nexus using xda premium

all good here. i'm very pleased with the battery life.

while there may be issues with the stats, the wake times are real for some users - as well as the heat generated (indicating the cpu is working) when the phone should be sleeping.
There is no question there are either bugs in ICS that cause wake locks to get stuck, or badly written apps that keep it awake that didn't keep awake froyo/gingerbread.

Agreed on the wake lock. In fact I really should have quantified that in my original post - I too have that ridiculous Android OS utilization.
I updated my post - you make a good point.

Charged to about 21%. Pulled battery and rebooted and reported about 31%. Running ARHD.
EDIT: Pulled battery again and rebooted and reports 20%.

I realized mine was charging extremely slow so I decided to turn it off and let it charge faster. It was only at 48% when I turned it off but as soon as the battery indicator showed up with the phone off it appeared to be well over halfway charged, I would've guessed close to 75% but I didn't think to turn it back on and see..
edit: I did charge it fully with the phone off then wiped battery stats in cwm before rebooting into the OS after this. Since then it seems to be charging normally and reporting the correct battery level

To prove this theory, I think you should check the reported voltage of the battery and compare that to the percentage meter. Most battery apps/widgets use the old Android "battery info" screen to report this data. There very well may be a problem with the GN/ICS meter, but to be sure there has to be some constant to go back to.
These batteries drop like a rock from full charge to something like 87-88%, and again from around 37-38% to zero. It's just the battery technology, perhaps exacerbated by not having enough battery stats to adjust the % meter.
As far as I know, an app/widget that reports battery voltage will do so from the information being provided by the battery circuitry itself, so it's not subjective or adjusted in any way like a meter will be, making it a far better correlation point for the discussion.

djp952 said:
To prove this theory, I think you should check the reported voltage of the battery and compare that to the percentage meter. Most battery apps/widgets use the old Android "battery info" screen to report this data. There very well may be a problem with the GN/ICS meter, but to be sure there has to be some constant to go back to.
These batteries drop like a rock from full charge to something like 87-88%, and again from around 37-38% to zero. It's just the battery technology, perhaps exacerbated by not having enough battery stats to adjust the % meter.
As far as I know, an app/widget that reports battery voltage will do so from the information being provided by the battery circuitry itself, so it's not subjective or adjusted in any way like a meter will be, making it a far better correlation point for the discussion.
Click to expand...
Click to collapse
I use current widget to tell me my voltage, as I don't pay attention to the meter. On a stock LTE battery, you should cap out at 4.203V

Voltage meter sounds like a reasonable way to approach the problem. I'm definitely not an expert on battery stats though - what should the voltages read? I know it caps at 4200mv, but what is the min?
Also how does mv relate to mah?

m0sim said:
Voltage meter sounds like a reasonable way to approach the problem. I'm definitely not an expert on battery stats though - what should the voltages read? I know it caps at 4200mv, but what is the min?
Also how does mv relate to mah?
Click to expand...
Click to collapse
mv stands for millivolt which is a measurement of voltage. Examples you may have heard before are 9v battery, 110 volt wall outlet.
1mv = 1/1000 volt OR 1v = 1000mv, so you can see a mv is very small compared to a volt.
mAh stands for milliampere-hour and, in layman's terms, is a measurement of battery capacity, specifically how many hours a battery will last if the device it is connected to pulls a known amperage.
So, if a device pulls 500mA and the battery is rated 2000mAh, then generally the battery will last 4 hours (2000mAh/500mA). There are numerous other factors in the equation such as temperature, age of battery, etc. that can affect the battery life.

Related

[Q] Desire Z Battery

What kind of battery time are you guys getting on the original battery?
I've had my phone for about 14 days now and im not getting more than 12 hours on a charge.. the first week iv'e been using the phone alot.
I have alot of apps installed and im wondering if that could have a impact on the battery.. i have tryed using a task killer and without..
From the battery usage statistics page the screen is definitely the one that uses the most. Voice calls is number 2.
Will all applications show on the battery statistics page or is this something the applications have to implement?
Sent from my HTC Desire Z using XDA App
My battery has gotten better since I got it. But I have been doing a few things to help my battery - e.g. I completely drain the battery (until the phone doesn't even turn on anymore) and then fully charge it overnight.
Read about task killers and Android here: http://forum.xda-developers.com/showthread.php?t=849974
All apps will show in the battery usage statistics. If the screen has been using the most power, that means exactly that - you've been using the phone a lot and as such the screen has been taking up a lot of power.
I would recommend though to try to completely drain and then overnight charge, and repeat that cycle as often as you can.. I'm no technician, but I do think how you charge the phone matters
i've read about the task killers and have decided to uninstall them compleetly and let android do what it wants.
Regarding the charging, i have ran the battery flat out almost every day..
Im going to try a few different charging methods and see if there is some difference..
however i suspect that if the indicator is saying 100% charge, thats exatcly what it is whatever the charging method. (i hope)
It does get better. When I first got the phone I was getting about 14 hours. Now I'm getting about 30 hours or so.
JuiceDefender and setCPU help preserve battery life, too.
I am lucky to even get 12 hours with minimal use. No calls, just some texting and maybe browsing my bank website. Screen is always the killer for me, even on 20% brightness. If I go lower the screen actually flickers.
I bought the red HTC Chichitech batteries and they didn't help me at all.
Tried overclocking module, didn't change much.
The only app that ever shows any significant battery use (over 5%) is Maps, when I use maps.
i always thought completly draining a Lithium-ion battery is a bad idea?
Yes, it is.
Older batteries such as Ni-MH should be completely worked out from full to dead in order to keep them going in the long run. Li-ion doesn't need to be worked out, in fact the more it is worked out the faster it will run through it's lifespan and stop holding a charge.
Now that batteries, phones, and chargers are all smart, it's supposedly good to keep them plugged in as often as you can instead of letting them run dry.
sukie said:
i always thought completly draining a Lithium-ion battery is a bad idea?
Click to expand...
Click to collapse
The post (#7) above is correct on this. You should not let the battery dip below 30%, since discharging it too low may prevent it from being able to take a charge. It happens to most of us on accident every once in a while. But you should avoid it if possible.
It is good to run through a couple charge/discharge cycles to calibrate the battery meter. Many people still think this is to "condition" the battery, but battery conditioning is only the case with the older NiCad type of rechargeable batteries. Charging/discharging the battery just helps calibrate the battery meter on the phone. For new phones or a new ROM flash, I usually charge the battery to 100%, then let it drain to 30%, and repeat a couple times.
sukie said:
i always thought completly draining a Lithium-ion battery is a bad idea?
Click to expand...
Click to collapse
It's also a bad idea to charge a cold Li battery, but I believe that affects lifespan more than charge. For those of us in colder climes, remember to wait for the battery to warm up to room temp before plugging in.
On my DZ I usually get 15~20h of battery life and it's O/C @ 1.4Ghz
3G & wifi : always on
facebook, gmail, emails, news, weather updates each hour
about 1h per day of audio streaming (deezer, Synology DS audio)
1~2h of internet and games per day (baseball superstars, angry birds, psx4droid...)
less than 30min of calls per day and about 20-30 sms...
sukie said:
i always thought completly draining a Lithium-ion battery is a bad idea?
Click to expand...
Click to collapse
It depends what you mean by "completely". If you drain the voltage of a LiIon battery too low, you will damage it. But the circuitry of the phone is normally designed that there's a cut-off before you get to this, i.e. "completely" discharging it by running it till the phone turns off will be before this dangerous level, so should be safe.
It's unnecessary though, your phone can tolerate a *lot* more partial discharges/charges than full discharges/charges. If you drain it ten times from 100% to 90% and charge again, then that's roughly equivalent to one whole discharge/charge from 100% to 0% and back again.
As redpoint73 said, the main issues it "training" Android to get the battery calibration right, not conditioning the battery (which only applies to NiMH, NiCad, etc).
Li-Ion batteries are protected from deep discharges in two ways:
1. The Phone, it will stop you from discharging too low.
2. The battery itself. Each Li-Ion battery contains circuitry that stops it from discharging too low.
Basically both have to fail to have you end up with a dead battery -> rarely happens.
Li-Ions take the heaviest duty when charging the top 90-100% charge, charging just that bit stresses the battery more than from 0-80% (ofc 0 not really being 0 ) Note: This only has an effect on battery LIFE, not battery capacity! -> if you keep charging your battery from 90-100% (for example by keeping it plugged in after driving to work, then recharge after driving home, basically always going from 100-90-100 you're really doing your battery a disservice life-cycle wise)
If Li-Ions are not in use for a while they should be stored at around 60-70% charge.
Now as for batteries in Android devices, I'd estimate that most causes of extreme battery drain are due to rampant programs/too many internet accesses.
Everytime you log onto the internet, or change speeds (3G -> Edge-> whatever) you take a lot more power than usual. Try to ensure that all your programs that regularly access the net, do so together (HTC Sense interface tries to do this)
Rampant Programs: Especially services that need to poll the clock a lot, or keep updating their info, keep their FPS high (games) It is for this reason I try to avoid installing a lot of programs at once, and keep it one at a time (especially for system programs) to see if there's a inordinate change in battery life.
Oh and do turn off unneeded things like bluetooth, wifi, and GPS if you don't need them... but thats a given.
Gee typed more than I was planning, just get tired of seeing these threads all over
Jacina said:
Li-Ions take the heaviest duty when charging the top 90-100% charge, charging just that bit stresses the battery more than from 0-80% (ofc 0 not really being 0 ) Note: This only has an effect on battery LIFE, not battery capacity! -> if you keep charging your battery from 90-100% (for example by keeping it plugged in after driving to work, then recharge after driving home, basically always going from 100-90-100 you're really doing your battery a disservice life-cycle wise)
Click to expand...
Click to collapse
Sorry but I disagree with that. Have you got any evidence to back that up ? Continually charging the battery from 90% to 100% should be fine and shouldn't shorten its life at all. Chargers will sometimes reduce their charge when the battery is nearly full, and a slower/lesser charge will actually increase its life (I have no idea whether the DZ's charger does this or not).
Jacina said:
Li-Ion batteries are protected from deep discharges in two ways:
1. The Phone, it will stop you from discharging too low.
2. The battery itself. Each Li-Ion battery contains circuitry that stops it from discharging too low.
Basically both have to fail to have you end up with a dead battery -> rarely happens.
Click to expand...
Click to collapse
Coming from the Touch Pro 2 forum, there are somewhat occasional posts by users that discharged their batteries too low, and get stuck in a boot loop. Leaving the battery on the wall charger (USB is not enough) for a long period of time seems to solve the issue in some instances, while others are forced to replace the battery.
As you said, instances of this are relatively rare. I've drained my battery until the phone shuts down plenty of times on accident, with no ill results. But best to play it safe and not do it intentionally.
When you mention the phone prevents the battery from discharging too low, is that the hardware, or the OS? I guess either way, maybe the Desire Z or the Android OS are better at this then Windows Mobile and the Touch Pro 2. But I still wouldn't discharge the battery too low intentionally.
I'm pretty sure on the Touch Pro 2 it was software based (hence actually allowing you to boot before saying "not enough charge" )
I doubt that ANY charger that comes with a phone is anything but a normal "charge till full" charger...
http://batteryuniversity.com/learn/article/charging_lithium_ion_batteries
All information is gathered there. (other articles there are also highly informative)
nivlheim_o_O? said:
On my DZ I usually get 15~20h of battery life and it's O/C @ 1.4Ghz
3G & wifi : always on
facebook, gmail, emails, news, weather updates each hour
about 1h per day of audio streaming (deezer, Synology DS audio)
1~2h of internet and games per day (baseball superstars, angry birds, psx4droid...)
less than 30min of calls per day and about 20-30 sms...
Click to expand...
Click to collapse
That is intense, are you serious?!
I barely make it through the day and I don't game or make many calls. usually just texts and emails.
My update intervals for emails are much more frequent though.
Lucky !
im usually not getting more than 10 hours on a charge... :s thinking about getting the 1800mAh mugen battery...
Sh0rty007 said:
im usually not getting more than 10 hours on a charge... :s thinking about getting the 1800mAh mugen battery...
Click to expand...
Click to collapse
Are you using it pretty heavily? I just got the phone Tuesday, and still playing with it a lot, so I can't comment on battery life yet. But what is your screen brightness set to? If you look at the battery use graph, you will see that the display uses the most power, and with any smartphone, the biggest culprit of short battery life. Turn the brightness as low as you can tolerate for your "average" viewing conditions. Also, be sure you've calibrated the battery meter as I've described in Post #8 above.
A word of caution as far as the Mugen extended battaries: one of the users here did a bunch of battary tests on OEM and different aftermarket brands, on various phones. The Mugen 1800 mAh batteries did not rate any better than the OEM 1400 mAh. Mugen tried to explain away the test results. But judge for yourself.
http://forum.xda-developers.com/showthread.php?t=583927
My screen brightness is just 25 or 45%. And i really don't make it to the end of the day.
I now have setcpu, so that when my screen is off my cpu is running on 300mhz. Think i can make it now through the day.
I use my phone a lot, thats true. But only to view the market or twitter things..
Ow and i don't use live wallpapers...
I think there is a lot to be said for keeping things turned off if you do not use/need them too much.
I leave my phone charging overnight (between 11pm and 6:30am). So when I leave the house in the morning it is fully charged.
I keep Wifi and 3G turned off unless I need to use it and I keep brightness to a minimum - again, only increasing it if I need it.
Normal usage for me would be about 1 hours music listening during my commute to work, a couple of texts a day and about 10mins worth of calls a day.
On top of that about 4 hours worth of data use (both Wifi and 3G) and I usually find I still have over 50% battery life left when I plug it back in around 11pm before going to bed (according to the Mini Info widget).
Granted this is fairly light use compared to some people, but I think if you take the time to control your app usage you should see better performance results!

Battery Automatically Recharges without Plug in

Has anyone experienced this. I used my phone heavily for about 1.5 hours at which point it said that I had about 50% battery left. i then left it untouched and unplugged for about 8 hours overnight and when i picked it up int he morning it was at around 50% still and the battery details showed this. seems like after i stopped using it, the battery started charging rather than discharging until I picked it up again.
I'm on stock with an extended battery.
I'm not complaining, just trying to see whats going on.
I've seen this happen as well when going from heavy use to no use over night or when put in airplane mode.
should ask in the Q and A forum....not development....
not only is it the wrong forum...but you will get more answer
The reason for this is due to how the phone displays battery usage statistics. You phone will periodically check the phone usage and determine battery life based on your current usage amount. So if you talk on your phone for an hour straight, during the time your phone will figure how much battery you have left based on that usage. If you then don't use it for 8 hours, your battery level indicated by the phone can actually go up, or stay the same for a very long period of time. Thats why your battery will drop very fast when you start to use it when it has not been used for a while.
It looks like the SOC (state of charge) algorithm is using the derivative of current (consumption over time) in conjunction with the open circuit voltage, yet taking little regard to cell temperature.
As current consumption is decreased, the cell temperature will eventually decrease and the open circuit voltage will slightly increase. This is where the SOC difference comes from.
This is a common problem with any SOC algorithm that doesn't precisely factor in the cell temperature. With these lithium cells being as small as they are (compared to what's used in Automotive applications) trying to characterize the cell temperature characteristics would be like nailing jello to the wall.
akilestar said:
The reason for this is due to how the phone displays battery usage statistics. You phone will periodically check the phone usage and determine battery life based on your current usage amount.
Click to expand...
Click to collapse
My thoughts are right along these lines. The phone is projecting your remaining battery life based on previous usage. It is forcasting what your usage will be and with no usage over a certain time period it is reporting negative numbers which send your patterns in a different direction.
Definitely feels temp related. I used mine heavily in a real bad signal area (Restaurant with a tin ceiling...) and it got really hot. I noticed battery life down to 48%. Put it near a fan to cool off and 5 minutes later it was at 65%.
Not positive on specifics, but it has to do with voltage fluctuating.

[Q] Verizon Nexus Battery percentage going up?

I have been noticing something strange. I have gotten in the habit of draining my battery down to single digits before charging in an attempt to keep my battery life up. I usually use netflix on 4g to do this as it does a pretty good job of sucking the juice down quickly.
A few times I have noticed that after I shutdown netflix and let the phone sit a little while that the percentage actually goes back up. For example, I kill netflix at 4% battery left. I set the phone down for a bit and when I pick it back up the battery is at 10%. I have seen this multiple times.
Just curious if anyone else has noticed this and anyone has an explanation for why this happens.
I believe it has to do with the battery meter displaying how much battery you have left based on what you are doing? So when you stopped being resource intensive it adjusted itself.
That's one explanation I have heard.. there is also one that has to do with the amount of current going to the battery.
Sent from my Galaxy Nexus using xda premium
trevoryour said:
I have been noticing something strange. I have gotten in the habit of draining my battery down to single digits before charging in an attempt to keep my battery life up.
Click to expand...
Click to collapse
I can't answer your question directly as there could be multiple reasons. (Battery capacity estimation is tricky business, and I don't know what algorithm they're using.)
But I can tell you that the common belief that one ought to discharge batteries before recharging them is not applicable to modern lithium batteries.
I was (to some extent) true for old-fashioned NiCd cells, but modern Li-ion cells shouldn't be excessively discharged. If you want to prolong battery life it's more important to keep the battery cool. (Lithium cells degrade much faster at elevated temperatures.)
(To contradict myself I have to add that the battery capacity calculation can be improved by discharging the battery completely from time to time - but again, this depends on the battery capacity calculation algorithm they're using.)
I understand the way current battery tech works. The discharge is not for the battery itself. Its for the Android OS. I have noticed that whenever I plug my phone in in the middle of the day, the next day my battery doesn't last as long. In fact the poor battery life will remain an issue for about a week until it levels itself back out. I have noticed this behavior on multiple phones by multiple manufacturers.
You end up going in a circle. You use heavy data one day and as a result you have to plug in in the middle of the day. The next day your battery doesn't last as long so you plug in again. Unless you allow your phone enough time to level back out then it will always appear that your battery life is aweful. Since i've been discharging my battery I am able to unplug my phone at 7:30 am, use it moderately all day with GPS, Bluetooth, 4G on/wifi off with a live wallpaper running. At 11:30pm when its time for bed I still have around 60-70% battery remaining. I find myself having to watch a few hours of netflix on 4g in order to drain the battery so I can plug it in.
I'm not sure if this behavior is a result of an issue with the battery stats file or what but I do know that when I flash a new ROM it appears my battery life is reset to how it was before I had shortened it by plugging in the middle of the day.
many of us have seen the percent rise slightly, its normal. when under heavy load watching videos or something and then you are finished, the voltage gets relaxed and pops up some. since this phone uses some type of voltage calculation to determine percent, it will jump up once in a rare while, typically right after you placed it under heavy load then went to idle.
it's normal..

random battery level reading

So, I got an old G3 F400L with a looking good battery physically. No swell and pretty solid. But it dropping fast on any rom or kernel I've installed, including stock.
Tried some battery calibration apps which deleted batterystats.bin, not really help.
What seems to be a little helping is cycling battery charge and discharge fully, from 0% to 100%. And vice versa. Which people consider a bad practice but it did made my battery level reading better anyway. At first the battery would dropping fast to zero from 90%, 60%, 50%, gradually, and now it would drop fast to zero from 20%.
Now something crazy is happening. My battery was emptied for about a hour. Then I switched my phone on and it's suddenly on 4%. I charge it a little to 10% and leave it be. Now it start increasing to 11%, 12% and finally 15%, even though I'am not charge it. And then it dies.
What is actually happening? how do battery reading mechanic works? Is it on kernel, or something lower level? How did something like this could happen?
Battery levels are just estimates. Drop in internal voltage which happens due to the old age is giving you the random readings.
Get a new battery.
engmia said:
Battery levels are just estimates. Drop in internal voltage which happens due to the old age is giving you the random readings.
Get a new battery.
Click to expand...
Click to collapse
Any methods to check this? Just to make sure.
Anyway, this drop won't be restored by natural usage in time, or by any kind of method, right?
khnoizer said:
Any methods to check this? Just to make sure.
Anyway, this drop won't be restored by natural usage in time, or by any kind of method, right?
Click to expand...
Click to collapse
I'm sure, but you can double check the battery voltage by attaching a multimeter probe to the terminals.
No, the drops and battery life (and this behaviour in general) will only get worse.
This is very normal and expected of batteries, that's why those devices with non removable batteries don't make any sense (from users buying them perspective, from a manufacturer point of view it's just great since it's less work and more money)! You can find a lot of information about li-ion batteries online.

Looking for a mod to make the battery indicator more accurate

Ever since the March update, my Pixel 3 XL's battery indicator in the status bar has been horrendously inaccurate. This is really annoying, as it always shows as having 10-12% less battery than the actual physical battery charge. If it ever reaches 0% and shuts down, if I were to, say, boot into TWRP, I'd see I still have about 11% battery remaining. Across all the phones I've owned over the years, I've never seen such a severe battery level mismatch before. I've never seen greater than a 2% difference in any phone I've owned.
I use the Advanced Charging Controller Magisk module to regulate how much my battery charges. Charging your phone too much is proven to damage your battery over time, so I like to set ACC up so that my phone never charges past 41%.
I first noticed this problem when my battery would stop charging past 31%. After digging deeper, I found that the battery level produced by "dumpsys battery" (used by the status bar indicator) does not match the actual battery level, which can be read from a kernel control file at "/sys/class/power_supply/capacity."
As a side note, is your battery indicator also incorrect? Try checking it running these commands as root, and compare the values. Maybe this affects you too:
cat /sys/class/power_supply/battery/capacity
dumpsys battery
(The number you're looking for in the "dumpsys" command is the number next to "level." If it doesn't match, and it's less than what's written to the capacity file, then you also suffer from this issue).
I've asked the ACC developer what can be done about this, and apparently not much, besides having ACC "pretend" the battery is offset by a user specified battery level. But in my case, I would just be charging my actual battery to 51%, even though it would display as 41%, and I don't want to do that. I tried fixing it by clearing my battery stats, charging to 100%, and etc, and it actually made matters worse for me - the status bar indicator now remains at 12% less than the actual battery level. No matter what, this value appears to be linear - it doesn't seem to be any more or less correct depending on how charged the battery is. It's always 12% less, unless you get beyond 88%. Then the statusbar pretends to charge, even though a voltage monitor will show that it is not charging.
I can "force" the statusbar to read as the most accurate battery level by running this command in the background in a root shell:
while sleep 15; do dumpsys battery set level $(cat /sys/class/power_supply/battery/capacity); done
This manually sets the battery level via dumpsys according to what the actual battery level is. But this has some limitations.
I'm using a while loop because setting a value like this is permanent - if I don't either continually set it or unset it, my phone will think my battery level hasn't dropped below the last set value.
However, more importantly, setting a value via dumpsys disables monitoring of other battery stats, such as voltage, temperature, current, whether or not the battery is charging, the charge counter, and etc. Just running a script like that isn't a good solution.
So since I have nowhere else to ask, is there any kind of root mod or something that can be made to force the phone to use the correct battery level? I don't know why this started happening since the March update, but it is extremely annoying, and I'd like to put an end to it as soon as possible.
Any insights to mods or tweaks that can be done to fix this would be greatly appreciated.
so im at 5%, but in /sys/class/power_supply/capacity it says 0 .... not sure what's real anymore
I'm gonna charge up to 100% and see for myself what "full capacity" is like
and now i'm at 91% in status bar but 93% in that capacity file lol
If I remember correctly Lithium batteries actually last longer if kept above the 60% range and taken off the charger when they're completely full or maybe a few percent before. It's the lower end of the battery percentage that actually damages the battery if it's kept there for too long. The lower the voltage the higher the resistance in the battery, this is going to cause heat in the battery, so the way you're charging your battery is most likely damaging. I might be wrong but battery tech has changed over the years, and some old misconceptions still exist.
My guess about the amount of difference in the battery display vs percentage is to protect people from this reason. To keep them off of the lower end of the battery because it's damaging to the battery and under the wrong circumstances it could cause the battery to overheat.
Sent from my Pixel 3 XL using Tapatalk
superchilpil said:
My guess about the amount of difference in the battery display vs percentage is to protect people from this reason. To keep them off of the lower end of the battery because it's damaging to the battery and under the wrong circumstances it could cause the battery to overheat.
Sent from my Pixel 3 XL using Tapatalk
Click to expand...
Click to collapse
While I can see that , i'm currently @ 100% in status bar, but 98% in the capacity file. and it won't go above that currently.
This kind of makes sense given how the battery jumps erratically from 100% to 98-06% too when discharging
masri1987 said:
While I can see that , i'm currently @ 100% in status bar, but 98% in the capacity file. and it won't go above that currently.
This kind of makes sense given how the battery jumps erratically from 100% to 98-06% too when discharging
Click to expand...
Click to collapse
What are you calling the capacity file? Battery in settings?
Tulsadiver said:
What are you calling the capacity file? Battery in settings?
Click to expand...
Click to collapse
this file > sys/class/power_supply/battery/capacity
So, just FYI, this is probably why i found charging it in TWRP to be the most accurate...
When i charge my phone up to 100% in twrp, i boot up phone, look at the capacity file and it reflects spot on what the status bar says, and it continues to do that throughout entire discharge.
superchilpil said:
If I remember correctly Lithium batteries actually last longer if kept above the 60% range and taken off the charger when they're completely full or maybe a few percent before. It's the lower end of the battery percentage that actually damages the battery if it's kept there for too long. The lower the voltage the higher the resistance in the battery, this is going to cause heat in the battery, so the way you're charging your battery is most likely damaging. I might be wrong but battery tech has changed over the years, and some old misconceptions still exist.
My guess about the amount of difference in the battery display vs percentage is to protect people from this reason. To keep them off of the lower end of the battery because it's damaging to the battery and under the wrong circumstances it could cause the battery to overheat.
Click to expand...
Click to collapse
The OP of the ACC discussion thread has some good links to studies done on Li-Ion batteries. It's a long read, but the summary is that you'll want to keep your temperatures as low as possible, and the battery itself between 30% to 80%. There are also some factors related to voltage that I don't really understand, but I do know that ACC manages the charging voltage to reduce strain while charging. The recommendation by the ACC developer for longevity is ~41%. That is within the 30% to 80% range, and I trust his judgement.
As for the other concerns in this thread, I don't think the difference in numbers serves any functional purpose other than to be annoying. It turns out that the one shutdown I had previously must have been a fluke, because now the battery in the statusbar will just sit there at 1% while the actual battery capacity ticks down, before forcefully shutting off at around 2% actual capacity. I don't even get the graceful "battery is empty, shutting down" message anymore.
Because the battery level reported by the capacity file is closer to zero than the statusbar one (simply because it shut down when that number was closest to zero), I'm inclined to believe it's the more accurate measurement. It's totally unrealistic to believe that the last 1% of the battery lasts as long as the previous 10%.
I can understand Google making the battery report a lesser number in order to protect the battery from the user, but that argument doesn't work if the phone just sits at 1% forever until it shuts down, which it has been doing for me. And the difference in numbers is just insane. Just today, the statusbar reported 2%, when the system reported 17%. A fifteen percent difference is absolutely absurd. I can understand a modest 3-5%, but this is just ridiculous.
I'm hoping there is a clever solution for this soon, or that the April update addresses it, because it's driving me crazy.
I tried this and the results from both commands were identical. I'm running the March update, rooted, and Kirisakura kernel.
Face_Plant said:
I tried this and the results from both commands were identical. I'm running the March update, rooted, and Kirisakura kernel.
Click to expand...
Click to collapse
Thanks for letting me know.
This is so weird. Maybe my battery is just horribly uncalibrated?
ubergeek77 said:
Thanks for letting me know.
This is so weird. Maybe my battery is just horribly uncalibrated?
Click to expand...
Click to collapse
Maybe it's time to start fresh with a full wipe/format and reinstall the March update? Maybe ACC is causing the issue? Have you tried Battery Charge Limit? That's what I use.
Why would you only charge your battery to 40%? I understand to prolong the life of the battery, but to what extent is going to do that.
You are shortening the amount of time needed between chargin. How much time does the battery last before you need to charge it again when you only charge it 40%?
If I am misunderstanding this, I think it would make more sense to keep the charge between 40%-80%.... Even if this is the case, how long does a charge last when you only use about 40% of it's capacity?
ubergeek77 said:
The OP of the ACC discussion thread has some good links to studies done on Li-Ion batteries. It's a long read, but the summary is that you'll want to keep your temperatures as low as possible, and the battery itself between 30% to 80%. There are also some factors related to voltage that I don't really understand, but I do know that ACC manages the charging voltage to reduce strain while charging. The recommendation by the ACC developer for longevity is ~41%. That is within the 30% to 80% range, and I trust his judgement.
As for the other concerns in this thread, I don't think the difference in numbers serves any functional purpose other than to be annoying. It turns out that the one shutdown I had previously must have been a fluke, because now the battery in the statusbar will just sit there at 1% while the actual battery capacity ticks down, before forcefully shutting off at around 2% actual capacity. I don't even get the graceful "battery is empty, shutting down" message anymore.
Because the battery level reported by the capacity file is closer to zero than the statusbar one (simply because it shut down when that number was closest to zero), I'm inclined to believe it's the more accurate measurement. It's totally unrealistic to believe that the last 1% of the battery lasts as long as the previous 10%.
I can understand Google making the battery report a lesser number in order to protect the battery from the user, but that argument doesn't work if the phone just sits at 1% forever until it shuts down, which it has been doing for me. And the difference in numbers is just insane. Just today, the statusbar reported 2%, when the system reported 17%. A fifteen percent difference is absolutely absurd. I can understand a modest 3-5%, but this is just ridiculous.
I'm hoping there is a clever solution for this soon, or that the April update addresses it, because it's driving me crazy.
Click to expand...
Click to collapse
While I agree it's absurd if it in fact is showing a 15% difference, but where is the proof that such a thing is occuring?
I've read a few articles that talk in depth about lithium ion and the takeaway is to charge your device TO 75-80% and remove it at 30. Charging to 40% and completely discharging it is in fact damaging the OP's device and that's what I was trying to say.
Sent from my Pixel 3 XL using Tapatalk
superchilpil said:
While I agree it's absurd if it in fact is showing a 15% difference, but where is the proof that such a thing is occuring?
Click to expand...
Click to collapse
I've already given proof. The proof is that the battery value produced by running "dumpsys battery" does not match the actual battery value, as read by the kernel, under "/sys/class/power_supply/battery/capacity." For clarification, the statusbar uses the value output by "dumpsys battery," which has been the incorrect value for me for almost a month now. SO's Pixel 3 XL is doing the exact same thing.
Further proof is that this offset doesn't serve any functional purpose. You would think that this kind of offset would be a way to protect the battery from the user, but that argument only works if the phone shuts itself down before the actual capacity reaches zero. That doesn't happen.
Instead, once the statusbar reaches 1%, it will just stay there indefinitely until the phone doesn't have enough voltage to keep itself on.
For example, let's say I'm monitoring the battery level in a terminal. When my statusbar says 2%, the kernel reads the battery as being 16%. It takes 10 minutes for the statusbar to reach 1%, and at the same time, the kernel battery reading will show 15%.
However, in a further 10 minutes, the phone does not shut off. Instead, the kernel battery reading will continue to tick down - 14%, 13%, ... 8%, 7%, etc - until the phone shuts off due to low voltage. During this time, the statusbar will continue to display 1%, despite the fact that the actual battery level is depleting.
No graceful shutdown, and the statusbar never reaches 0%. As such, I no longer see the "Battery Empty, shutting off" message where the phone shuts itself down gracefully.
I've kept my Pixel 3 XL updated with the latest updates and Kirisakura kernel. ACC (default settings) and my battery was doing fine until around the March update when I started a difference in reported battery level between the status bar and system that worsened and grew to 15% or more (I don't exactly remember). Also the status bar battery level would hang at 1% for a ridiculously long time. After uninstalling ACC and a several of charging cycles it got better (and the April update). Now my difference is 3%.
what happens if we delete that battery file? does it regenerate on it's own?
Got the same error with a Pixel 3, /sys/class/power_supply/battery/capacity is about 10% higher than dumpsys.
Is this why my phone shuts down at 14% battery level? I'll get a notification my battery is dying, check it, it'll be between 12-15% battery left, shut down 30 seconds later, and I can't reboot bc battery is dead. When I plug it in, then boot back up, it only says it is at 2 or 3%. I'm locked down bl because I thought maybe some root apps were messing with it, and I've even tried on q beta, but still early shutdown issue. Not really bothersome as I get 7 hrs or better screen on time, but it is curious....
Bryanx86 said:
Is this why my phone shuts down at 14% battery level? I'll get a notification my battery is dying, check it, it'll be between 12-15% battery left, shut down 30 seconds later, and I can't reboot bc battery is dead. When I plug it in, then boot back up, it only says it is at 2 or 3%. I'm locked down bl because I thought maybe some root apps were messing with it, and I've even tried on q beta, but still early shutdown issue. Not really bothersome as I get 7 hrs or better screen on time, but it is curious....
Click to expand...
Click to collapse
I have a similar situation. It starts with 20-25%.
I think this started for me with q.
I wiped my device and flashed factory image to a/b slot. About 3 times .
How is your device going?
RMA is on the way....

Categories

Resources