yashsingh1/xdaforums huggingface dataset:
[Galaxy S II General] emilcioran99:
That's what I think too and for this ideea I don't want to flash the Siyah kernel: I want to eliminate the drayn and the high Android OS reporting and if this is not possible, then I want to even know how I stay, not to hide the trash under the carpet... and then claim that there is no garbage... ;)

---------- Post added at 09:47 PM ---------- Previous post was at 09:43 PM ----------

1. If you have time and read this thread you will see that this does not affect all SGS 2.

2. NO.
[Galaxy S II General] emilcioran99:
http://xdaforums.com/showpost.php?p=18495038&postcount=232
[Galaxy S II General] Entropy512:
Heheh. Although most likely I assume your phone isn't configured to connect to most of them. (I know mine doesn't autoconnect to APs that haven't been explicitly configured.)

Define "this" - if you read this thread, you'll find that "this" is MANY things - Android OS is kind of a "catch-all" pot into which all sorts of things can get lumped.

So if "this" is the problem Andrei initially experienced - it doesn't affect all S2s - it affects anyone running Skype. It may happen to affect S2s more negatively due to the suspend/resume dynamics, but it is going to affect any device.

If "this" is the long 107 minute wakelock Andrei just experienced recently - no, I've never seen it before. It might occasionally happen, but it's rare.

Same with the PowerManagerService wakelocks TheFirstBen just reported - never seen them before. They may have happened before and not been seen due to BetterBatteryStats being deficient, but it's new.

If "this" is Android OS reporting higher than expected but with people experiencing "normal" drain - there is a possibility that power_profile.xml may be broken and reporting all CPU usage as consuming double the power it really does. This is unknown and it's going to take a LOT of digging to get the real answer.

If "this" is the fact that receiving or sending any cell data incurs a 6-second wakelock - yes, it affects all GS2s. How much impact this really has depends a lot on data usage patterns. It'll mercilessly rape your battery if you're on Skype. For me, I suspect it may constitute a sizable fraction of my 1%/hour drain when idling on cell data.

If "this" is the fact that our suspend/resume dynamics include 500-650 ms wakeup time and 150 ms suspend time (meaning 650-800 ms awake for any wakeup, no matter how little actual work needs to be done), then it affects all GS2s. It MAY be that patching a kernel to 2.6.35.14 somehow alters suspend dynamics to eliminate most of these penalties but still get the power consumption benefits of deep sleep - In this case, .14 may improve battery life. This needs a LOT more digging and investigation... Such as rolling back the patches one Linux base release at a time to see in which one the problem occurred. Since determining the results takes a few hours at least to be conclusive, this will take quite a bit of time.
[Galaxy S II General] staygold1gr:
i have returned home from work, wifi policy is set to never (although it sucks if we have to set it to never to spend less battery!!) I am signed off from skype and it is not visible on the notification bar. I cleared my exceptions on watchdog and I already have 19 alerts at 99% 'base system' in 4.5 hours. I have used the phone just once to turn off an alarm. I am running yahoo on push and a weather widget, that's all, I think I also read an incoming text that's about it.

I am now on 85% battery that is 15% vapourised in 4 hours.. Isn't this fundamentally wrong?

I keep asking how we have ruled out this is a hardware issue but nobody responds. I will install the rom / kernel my mate uses and every f* app he has, I will clone his phone, if i get the same issue I will throw mine to the bin and get another one and never ever buy anything again from samsung as I have grown another of couple of grey hair trying to resolve this problem since i got this phone

I am a very unhappy customer, I do not expect my solution from developers not them who got my hard earned £400, samsung sucks. from what i read the best case scenario is that there is no drain here and it is just a reporting fault, well does that explain what is happening to me? the only way i can reduce consumption more is to switch the flipping thing off!
[Galaxy S II General] Entropy512:
Need your wakelocks and dmesg to diagnose... see above for info on how to pull.

A LOT of Android battery problems are rogue or badly written apps. However it just happens that on the GS2, many of them can manage to get lumped into "Android OS" when they do it.

Also, wifi policy doesn't HAVE to be set to "never" - it's not like the Nexus S bug where having it set to anything other than "never" would cause fundamental drain in all situations.

HOWEVER, it turns out that due to its very low standby drain and reduced wakelocking, it is somewhat more power-efficient to use wifi than the cell radio for background data if a wifi AP is nearby. Also, it means less data usage from your cellular data plan.
[Galaxy S II General] Entropy512:
As I said before, the 48k wakelocks, if you look at the total time, were negligible.

