[KERNEL] [AOSP] leanKernel: minimalistic kernel (v5.1.0, 11/16/11)

Search This thread

Imoseyon

Recognized Developer
Dec 21, 2010
2,495
8,870
Mountain View, CA
This is a minimalistic Thunderbolt kernel based on the official gingerbread kernel source, patched to 2.6.35.14, and then a bunch of lean mods added (look at feature list below).

DOWNLOADS:
1) lean (normal lean version), 1) 184Mhz (184Mhz can be unlocked via st - note for many people 184Mhz is unstable and cause issues, also supports outgoing call recording)

speedtweak.sh
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.
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:
speedtweak.sh and SetCPU
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. :)

FEATURES
  1. Includes lots of goodies from kernel source (2.6.36.x & 3.x from kernel.org) newer than stock.
  2. speedtweak.sh script to adjust clock frequencies and voltages.
  3. SVS - manual voltage tweaking via /etc/init.d/01vdd_levels
  4. 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.
  5. For 1.92Ghz builds, interactiveX and smartass governors were modified to minimize unnecessary spikes above 1.8Ghz to keep phone stable.
  6. vm, minfree, memory, buffers readahead buffer tweaks
  7. All unnecessary kernel components removed to make kernel lean and fast!
  8. low # (5-10) of cpufreq slots for simple management and less governer transitions.
  9. Undervolted for longer battery life.
  10. SWAP and EXT4 enabled.
  11. Filesystems mounted via EXT4, and tweaked for performance.
  12. init.d enabled in ramdisk
  13. TUN, CIFS, NSIO (netspector) module support
  14. zram (from linux 3.1) module support (to enable, go into Terminal, type su, and then type "zram enable" without quotes). What is zram?
  15. TINY_PREEMPT_RCU.
CHANGELOGS

4.2.0 (10/28/11) - last "stable" kernel based on cm7 source.
5.0.0 (10/29/11) - based on official kernel source from HTC.
5.0.3 (11/1/11) - bluetooth, video playback, scaling frequencies sysfs all fixed. audio levels tweaked. netspector(nsio) module upgraded to 2.0.
5.0.4 (11/13/11) - 5.0.3 with audio levels reverted stock for better compatibility with MIUI (no need to upgrade from 5.0.3)
5.1.0 (11/16/11) - cpufreq and cpuidle updated to linux v3.2rc1, suspend support for LTE, 184mhz version supports in-call recording now (outgoing only).

DIRECTIONS
Uh.... flash the zip in clockworkmod. You may need to wipe Dalvik cache and/or delete /data/misc/dhcp, /data/misc/wifi.

Donate to your favorite charity, or donate to me.
 
Last edited:

Imoseyon

Recognized Developer
Dec 21, 2010
2,495
8,870
Mountain View, CA
GOVERNORS
First, my take on the governors that are out there: http://forum.xda-developers.com/showpost.php?p=13020648&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 below 400Mhz. 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.

Source code
AOSP: https://github.com/imoseyon/leanKernel-tbolt-gingerbread/tree/aosp

AOSP FAQ
  1. Wifi is not working - 1) first make sure you flash kernel via CWR, not kernel manager or rom manager, 3) clear dalvik cache, 2) delete all files in /data/misc/wifi and /data/misc/dhcp, and reboot.
 
Last edited:

jaydizzle333

Senior Member
Sep 10, 2010
76
8
Awesomeness...finally able to boot all the way up...running battsaver...and confirmed camera is working...thank you imoseyon!!!
 

arcanexvi

Senior Member
Aug 22, 2010
1,435
464
Hoffman Estates, IL
This may have fixed the slow charge issues inadvertantly. :) its not in your change log but either this (test2) or 1.3 on jcases build fixed it.

Sent from my ADR6400L using XDA Premium App
 

nerogold

Senior Member
Oct 23, 2010
361
36
ny
This may have fixed the slow charge issues inadvertantly. :) its not in your change log but either this (test2) or 1.3 on jcases build fixed it.

Sent from my ADR6400L using XDA Premium App

