[KERNEL][S4][SENSE][4.0.4] Fusion Ultimate v2.1 | CPU Settings Fixed! | (9/2/12)

Search This thread

klin1344

Senior Member
Nov 11, 2011
3,486
5,611
Fusion Ultimate Kernel for all Sense-based 4.0.4 ROMs (Yes, including ViperOneS)
Latest Version: v2.1 (9/2/12)


Disclaimer:
Code:
#include 
/*
 * Your warranty is now void.
 *
 * I am not responsible for bricked devices, dead SD cards,
 * thermonuclear war, or you getting fired because the alarm app failed.  
 * YOU are choosing to make these modifications, and if
 * you point the finger at me for messing up your device, I will laugh at you. :P
 * blah blah blah you get the point.
 */

This kernel is built from the new HTC RUU 2.31 kernel sources, which means it's compatible with any Sense 4.0.4 ROM (including ViperOneS). This is the kernel everybody has been asking for!! :victory:



CPU settings now stick! Use SetCPU for CPU settings and System Tuner for voltage settings. The settings WILL stick!



Features

  • init.d scripts support
  • CPU frequency control from 192Mhz 1.89Ghz
  • voltage control (use System Tuner Lite/Pro)
  • SmartassV2, Interactive, Conservative, LagFree, Lionheart, Brazilianwax, Intellidemand, Interactivex, SavagedZen, Smartass(V1) CPU governors added
  • Simple IO (SIO) and V(R) scheduler added
  • capacitive LED lights dimmed to 2mA
  • improved media scanning times (increased readahead buffer)
  • good multitasking
  • enabled zRam
  • greatly improved I/O performance (disabled fsync() )
  • overall good battery life and performance
  • XZ kernel compression
  • optimized and tweaked
  • much more; check the changlog or my GitHub if you want to know the specifics




Downloads

All downloads are HERE




How to Install

For hboot 1.09 and below:


1. Download the .7z package.
2. In it you will see a "stock" and an "overclock folder". Extract the boot-xxxxxx.zip you want.
3. Then flash the zip in TWRP recovery. It will automatically flash the boot.img for you.


For hboot 1.13 and up:

1. Download the .7z package.
2. In it you will see a "stock" and an "overclock folder". Extract the boot-xxxxxx.zip you want.
3. You have two options:

Option #1
Use TWRP's HTC Dumlock feature. It is a pretty neat workaround that allows you to flash boot.imgs in recovery even on a higher hboot.
Look here for instructions from TeamWin. If you are not comfortable with this method, then follow option #2 to manually flash in fastboot.

Option #2
In addition to flashing the zip, you will have to extract the boot.img from the package and flash it manually with fastboot. Blame HTC for the half-assed 'unlock bootloader' offering they give us. Hopefully we will get S-OFF soon...
Code:
adb reboot bootloader
fastboot flash boot boot.img
fastboot erase cache
fastboot reboot
Look here for a guide.



Sources
kernel: https://github.com/klin1344/kernel_ville_2.21




Enjoy :)
 
Last edited:

klin1344

Senior Member
Nov 11, 2011
3,486
5,611
Changelog/Complete Feature List

Changelog

v1.0 (Initial Release 8/24/12)
  • based on HTC RUU 2.21 kernel source code
  • overclock and stock options
  • enabled overclocking up to 1.89Ghz
  • added CPU 192Mhz step
  • added LionHeart, Conservative, Interactive, LagFree, and SmartassV2 CPUfreq governors
  • implemented adjustable voltage table via sysfs and allow controlling through CPU apps
  • tweaked CPUfreq governors
  • disabled GENTLE_FAIR_SLEEPERS
  • disabled fsync() calls
  • added vR and SIO schedulers
  • adjusted VM ratios
  • enabled zRam
  • compiled with NEON and Snapdragon optimizations
  • reduced capacitive LED lights to 2mA
  • increased readahead buffer
  • much more...


v2.0 (9/1/12)
  • added BrazilianWax, Intellidemand, InteractiveX, SavagedZen, and Smartass (V1) governors
  • XZ kernel compression
  • optimized SmartassV2 CPU governor
  • tun.ko and cifs.ko now built into kernel
  • tweaked deadline I/O scheduler for better performance
  • make kernel use AC charging mode for unknown chargers
  • various lowmemorykiller fixes
  • fixed and tweaked a few other things


v2.1 (9/2/12)
  • updated to the latest HTC RUU 2.31 kernel sources
  • includes many performance and stability changes
 
Last edited:

klin1344

Senior Member
Nov 11, 2011
3,486
5,611
FAQ

Frequently Asked Questions​

What ROMs is this kernel compatible with?