However, that fuel_alert was a bug. I am 90% certain it would have caused drain without showing as AOS, as it simply held a long wakelock.

Bug searched and destroyed

TheFirstBen's PowerManagerService wakelocks are tougher - that one originated somewhere in the Android stack, not the kernel.

It may be possible to reduce the svnet-dormancy wakelocks a bit, the wakelock timeout is controllable. It defaults to 6000 msec

echo "6000" > /sys/devices/virtual/net/svnet0/waketime

from a terminal will change it to whatever number you replace 6000 with, but BEWARE: This could REALLY screw up your cell data!

6000 msec = 6 seconds of course.
[Galaxy S II General] kremori:
I uninstalled SKYPE, rebooted the phone and tested for 24 hrs, AOS is still number one in the battery list and two Top processes are events/0 and suspend each around 14 munutes of CPU use for less than a day, so for me its not skype but whatever it is its very annoying
[Galaxy S II General] xdapao3:
This issue almost made me sell my GS2 a week after having bought it... (I was coming from a GS which I was VERY happy with).

After a long research on XDA, freezing several system apps and background processes which I don't use and don't need and disabling fast dormancy "fixed" it for me. I am now getting high Android OS indicated percentage of use but a 1%/hour drain overnight (with wi-fi on, push e-mail on, 3 widgets which update in the background etc) which is higher than my GS but acceptable.

In 2 weeks I have had 4 different ROMS (the one which I bought the phone with, the latest official Italian one, KI3, KI8) and I have noticed that even when I repeated the same steps to "fix" this issue as soon as I flashed a new ROM, it took several days to get down to 1%/hour battery drain.

God I hope ICS fixes this once and for all...

Anyway, other than that I am happy with the GS2 (I am a "poweruser", I do use the features of these smartphone a lot and to do lots of things...).
[Galaxy S II General] stuclark:
Has anyone looked at Engadget's screenshots of ICS? ... looks like the Android OS bug may be present there too!

http://www.engadget.com/photos/ice-cream-sandwich-android-4-0-screenshot-gallery/4538976#4539273

EDIT: It's picture 52, the 3rd from the end, that you want to look at.
[Galaxy S II General] Entropy512:
/proc/wakelocks, post it up here.

Or try analyzing yourself:

Open up the file in Excel or OpenOffice/LibreOffice Calc. Open it as a tab-delimited file.

Add a column called sleep_time_min

Set up a formula in the cells of sleep_time_min to divide sleep_time by 60*1e9 (or, 60*1000000000) - this gives the total time spent in minutes for wakelocks held while the device was asleep.

Sort by sleep_time_min in descending order.

Look at what's at the top:

If it's svnet-dormancy or wlan_wake, or wlan_rx_data, you likely have an app consuming background data frequently. It doesn't need to be a LOT of data - how often packets arrive is more important than how many bytes. For example, a 20 byte packet once a second will kill your battery fast, while a 1200 byte packet once every minute or even a few kilobytes once every minute won't be so bad. So it's possible for a large amount of data waking to occur even if you have data usage byte counters that are going up slowly.

If it's fuel_alerted, you just encountered the first confirmed kernel bug in this thread. If you discharge your battery below a set threshold (not sure what it is exactly, will figure out tonight, but it's likely somewhere below 20% and probably a point at which you got some sort of warning), you have a high chance of acquiring a permanent wakelock until reboot even after recharging your battery above that threshold. I777 users will get a fixed kernel for this tonight, I9100 users will need to have their kernel devs pull in the fix I linked above.

If it's PowerManagerService like TheFirstBen - I don't know what's going on, something in Android up above the kernel is holding a wakelock.
[Galaxy S II General] staygold1gr:
Thanks dude I will get them this weekend and post

---------- Post added at 01:02 PM ---------- Previous post was at 12:59 PM ----------

Great just what I was afraid of..
[Galaxy S II General] AndreiLux:
I guess I'll break an uptime record if I stay home. 19 hours now and drained 7%. I'll still need to test outside world battery life. Makes you wonder how inefficient current smartphones are and limited by simple stupid design. Makes things like Kal-El with a dedicated low-power core for such bull**** even more attractive. The question is how much can it be improved by the software/drivers and what the limits are.

Also: the TVOut driver definitely is tied to waking up of the CPU. It's also ridiculously low now.
[Galaxy S II General] staygold1gr:
How did you get there? Just by not using Skype?
[Galaxy S II General] emilcioran99:
IF the Android OS will be remaining/reporting at 7-9-10 % WITHOUT the battery drayn will be not a problemm with me and in that case I don't think that it is a bug.

