[Galaxy S I9000 General] Stefanauss:
1st Test Cycle with JPY

Ok. End of my cycle. It's been 32 interesting hours battery-wise.

I think i might have isolated the causes of the battery draining

I am experiencing

, maybe even found a proper bug. Needs more testing, but at least it seems very much replicable, which is essential for a bug hunt.

PREVIOUS SITUATION - JPX, flashed with KEIS reghack, not particularly bothering about charge level, wiping and factory resetting. I have done no proper battery testing for JPX since JPY came out shortly afterwards. Though the feeling was definitely like there were the same worse battery draining.

FLASHING METHOD FOR JPY - Charged to 100%. Wiped cache partition and then Dalvik cache, both through recovery. Did a HARD factory reset (*2767*3855#, this will wipe everything, including internal SD card, not even asks for confirmation!). Flashed with reg-hacked KIES. After 1st boot, HARD factory reset again.

ACTIVE MODs OR CUSTOM ROM - Everything stock, except for rooted CF-root JPY kernel, which is stock JPY + injected "root stuff".

BACKGROUND - If you read my post #59 you'll learn more about my use-cases, my battery testing ad why i strongly suspected battery mis-calibration for being the primary cause of my battery draining. Therefore, i decided to do the charging bump. To learn the theory behind this i strongly urge you to read this expert witness, if you haven't yet. To learn about the practice, there is a long and full of contributions thread about the HTC Desire battery (re)calibration here on XDA (which is unfortunately a perfect example of a poor scientific approach to battery issues that leads to a waste of efforts). There is no widely accepted and proved working method to recalibrate the battery, you will find tens of procedures, tens of successful and unsuccessful reports even with the same procedure. To me this is a clear sign that battery de-calibration can definitely be an issue and it's no suggestion, that recalibrating is definitely possible but up until now we are very much shooting randomly when trying to solve it.

CHARGE BUMP - The method i choose is just the one i felt more logical and straightforward, more likely to work with SGS. Might be a wrong one, or might be just one of the right methods. Here is what i did:

Left 2% of charge on the phone, power it off;

Plug the charger, let it charge while powered off.

Left charging 1 more hour after 100% sign and vibration.

Plug out the charger, powered on, let boot and media scan complete, wait 1-2 more minutes, power it off.

Plug the charger, let it charge while powered off. It charged the phone for almost 10 more minutes, than 100% sign and vibration happened.

Plug out the charger, powered on, let boot and media scan complete, wait 1-2 more minutes, power it off.

Plug the charger, let it charge while powered off. It charged the phone for less than 5 more minutes, than 100% sign and vibration happened.

Left charger in, boot into CWM recovery, wiped battery stats, reboot system, plug out the charger while booting.

POWER MANAGEMENT SETTING - Packet Data ON; Wi-Fi OFF; Sync/Push ON on GMail, Contacts, Calendar, Twitter, Last.fm, Skype; FancyWidget refresh ON (every 2h); Brightness on AUTO; GPS OFF; Bluetooth OFF; 2G/3G AUTO; Haptic feedback on keyboard and keys ON; AutoRotate ON;

(Let me know if i missed some settings you're interested in)

FORESCIC TOOLS -

Battery Statistics (*#*#info#*#*)

OsMonitor (Process list was sorted by CPU Load)

BOOT STAGE - By the time i unlocked the screen, it showed 99%. I left media scanning complete, quickly checked mail and tweet notification, then gave a quick look at OS Monitor to see if something strange was happening during boot, and then i switch Flight Mode OFF/ON to get rid of the infamous "50% of time without signal" bug. By the time i did this (2-3 minutes), it fell back to 98%. I went to sleep with a felling of impending battery doom.

1st STAGE (98% to 66%) - But that feeling was unjustified. I woke up temporarily 5:30h later, to find out that there was 90% left. I went back to sleep, and when it was time to wake up for good 3 hours later, there were 86% of battery left. So we are taling about 12% drop in ~8h, 1.5% per hour, a proper sleep drain.

Then i started using the phone according to my test-case (post #59, again), checking OsMonitor and Battery Statistics every once in a while to see if something strange was happening. It was not. I will make just this two remarks, they will be useful soon:

In OsMonitor List of active processes, sensor_yamaha occasionaly popped up at the top, with 2-3% of CPU load, but more often than not it was not in active use (remember, list sorted by CPU usage)

In Battery Statistics, in the sensor section, the only item present was Maps, and the time using sensor was exactly the time i kept the app open: few seconds, 25-30. Then i closed Maps, and sensor statistics shows no more use of the sensor.

After 16h and 1 minute, i reached the 66% left mark. Perfectly on schedule for 2 days.

Everything was pointing to a successful recalibration of my battery.

2nd STAGE (66% to 40%) - Then I had to take a picture with my SGS. I took it and then opened the preview that is now easily accessible through Camera with 2.2.1 ROMs. That opened the Gallery to show the image, which i then adjust for viewing by rotating my phone.

This is when the heavy drain started. I lost 26% in 5:30h.

All of this was shown using forensisc tool:

OsMonitor now showed almost always sensor_yamaha in the active processes, with an increased average of 4-5% cpu load. It reverted the previous situation: now sensor_yamaha was in sight more often than it was not.

Battery Statistics was even more odd: in the sensor section an item "Gallery" appeared. From now on there was no way to stop increasing time counter. Since i first opened the gallery, until my battery died the next morning, there were nearly 16h in between. That is the total duration os sensor using for the "Gallery" item.

I noticed i was in a new, heavy drain stage earlier, when suddenly i saw 61% left when in fact i was expecting 64 or something like that. The fact is, i thought maybe some gallery process hanged, but couldn't find any, nor with stock Samsung Task Manager, nor with the awesome Task Manager from the market, nor with OsManager. So i tried, and launched the gallery again, let it load all of the thumbnails, then push the back button, go to the OsManager process list: there was a still active Gallery process. I killed it. I did this twice during this second stage, but it came to no help. Draining wasn't stopping. So i decided to take a different route.

3rd STAGE (40% to 28%) - I disabled AutoRotate through its toggle in the drop-down notification bar. Guess what?

Draining stopped altogether!

It just went back to prior 2.5% per hour, the normal "Using The Phone" draining, the same there were until 66% mark! The next 12% took 5:30h to discharge. It reached 28% left, and then i went to sleep.

Please notice: the fact that i turned sensor off stopped the draining, stopped the process sensor_yahama, but

didn't stop the increasing statistical counter

. That makes me think about a few possibilities:

A bug in the Battery Statistics utility (very unlikely, Maps and other items were correct).

The counter do not show the time spent using the sensor, as someone would suppose; instead, it shows the time spent by processes sending request to the sensor daemon/server. This would explain why a faulty/bugged gallery would keep it growing even though draining stopped (sensor disabled = process terminated by android = requests simply ignored = no more energy used).

So before going to sleep i made quick maths; with the correct draining rate restored, the phone would have last for the next 12h, more or less.

4th STAGE (28% to 0%) - And probably would have. I will never know, because a different issue showed up. While i was sleeping i received 4-5 SMS. Having HandCent SMS installed, both its popup and stock Samsung notification went on. The problem is,

HandCent SMS for some reason never left the phone go into sleep mode again

. You can perfectly see that in the screencaps about "In Execution" section. From the time i received the 1st SMS (9:09) to when i read it (12:20), Handcent was in execution (3:11h). The "Time spent without sleeping" counter was exactly where i left it at night... plus Handcent massive contribution!

I was very lucky i woke up in time to notice this and have a look at the stats, take the screencaps and make my speculation about this :D

MISCELLANEA - The signal strenght in my area wasn't very strong, but also wasn't a complete mess at all. Frequent changes from 2G (Edge) to 3G and HSDPA. Never seemed to affect the phone much, though.

WHAT'S NEXT? - Now that it seems my battery has been recalibrated, sensor is my main concern at the moment. For the next cycle i want to change the least possible variables, and so i would probably made another little bump (just once this time, and no battery stats wiping of course) and keep auto-rotating OFF. If all will go well, i will re-test with AutoRotating ON but avoiding starting the Gallery. I will then evaluate what to do, i heard there is a fixed version of the Cooliris Gallery (Samsung stock gallery) somewhere, maybe in the SGS Tools.

In the meantime, i hope someone could make use of this extremely long report and confirm/controvert this two issue. I think, apart from System draining, a list of faulty apps badly using power has to be one of our targets.

VOLTAGE - My 2 cents about voltages. I also think a combined monitoring of percentages and voltage values has to be made. It is a kind of analysis we lack of, never seen that. It will help to understand more about calibration, among other things. Once in a while i had a look on them (with 1s refresh), and i can definitely say that the higher voltage i have ever seen on SGS is 4.240 mV. It last as long as the charger is plug in.

The lower voltage i saw was 3.460 mV.

I have reason to think voltage is the actual value used when the system automatically shutdown itself on low power: several reports of recalibrations (it actually happened to me once) shows that 1st cycle after recalibration could end in a shutdown while battery shows 20% left or some; another thing that could happen is a battery suddenly dying while doing a power-intense task like, for instance, switching/disabling Flight Mode. The sudden drop in voltage value could mislead the system to think battery is empty. It's not rare that when this happens, after a little while you could power on again and enjoy even 10 more minutes of juice.

If i'm right and this is the case, it's very important to get near to the ideal situation where max voltage is recognised as 100% and minimum voltage match the 0 or 1% mark.

Battery History - Other Use

Schermo Acceso = Screen On

Tempo trascorso senza la modalità sospensione attiva = Time spent with sleeping mode off

Battery History - Sensor Usage

Look at the Gallery, middle caps.

Battery History - Usage from partial wake

HandCent is the show stealer here.

Next to die Battery Statistics

​