As stated in the OP, this kernel is compatible with all S4 devices running a 4.0.4 Sense-based ROM. It is 100% compatible with ViperOneS even though that uses the 2.31 RUU base. I'm betting that there were no changes in the kernel source for 2.21 and 2.31. :p


What is the best governor for me to use?

It really depends on what you're looking for. If you want performance, go with Lionheart or Ondemand. If you want battery life, go with Conservative. And if you are looking for a balance between battery life and performance, then use either SmartassV2, Interactive, or LagFree. These are just my opinions. Look here for a great reference of all the CPU governors. Test them out and decide which works best for you.


Which I/O scheduler is the best?

I personally use SIO, but you can test and decide which is the best for you. Read here to find the pros and cons of each one.


How do I overclock?

The kernel should default at 192Mhz 1.5Ghz CPU clocks. To overclock, use SetCPU, No-Frills CPU, System Tuner Lite/Pro, or any similar CPU control app. Some apps don't allow the settings to stick properly. I recommend using No-Frills or System Tuner.

CPU govenors won't stick/CPU0 stuck at max frequency????

Yes, that is a known issue with the non-default governors. I have worked hard on a fix, but I still can't figure out the problem. So basically, if you want to use a governor other than the defaults ones from a stock kernel, make sure you check up on it and make sure the settings stuck and CPU0 isn't locked at max frequency.


How do I undervolt?

Right now, the only app that works for voltage control is System Tuner. Both the Lite and Pro versions allow you to change the voltages. Do not use SetCPU as it doesn't work.
Here is the voltage table I am currently using:
Code:
1890mhz: 1250 mV
1809mhz: 1225 mV
1728mhz: 1200 mV
1674mhz: 1175 mV
1512mhz: 1150 mV
1458mhz: 1137 mV
1404mhz: 1125 mV
1350mhz: 1125 mV
1296mhz: 1100 mV
1242mhz: 1100 mV
1188mhz: 1075 mV
1134mhz: 1075 mV
1080mhz: 1025 mV
1026mhz: 1000 mV
972mhz: 1000 mV
918mhz: 975 mV
864mhz: 975 mV
810mhz: 950 mV
756mhz: 950 mV
702mhz: 900 mV
648mhz: 900 mV
594mhz: 875 mV
540mhz: 850 mV
486mhz: 800 mV
384mhz: 725 mV
192mhz: 650 mV
Please just take these as a grain of salt; not all chips are created equal! Some devices can become an ass when it comes to undervolting, while others can starve the CPU to death and still run fine. Experiment little by little until you find your perfect voltages.


What is zRam and how does it work?

Originally Posted by faux123
ZRAM (aka CompCache aka RAMZSwap)

ZRAM is an updated version formally known as CompCache and RAMZSwap. It was originally designed for 2.6.38.xx kernels, I have backported to our 2.6.35.xx kernel. ZRAM allows real-time compression of memory objects in RAM thus reducing memory pressure for the Linux kernel and can keep more apps in memory longer (more apps in RAM == better performance, less fetching from slower MMC or SDCard). Compression, however, is not Free. Some CPU cycles are required to do the compress/decompression, so there's a slight penalty for it. The original CompCache / RAMZSwap required a user space binary to control its behavior which adds additional penalty to performance, but the new version ZRAM eliminated the need for a separate dedicated daemon, thus reducing the overhead and increased performance from the old CompCache by 20%. Therefore, with the newer implementation of ZRAM interface, the performance penalty is almost negligible.


 
Last edited:

Raptylos

Senior Member
Feb 24, 2008
270
133
I installed it on Viper as well. UV settings were applied as set on 3.2 for 4.0.3 kernel.
I'll report back
 

mteezey

Senior Member
Oct 24, 2011
1,333
744
Detroit
Nice job. I didn't think this Rom could get any better. I haven't even oc or uv yet and I can feel a big difference. Curious to see how it effects battery life.

Sent from my ViperOneS using Tapatalk 2
 
Last edited:

SnowToad

Senior Member
Jun 11, 2010
114
7
Seems to work OK on Viper, however still having problems with Smartass as on Axiom... config folder in sys/devices/system/cpu/cpufreq is sometimes not created (no smartass folder) or randomly gets deleted, so CPU0 gets locked at max freq
 
  • Like
Reactions: klin1344

klin1344

Senior Member
Nov 11, 2011
3,486
5,611
Seems to work OK on Viper, however still having problems with Smartass as on Axiom... config folder in sys/devices/system/cpu/cpufreq is sometimes not created (no smartass folder) or randomly gets deleted, so CPU0 gets locked at max freq

