yashsingh1/xdaforums huggingface dataset:
[AT&T Samsung Galaxy S II SGH-I777] Entropy512:
Wakelock - blocks suspend but allows all idle states. I forget the exact sysfs file to hold your own:

echo "spork" > /sys/power/wake_lock

I think, and:

echo "spork" > /sys/power/wake_unlock

to unlock.

There's also a "wake lock" app on the market.

However if you're plugged into USB, you're fundamentally wakelocked to begin with - so the question is - if USB is plugged in and the screen is on, are AFTR and LPA even getting chosen? (It's possible for them to get chosen and not entered, but if they're not even chosen in the first place due to screen/USB interrupts, you know that hotplugging the second core won't hurt your idle statistics.)

Edit: to be clear, I'm fairly certain that if the cpuidle governor chooses LPA or AFTR, but the second core is active, it'll fall back to IDLE without getting reflected in the statistics. But if it's not selecting AFTR or LPA to begin with, this won't be a problem.

Edit 2: Thinking back over the past few weeks - The video decoding problems AntwanL and others had with 1/29 and 1/30 were caused by the CPU being able to enter AFTR in a case where it couldn't before. While debugging this, AntwanL did mention that he was unable to reproduce the problem when plugged into USB - so this would be a sign that somehow USB blocks entry into even AFTR.
[AT&T Samsung Galaxy S II SGH-I777] BigMc71:
Shut down = 1 - 2 sec power button turn on. Just seems like it was told to power off. Everything else for me works perfect. Bat life is amazing. Performance is smooth. I'm not doing any uv/oc but I do have cpu master installed. I'll have to research how to generate the kmsg you are requesting and get it to you (sorry). I upgraded to 2/7 kernel but it happened again last night. Thanks for the help.
[AT&T Samsung Galaxy S II SGH-I777] garyd9:
Simple test then: run the "idle" test again in three cases:

1) 1200 MHz, locked to 2 cores

2) 1200 MHz, locked to 1 core

3) 1200 MHz, no locking at all.

From what you've described, it would be a valid test to do this with the display ON. Now I just need a block of 3 or so hours (which isn't likely to happen until at least Wed evening.)

Gary
[AT&T Samsung Galaxy S II SGH-I777] Entropy512:
Most likely if it's a full shutdown, /proc/last_kmsg will not exist, as RAM doesn't remain powered in the case of a full shutdown... Try anyway, but don't be surprised if /proc/last_kmsg isn't even there. (It is only present if valid data was in the ramconsole buffer on bootup - on a powerup from full shutdown, this buffer will be empty.)

Screen on vs. off might affect it, by causing more interrupts which could preclude idle states. All I know is that with screen on AND USB connection, AntwanL seemed to be in a case where AFTR was no longer ever selected, resulting in video decoding working for him. It's unknown whether you can hit idle states with USB connected but screen off (since we didn't explicitly check idle states, I just know AFTR wasn't getting hit in AntwanL's case when USB was plugged in during video playback.)
[AT&T Samsung Galaxy S II SGH-I777] desiromeo719:
Entropy believe it or not the touchkey light went out even on XWLA4 stock...thing is the version i installed from the general section also had some bln support built in too...But now we know it isnt only uckk6 where this is happening and it did start after a certain kernel update...cant rmr which one now.

I can provide a dmesg if this will help sort out the issue...maybe it is a problem that is caused by installing bln support addons(bln app came pre installed but disabled)...maybe i should try to replace the liblights with stock XWLA4 to see if that fixes it?

edit - The problem has only occurred once so far on XWLA4 so not as much as other bases....and this could have no correlation what so ever, but ill say it again like I said before...just an observation that it seems to happen more in dark light settings...like in pitch black rooms...idk.
[AT&T Samsung Galaxy S II SGH-I777] Entropy512:
Try the stock liblights - in all of the dmesgs I've seen, there are messages saying that the lights were disabled by the system "app" - which is actually liblights as far as the kernel is concerned. I'm wondering if some other app is interacting with liblights in a hidden way. It only seems to happen with BLN-modded liblights present. In fact, if XWLA4 that you used had liblights replaced with a BLN-enabled one, there's a good chance it was the exact same library. You can check it by running the following in a terminal or ADB shell:

md5sum liblights.GT-I9100.so

(or SGH-I777 in the case of UCKK6).

If the file contents are the same, the md5sum will be the same.
[AT&T Samsung Galaxy S II SGH-I777] othermark:
I'm concurring here, I've had zero issues with 02/07. Are we sure these SoD folks are not doing undervolting/overclocking,some other init.d script pushing stuff into /proc, or running extended batteries when they shouldn't?
[AT&T Samsung Galaxy S II SGH-I777] NJGSII:
I know the problems for me with SOD started with me undervolting. It was happening even at pretty conservative levels too. My phone no likey undervolting and I wasn't getting much better battery life anyway.
[AT&T Samsung Galaxy S II SGH-I777] :
I havent had one problem with 2/7. Guess I should count my blessings, but then again Im just running UnNamed 1.3.2 and enjoying my speed+battery life.
[AT&T Samsung Galaxy S II SGH-I777] Entropy512:
Seems like the "shutdown when charging overnight" people are having it with 1/30... hmm...

At least one person who had SoDs swears they are not UV/OCing - tbooe, are you using any tweak scripts though?
[AT&T Samsung Galaxy S II SGH-I777] NJGSII:
Had the shutdown whilst charging thing happen twice today on 2/7. Ill be pulling data after the next time it happens.
[AT&T Samsung Galaxy S II SGH-I777] posthold:
I've had 3 SoD's on 2/7 on UNamed v2.2.1. No UV/OCing or tweaked scripts. If it happens again I will send you my last_kmsg.
[AT&T Samsung Galaxy S II SGH-I777] Entropy512:
OK. Also, before unplugging the device, first try quickly tapping Power to see if the battery icon shows up.

Do that, then try one of the test kernels posted a few pages back.
[AT&T Samsung Galaxy S II SGH-I777] Romee74:
+1

I am running ICScrewed 2.0.1 with 2/07 kernel with no issues and awesome battery life.
[AT&T Samsung Galaxy S II SGH-I777] avidmovies:
Same for me!

Thanks for an amazing kernel!
[AT&T Samsung Galaxy S II SGH-I777] dandrumheller:
Also on ICScrewD 2.0.1, no init.d scripts, no OC/UV. Finishing out day 4 on 02/07 kernel. Battery life is moderately better than siyah kernels, zero issues with SoD or other strange behavior. touch key lights seem to be more responsive when set to "on in the dark" now as well...not sure if anything changed in that regard from earlier kernels or I just happen to be working in slightly different lighting conditions though.
[AT&T Samsung Galaxy S II SGH-I777] NJGSII:
Battery icon showed up both times when I did that after each time it happened.
[AT&T Samsung Galaxy S II SGH-I777] Entropy512:
Hmm... So it's crashing into LPM. Grr... This is gonna be a ***** to debug!!!!! (There's a good useful /proc/last_kmsg when the battery icon is up - but no way to pull it without blowing it away! Pull the charger and it's gone, power up by rebooting and it's probably gone...)

I may need to revert most of the patches from 2/7 and 1/30 out except the critical fixes (BTHID and the video/cpuidle interop fix), then go "patch a day" after that until I'm back at the 2/7 patch level. This way the exact problem patch can be identified. (There may be two of these - one for the SoDs some have had with 2/7, one with the crash-to-charging others have had starting with 1/30.)

Too bad "git bisect" is almost unusable when you need to wait a few days for feedback... It's easier to go patch-by-patch one per day (or maybe two per day... People can revert a half-day if a problem starts happening.)

