[Kernel][CWM]Fecality I9100 3/7/2012 (GPU Voltage Fix)

Search This thread

khartaras

Senior Member
Feb 14, 2011
234
111
The problem was intermittent - some people (including myself) never experienced it, others had it occasionally, one guy had it happen all the time.

It also affected the ability to touch the screen during phone calls for him.

Strange. It doesn't happen EVERY time, but it does happen very frequently. Oh well, since you have the problem pinned down I guess it's not really a problem any more.
 

Entropy512

Senior Recognized Developer
Aug 31, 2007
14,088
25,086
Owego, NY
Strange. It doesn't happen EVERY time, but it does happen very frequently. Oh well, since you have the problem pinned down I guess it's not really a problem any more.

We'll see - I THINK I know what it is but I need time to look at the source.

This could be a bit difficult to get working properly, because it is I9100-specific and getting the right combo of #ifdefs could be difficult. Basically - some of the CONFIG_TARGET_LOCALE_NAATT ifdefs may be causing code that should be common to I9100 and I777 to be compiled for I777 only.
 

teiglin

Senior Member
Jul 7, 2011
627
134
I dont have any probleme with the circle lockscreen too . i test with clear ram and i have the circle all times

Just to be clear, the issue isn't related to the circle lockscreen, or to any particular lockscreen. The problem is that the phone is slow to become responsive after waking from deep sleep, so it takes a five seconds or so before you can actually unlock the phone.

Entropy, let me know if there are any values or logs I can get you that would help.
 

Entropy512

Senior Recognized Developer
Aug 31, 2007
14,088
25,086
Owego, NY
Just to be clear, the issue isn't related to the circle lockscreen, or to any particular lockscreen. The problem is that the phone is slow to become responsive after waking from deep sleep, so it takes a five seconds or so before you can actually unlock the phone.

Entropy, let me know if there are any values or logs I can get you that would help.

I'm going to try and put out a test kernel tonight - given my history with this issue, I think I know the solution and unfortunately this one is next to impossible to get good logs for. And yes - this affected I777 users long before circle lockscreen existed. It happened when I tried to pull in the I9100 update3 touchscreen drivers - I eventually reverted those back to I777. However, I left the I777 ifdefs in there - so when building for I9100, the I9100 code remains.

What I can't figure out is why I9100 users aren't complaining about it left and right with any kernel that uses the I9100 update3 base. (Except Siyah, which uses i777 touchscreen drivers.)
 

teiglin

Senior Member
Jul 7, 2011
627
134
I'm going to try and put out a test kernel tonight - given my history with this issue, I think I know the solution and unfortunately this one is next to impossible to get good logs for. And yes - this affected I777 users long before circle lockscreen existed. It happened when I tried to pull in the I9100 update3 touchscreen drivers - I eventually reverted those back to I777. However, I left the I777 ifdefs in there - so when building for I9100, the I9100 code remains.

What I can't figure out is why I9100 users aren't complaining about it left and right with any kernel that uses the I9100 update3 base. (Except Siyah, which uses i777 touchscreen drivers.)

Cool, I look forward to the test kernel, though I have it in relatively low volume (only four or five times since I flashed the kernel yesterday), so I'm probably not the best test case.

I'm trying to remember when I first started experiencing it. I don't think I've had it happen on pongster's kernel recently, but for a while I was bouncing between his kernel and siyah pretty frequently, just screwing around mostly, so what happened on which kernel is pretty muddled in my head going back more than a week or two. I'm pretty sure it was widely-complained-about for a while, so I'm guessing people besides GM must have also backported the I777 drivers (or found another fix?). I'll have to poke around git tonight to see.
 

Entropy512

Senior Recognized Developer
Aug 31, 2007
14,088
25,086
Owego, NY
Cool, I look forward to the test kernel, though I have it in relatively low volume (only four or five times since I flashed the kernel yesterday), so I'm probably not the best test case.