This new kernel fixed the slow charge for you or updated jcase gbread rom? I did both and my phone refuses to charge.

Sent from my ADR6400L using XDA Premium App
 

Derrtydozen

Senior Member
Nov 29, 2010
165
8
New Mexico
I don't know if this was posted before, so i apologize if it has;

Here are my questions;

How can having the 184 slot unlocked be worse? (I saw this posted with no explanation in the old thread)

I've used all governors on batt saver and all run smooth as butter, so which will give me best battery life? I understand interactiveX is for performance and efficiency, smartassx and ondemandx are both kinda similar.....

I adjusted the voltage to the lowest values that my phone could handle but my battery life was worse than before.....

Excuse my noobishness :eek:
 

Imoseyon

Recognized Developer
Dec 21, 2010
2,495
8,870
Mountain View, CA
Ok full change logs for v2.5.2test2 sense:

v2.5.3test2 (5/19/11) - fixed BT, backported usb stuff from ace kernel including otg, changed overclock/undervolt to safer values.

gonna work on wifi tethering today.
 

Imoseyon

Recognized Developer
Dec 21, 2010
2,495
8,870
Mountain View, CA
This new kernel fixed the slow charge for you or updated jcase gbread rom? I did both and my phone refuses to charge.

Sent from my ADR6400L using XDA Premium App

That is weird, mine charges fine. I'll try to look at this today.

I don't know if this was posted before, so i apologize if it has;

Here are my questions;

How can having the 184 slot unlocked be worse? (I saw this posted with no explanation in the old thread)

I've used all governors on batt saver and all run smooth as butter, so which will give me best battery life? I understand interactiveX is for performance and efficiency, smartassx and ondemandx are both kinda similar.....

I adjusted the voltage to the lowest values that my phone could handle but my battery life was worse than before.....

Excuse my noobishness :eek:

Sometimes extreme undervolting can do more harm than good. If your phone is not getting enough juice then it can have unpredictable results. Try bumping up voltage to see if it helps.
 

Natef53

Senior Member
Sep 6, 2010
119
14
Boston
Ok full change logs for v2.5.2test2 sense:

v2.5.3test2 (5/19/11) - fixed BT, backported usb stuff from ace kernel including otg, changed overclock/undervolt to safer values.

gonna work on wifi tethering today.

I've been waiting to flash this until the camera and USB issues were sorted out.

The GingerJane thread says "PSCII.apk (chingy) - fixes usb mounting with custom kernels"

...does this mean that I need to flash that file to fix USB mounting or is it already fixed on YOUR v2.5.2test2?
 

Imoseyon

Recognized Developer
Dec 21, 2010
2,495
8,870
Mountain View, CA
I've been waiting to flash this until the camera and USB issues were sorted out.

The GingerJane thread says "PSCII.apk (chingy) - fixes usb mounting with custom kernels"

...does this mean that I need to flash that file to fix USB mounting or is it already fixed on YOUR v2.5.2test2?

So turns out USB mounting wasn't really broken with the kernel. There's some compatibility issues with the leak connect to pc app. You'll need the new PSCII app for usb mounting to work. Both jane and gingeritis should have the new apk now.
 

Natef53

Senior Member
Sep 6, 2010
119
14
Boston
So turns out USB mounting wasn't really broken with the kernel. There's some compatibility issues with the leak connect to pc app. You'll need the new PSCII app for usb mounting to work. Both jane and gingeritis should have the new apk now.

Nice. So install the APK and then reboot and flash the kernal and everything should be good?