I don't think that everything is displayed regardless of the percentage shown there is a bug. Not so? :D :D

---------- Post added at 04:00 PM ---------- Previous post was at 03:33 PM ----------

I understand that (unlike Aplle OS that is designed for ONLY one model) in Samsung Android OS exists bugs, because this OS in for more models and they tryed to find a system that can be used on all models with small changes, even it have existing minor bugs (sometimes major bugs undiscovered at launching time :D) hoping that will be corrected later but in this case I think we all have a part to blame.

Vain Samsung/Google launches a more powerful/safer OS if we need to install the Android market's all kind of bad applications and unverified enough, with all kinds of permissions required elsewhere. I saw clock widgets that request access to Bluetooth, Wireless and/or OS.

Why?

I saw Compass widgets with request for access to phonebook, SMS, OS, etc.. Why should I give a compass widget access to my phone book or sms? Therefore installing such applications come at a time to make ourselves more harm than good.

I gave a while to Skype (logged all the time though I had not even user there), Google+ (because it uploaded automaticaly - without my permissions - on the server, most of the personal things that I have in the phone: pictures, music, and other personal things that I do not want them there) and much more ...

Am I wright or not? :D
[Galaxy S II General] Molitro:
What are you testing to achieve such a low drain?
[Galaxy S II General] AndreiLux:
Nothing really. I'm just at home as before and the only thing I've changed is removing Skype, leaving the device be as it is with Wifi on and 2G. I'm still connected to Trillian and multiple services, but that's working over C2DM. As for that topic I've got my own little theories on the abusive Skype but I'll have to test that at a later date / it takes a lot of time, it may have to do with synchronization between clients.
[Galaxy S II General] Molitro:
Less than 1% every 2 hours just like that?

I barely get that shutting down all data... And I sure as hell don't use skype xD
[Galaxy S II General] AndreiLux:
I've stated enough times already that if the device doesn't have any issues it goes down to 0.3%-0.4% per hour. And if you turn off all data completely then the thing is basically a feature phone and if you use it barely it goes down to stupid idle times up to 2 weeks. That's maybe where reception actually comes into play, but as I said, there's nothing "great" about -83dBm.
[Galaxy S II General] Molitro:
I know that, and that's why I'm *****ing about it. It seems awfully hard to have no issues with this damn phone.
[Galaxy S II General] Entropy512:
You can expect it to be closer to 1% an hour if you don't force 2G - but that's to be expected, as I've mentioned before UMTS isn't exactly known for good battery life.

Usually, my deep sleep percentages with my usual idle data usage (logged into Google Talk, Gmail, Facebook, WeatherBug set to refresh every 4 hours):

Wifi - 97%

Moderate cell signal - 94-95% (stupid svnet-dormancy wakelock...)

Weak cell signal - 91-93% (svnet-dormancy goes up as more time is spent transferring data, and sync wakelocks in userland start going up too)

I really need to investigate power_profile.xml more - I think AOS might be getting reported as double what it really is, but not sure.

I'll also look at trying to see what killing HDMI support does in terms of wakeup times - who knows, this may be why the Infuse wakes up so much faster (custom Gingerbread kernels for the Infuse are lacking HDMI support.)
[Galaxy S II General] Molitro:
I'm almost always on 2G, and virtually always when I leave the phone idling for more than 15 minutes.
[Galaxy S II General] madmack:
Hey everyone,

I pulled the wakelocks file to see if I was running into any problems myself and got the following:

The phone has been plugged to the charger overnight, so I'm wondering if the biggest contributor here (PowerManagerService) has been holding the wakelock for that reason? or am I looking at a potential bug?

The number doesn't make any sense anyways if it's the charger wakelock given that I've slept more than ~3h45m (225 min).

Would love to hear your insights, experts :)
[Galaxy S II General] AndreiLux:
Edit: I'm an idiot and had a brain fart. How long a period was that from? Did you reboot the phone before testing? Can we get the file? Also the device is supposed to not sleep when plugged in.

Edit: that total time on the vbus_present one is 32 hours... you clearly didn't reboot the phone in a while.
[Galaxy S II General] madmack:
oh I thought we were looking at sleep_time

No I haven't rebooted in a friggin' while. Uptime > 89 hours.

When do these stats get reset anyways? reboot?

I'm attaching the file for your viewing pleasure :)