I'm likely to start this tomorrow.
[AT&T Samsung Galaxy S II SGH-I777] :
We all aplrociTe your efforts and time. Thanks for diving into this trying to figure it out, even though you seem to be going in blindly.

-Red5
[AT&T Samsung Galaxy S II SGH-I777] DeXel55:
I had SoD or another another shut down during charging ( big battery charging animation). Now, I have no idea which one it is, but it only happens (I am still not 100% sure) when widget locker installed. So I guess it is SoD because I remember you mentioned it can cause that. There is my last_kmsg. Hope it helps. Thanks for everything you have done!

As for Widget locker settings, it has root helper enabled, and I can post everything else if anybody wishes to try to reproduce these shut downs.

Same thing with my phone.
[AT&T Samsung Galaxy S II SGH-I777] Dungeon47:
I get the same SoD without widget locker.

Sent while riding a buffalo.
[AT&T Samsung Galaxy S II SGH-I777] DeXel55:
Yea, just happened again without it. Another last_kmsg included. It seems totally random. I had few days without turn off, and then installed widget locker and set cpu (I use it only to change governor) and then my phone turned off.

BTW, I use old version of set cpu from amazon app store... will try new one that in this forum.
[AT&T Samsung Galaxy S II SGH-I777] Entropy512:
That was not an SoD. The possibilities are:

Crash-to-LPM (this is new terminology): Phone crashes and reboots to LPM (the powered-off battery charging mode) while plugged in - In this case, tapping Power before unplugging will cause the big battery icon to show. Pressing power for 2 seconds or so causes the phone to boot. Pull a last_kmsg, even though unfortunately it may not be useful as it may just have a log of the LPM charging mode.

Shutdown: Phone is totally shut down, pressing Power for 2 seconds boots it. Given the new evidence for identifying crash-to-LPM, I don't think this has happened to anyone.

Panic reboot: Phone spontaneously reboots during operation. A last_kmsg is VERY important here.

SoD: Phone does not wake from sleep using a short tap of power OR holding Power for 2 seconds. Rebooting the phone requires holding power for 10-15 seconds to force a reset. last_kmsg is important here, it will almost surely contain useful information!

I have not ever seen SetCPU cause SoDs on kernels with the suspend SoD patch (one of the first things I put into this kernel.)