I'm trying to remember when I first started experiencing it. I don't think I've had it happen on pongster's kernel recently, but for a while I was bouncing between his kernel and siyah pretty frequently, just screwing around mostly, so what happened on which kernel is pretty muddled in my head going back more than a week or two. I'm pretty sure it was widely-complained-about for a while, so I'm guessing people besides GM must have also backported the I777 drivers (or found another fix?). I'll have to poke around git tonight to see.

I know GM definitely reverted back to the I777 drivers - His revert was why I reverted my source base. However, since I built for I777 target, my #ifdefs may be slightly different from his - i.e. I think his may enable the I777 code at all times, while mine only enables it when compiling for I777 (since until this week, I only compiled for I777 except for a test kernel I dropped in the VR thread.)

I'm home now, looking at the code.

Edit: Weird, GM left all of the #ifdefs checking for CONFIG_TARGET_LOCALE_NAATT in mxt224_u1.c there - so if you're not having the issue on SiyahKernel, it's not that file. Hmm.

Edit: Same for all CONFIG_TARGET_LOCALE_NAATT items in arch/arm/mach-s5pv310/mach-c1.c

I am wondering if maybe the I9100 community has other workarounds they use for touchscreen issues that just plain don't exist on the I777... Looking through all other touchscreen related commits in Siyah.

Right now the main difference I can find is a difference in the default touch threshold.

Try putting this into an init.d script to see if it changes anything:
Code:
#!/sbin/sh
log "Increasing touchscreen sensitivity"
echo "50" > /sys/devices/virtual/sec/sec_touchscreen/tsp_threshold
 
Last edited:

teiglin

Senior Member
Jul 7, 2011
627
134
Right now the main difference I can find is a difference in the default touch threshold.

Try putting this into an init.d script to see if it changes anything:
Code:
#!/sbin/sh
log "Increasing touchscreen sensitivity"
echo "50" > /sys/devices/virtual/sec/sec_touchscreen/tsp_threshold

Okay, I'll set that and give it a shot (can I just set it or do I actually need to reboot?). You'll have to give me a bit since it doesn't always happen, plus I have to wait long enough to be sure the phone is in deep sleep. For the record, that value was 40 before I changed it.

Since you mention touchscreen sensitivity, I feel I should mention that I use vitalij's TouchScreenTune to shorten blen, though his app doesn't allow setting tsp_threshold. Could the two be related?

Edit: Tried twice now after putting airplane mode on and waiting a couple minutes, didn't happen either time with that tweak. I'll keep it there and let you know, though, since twice is hardly conclusive given the fairly low frequency with which I normally hit this.
 
Last edited:

Entropy512

Senior Recognized Developer
Aug 31, 2007
14,088
25,086
Owego, NY
40? odd... It should default to 70 unless you had another init.d script change it.

And it can be changed on the fly.

That is something interesting - Over here in I9100-land there's all sorts of touchscreen fixes and tweaks. In I777 land, the only time people have ever complained about their touchscreen is when running kernels based on I9100 source.
 

teiglin

Senior Member
Jul 7, 2011
627
134
40? odd... It should default to 70 unless you had another init.d script change it.

And it can be changed on the fly.

That is something interesting - Over here in I9100-land there's all sorts of touchscreen fixes and tweaks. In I777 land, the only time people have ever complained about their touchscreen is when running kernels based on I9100 source.

Hah, figures. I'll need to poke around my other tweaks--something is definitely setting it to 40, since my changes aren't sticking. I did hit the bug again, by the way, but I went back and looked at the tsp_threshold, and it was 40, despite the fact that I had manually changed it to 50 before turning the screen off.

Edit: It's not TouchScreenTune, and tsp_threshold doesn't even appear in any of my init.d scripts aside from the one I just created. Nevertheless, every time I turn my screen on, the value is set to 40. I have no idea what could be causing this--what is executed when you turn the screen on?
 
Last edited:

Entropy512