thanks guys.
[Galaxy S II General] m2smoe:
On some ROMs in the past, I've gotten up to 3 days uptime with little screen on time, but wifi always on. I'm sure this phone could have great battery life if all the little drains got fixed.

Samsung, time to put those engineers to work...
[Galaxy S II General] AndreiLux:
Edit: I'm an idiot.
[Galaxy S II General] madmack:
rofl, that's hilarious man.

i actually read the 2 edits you made.
[Galaxy S II General] AndreiLux:
Sorry about that. I was doing actually controlled testing when pulling the wakelocks so it completely didn't matter for me, but you had vastly different values so it threw me off. In any way, those are stats over a huge period of time for you, can't really pinpoint anything.

Also: Why is Entropy still the only person having user processes listed in his wakelocks file?
[Galaxy S II General] TheFirstBen:
Yes you are right exactly, it does not connect to any as they are only office networks.

Anyway I've check again today my wakelocks etc.

What i changed today is

shutdown my Wi-Fi when leaving home

Updated Siyah Kernel to V2 final (was using V2rc3 i think)

Used my GPS a lot :

new app (iOnRoad)

GPS app (Aura)

This time i have completely different values : svnet-dormancy & svnet are the top 2 still followed by PowerManagerService but with a value 8 times lower than yesterday.
[Galaxy S II General] Entropy512:
That I can't figure out - it's either something "special" in the UCKH7 ROM (for the I777), or something specific in the combination of the AT&T sources and defconfig.