However I have seen Widget Locker be responsible for SoDs for multiple people on multiple kernels (There's a thread on it somewhere in General or Q&A), so right now my first advice is that if you are having SoD issues and use Widget Locker, ditch it. If you're having SoD issues without Widget Locker I'm very interested to get last_kmsg reports.
[AT&T Samsung Galaxy S II SGH-I777] rav4kar:
I use MagicLocker from market (free version), never got any SoDs, guys can give it a try.

edit#1: though I got a reboot (Panic reboot: Phone spontaneously reboots during operation. - Entropy ) with 02/07DD which was discussed very few pages back.
[AT&T Samsung Galaxy S II SGH-I777] Entropy512:
The panic reboots and crash-to-LPM are likely to be related... The difference being whether a charger is plugged in during the crash.
[AT&T Samsung Galaxy S II SGH-I777] Alucardis666:
Well thankfully I'm having 0 issues with the latest kernel. :-) But I do hope you can get things figured out and sorted.
[AT&T Samsung Galaxy S II SGH-I777] stalked_r/t:
This thing is confusing as hell. Lol. So I've been on. 2/7 since the 8th and have had great battery life. Generally with moderate use I'm getting about 18 hours of use. Days like today are what's confusing. I'm at 60% with little to no use. Wakelock from wklan or something. I'll post the screenshot if someone wants it.

I know it's the wifi being stupid. Just don't understand what would cause it to randomly do this. Yesterday I was at 70% after 19 hours of normal use with wifi and bluetooth on all day.
[AT&T Samsung Galaxy S II SGH-I777] Entropy512:
Misbehaving app? Get a Shark for Root capture when it's draining, as covered in the battery drainers thread.
[AT&T Samsung Galaxy S II SGH-I777] :
Why do people stay on KK6 when it has a KNOWN wifi battery issue, and then complain that their battery is draining fast? Get away from KK6 like I did... battery life is stellar now.
[AT&T Samsung Galaxy S II SGH-I777] stalked_r/t:
I'm not complaining about the drain. I knew the risk with the KK6 and am running it anyway. My complaint is about the inconsistency. For instance, yesterday I was at 70% after 19 hours, yet today after 7 hours I'm at 30%.

I'm going to pull a shark and get it posted in the battery drainers thread.
[AT&T Samsung Galaxy S II SGH-I777] :
I wasnt saying that you were complaining, I meant people in general. They seem to go with something thats flawed, then complain about it down the road. Its a pet peeve of mine, always has been.
[AT&T Samsung Galaxy S II SGH-I777] shoman94:
I don't agree with that statement. IMO it depends on the setup. Mainly brand router... Etc....

I don't have the issue on my phone at home with either phone and my wife uses wifi all day at her work... No drain.

I could easily say your router sucks... Get a new one.
[AT&T Samsung Galaxy S II SGH-I777] rav4kar:
Red5, KK6 has pros and cons , example I switched to KH7 to get rid of WiFi drain but KH7 did not give me better as well as smooth Network(calls/Data) in my area or in roaming than KK6, I was forced to revert and end up with KK6 now :(

---------- Post added at 03:31 PM ---------- Previous post was at 03:28 PM ----------

Same with me ..my phone does not drain with my dd-wrt based home router ..but drains upto 5%/ hour idle on my work router!
[AT&T Samsung Galaxy S II SGH-I777] ryude:
In my testing I've had the most problems with KK6, then KH7, all of the best experiences I have had was on I-9100 firmwares.

But the KK6 modem is the best for me as far as battery drain and persistent data connection.
[AT&T Samsung Galaxy S II SGH-I777] Entropy512:
I was going by his sig that said that he was on Unnamed 1.3.x which is KH7 based, so I assumed it was a misbehaving app.

KK6 has one confirmed wifi bug and one likely one I haven't had a chance to confirm, in addition to the general compatibility issues.

1) The BT-AMP bug. This one is intermittent and unpredictable, you never know when it will nail you, but it WILL. This one is confirmed for UCKK6, it also affects XWKK5 and many of the Infuse Gingerbread leaks. This can affect you regardless of router - in fact it often seems to be triggered by moving out of range of your router. (e.g. leave home, it starts, and it does not stop until wifi is turned off, even if you return to your home network)

2) Wifi early_suspend handlers blocked - this is confirmed on XXKI3 and strongly suspected on UCKK6. Making this easy to diagnose was the goal of https://github.com/Entropy512/linux_kernel_sgh-i777/commit/86b36aa74d642aef455579140801449e089d6f02 - this will only affect you on "dirty" wifi networks, as this is what lets ARP spam wake up the device.
[AT&T Samsung Galaxy S II SGH-I777] :
Im a Network Administrator, I have a good router. :D

Isnt that modem related? You could run KH7 base firmware and use the KK6 modem and should have the best of both worlds.
[AT&T Samsung Galaxy S II SGH-I777] desiromeo719:
Entropy what are your views on fast dormancy....there seems to be a lot of conflicting info on this...

http://xdaforums.com/showthread.php?t=1289541

http://xdaforums.com/showthread.php?t=1371489

http://xdaforums.com/showthread.php?t=1404674&page=2
[AT&T Samsung Galaxy S II SGH-I777] avidmovies:
I'm sure everyone has seen this, but I just thought it was quite relevant:

/end offtopic :)
[AT&T Samsung Galaxy S II SGH-I777] :
I lol'd.
[AT&T Samsung Galaxy S II SGH-I777] Simba501:
Lmao!