Ahh...so that is the source of the issue. I will have to take a look at my code then. Also, it seems to happen regardless of any governor, especially during the first few minutes after startup.

Sent from my HTC One S using Tapatalk 2
 
  • Like
Reactions: Elloco305
G

GuestX0019

Guest
runs fine here klin

smartass folder created on reboot

smoooth

will test for a couple days
 

SnowToad

Senior Member
Jun 11, 2010
114
7
Set to smartass, rebooted, folders were there and worked fine.. but then randomly the whole folder was deleted again and cpu is locked at max all the time. Would like smartass working!
 
G

GuestX0019

Guest
same here--ok

flashed thru fastboot and erased cache

then rebooted
 

klin1344

Senior Member
Nov 11, 2011
3,486
5,611
Hmm...I think the issue with smartassv2 is only with the first few minutes of booting. After that, it seems to work fine and not only stick to 1.5Ghz. Can anyone confirm?
 

Top Liked Posts

  • There are no posts matching your filters.
  • 41
    Fusion Ultimate Kernel for all Sense-based 4.0.4 ROMs (Yes, including ViperOneS)
    Latest Version: v2.1 (9/2/12)


    Disclaimer:
    Code:
    #include 
    /*
     * Your warranty is now void.
     *
     * I am not responsible for bricked devices, dead SD cards,
     * thermonuclear war, or you getting fired because the alarm app failed.  
     * YOU are choosing to make these modifications, and if
     * you point the finger at me for messing up your device, I will laugh at you. :P
     * blah blah blah you get the point.
     */

    This kernel is built from the new HTC RUU 2.31 kernel sources, which means it's compatible with any Sense 4.0.4 ROM (including ViperOneS). This is the kernel everybody has been asking for!! :victory:



    CPU settings now stick! Use SetCPU for CPU settings and System Tuner for voltage settings. The settings WILL stick!



    Features

    • init.d scripts support
    • CPU frequency control from 192Mhz 1.89Ghz
    • voltage control (use System Tuner Lite/Pro)
    • SmartassV2, Interactive, Conservative, LagFree, Lionheart, Brazilianwax, Intellidemand, Interactivex, SavagedZen, Smartass(V1) CPU governors added
    • Simple IO (SIO) and V(R) scheduler added
    • capacitive LED lights dimmed to 2mA
    • improved media scanning times (increased readahead buffer)
    • good multitasking
    • enabled zRam
    • greatly improved I/O performance (disabled fsync() )
    • overall good battery life and performance
    • XZ kernel compression
    • optimized and tweaked
    • much more; check the changlog or my GitHub if you want to know the specifics




    Downloads

    All downloads are HERE




    How to Install

    For hboot 1.09 and below:


    1. Download the .7z package.
    2. In it you will see a "stock" and an "overclock folder". Extract the boot-xxxxxx.zip you want.
    3. Then flash the zip in TWRP recovery. It will automatically flash the boot.img for you.


    For hboot 1.13 and up:

    1. Download the .7z package.
    2. In it you will see a "stock" and an "overclock folder". Extract the boot-xxxxxx.zip you want.
    3. You have two options:

    Option #1
    Use TWRP's HTC Dumlock feature. It is a pretty neat workaround that allows you to flash boot.imgs in recovery even on a higher hboot.
    Look here for instructions from TeamWin. If you are not comfortable with this method, then follow option #2 to manually flash in fastboot.

    Option #2
    In addition to flashing the zip, you will have to extract the boot.img from the package and flash it manually with fastboot. Blame HTC for the half-assed 'unlock bootloader' offering they give us. Hopefully we will get S-OFF soon...
    Code:
    adb reboot bootloader
    fastboot flash boot boot.img
    fastboot erase cache
    fastboot reboot
    Look here for a guide.



    Sources
    kernel: https://github.com/klin1344/kernel_ville_2.21




    Enjoy :)
    18
    Changelog/Complete Feature List

    Changelog

    v1.0 (Initial Release 8/24/12)
    • based on HTC RUU 2.21 kernel source code
    • overclock and stock options
    • enabled overclocking up to 1.89Ghz
    • added CPU 192Mhz step
    • added LionHeart, Conservative, Interactive, LagFree, and SmartassV2 CPUfreq governors
    • implemented adjustable voltage table via sysfs and allow controlling through CPU apps
    • tweaked CPUfreq governors
    • disabled GENTLE_FAIR_SLEEPERS
    • disabled fsync() calls
    • added vR and SIO schedulers
    • adjusted VM ratios
    • enabled zRam
    • compiled with NEON and Snapdragon optimizations
    • reduced capacitive LED lights to 2mA
    • increased readahead buffer
    • much more...


    v2.0 (9/1/12)
    • added BrazilianWax, Intellidemand, InteractiveX, SavagedZen, and Smartass (V1) governors
    • XZ kernel compression
    • optimized SmartassV2 CPU governor
    • tun.ko and cifs.ko now built into kernel
    • tweaked deadline I/O scheduler for better performance
    • make kernel use AC charging mode for unknown chargers
    • various lowmemorykiller fixes
    • fixed and tweaked a few other things


    v2.1 (9/2/12)
    • updated to the latest HTC RUU 2.31 kernel sources
    • includes many performance and stability changes
    8
    FAQ

    Frequently Asked Questions​

    What ROMs is this kernel compatible with?

    As stated in the OP, this kernel is compatible with all S4 devices running a 4.0.4 Sense-based ROM. It is 100% compatible with ViperOneS even though that uses the 2.31 RUU base. I'm betting that there were no changes in the kernel source for 2.21 and 2.31. :p


    What is the best governor for me to use?

    It really depends on what you're looking for. If you want performance, go with Lionheart or Ondemand. If you want battery life, go with Conservative. And if you are looking for a balance between battery life and performance, then use either SmartassV2, Interactive, or LagFree. These are just my opinions. Look here for a great reference of all the CPU governors. Test them out and decide which works best for you.


    Which I/O scheduler is the best?

    I personally use SIO, but you can test and decide which is the best for you. Read here to find the pros and cons of each one.


    How do I overclock?

    The kernel should default at 192Mhz 1.5Ghz CPU clocks. To overclock, use SetCPU, No-Frills CPU, System Tuner Lite/Pro, or any similar CPU control app. Some apps don't allow the settings to stick properly. I recommend using No-Frills or System Tuner.

    CPU govenors won't stick/CPU0 stuck at max frequency????

    Yes, that is a known issue with the non-default governors. I have worked hard on a fix, but I still can't figure out the problem. So basically, if you want to use a governor other than the defaults ones from a stock kernel, make sure you check up on it and make sure the settings stuck and CPU0 isn't locked at max frequency.


    How do I undervolt?

    Right now, the only app that works for voltage control is System Tuner. Both the Lite and Pro versions allow you to change the voltages. Do not use SetCPU as it doesn't work.
    Here is the voltage table I am currently using:
    Code:
    1890mhz: 1250 mV
    1809mhz: 1225 mV
    1728mhz: 1200 mV
    1674mhz: 1175 mV
    1512mhz: 1150 mV
    1458mhz: 1137 mV
    1404mhz: 1125 mV
    1350mhz: 1125 mV
    1296mhz: 1100 mV
    1242mhz: 1100 mV
    1188mhz: 1075 mV
    1134mhz: 1075 mV
    1080mhz: 1025 mV
    1026mhz: 1000 mV
    972mhz: 1000 mV
    918mhz: 975 mV
    864mhz: 975 mV
    810mhz: 950 mV
    756mhz: 950 mV
    702mhz: 900 mV
    648mhz: 900 mV
    594mhz: 875 mV
    540mhz: 850 mV
    486mhz: 800 mV
    384mhz: 725 mV
    192mhz: 650 mV
    Please just take these as a grain of salt; not all chips are created equal! Some devices can become an ass when it comes to undervolting, while others can starve the CPU to death and still run fine. Experiment little by little until you find your perfect voltages.


    What is zRam and how does it work?

    Originally Posted by faux123
    ZRAM (aka CompCache aka RAMZSwap)

    ZRAM is an updated version formally known as CompCache and RAMZSwap. It was originally designed for 2.6.38.xx kernels, I have backported to our 2.6.35.xx kernel. ZRAM allows real-time compression of memory objects in RAM thus reducing memory pressure for the Linux kernel and can keep more apps in memory longer (more apps in RAM == better performance, less fetching from slower MMC or SDCard). Compression, however, is not Free. Some CPU cycles are required to do the compress/decompression, so there's a slight penalty for it. The original CompCache / RAMZSwap required a user space binary to control its behavior which adds additional penalty to performance, but the new version ZRAM eliminated the need for a separate dedicated daemon, thus reducing the overhead and increased performance from the old CompCache by 20%. Therefore, with the newer implementation of ZRAM interface, the performance penalty is almost negligible.


    7
    need this too..
    6
    Updated to v2.0. See OP for details.

    Directly from FAQ:

    CPU govenors won't stick/CPU0 stuck at max frequency????

    Yes, that is a known issue with the non-default governors. I have worked hard on a fix, but I still can't figure out the problem. So basically, if you want to use a governor other than the defaults ones from a stock kernel, make sure you check up on it and make sure the settings stuck and CPU0 isn't locked at max frequency.