How close is the kernal to the stock one in the GB leak? I have been getting decent performance and great battery life, hoping that doesn't change with the new one.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 92
    This is a minimalistic Thunderbolt kernel based on the official gingerbread kernel source, patched to 2.6.35.14, and then a bunch of lean mods added (look at feature list below).

    DOWNLOADS:
    1) lean (normal lean version), 1) 184Mhz (184Mhz can be unlocked via st - note for many people 184Mhz is unstable and cause issues, also supports outgoing call recording)

    speedtweak.sh
    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.
    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:
    speedtweak.sh and SetCPU
    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. :)

    FEATURES
    1. Includes lots of goodies from kernel source (2.6.36.x & 3.x from kernel.org) newer than stock.
    2. speedtweak.sh script to adjust clock frequencies and voltages.
    3. SVS - manual voltage tweaking via /etc/init.d/01vdd_levels
    4. 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.
    5. For 1.92Ghz builds, interactiveX and smartass governors were modified to minimize unnecessary spikes above 1.8Ghz to keep phone stable.
    6. vm, minfree, memory, buffers readahead buffer tweaks
    7. All unnecessary kernel components removed to make kernel lean and fast!
    8. low # (5-10) of cpufreq slots for simple management and less governer transitions.
    9. Undervolted for longer battery life.
    10. SWAP and EXT4 enabled.
    11. Filesystems mounted via EXT4, and tweaked for performance.
    12. init.d enabled in ramdisk
    13. TUN, CIFS, NSIO (netspector) module support
    14. zram (from linux 3.1) module support (to enable, go into Terminal, type su, and then type "zram enable" without quotes). What is zram?
    15. TINY_PREEMPT_RCU.
    CHANGELOGS

    4.2.0 (10/28/11) - last "stable" kernel based on cm7 source.
    5.0.0 (10/29/11) - based on official kernel source from HTC.
    5.0.3 (11/1/11) - bluetooth, video playback, scaling frequencies sysfs all fixed. audio levels tweaked. netspector(nsio) module upgraded to 2.0.
    5.0.4 (11/13/11) - 5.0.3 with audio levels reverted stock for better compatibility with MIUI (no need to upgrade from 5.0.3)
    5.1.0 (11/16/11) - cpufreq and cpuidle updated to linux v3.2rc1, suspend support for LTE, 184mhz version supports in-call recording now (outgoing only).

    DIRECTIONS
    Uh.... flash the zip in clockworkmod. You may need to wipe Dalvik cache and/or delete /data/misc/dhcp, /data/misc/wifi.

    Donate to your favorite charity, or donate to me.
    18
    GOVERNORS
    First, my take on the governors that are out there: http://forum.xda-developers.com/showpost.php?p=13020648&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 below 400Mhz. 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.

    Source code
    AOSP: https://github.com/imoseyon/leanKernel-tbolt-gingerbread/tree/aosp

    AOSP FAQ
    1. Wifi is not working - 1) first make sure you flash kernel via CWR, not kernel manager or rom manager, 3) clear dalvik cache, 2) delete all files in /data/misc/wifi and /data/misc/dhcp, and reboot.
    6
    SENSE v2.5.4test4 (5/22/11) - Fixed a silly bug i introduced when i reworked overclock code, modded battery code to charge FAST until 95% and then slow charge.

    Oh also changed the higher frequencies to even numbers: 1200000, 1400000. Keeping it simple the leanKernel way! (also may resolve some oc/uv issues)

    http://forum.xda-developers.com/showpost.php?p=13940102&postcount=1

    TODO:
    1) look at battery drain issue some more (possibly wifi 11n enable).
    2) work out any remaining kinks with battery and cpufreq code mods.
    3) look into camera/camcorder focus issue

    I'm probably going to take a little break for the rest of the evening. Still a bit under the weather. Happy flashing! :D
    5
    Sweet man! Glad its working for ya! Charging is awesome, but like you said and everyone else, Drain sucks! just wish I knew where to find all the previous GB kernels!! I loved 2.5.4test4, but haven't found anything! stay in touch and let me know (as well as other people reading this) if you guys know where I can find previous Imosey GB Kernels. Thanks for the Thanks Mate! :D

    Ask and you shall receive. I have almost all of his kernels on my computer. This is the 2.5.4test4. enjoy.
    Since IMO's server is down I'll post the 2.8.1test1 kernel as well. I was able to snag it as soon as he posted it.
    4
    Working like a charm right now !!!!

    Imoseyon, YOU DA MAN! BT is back up and running on your sweet new 3.3.3! THANKSYOUTHANKSYOUTHANKSYOU!

    Sweet. Call XDA and tell them to make me a recognized developer! :D