Sent from my Galaxy SII
[AT&T Samsung Galaxy S II SGH-I777] ryude:
To be clear, does this revert to 1/30 or BEFORE 1/30 changes?
[AT&T Samsung Galaxy S II SGH-I777] rav4kar:
Entropy, as we are talking about this in detail, I just got another Reboot just a while ago :p , please find the attached last_kmsg, hope this helps you somehow in troubleshooting efforts, this is my 2nd reboot with DD 2/7/12 in last 4 days, thanks!

Edit#1: fyi, during this incident, the phone was connected to power adapter and I was browsing amazon app store, to be specific, I was looking at feedback on one of the apps and then tried to go back pressing "back" touch key, it got stuck at feedback screen and pressed "back" touch many times repeatedly, it came out of amazon app store and at that time it rebooted ( I guess).

Edit#2: Yes, I remember one more thing, I think turned off wifi before reboot.

Edit#3: 2nd reboot in less than an hour ( 3rd since 02/07 DD). Attached last_kmsg2.zep
[AT&T Samsung Galaxy S II SGH-I777] Entropy512:
This is a poor excuse for staying with broken firmware - With newer wifi chipsets such as the BCM4330, standby power consumption with wifi enabled but not connected is negligible - I have never seen any significant difference at my desk between having it on or off power-wise. I see far more difference just by changing modems (UCKK6 modem seems to be significantly worse than UCKH7 at my desk now that I've hopped back and forth between the two a few times). The power penalty of the user forgetting to turn on wifi (easy to do) when in range of a working network is, however, clearly measurable - when connected and using working firmware, routing data over wifi consumes measurably less power than over the cell radio in 95%+ of situations.

As you can see, I commented on a few of those threads. I found that enabling it with the dialer codes did nothing on UCKH7 system base - HOWEVER, most I9100 firmwares have it enabled by default, which may be why they provide superior power consumption to any I777 firmware. (It may be some other reason, but I know XXKI3 provides clear power consumption benefits in almost all situations over UCKH7 except for two wifi-related deficiencies, and XWKL1 fixes the only situations where UCKH7 outperformed XXKI3.)

Right now the best combination for power management seems to be I9100 firmwares and the UCKH7 radio. UCKK6 radio seems to result in significantly more power consumption and poorer data performance (Connection status icons go "grey" on themes that report Google connection state frequently at my desk with the KK6 radio but not with the KH7 radio).

I just posted the 2/15 "A" release - This reverts nearly all patches from 1/30 and 2/7 except for the three stated in the changelog, two of which are critical functionality fixes and one of which is a revert itself of a patch which did absolutely nothing if you actually read the code.

There will be a "B" release later tonight of patches I think should be fairly safe stability-wise, and then I will start with one patch per release of adding the riskier patches from 1/30 and 2/7 back in until I am back at the 2/7 level. This should allow easier identification of the offending patches, especially since the crash-to-LPM behavior is impossible to get a last_kmsg for (since you can't get a last_kmsg during LPM, and rebooting to normal operation will blow away the useful last_kmsg.)
[AT&T Samsung Galaxy S II SGH-I777] DefTaker:
Unfortunately, some people like me have uVerse and we can't just supplant with any router...trust me, I'd bring out my DD-WRT Buffalo - G router really quickly if I could! :D

However, my battery life has been nothing short of stupendous ever since going to UCKH7 again (or is it XWKL1?) don't know how that works on jivy's rom.
[AT&T Samsung Galaxy S II SGH-I777] manny05:
So if my phone is not randomly rebooting, it would be useless for me to update to the 2/15?? I mean I don't have any problems with entropy at all

Right now I'm using rebel ROM from i9100. Very smooth

Sent from my pimp'd out Samsung Galaxy S2
[AT&T Samsung Galaxy S II SGH-I777] Entropy512:
That's the biggest issue - many of the reported ARPspam issues have been with UVerse integrated router/modems that simply cannot be replaced.

Originally I told most people to fix their networks/routers - which is still a good idea, but now that it is clear only certain firmwares have issues with ARPspam and broadcast spam, the solution is to migrate away from firmwares that are well documented to be, simply put - total ****. I9100 bases are clearly superior to I777 bases in my experience, with the exception of NFC NDEF tags - but that doesn't even work in stock I777 firmwares to begin with!

I just recently found out about the wifi country code issue with some I9100 firmwares, so that will be fixed in the next Hellraiser.
[AT&T Samsung Galaxy S II SGH-I777] desiromeo719:
Thanks...I am currently running XWLA4 with uckh7 modem...will run it for a few days and see...But i also have fast dormancy enabled and wanna test with it on and off....if I just knew if ATT uses it or not...would make things much simpler.

Correct me if im wrong but I think when I was running Unnamed it was disabled by default...will see if my speeds now are same as unnamed in the same locations...if not then i will try disabling and testing further.

Also 2/7 has been running flawless for me on XWLA4 besides the touchkey hiccups that occur sometimes...
[AT&T Samsung Galaxy S II SGH-I777] Entropy512:
As covered in my post (which was after yours) - It is:

1/29 PLUS:

BTHID fix from 1/30

MFC/cpuidle fix from 2/7

A wifi revert from 2/7 that should be safe anyway.

The other 1/30 and 2/7 patches are removed from 2/15.

If you're stable on 2/7 there is no benefit to 2/15 or any release before "patch a day" is completed.
[AT&T Samsung Galaxy S II SGH-I777] Entropy512:
Uploaded 2/15 release B which adds a few patches that should be safe, including one that helps identify firmwares with a wifi power management issue.

If you turn your screen off and on a few times well after you have connected to a wifi network, and a firmware has the bug in question, you will see this in the dmesg:

bcm4330: early_suspend processing disabled, suspend_disable_flag is set by system.

If it happens once or twice right when you connect to a network it's OK, but if it happens every time you turn the screen off, your firmware is broken. XXKI3 is confirmed broken, I still need to confirm UCKK6 but I'm 90% certain it is affected.
[AT&T Samsung Galaxy S II SGH-I777] Entropy512:
Your first error is similar to another one posted - it looks like arighi's smooth scaling patch at https://github.com/Entropy512/linux_kernel_sgh-i777/commit/888555febc22e72515d124477bee0a1c515289a1 went nuts - if you look at it, it's constantly trying to hit 1.2 GHz even though it probably IS at 1.2. I think I may just leave it out - it only affects those who are using the performance governor or governors that make large sudden jumps.

Second log is interesting - looks like your video decoder was VERY unhappy for the entirety of the log.

Edit: OK, I'm 90% positive that the issue was an interoperability problem between arighi's patch, overclocking, and one other thing: In kernel/power/main.c, there is code that appears to allow an app to lock the frequency to 1.2 or 1 GHz (dvfslock_ctrl) - On an OC kernel, these CPU levels (L0 and L1) are 1.6 and 1.4 GHz. So dvfslock_ctrl tries to lock to 1.6 or 1.4, but the user limit blocks operation above 1.2. This causes arighi's patch to constantly try and hit 1.4 or 1.6 GHz, but it can't. It's another case of an arighi patch that doesn't play well with overclock kernels.
[AT&T Samsung Galaxy S II SGH-I777] NJGSII:
Flashed 2/15 A.

If anything happens ill be sure to get data.
[AT&T Samsung Galaxy S II SGH-I777] Entropy512:
I think I figured out the cause of crashes specific to 2/7 - but I'll still do patchaday to be sure.

However, some people reported issues with 1/30 - still don't know what the source of those is.

Edit: Uploaded 2/15-C - Lots of fixes for cpufreq lock levels that have been wrong since the implementation of overclocking. One of these combined with the arighi scaling patch is likely the cause of 2/7 problems. 1/30 problems still unknown. Thank rav4kar (and one other person, forget who...) for this - his last_kmsg had the "smoking gun" for one of the bad lock levels. Other problems that were fixed are improper overheating protection.