Senior Recognized Developer
Aug 31, 2007
14,088
25,086
Owego, NY
I'm less sure that it's the threshold then, since something is overriding it anyway, it doesn't matter.

I'm wondering if one of the tweak apps you're using is somehow interfering...
 

teiglin

Senior Member
Jul 7, 2011
627
134
I'm less sure that it's the threshold then, since something is overriding it anyway, it doesn't matter.

I'm wondering if one of the tweak apps you're using is somehow interfering...

Well, that's why I mentioned TouchScreenTune, as it's the only tweak that I use that (afaik) is doing anything when you turn the screen on. I've turned it off for now, and I will let you know if that removes the issue. My init.d stuff is pretty minimal, no superscripts or anything like that--just the stuff that came with CheckROM (loading cifs, sd readahead, changing nice of kswapd0), plus a tweak for my conservative thresholds.

I poked around a bit more, and it seems tsp_thresholds are set automatically, 40 or 70 when charging, which is consistent with the behavior I'm seeing.
 

Entropy512

Senior Recognized Developer
Aug 31, 2007
14,088
25,086
Owego, NY
Well, that's why I mentioned TouchScreenTune, as it's the only tweak that I use that (afaik) is doing anything when you turn the screen on. I've turned it off for now, and I will let you know if that removes the issue. My init.d stuff is pretty minimal, no superscripts or anything like that--just the stuff that came with CheckROM (loading cifs, sd readahead, changing nice of kswapd0), plus a tweak for my conservative thresholds.

I poked around a bit more, and it seems tsp_thresholds are set automatically, 40 or 70 when charging, which is consistent with the behavior I'm seeing.

Hmm, good catch there.

I guess the question is whether khartras is also using touchscreentune - if he is too, then it may cause problems when combined with the I777 touch driver - but then why doesn't Siyah also have the same issues (as it seems to have the same code as far as I can tell, with the exception of possibly changing some defaults. I need to take a second look.)

Edit: I think I found a possible culprit, need to look at SiyahKernel - See https://github.com/Entropy512/linux...r/drivers/input/touchscreen/mxt224_u1.c#L3250

On I777, the suspend handler gets called later and the resume handler gets called earlier.

Well, I've found plenty of possible culprits - just no explanation why you didn't have issues in Siyah...
 
Last edited:

teiglin

Senior Member
Jul 7, 2011
627
134
Hmm, good catch there.

I guess the question is whether khartras is also using touchscreentune - if he is too, then it may cause problems when combined with the I777 touch driver - but then why doesn't Siyah also have the same issues (as it seems to have the same code as far as I can tell, with the exception of possibly changing some defaults. I need to take a second look.)

Edit: I think I found a possible culprit, need to look at SiyahKernel - See https://github.com/Entropy512/linux...r/drivers/input/touchscreen/mxt224_u1.c#L3250

On I777, the suspend handler gets called later and the resume handler gets called earlier.

Thanks for your patience on this. Hopefully khartras will weigh in whether he is using TouchScreenTune--I haven't hit the bug since turning it off (including turning the screen on a few times for no reason but to check).

I don't totally understand what the data->early_suspend.level means--it seems like you're saying that setting it to the higher value (of DISABLE_FB+1 instead of BLANK_SCREEN+1) changes when the suspend and resume handlers are called? And that timing may be crossing wires with whatever TouchScreenTune is doing and causing the short hang when waking up/turning the screen on?

Edit: yeah, I'm not sure at all. Missed your edit while I was blindly wading through the various touchscreen edits. I guess it's not surprising that it could be a lot of things.
 
Last edited:

Entropy512

Senior Recognized Developer
Aug 31, 2007
14,088
25,086
Owego, NY
Yeah. During suspend, the handlers are called in ascending order. During resume - descending order. So on I777, the earlysuspend handler is called later and the lateresume handler is called earlier.

Early suspend and late resume are screen off/on - deep sleep is regular suspend/resume.

As to CWM Manager compatibility - After poking at cfroot's initramfs, my head hurts. Do any other custom kernels support it?
 
  • Like
