[Kernel][CWM]Fecality I9100 3/7/2012 (GPU Voltage Fix)
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
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.
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)
BFQ I/O scheduler
CIFS module in initramfs
CWM 18.104.22.168 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.)
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.
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://forum.xda-developers.com/show...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:
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://forum.xda-developers.com/show....php?t=1288112 - Reading at least the first post of this thread in its entirety is STRONGLY recommended.
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
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.
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
Corresponds to Daily Driver 3/5/2012
Corresponds to Daily Driver 3/4/2012-B
Corresponds to Daily Driver 3/4/2012
Corresponds to Daily Driver 3/3/2012-B
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
Corresponds to Daily Driver 3/02/2012
Corresponds to Daily Driver 2/28/2012 IMPORTANT: Internal/External sdcards have been swapped in CWM to be consistent with Android standards!
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
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
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):
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
OK, right now this post only has documentation of one "special but safe" feature:
To enable debugging of high deleted_wake_locks time, I've set this up to allow wake_lock_destroy() to be debugged without enabling DEBUG_WAKE_LOCK (which spams dmesg with a ton of stuff not needed for wake_lock_destroy() debugging). To enable, add 32 to the value of /sys/module/wakelock/parameters/debug_mask - This defaults to 3, so the proper value is 35.
Q: I installed this and still don't have root?
A: I keep a clean initramfs. There are NO tweak scripts in it, and no autoinjection scripts. To root your device, flash one of ChainsDD's Superuser packages in CWM
Q: I don't like the default I/O governor, why is it this way?
A: Clean initramfs (if you need to flash a kernel cleaner script after my kernel, I have failed or an app cluttered up your init.d) - If you want to change the default governor and tune the filesystem, see my init.d scripts thread.
Q: Why is it so laggy by default?
A: I don't believe in having half my patches tuning default values of things the user can change. In addition, as stated above - battery life is valued over performance, so default governor settings will be biased towards battery. My personal recommendation if you wish to increase performance (at the cost of battery life) is to drop the sample_rate for the conservative governor using SetCPU or a similar tool - this will significantly improve performance. It provides nearly all of the benefits of the original "lionheart" without allowing the sample_rate to go dangerously low. In a future release I'm going to drop the minimum a little bit more.
Q: Something went wrong. I'm using some stupid comprehensive tweakscript. Y U NO FIX?
A: I will not support anyone who is using a comprehensive tweak script (Thunderbolt, V6 Supercharger, etc. - ESPECIALLY V6 Supercharger, as its developer has multiple times in the past put in dangerous tuning options. For example, he disabled the panic reboot timeout, which combined with Samsung's ****ty wifi driver on the Tab 7 Plus, led to multiple Tabs draining their battery all the way to the battery's failsafe cutoff.) If a specific individual tweak causes a problem, let me know - but you'd better know EXACTLY which tweak it is. In addition to the above issues with V6SC, many "tweak scripts" achieve their goals by trading filesystem integrity for performance, and irresponsibly don't warn the user about this fact. See, for example, the fsync disable feature above - it's dangerous, but don't say I didn't warn you it was.
Q: What voltages do you use?
A: This is irrelevant. Every device is different, if a given set of voltages worked on all devices, Samsung would've made it stock. I will report any discussion of voltage recommendations to the moderator for cluttering the thread. If you're undervolting, you need to take responsibility and do it on your own.
Q: Why don't you support AOSP firmwares (CM7, etc.)?
A: I know that the CM team frowns upon alternate kernels as it makes their testing job more difficult. Similarly, supporting too many firmware bases makes my job more difficult. Out of respect for the skills of codeworkx and atinm, I will not release kernels that could make their life harder. I periodically give them the heads-up on patches that I think are important though.
Q: What's with the toilet humor of the name?
A: Long ago in the Infuse community, there was a person (lemons) that was starting to do some smali hacks (camera modding and such), and was planning on eventually releasing a ROM. He was a pretty good guy, and had lots of potential. He and others joked that since it was his first attempt, it should be called ****ROM. Sadly, lemons never followed through and just disappeared, so for months, ****ROM never became a reality. Eventually it was realized in the form of a deodexing/porting/basic modding guide for I777 users at http://forum.xda-developers.com/show....php?t=1505685. In addition - I hate hype and marketing, better to set expectations low and let the code prove itself on its own merits. Since I'm blind-developing, I can't just say it's my daily driver because in this case, I am unfortunately not eating my own dogfood.
Q: Why don't you base on 22.214.171.124?
A: That would be my Experimental series. It's temporarily on hold for a variety of reasons but will return once I finish reimplementing some patches. The great thing about git branching is I've been able to maintain .7 and .14 trees simultaneously with ease.
Q: Sometimes my touchscreen is unresponsive right after a wakeup, why?
A: It seems, based on reports from khartras and teiglin, that TouchScreenTuner does not play well with the I777 touchscreen drivers. I'm not sure if it's even necessary with them - in the months since October, the only time I have ever received touchscreen complaints from I777 users was when running I9100 update3 touchscreen drivers. TST may just be working around broken drivers...
XDA Developer TV Producer Kevin wants to help make your … more
XDA Developers was founded by developers, for developers. It is now a valuable resource for people who want to make the most of their mobile devices, from customizing the look and feel to adding new functionality. Are you a developer?