If it's the AT&T sources, Siyah 1.8 should've done the same. (Although honestly, I need to recheck to see if maybe a .14 kernel acts differently - I'm the only one here running an AT&T source kernel NOT patched to .14.)

Or there's something buried deep within the defconfig that isn't immediately adjacent to the wakelocks configuration items... I've been too busy to really review Andrei's defconfig in detail.

PowerManagerService wakelocking is an oddball one - it does not appear to be a kernel-originated wakelock (not a single reference in the kernel sources, at least not mine!), but it does show in the stats of people who normally don't show userland wakelocks.
[Galaxy S II General] AndreiLux:
Well. Enough of testing like this, I won't actually wait another 9 days for it to drain to zero.

===========

Other Usage

===========

Wifi On (): 1 d 1 h 28 m 11 s (91691 s) Ratio: 100.0%

Awake (): 30 m 33 s (1833 s) Ratio: 2.0%

Screen On (): 6 m 25 s (385 s) Ratio: 0.4%

=========

Wakelocks

=========

DhcpHandler (Android System): 8 m 19 s (499 s) Count:133 0.5%

C2DM_LIB_TrillianReceiver (com.ceruleanstudios.trillian.android.Trillian): 2 m 59 s (179 s) Count:6 0.2%

AlarmManager (Android System): 1 m 1 s (61 s) Count:1027 0.1%

Event Log Service (Google Services): 12 s (12 s) Count:51 0.0%

ActivityManager-Launch (Android System): 11 s (11 s) Count:83 0.0%

sleep_broadcast (Android System): 6 s (6 s) Count:18 0.0%

LockerService (com.teslacoilsw.widgetlocker.WidgetLocker): 5 s (5 s) Count:9 0.0%

show keyguard (Android System): 4 s (4 s) Count:27 0.0%

GTALK_CONN (Google Services): 3 s (3 s) Count:338 0.0%

AlarmReceiver (com.sec.android.app.clockpackage.Clock): 3 s (3 s) Count:1 0.0%

GTALK_ASYNC_CONN (Google Services): 1 s (1 s) Count:52 0.0%

RILJ (Dialer): 1 s (1 s) Count:61 0.0%

keyguardWakeAndHandOff (Android System): 1 s (1 s) Count:343 0.0%

=========

Processes

=========

tvout resume wo (0): Sys: 5 s (5 s) Us: (0 s) Starts: 0

suspend (0): Sys: 3 s (3 s) Us: (0 s) Starts: 0

mediaserver (1013): Sys: (0 s) Us: 2 s (2 s) Starts: 0

com.sec.android.app.clockpackage (com.sec.android.app.clockpackage.Clock): Sys: (0 s) Us: 1 s (1 s) Starts: 1

mmcqd (0): Sys: 1 s (1 s) Us: (0 s) Starts: 0

events/0 (0): Sys: 1 s (1 s) Us: (0 s) Starts: 0

​

PowerManagerService might be something related to power savings mode checking on the battery state? Maybe. The 800MHz state also roughly correlates to the amount of times the device wakes up considering the wake-up time. Makes you wonder about sec-battery-monitor....
[Galaxy S II General] c-pimp:
now that is impressive!! I wish I could imitate that. I dont use skype at all lol... Im using the latest cyan nightly for vibrant and Im now reading thru this whole thread to find any help I can to get better deep sleep. thanks for all the hard work
[Galaxy S II General] Entropy512:
Keep in mind that Samsung CPUs enter/exit suspend at 800 MHz - so that sorta makes sense.

What I can't figure out is why sec-battery-monitor seems to always take about the same amount of time, regardless of whether I change the polling interval from 10 sec to 40 sec or not. In addition, even when set to 10 sec, I often see my device sleeping for 2-3 minutes in some tests...

Oh, along the lines of calibration and such - so far, everyone who has messed with batterystats.bin or battery calibrators on the I777 has wound up with problems. This doesn't surprise me, as I said the fuel gauge has no provisions for calibration, however, it seems like messing with the stats file causes something in userland to poke at the kernel sysfs interfaces in a way that makes the gauge unhappy. One person has their battery stuck reporting 100%, one person had normal fuel gauge operation EXCEPT for always triggering the fuel_alerted bug.
[Galaxy S II General] Molitro:
I'm leaving the phone with the kernel of the new KI4, and tomorrow will upload hte list of the wakelocks to see what the hell is going on.

So far... 98% after 2:30 hours with AOS at 48%. Looks on par of every other kernel .14 or not .14. Still, I never trust the first couple of percent points. The "full" state never behaves the same.
[Galaxy S II General] AndreiLux:
That's why I've been mentioning it since the beginning. I'm on a 100-200 screen-off profile, so most of that time is caused by the suspend frequency-lock.

That's what I've been saying all along too, don't touch the .bin file. Charging your device to full and a little more, deleting the file, letting it drain to zero until it dies off, and forget it. After you do that all those weird 100% cases running for half a day don't appear anymore. Also kind of what I've been calling "calibrating" even if it's the wrong word for it compared for other devices.
[Galaxy S II General] Sesshou:
I have the android system on top sometimes only surpassed by the display, but have watched some 1080p movies and only consumes 16-18%. Using the siyahkernel 2.0, how can i just hide it?
[Galaxy S II General] AndreiLux:
Oh well, at least I'm not the only one of this opinion and they're working on it.
[Galaxy S II General] s2d4:
I think he is saying don't touch it at all..
[Galaxy S II General] emilcioran99:
How can I list mine user processes? :D
[Galaxy S II General] TheFluffyOne:
For anyone interested in understanding the content of /proc/wakelocks better, the following is a description stolen from LWN:
[Galaxy S II General] ram3n:
Guys,

This a question about Battery Calibration on S2 :

First of all, I know MAX17042 drivers doesn't require calibration. So, it means deleting batterystats.bin is useless, just as using other apps.

Based on this observation, dear friends, I'm wondering now how to accurately calibrate our battery ? Pulling out the battery ?

Because of my battery dropping fast over the night (with plane mode), about 8%, and even when powered off, I think it's time for me to do this meaningfull manipulation.

Cheers.
[Galaxy S II General] Molitro:
I've gotten a problem pulling the wakelocks. The file looks like this:

Edit: Okay, I see that the decimal point isn't there, but it's fairly obvious where it is at least in the "last_change" column.

And I see it's normal.

Anyway... 92% after 13 hours of idling on wifi and 2G, which I believe is the way Andrei had a full day for his 10% (which would given me about 16 hours).
[Galaxy S II General] Ztax:
Here's what I've got. I believe the battery was around 86%. Anybody wanna help me make some sense out of these files, like, is this normal?
[Galaxy S II General] s2d4:
can you guys post the wakelock with the times converted to minutes... very hard to read especially posted as pictures..
[Galaxy S II General] Entropy512:
Yeah, unless posting a raw wakelocks.txt - if you post a picture, please at least try to add a column for sleep_time converted to minutes (or for a short run, seconds).

Divide sleep_time by 1e9 for seconds, 60e9 for minutes.

Turn off device, pull out battery, reinsert battery, power on. You're "calibrated".

If you're dropping 8% in 8-10 hours in 100% airplane mode - yeah something may be wrong, but it's probably not calibration. 8% in 8-10 hours is fine if on cell data, and slightly high for wifi but not too bad. Might be fine if not excellent you've got an Exchange account for email.

Proceed with the usual "find your drain sources" investigation process. If you don't know what this is - reread the past 10-15 pages - collecting deep sleep stats, hunting wakelocks, etc.