[Kernel] [froyo] leanKernel: minimalistic kernel, v2.6.0 sense 6/5/11
This is a minimalistic Thunderbolt kernel based on the HTC Incredible S source (vivo-126.96.36.199), then upgraded to 188.8.131.52. Some of the code is backported from latest linux (2.6.39). See FEATURES section for more details on how awesome this is.
SENSE - ALL FROYO ROMS
: stripped down and minimalistic. undervolt/overclock/slots are now controlled by the "speedtweak.sh" script (more info below)
2) special edition
: slightly less lean. Supports in-call recording, and TUN. "speedtweak.sh" script also available.
: lean version with 184Mhz enabled (but locked by default). You may experience battery drain or overheat when you unlock the slot.
SENSE KERNEL DOWNLOADS (ALL ROMS EXCEPT CM7)
, 2) special edition
, 3) 184Mhz
This script will allow you to "transform" your kernel into normal, extreme, 1.92, 1.92X and battsaver versions (ie. it allows you to control speed, voltage, and slots to a certain degree). Once you run the script, everything will be self-explanatory. To run the script:
1) Open Terminal Emulator (install it from market if you don't have it).
2) Type "su" (without quotes) and hit enter.
3) Type "speedtweak.sh" (without quotes) and hit enter.
speedtweak.sh and SetCPU
leanKernel kernel speed tweaker
1) normal: undervolted, overclocked to 1.41Ghz
2) extreme: extremely undervolted, overclocked to 1.41Ghz
3) 1.92: undervolted, overclocked to 1.92Ghz
4) 1.92X: extremely undervolted, overclocked to 1.92Ghz
5) battsaver: extremely undervolted, not overclocked
6) Unlock 184Mhz
7) Lock 184Mhz
8) View current settings
Please type 1, 2, 3, 4, 5, 6, 7, or 8:
The risk of running setcpu is that it can inadvertently override the min and the max that were set by the speedtweak script. (oh it can also override the governor setting but that's not as bad). Other than that it's pretty harmless - it can't mess with the voltage settings. So if you're going to use SetCPU, keep this in mind. One way to make this work is to use SetCPU to configure governor and min/max, and use speedtweak.sh to configure voltage settings. Or just don't use SetCPU.
- Linux Kernel v184.108.40.206. This is many revisions newer than the stock tbolt linux kernel. Majority of kernel code such as memory management, file systems, network, kernel base, etc were mostly completely re-written and are either identical or very similar to latest linux kernel (2.6.39).
- speedtweak.sh script to adjust clock frequencies and voltages.
- Completely reworked on-demand governor (backported from linux-2.6.39-rc2) for better performance and power efficiency.
- Heavily modified/optimized smartass code (based on erasmux's latest git).
- InteractiveX and ondemandX governors! Added my own suspend code to interactive and ondemand code to make the phone lock at low clock speed when screen is off. No need for sleep setcpu profile anymore.
- For 1.92Ghz builds, interactiveX and smartass governors were modified to minimize unnecessary spikes above 1.8Ghz to keep phone stable.
- My kernel tweaks directly applied to kernel and ramdisk via code changes. ie. vm, minfree, etc. No more sysctl and init.d shenanigans!
- No EXT2, TUN, FUSE, YAFFS/2, etc. Stripped down and lean!
- backported 2.6.35 wifi driver which includes low power mode! (idle wifi consumes 50% of power than stock wifi driver). Sense only.
- low # (5-10) of cpufreq slots for simple management and less governer transitions.
- Undervolted *drastically* for longer battery life.
- SWAP and EXT4 enabled.
- Increased readahead buffer.
- init.d enabled in ramdisk
- filesystem speedup in ramdisk
.. a few other small optimizations
BATTERY SAVING TIPS
1) Install one of my kernels, 2) Stay on WIFI as long as possible (ie. avoid 3g/4g as much as possible).
v0.1 - initial beta release (testers are welcome!)
v0.2 - fixed quadrant/linpack scores! (apparently my own overclocking code was kinda lame - borrowed code from richardtrip for now - more changes in the future).
v0.3 - added MD back in (needed for a2sd), undervolted the crap out of it especially lowest frequency which is where your phone spends most of its time, added /tmp tmpfs support, disabled install-recovery so init.d scripts don't run twice.
v0.4 - removed YAFFS/2 (shaved off 2Kbytes), added 460800 clock speed, removed powersave governor.
v0.5 - increased readahead buffer to 1024KB (should improve I/O, especially for sdcard), created lame and 1.92Ghz versions.
v0.6 - Reworked on-demand governor, backported from linux-2.6.39-rc2, which includes massive amount of improvements and fixes.
v0.7 - Added 122880 at 550 VDD for extended battery life. Went back to my own overclock code (for the most part) without losing speed.
v0.71 - fixed a bug preventing the 1.92 version from booting. Cleaned up some overclock code and adjusted VDD a bit on some of the clock speeds. Changed file names which make better sense now.
v0.72 (extreme version only) - got rid of 123Mhz. good riddance! Undervolted some more.
v0.72 (1.92) - fudged around the VDD to stabilize it for difficult phones.
v0.8 - Implemented smartass governor (based on erasmux's latest, optimized code for my kernel), reworked conservative governor (backported from latest linux source), added 1.79Ghz slot for 1.92 version, removed EXT4 until I have a reliable way to convert filesystems, brought back LOGGER until i'm done debugging stuff, more VDD tweaks, and filesystem speedups in ramdisk.
v0.85 - reworked overclock code, tweaked VDD some more to stabilize. added audio & battery tweaks from adrynalyne per popular requests
v0.9 (4/13/11) - removed profiling for extra speed, reworked slab allocator (backported from 2.6.39-rc2), backported 2.6.35 wifi driver (low power mode!), added battsaver version, optimized the heck out of smartass for power efficiency, disabled a couple of debug stuff for smaller kernel, removed performance governor.
v0.92 (4/14/11) - fixed smartass performance (should be close to ondemand now), changed default i/o scheduler to noop and removed other i/o schedulers (even leaner!)
v1.0 (4/15/11) - introducing interactiveX governor (interactive + my own suspend code), heavily optimized smartass code (again), undervolted 1.92X a little more at the top end, removed conservative governor, made interactiveX default, went back to deadline i/o scheduler (was causing issues with 1.92 overclock).
v1.1 (4/18/11) - ondemandX governor (ondemand + my own suspend code to keep phone under 369Mhz when screen is off), modified interactiveX and smartass governors to prevent unnecessary spikes over 1.8Ghz to stabilize my 1.92 builds, extreme/1.92X/battsaver now all share the same VDDs at and below 1024Mhz, OC/UV code re-written again to smooth out transitions and reduce random reboots, and added one more slot to 1.92 builds.
v1.11 (4/19/11) - fixed smartass to suspend properly (ONLY NEED TO UPDATE IF YOU'RE USING SMARTASS).
v1.2.3 (4/27/11) - fixed 1Ghz speed, removed more unnecessary components for leaner kernel, GPU+ patch from CM.
v2.0.0 (5/5/11) - brand new kernel base (2.6.35) - mostly new code. Extreme,battsaver, and 1.92X have an extra slot at 184Mhz/650VDD for better battery life.
v2.0.1 (5/5/11) - extreme, 1.92X and battsaver only. Fixed lowest clock undervolting.
v2.1.0 (5/6/11) - 184Mhz battery draining fixed, flashlight brightness fixed, EXT4 enabled
v2.1.1 (5/8/11) - 184Mhz slot disabled by default (use the enable_lowslot.zip to re-enable it), filesystem speedup in ramdisk, full kernel version names.
v2.2.0 (5/8/11) - revamped governors to possibly improve battery life while on 3g/4g (fingers crossed), brought back readahead buffer tweak from my mecha kernels.
v2.4 (5/10/11) - combined all my kernel flavors into one, speed/voltage can be controlled by speedtweak.sh script, added vdd_levels support (code from snq- via adrenalyn's git), kernel upgraded to 220.127.116.11.
v2.4.1 (5/11/11) - enhanced speedtweak.sh to include governors and show current mode. EXT4 mounting is now enabled for EXT3 partitions. Temporarily added a 246Mhz version until I get in touch with setcpu folks.
v2.4.2 (5/11/11) - fixed 184Mhz (sorry about that)
v2.4.3 (5/11/11) - fixed speedtweak settings not sticking at reboot (sorry about that!!)
v2.4.4 (5/12/11) - made a tiny change to speedtweak script to require you to hit enter before the screen loops back. Purely aesthetics - optional upgrade.
v2.4.6 (5/12/11) - reverted to EXT3, EXT4 was killing quandrant scores. Will bring back EXT4 after more testing.
v2.5 (5/14/11) - reworked interactiveX for better performance and power efficiency, removed 184Mhz from lean version, created a separate 184Mhz version, enhanced speedtweak script (added time-in-state), enhanced filesystem mount options for speed.
v2.5.1 (5/16/11) - reverted interactiveX wake speed, added a setcpu friendly option to speedtweak.sh.
v2.6.0 (6/5/11) - in-call recording added by default, overclock code reworked, interactive/smartass governor tweaked, speedtweak.sh script enhanced.
Uh.... flash the zip in clockworkmod. No need to wipe anything.
First, my take on the governors that are out there: http://forum.xda-developers.com/show...&postcount=617
I offer three governors: interactiveX, ondemandX, and smartass. What are they?
- interactiveX - it's the interactive governor from CM, but I added suspend/wake logic so when the phone screen is off it runs at 246Mhz. Also, I modified its code some more to minimize unnecessary cpu spikes above 1.8Ghz if you happen to be running one of my 1.92 kernels. Most tbolts are unstable above 1.8Ghz, and it's the quick jump above 1.8Ghz that usually locks up the phone. It will hit 1.92Ghz only when it makes sense (ie. sustained high load). This is my favorite governor - perfect combination of speed and power efficiency.
- ondemandX - ondemand governor code from latest linux source *plus* the suspend/wake logic described above, except it has the ability to ramp to 369Mhz while screen is off. No additional code was added for stabilizing above 1.8Ghz.
- smartass - smartass code from erasmux, but I wasn't happy with its performance so I tuned it for quicker ramp up in speed. It has the same suspend/wake logic as ondemandX, and the same >1.8Ghz stabilizing mod as interactiveX.
1) Why 1.41Ghz? - my kernel's 1.41 runs very close to stock voltage at 1Ghz, and with the other frequencies undervolted you should realize longer battery life. If you go any higher, you're going to experience poor battery life since you need to use more juice to support higher frequency. Plus most of you probably can't tell the difference between 1.4 and 1.8.
2) Why release so often? - I try to minimize # of changes to at most 2-3 per release so we can easily pinpoint any benefits or harm my code changes or tweaks made.
3) What is enable_swap.zip and why do i need it? - Flashing the zip will create a 200MB swap file (at next boot) and activate the swapfile on every boot. Completely optional. Read more about it here
Donate to your favorite charity
, or donate to me