Reactions: teiglin

teiglin

Senior Member
Jul 7, 2011
627
134
Yeah. During suspend, the handlers are called in ascending order. During resume - descending order. So on I777, the earlysuspend handler is called later and the lateresume handler is called earlier.

Early suspend and late resume are screen off/on - deep sleep is regular suspend/resume.

As to CWM Manager compatibility - After poking at cfroot's initramfs, my head hurts. Do any other custom kernels support it?

I see, thanks for the explanation.

I thought Siyah supports CWM Manager, and I'm pretty sure RedPill does too. I haven't used the app except to remove yellow triangles, though, so I can't say I've tested it at all.

Also FWIW (not very much), another hour and a half without hitting the wakeup hang with TouchScreenTune off, but I haven't used my phone much.
 

antt00

Senior Member
Jul 31, 2007
1,325
451
Kuala Lumpur
Yeah. During suspend, the handlers are called in ascending order. During resume - descending order. So on I777, the earlysuspend handler is called later and the lateresume handler is called earlier.

Early suspend and late resume are screen off/on - deep sleep is regular suspend/resume.

As to CWM Manager compatibility - After poking at cfroot's initramfs, my head hurts. Do any other custom kernels support it?
Redpill and siyah support chainfire's CWM manager app
 

Top Liked Posts

  • There are no posts matching your filters.
  • 37
    Read the Known Issues section of this post below along with the FAQ a few posts down before posting.

    A few people have asked about I9100 builds of my Daily Driver kernel for the SGH-I777. I normally hate blind development, but since most I9100 guys are doing it for I777 targets, I may as well try going the other way. Since it fails the definition of being a "daily driver" as I own an I777 and not I9100 - it will not be using the Daily Driver name.

    This should be compatible with most stock-derived Gingerbread firmwares, with a few exceptions listed below. It is NOT compatible with CM7/MIUI or any other AOSP-derived firmware. It is NOT compatible with ICS and WILL NOT BE until ICS kernel source for the I9100 is released. At that point a new thread will be created for those kernels. I am testing it currently with self-deodexed/debloated/Hellraised XWLA4.

    The following firmware bases are likely to deliver poor battery life with this kernel due to wifi bugs in the firmware:
    XXKI3, UCKK6, XWKK5 - especially UCKK6 and XWKK5

    This kernel series is intended to be similar in spirit to my Daily Driver series for the Infuse at http://xdaforums.com/showthread.php?t=1212795

    It is built from sources at https://github.com/Entropy512/linux_kernel_sgh-i777/commits/oc_codeworkx, and initramfs at https://github.com/Entropy512/initramfs_sgh-i777/commits/master

    My general goals are to focus on stability and battery life. If it comes to a tradeoff between performance and the above two, I will choose stability/battery life. In general I will choose stability first, with the exception of undervolting.

    I keep my initramfs clean - There are no tweaks or other automated scripts built into this kernel. For a collection of tweaks I am working on and documentation on them, see http://xdaforums.com/showthread.php?t=1378080

    Current features:
    • I9100 Update3 base
    • Touchscreen drivers from I777 source code base
    • codeworkx's cpuidle patch - should improve battery life a bit. In most cases it will likely not improve things much, but in rare cases it will result in significant improvements. (I only have one partially-reproducible test case on the Infuse so far)
    • JHash 3
    • BFQ I/O scheduler
    • CIFS module in initramfs
    • CWM 5.0.2.8 compiled from CM7 sources on 2/28/2012
    • "insecure" kernel (meaning root in ADB)
    • CPU governor set to Conservative by default to conserve some battery - this will make your device slightly less responsive, use SetCPU or a similar app to return to ondemand if you want it, or reduce the conservative polling interval
    • Filesystem readahead tweaks in initramfs
    • netarchy's Sleep of Death fix
    • netarchy's conservative governor tuning patch - should improve responsiveness of devices when using the conservative governor if you reduce the polling interval (misnamed as sample_rate) - the I9100 community calls this "lionheart" even though it's really only a 2-line patch
    • Battery charge current monitoring (CurrentWidget) support - only reports charge current and not discharge, and reports a value 2.85 times the actual current. Use CurrentWidget's "operation on value" to divide by 2.85.
    • Miscellaneous bugfixes pulled from Ninphetamine and CM7 sources - see github for details
    • /system/etc/init.d support in initramfs - Note that this only runs stuff in /system/etc/init.d - ROM developers or you need to create it. Attached is an example script that will change the CPU frequency governor to ondemand if placed in /system/etc/init.d and set to executable
    • Four "use at your own risk" features that trade performance for stability - See Post #4 for details
    • Standard bootanimation support
    • /proc/last_kmsg crash debugging support
    • NFS modules in initramfs - note that they must be insmodded in a specific order: sunrpc.ko, lockd.ko, then nfs.ko
    • Fix for fuel_alerted perma-wakelocks
    • Fix for wifi tethering on I9100 ROMs that have been Hellraised to I777
    • Bump up TCP buffer sizes in initramfs to match that of the Infuse - may help network performance in some cases
    • cpuidle driver from Tab 7 Plus kernel - allows entry into AFTR more often - includes MFC interoperability fix (Should not break video playback.)
    • Support Bluetooth HID on newer firmware bases
    • 3-step GPU clock/voltage control
    • Extended hotplug tuning
    • Support for Xan's ExTweaks universal tuning app - https://market.android.com/details?id=com.darekxan.extweaks.app

    Planned features, short term:
    • Determine if issues with PINlock when running I9100 firmwares on I777 have kernel involvement, and fix them if this is the case.

    Planned features, mid-term:
    • Potentially my first departure from "standard" governors, with a focus on improving hotplugging logic

    Planned features, long-term:
    • Improved battery charge algorithm for faster charging - Initial research indicates we have an alternate battery charger chip (MAX8922) that differs from the MAX8997 used in the I9100. We DO have an 8997 also - but on our device for some reason Samsung decided to use an alternate chip instead of using the 8997's built-in charging. This means we have far fewer options (90,400,660 mA) in terms of charge rates compared to the I9100 (from 200 to 950 in 50 mA steps). So we might not be able to implement any fancy charging algorithms. :(

    Features not planned:
    • BFS process scheduler - I have only once ever seen a test case where this clearly outperformed the mainline Linux scheduler (multithread x264 encoding) - The mainline schedule was fixed in the next release and BFS now has no performance benefits
    • Any feature that trades off stability or data integrity for performance unless it can be disabled entirely and defaulted to "off"
    • Any feature that cannot have functionality tested without a paid app. Interface-only checks don't cut it - I don't want users complaining that the app they paid for didn't work because an interface check worked but function didn't
    • Touch recovery - too prone to unintentional user input in dangerous situations. I will reconsider this with ICS.
    • ARM_TOPOLOGY/SCHED_MC - See http://xdaforums.com/showpost.php?p=23193259&postcount=100 for details

    Known issues:
    • Power management regression somewhere between 12/8/11 and 1/2/12 - Intermittent high drain without high AOS or reduced deep sleep percentage when on some wifi networks - seems more likely if GPS is used when connected to wifi. Wifi with high AOS/reduced deep sleep is not a kernel problem. This appears to only happen on some firmwares - it happens on XXKI3 but not XWKL1. It is likely connected to a wifi power management bug in some firmwares. A debugging feature in 2/7 and later will allow identification of such firmwares - see http://xdaforums.com/showpost.php?p=22581928&postcount=1777 for details
    • Some people have reported touchkey lights becoming disabled until the screen is turned off and back on again. Under investigation - seems to mainly happen on firmwares with BLN-modded liblights even if the BLN app isn't used
    • Internal and External SD card are swapped in CWM currently
    • Keymap is a little funky in CWM for I9100 users. VolUp/VolDn to move, Power to select is reported to work, but bottom keys are funky. Working on it
    • A few users have reported that when Hellraising I9100 firmwares to I777, they are unable to set up a PIN-lock. If this occurs for I9100 users on their own devices, I need to look into initramfs fixes and this will be my top priority.
    Basic flashing instructions for .tar releases (NOTE - There are currently no releases in this category. These instructions only remain for heimdall+ZIP users:
    (Tested on Linux, not tested MacOS/Windows but should work) Heimdall - Extract the contents of the tar file, enter download mode, and flash with the following command line:
    Code:
    heimdall flash --kernel zImage

    Flashing instructions for .zip releases:
    Flash in CWM, or extract the zImage and use the Heimdall instructions above.

    Please do not ask how to enter download mode or install Heimdall/Odin in this thread - these are basic generic skills anyone flashing custom firmwares on Samsung devices should know and plenty of documentation exists elsewhere. If you really need to ask, use the General forum, or if created, the Q&A forum. I want to try to keep this thread clean and only with bug reports and issues specific to this release, not general HOWTO or troubleshooting posts. Some of the information you need is in jivy26's FAQs thread at http://xdaforums.com/showthread.php?t=1288112 - Reading at least the first post of this thread in its entirety is STRONGLY recommended.

    Bug reports:
    If you have a crash (reboot all the way to Galaxy S I9100 screen), use ADB dump the contents of /proc/last_kmsg and post
    If you have oddball behavior, include a clearly reproducible test case with your report, or use ADB to obtain a dmesg and logcat capturing the odd behavior at the time of error.

    Similar to flashing - using ADB and obtaining last_kmsg, dmesg, and logcat dumps are basic skills that anyone working with custom firmwares on Android devices should have. If you need help with these, do some searching, or post in the General forum or Q&A forum.

    Firmware ("ROM") Developers:
    While I cannot restrict anyone from putting this kernel into a ROM as long as links are given to the github sources for GPL compliance, I request that anyone who includes this kernel in a firmware release does the following out of courtesy:
    Link to this thread
    Clearly indicate in your firmware changelog which Daily Driver kernel release is included in your firmware release whenever you change DD releases - this lets users identify whether a fix is present in the kernel they're using or not

    Kernel Developers:
    Similar to my request for ROM developers, while I can't restrict you from doing anything, I ask as a courtesy that if you cherry-pick my commits, you do the following:
    Please don't rebase my commits into a large multi-feature without consulting me - rebasing related bugfixes together is OK.
    Please try not to implement lots of unrelated features or bugfixes in a single git commit - it makes it hard to reimplement that when Samsung drops new sources or releases a new device

    ALL OF MY RELEASES ARE NAMED BY RELEASE DATE - MMDDYYYY. See the changelog for differences between Experimental (exp) and non-exp versions for days where dual releases are made.
    9
    I'm not going to mess with sched_mc right now as I don't think it'll do anything - that post was my reasoning why. :)

    There's just not much you can do power-management wise as far as multicore scheduling tricks when you only have clock gating available to you (which is the only thing available when the second core is on). Two cores at 50% will have the same consumption as one at 100 and one at 0, for example. If the cores could hit AFTR or LPA this would be different - the 100/0 combo would be better. (Kind of like hotplugging but without the power penalty involved with the actual hotplug event.)

    So screen-on power consumption is likely best handled by advanced GPU clocking (You're way ahead of me there...) and changing the hotplugging logic (Probably some neat tricks to be done here, even after ICS drops).

    Could be different in ICS though. Sammy might add some undocumented idle features. (Idle states of Exynos are COMPLETELY undocumented in the TRM... Other than "we have them"...) See the Tab 7 Plus cpuidle backport - it can hit AFTR far more often now. If there's a way to hit AFTR or LPA when the second core is on - everything changes.

    What I'm thinking of experimenting with is tying the hotplug logic into a governor - bias the hotplug decisions based on frequency and ensure decisions are synced with load. Favor singlecore heavily up to 800 MHz or so, then bias more towards dualcore past this, since the voltage starts climbing more per frequency step past 800.

    Something like this, a version of conservative where, instead of the following logic at 800 MHz:
    If (load > up_threshold) go to 1000

    it would be:
    If (load > up_threshold AND only one core on AND we have multiple threads) hotplug the second core instead of going to 1000.

    Not sure whether there are any good ways to determine if our load is highly multithreaded or single threaded. (This is another thing that may work better on ICS, since it supposedly is more multithreaded.)

    I did not fully read the post and I thought you would implement it. sorry I misunderstood.
    then I will read it now :)

    by the way... why is this thread rated 4?
    as an analogy: there are several contests on tv in my country, mainly singing and talent contests...
    elections of the talent contests takes about 4 times than singing contests which makes me think that there are 4 times more clowns in my country than talents.
    this thread is maybe the most original and development related thread lately and it doesn't get 5 from users which makes me think that there are more "users" (I'm being polite) than developers in this forum.
    anyway.. let's think positive and hope that 4 points will make the noobs stay away.
    8
    Change Log

    The primary change log will be kept in my I777 kernel thread at http://xdaforums.com/showpost.php?p=18129037&postcount=2

    Unless I9100-specific items are implemented, this post will simply indicate which I777 release the kernel corresponds to.
    3/7/2012:
    Corresponds to Daily Driver 3/7/2012

    03/05/2012:
    Corresponds to Daily Driver 3/5/2012

    03/04/2012-B:
    Corresponds to Daily Driver 3/4/2012-B

    03/04/2012:
    Corresponds to Daily Driver 3/4/2012

    03/03/2012-B:
    Corresponds to Daily Driver 3/3/2012-B

    03/03/2012:
    Corresponds to Daily Driver 3/3/2012
    Initial release was bad, that was an I777 build. Reuploaded at 4:22 PM Eastern Standard time on 3/3 - Redownload if you downloaded before that

    3/02/2012:
    Corresponds to Daily Driver 3/02/2012

    2/28/2012:
    Corresponds to Daily Driver 2/28/2012
    IMPORTANT: Internal/External sdcards have been swapped in CWM to be consistent with Android standards!

    2/26/2012:
    Corresponds to Daily Driver 2/26/2012

    Initial release, 02/15/2012:
    I know it's dated 2/15 and not 2/26, because that's when it was built. Thanks to khartaras for indicating that it isn't at least a horrible turd when used on an I9100. ;)
    This release corresponds to the 2/15/2012-C release of I777 Daily Driver
    7
    Here Be Dragons

    This post is for features present in the kernel that are "use at your own risk" - They have either potential or guaranteed negative side effects if used.
    Overclocking (CPU):
    Enable using SetCPU or a similar app
    USE AT YOUR OWN RISK. DO NOT REPORT BUGS OR PROBLEMS IF YOU ARE OVERCLOCKING OR UNDERVOLTING. IF YOU EXPERIENCE ANY STABILITY PROBLEMS, DISABLE ALL OC/UV

    Overclocking (GPU):
    See Ninphetamine kernel for documentation - Same control method
    USE AT YOUR OWN RISK. DO NOT REPORT BUGS OR PROBLEMS IF YOU ARE OVERCLOCKING. IF YOU EXPERIENCE ANY STABILITY PROBLEMS, DISABLE ALL OC

    Per-File fsync() disable:
    This allows you to disable per-file write forced syncs. (e.g. if an app tries to force a write straight to disk, it'll just go to cache). This achieves the same goal as the modded sqlite hacks seen in tweaks such as USAS, however it can be disabled at runtime.

    WARNING: THIS CAN CAUSE DATA LOSS OR CORRUPTION IN A CRASH

    To enable, do the following in a terminal, or add it to an init.d script (look at my ondemand script as an example):
    Code:
    echo "1" > /sys/module/sync/parameters/fsync_disabled

    And to disable (return to the default):
    Code:
    echo "0" > /sys/module/sync/parameters/fsync_disabled
    Good for around 200 points of epeen in the database benchmarks in Antutu or 500-600 points of epeen in Quadrant. Real-world benefit: Probably not worth the data integrity risk, but you've got a choice now.

    Backlight Notifications (BLN):
    This allows the touchkey backlights to be used for notifications. Some stock apps (such as stock MMS) don't support it. Supposedly services.jar mods can change this.

    This WILL drain your battery when a notification is active due to a wakelock that holds deep sleep. Sorry, it's either this or instability for the time being.

    In addition to the BLN control app, the ROM needs a modified liblights file for this to work

    Attached here - Liblights - both BLN-modified (extracted from VillainROM 3.0) and stock I777

    To install, take the file and push it to /system:
    Code:
    adb remount
    adb push <file> /system/lib/hw/lights.SGH-I777.so
    adb chmod 644 /system/lib/hw/lights.SGH-I777.so
    Then reboot

    Note that on a Hellraised ROM, you need to replace SGH-I777 with GT-I9100. This includes manually ported ROMs like Cognition 777

    Like my prerooted system image, this file is compressed using 7-Zip to prevent people from trying to flash it with CWM
    6
    A bit on SCHED_MC/ARM_TOPOLOGY

    One patchset that has been floating around for a while is the ARM_TOPOLOGY/SCHED_MC patchset that is supposed to improve battery life.

    My first few readthroughs of the code didn't lead me to believe that there was that much improvement to be had, so it has been a low priority for a while. I took a further look, and have decided not to implement this patchset.

    First, the background on the topology/sched_mc patches is at https://wiki.linaro.org/WorkingGroups/PowerManagement/Specs/sched_mc

    One important thing to note - Most of the stated goals of ARM_TOPOLOGY are to improve the kernel's awareness of how CPUs are grouped on hyperthreaded/multicore/multipackage systems. The thing is, on systems with simple topologies such as a dualcore system without hyperthreading, ARM_TOPOLOGY is redundant - the kernel already knows there are two cores on a single package that share the same clock.

    So that leaves SCHED_MC - This offers multiple choices for scheduling tasks between two CPUs. The first is a basic load balancer that tries to keep load even between CPUs, and is multipackage/hyperthreading aware. We don't have hyperthreading or multipackage, so this mode offers little to no advantage over the default scheduling methods.

    The second is one that, instead of trying to keep load even, tries to keep load on one core until it is fully loaded, so that the second core can enter deeper IDLE states. The assumption here is - it is better to allow the second core to enter very deep idle states and the other core doesn't idle much at all rather than have both cores at lower loads and not be able to hit the deeper idle states.

    This is where the problem with SCHED_MC on our device lies - When the second core is online, all of the deeper idle states (AFTR, LPA) are locked out. This leaves only basic clock gating (IDLE), which is fairly fine grained. So there is no advantage to asymmetricaly loading the cores so that one can hit deeper idle states, because there are no deeper states to hit when the second core is hotplugged in. See https://github.com/Entropy512/linux_kernel_sgh-i777/blob/master/arch/arm/mach-s5pv310/cpuidle.c#L990 (and also line 1016)

    Based on what I've seen of OMAP4 source code - this is the same on OMAP4 devices like GNex. On OMAP4, deeper idle states can be hit when both cores are online BUT both cores must agree on the idle state - Thus it is better to have the cores similarly loaded (so they can both enter idle) than to have asymmetric load (because one core entering idle will block deeper idle states on the other core, if I am reading the code correctly.) I could be wrong about this on OMAP4 - however I am absolutely positive that deep idle states are blocked on Exynos when the second core is online.

    So this leaves us only with improved hotplugging logic to try and save power - which I'm going to look into once I finish a few other items after PatchADay is complete.

    (And yeah, I know it has proven to not quite be one patch per day - but it has been one patch per release except for reverts and the CWM stuff.)