Android OS Forum banner
1 - 20 of 76 Posts

·
Kernel Haxor
Joined
·
1,416 Posts
NOTICE: This is COMPATIBLE with ALL Vivid Rooted Stock and Custom ROMs

For frequency control and voltage adjustments use SystemTuner by 3C or SetCpu

Just a statement regarding kernel source: The Kernel Source is of course covered under GPL version 2. Free software does NOT mean no work or time was spent working on it. I have donated a large sum of my free time to hack this kernel. If you use my modified kernel source in parts or in its entirety, I kindly ask you mention its origins and to send me a github pull request or PM whenever you find bugs or think you can help improve my kernel hack further. This way the entire community will truly benefit from the spirit of open source. Thank you :cool:

Hi RootzWiki members and fellow Vivid users:

This is my nineteenth kernel hack. I want to thank Erasmux, and several others I cannot recall for inspiring me to venture into this unfamiliar territory for me.

What is a Kernel? The Kernel is the Foundation in which everything else builds upon in any software system.
[Car Analogy]: Kernel is like the Engine, Electrical system and the Transmission to a car. The Library, Framework and the Apps [AKA ROM] are the body frame and the rest of the Car.


THIS KERNEL is BASED ON HTC Source Code. So it is COMPATIBLE ONLY WITH HTC ICS Vivid Builds.

Please DO NOT use any task killers, they DO NOT improve performance nor battery life. They INTERFERE with your phone's stability (more crashes) and App compatibilities (Forced Close).


CleanCache (via ZCache backend)

ZCACHE is a new technology I introduced to Vivid Kernel. ZCACHE is a compressed cache similar to ZRAM but the similarity ends there. ZCache is meant to provide as many "cleancache" pages (non-dirty or untouched "virgin" memory) to apps that request for new memory. CleanCache is very easy to allocate and no additional penalty are required to hand them out, so having more CleanCache pages will improve performance. Under heavy memory pressure, often times the kernel will NOT have enough CleanCache pages, so the kernel has to do EXTRA work to reclaim dirty cache pages and clean them for the new apps that's requesting for them. The described process creates a performance hit for the kernel and the app, so the idea is to use compression to create more CleanCache pages available for use. Of course there's a penalty to pay for using compression, but the trade-off between compression penalty and the penalty for reclaiming dirty cache pages and allocating them after cleaning is smaller for compression, so in the end, CleanCache should add more performance.

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.
:D


Joe's RCU (Optimized for Small SMP systems)

Joe Korty has created an RCU for small SMP systems (> 32 cores). His approach is to isolate all the Garbage Collection (GC, a slow time consuming but necessary processing) to a single core, thus allowing other cores to ONLY work on real required processing. This will allow the additional cores to complete their assigned tasks as fast as possible (not bogged down by GC) then immediately go back to a suspended state (saving battery).

Fast No Hz RCU (Optimized for SMP operations)

Fast NoHz is an optimized version of the traditional Tree RCU. Many new kernels are using the Tickless NoHz design. This RCU is tailored and designed to work with the new NoHz kernel system.

SmartAssV2 Governor (Balanced)

This governor has a built-in "profile" similar to SetCPU, so screen off will use lower clock rate thus conserve more battery, but it also has a fast wake up feature so that user interaction will not see the lag when switching from Sleep to Wake state.... (So SetCPU Profiles are sorta redundant when using this governor, you can still use SetCPU to OC to higher than default Clock frequency).

Interactive Governor (Performance)

This governor is designed to put more priority to User Interface (UI aka Apps) tasks, therefore appears more responsive then the traditional OnDemand governor. So if you want the smoothest UI interaction, this governor is for you...

Brain F*ck Scheduler - (BFS)

This scheduler is designed to be simple and speedy tailor specifically for user interface type systems such as desktop/smart phone devices where user interaction is MORE important than serving 1 million web requests (CFS, the default scheduler) at the same time (think of nimble desktop workstations vs large corporate servers).

SLQB - (SLAB allocator with Queue)

This memory allocator is designed for small number of CPUs system (such as desktop or smart phone devices). This allocator is design to be simple and it is optimized for using order-0 pages as much as possible (order-0 pages are the simplest therefore quickest type of memory in a Linux system to allocate). Not all kernels are using SLQB including CM7 main line...

Fair Budget Queue (BFQ I/O scheduler)

This I/O scheduler is an improvement on top of Completely Fair Queue (CFQ). CFQ is fair in terms of time but not in terms of throughput / bandwidth, so BFQ make sure that both time and throughput / bandwidth are balanced across all requests.


Installation Instructions:

Here's a step by step instruction to install this kernel:

****************** Ice Cream Sandwich KERNEL (Android Version 4.0.x) ******************
[ CFS ] (Mainline Edition)
The File ==> N/A (1.73 GHz, GPU @ 266MHz) <==

*** S-OFF Users ***
[ CFS ] (Ultimate Edition - should work with most phones but NOT GUARANTEED!)
The File ==> Vivid Kernel 007 (1.73 GHz, GPU OC @ 320MHz, ZRAM, Intellidemand) <==

*** S-ON Users ***
[ CFS ] (Ultimate Edition - should work with most phones but NOT GUARANTEED!)
The File ==> Vivid Kernel 007 (1.73 GHz, GPU OC @ 320MHz, ZRAM, Intellidemand) <==


Easy Kernel Flasher Instructions:

1. download the above file (via phone directly or to a PC)
2. unzip to a folder then depends on PC or Linux
[ Windows ] open command prompt window and type Flash.bat
[ Linux ] open terminal window and type ./Flash.sh (make sure permission is set to 755 for the Flash.sh)
3. Let the script complete!

Note: After FLASHING, the first reboot may take longer than usual, please be patient... After the first reboot, it may lag during initial load (let everything finish loading). Once everything is loaded and phone is ready for use, reboot the phone a 2nd time and the lag will be gone and everything should be silky smooth... [/b]

[ Advanced Users: ]

[ Optional: ]

[ For Kernel Devlopers ONLY: ]

Optional Under voltage: Version 003+ ONLY

Code:
<br />
[ to over volt ALL frequencies by 25000 uv (microvolts) ]<br />
echo "+25000" > /sys/devices/system/cpu/cpufreq/vdd_table/vdd_levels<br />
[ to under volt ALL frequencies by 25000 uv (microvolts) ]<br />
echo "-25000" > /sys/devices/system/cpu/cpufreq/vdd_table/vdd_levels<br />
<br />
[ to set a specific frequency (ie 1.18 GHz)<br />
  with a specific voltage (ie 1.0875 volts) ]<br />
echo "1188000 1087500" > /sys/devices/system/cpu/cpufreq/vdd_table/vdd_levels<br />
CPU Frequency Voltage Table Example
Code:
<br />
  192000:   812500<br />
  310500:   812500<br />
  384000:   812500<br />
  432000:   812500<br />
  486000:   837500<br />
  540000:   850000<br />
  594000:   862500<br />
  648000:   875000<br />
  702000:   900000<br />
  756000:   925000<br />
  810000:   937500<br />
  864000:   962500<br />
  918000:   962500<br />
  972000:   962500<br />
1026000:   975000<br />
1080000:   987500<br />
1134000:  1000000<br />
1188000:  1012500<br />
1242000:  1025000<br />
1296000:  1050000<br />
1350000:  1075000<br />
1404000:  1100000<br />
1458000:  1112500<br />
1512000:  1125000<br />
1566000:  1150000<br />
Optional: Stock Clock Frequencies for Dual CPUs
Code:
su<br />
echo 192000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq<br />
echo 1188000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq<br />
<br />
echo 1 > /sys/devices/system/cpu/cpu1/cpufreq/online<br />
echo 192000 > /sys/devices/system/cpu/cpu1/cpufreq/scaling_min_freq<br />
echo 1188000 > /sys/devices/system/cpu/cpu1/cpufreq/scaling_max_freq<br />
Optional: ZRAM (Compressed RAM swap space
:D
)

Code:
su<br />
mkswap /dev/block/zram0<br />
swapon /dev/block/zram0<br />


NEWS BULLETIN:

Official ICS Vivid Kernel Version 007 is out!
Enabled Sweep2wake courtesy of showp1984
More intelligent intellidemand!
Free yourselves form mpdecision and thermald. 100% kernel based cpu core management and thermal management!


Please don't hesitate to talk among yourselves and help each other out... The RootzWiki community is what inspired me to hack kernels for everyone since everyone here is nice and helpful to each other... Keep helping each other.... Famous proverb: It's better to give than to receive...

BUGS:

Not All CHIPS ARE CREATED EQUAL

TO DO:

version 1.x.x -- Haven't thought about it yet...

History:

See Post below...

Standard Disclaimer: Not responsible for bricking your phone, voiding your warranty, or any other pain or suffering you may feel as result of using this kernel!!!

My github Complying with GPL and RootzWiki rulez

Follow me on :

If you find this Kernel useful, feel free to hit the [Thanks] button below
 

·
Kernel Haxor
Joined
·
1,416 Posts
Ice Cream Sandwich Kernel (4.0.x) Version History

Version 001 (internal)

Based on Initial HTC ICS source
Patched to mainline 3.0.25 with all conflicts resolved
Added Optimized String/Memcopy libs
Added ARM Optimized SHA, RWSEM libs
Added Global UV interface
Added CPU Overclock (up to 1.73GHz, boots default @ 1.51 GHz)
Lowered Camera Flash Threshold from 30% to 5%
Lowered WiFi voltage driver from 2.9 volts to 2.3 volts
Added Just-in-Time (JIT) compiler for packet filtering (Network optimization)
Added CPU 2nd core control to existing PowerManagement
Patched GPU KGSL drivers to latest CAF open source
Patched Several power drain related issues from CAF
Enabled and Added several drivers in an attempt to enable USB On-The-Go (OTG) / Host capability
Added GPU Overclock to 3D (up to 320 MHz Turbo mode)

Version 002 (Internal)

Added kernel based thermal management driver
Multi-touch fix up from HTC vivid source code
Added kernel CPU screen on/off profiler and 2nd core management
Updated to Linux 3.0.26
Patched Zcache to latest korg version
Enabled CleanCache (Ultimate Edition ONLY)

Version 003 (Short Term Release)

http://faux.androidro.ms/Holiday-EKF-003u-sense.zip

re-introducing Intellidemand CPU governor. Default to 1.51 GHz, in browsing state, it will reduced to 1.08 GHz. In 3D gaming it will run at 1.51 GHz uninhibited. (You should have all CPU profiles disabled by now... )
Patched to kernel.org Linux 3.0.27
included more patches from HTC vivid ICS source
add very cool GRADUAL DIMMING for screen on
included more patches from HTC vivid ICS source
Disabled CleanCache (I found it was causing battery drain and sapping performance due to frequent cache misses.)
Added couple of kernel speed tweaks
Added code fixes from HTC Vivid source
Enabled ZRAM with Google Snappy compression due to popular demand
Fixed stupid power key drop / delay issues
Compiler optimizations and minor tweaks

Version 004 (Short Term Release)

http://faux.androidro.ms/Holiday-EKF-004u-sense.zip

Fixed 2D GPU stuck clock issue reported by users
Oh, Added Sense 4 FrameBuffer compatibility (Thanks to Team Virtuous!)
Major logic tweak to browsing detection for intellidemand to be even smarter and more responsive to gaming demands.
Patched old HTC bluetooth stack to latest CAF baseline
Enabled BT SCO options
Enabled BT RFCOMM options
Intellidemand Governor tweak:
Introducing Smart Core Management :D
Automatic offlining of 2nd CPU core while Screen is ON.
Scenarios:
1- While Screen is ON > 3 min, and average load of the CPU is < 35%, then CPU1 will be taken offline.
2- While Screen is On, if average CPU load > 35%, CPU1 will be Online and both CPUs max frequencies will be limited to 1.13 GHz Max
3- While Screen is On, After both CPUs' Max is limited to 1.13 GHz, when the average CPU load has dropped down to less than < 25%, then both CPUs Max freq will be restored to 1.51 GHz Max (then go back to scenario 1).
-- for 3D Games or GPU intensive apps, both CPUs's max frequencies will be restored to 1.51 GHz and both CPUs will be online.


Version 005 (Short Term Release)

http://faux.androidro.ms/Holiday-EKF-005u-sense.zip

Add battery/charger/vibrator code fix up from Sensation WWE source release
Add htc_sdservice driver from Sensation WWE source release
Add ARM TrustZone debugging
Add mutex protection for Intellidemand (this should eliminate random reboots
)
Minor overclocking code clean up

patched latest CAF HDMI bug fixes
patched latest CAF BT bug fixes
patched latest CAF KGSL bug fixes
Add more debugging for USB OTG

Create more intellidemand tunable parameters via sysfs interface
Fixed minor thermal monitor issues
Applied latest Google's interactive governor patches
Patched OnDemand and Intellidemand's rate sampling transition issue
further tuned intellidemand to be more intelligent

patched to 3.0.28 from kernel.org

Version 006 (Short Term Release)

http://faux.androidro.ms/Vivid-EKF-006u-sense.zip
http://faux.androidro.ms/Vivid-ICS_sense-006u.zip

Added polling ignore kernel interface for Proximity Sensor Calibration App
Added Sense 4 Vibration compatibility hack (courtesy of showp1984)
Added Kernel Timer optimization
Added SMP patch from Google
back ported Android LowMemoryKiller from Mainline Linux 3.4+
back ported Android Binder from Mainline Linux 3.4+
back ported scheduler load balancing optimization from Mainline Linux 3.4+
Patched to mainline Linux 3.0.30
Added latest Google Interactive Governor patches
Added missing cmdline option for Sweep2wake.
Added more KGSL updates from CAF
Added more Bluetooth updates from CAF
Patched potential kernel crash during high memory pressure
Patched latest Google Clean Room Interactive Governor to latest google code
Updated Netfilter from Google master
Added user configurable WiFi sleep policy (PM_MAX or PM_FAST)
Code:
echo "Y" > /sys/module/bcm4329/parameters/wifi_fast (for PM_FAST)<br />
echo "N" > /sys/module/bcm4329/parameters/wifi_fast (for PM_MAX)
(Good for background Wifi performance or Skype users)
patched to mainline 3.0.29
Added optimizations for libs (number conversions)
KANGED sweep2unlock from show-p1984 (so I don't get asked for that feature anymore and be work on something else
)

Version 007 (Current)

Updated to mainline 3.0.33
use generic strnlen_user and strncpy_from_user backported from Linux 3.4+
Added 2 NoHz/Load Balance patches from Linux 3.4+
Updated to the latest CAF BT code base
Reverted 2 load balance patches from 006 (According to original Mainline Author, those 2 patches didn't help)
Fixed USB Gadget Composite corruption issue.
patched to mainline 3.0.32
updated interactive governor to latest Google Mainline
updated USB gadget accessory (added USB Gadget Audio Source support)
Added couple of network fixups from Mainline
 

·
Registered
Joined
·
3 Posts
I had a rooted stock ics, flashed the kernal and now its in a boot loop. occasionally it gets to the upgrading/optimizing apps stage of the boot, but freezes at one then restarts. Any advice?
 

·
Kernel Haxor
Joined
·
1,416 Posts
Discussion Starter · #6 ·
using wild childs ROM i get a boot loop just loads up to the lockscreen then restarts.
How are you guys installing my kernel? Are you using my flash.bat (windows) or flash.sh (Linux)? Everything should be automated...

If you are installing it a different way, you will need to follow the instructions here:

exynos5250x;24326117 said:
1.Rename your thermald/mpdesicion to thermald_ins/mpdesicion_ins
2.Extract boot image from the provided zip.
3.Plug your phone to pc then open cmd, navigate to your /android/sdk/tools
4.then adb reboot bootloader
5.now run "fastboot flash boot boot.img"
6.hit recovery on bootloader menu
7.Extract the bcmdhd.ko from the provided zip to your desktop
8. go back to your open cmd inside /android/sdk/tools.
9.Run 'adb push /users/youruser/Desktop/bcmdhd.ko /system/lib/modules
10.Now adb reboot

You want to do that or just double click a simple noob friendly flash.bat? its your desicion...
 

·
Kernel Haxor
Joined
·
1,416 Posts
Discussion Starter · #8 ·
Kernel 003 Open Beta build 2 is out!

http://faux.androidro.ms/Holiday-EKF-003b2-sense.zip

[ build 2 ]
Updated to Linux 3.0.27

Instructions:

1.Rename your thermald/mpdesicion to thermald_ins/mpdesicion_ins
2.Extract boot image from the provided zip.
3.Plug your phone to pc then open cmd, navigate to your /android/sdk/tools
4.then adb reboot bootloader
5.now run "fastboot flash boot boot.img"
6.hit recovery on bootloader menu
7.Extract the bcmdhd.ko from the provided zip to your desktop
8. go back to your open cmd inside /android/sdk/tools.
9.Run 'adb push /users/youruser/Desktop/bcmdhd.ko /system/lib/modules
10.Now adb reboot

You want to do that or just double click a simple noob friendly flash.bat? its your desicion...
 

·
Developer
Joined
·
735 Posts
Kernel works perfectly, no reboot or bootloops, if your getting these its something wrong on your end...
 
  • Like
Reactions: faux123

·
Registered
Joined
·
3 Posts
The one click flash.bat still does work for me on Windows 7 64-bit after following directions & trying 3 more times with beta2. I'm running pirateghost's Stock Rooted .56 CWM ROM. I can flash everything manually so computer shouldn't be the issue.

1.Rename your thermald/mpdesicion to thermald_ins/mpdesicion_ins
The 2 files I was to rename are these, correct?

/system/etc/thermald.conf
/system/bin/mpdesicion

This is what they should be afterwards, correct?

/system/etc/thermald_ins.conf
/system/bin/mpdesicion_ins

And if it's correctly done, the kernel version now says this, correct?

3.0.27-MSM8660-Faux123-v003+
[email protected] #3
SMP PREEMPT Mon Apr 2 22:22:26 PDT 2012

*Side note- is there any chance that this Kernel has the BLN mod, or changes the factory LED settings to not stop so soon? It really should blink till we check the missed messages/calls/etc. I know there are apps out there, but none work good on this phone, I've tried them all. BLN seems cool, but existing LED would be ok if it just kept flashing. I'm not sure if that's a setting even in the kernel, but wanted to ask.

Thanks!
 

·
Registered
Joined
·
10 Posts
does this work with the ics that was installed with ruu none unlocked bootloader and none rooted ?

or is this work with a coustom rom and rooted / unlocked bootloader phones only ?
 

·
Android Apprentice
Joined
·
47 Posts
does this work with the ics that was installed with ruu none unlocked bootloader and none rooted ?

or is this work with a coustom rom and rooted / unlocked bootloader phones only ?
obviously to install it you would need an unlocked bootloader.....
 

·
Registered
Joined
·
10 Posts
ok
ive been wating to try your rum 4 but have been hesitant to unlock my phone cuz im just learning the android ways and coming from blackberry its a whole new learning cores for me ,

if i did get it unlocked and put the beta 4 on it could this work with it ?
 

·
Android Apprentice
Joined
·
47 Posts
ok
ive been wating to try your rum 4 but have been hesitant to unlock my phone cuz im just learning the android ways and coming from blackberry its a whole new learning cores for me ,

if i did get it unlocked and put the beta 4 on it could this work with it ?
should work fine. i haven't tested it as i currently have my phone out of commission for sense roms for the time being.
 

·
Developer
Joined
·
735 Posts
Its clearly stated in OP that this kernel will work on any ICS Sense rom, unless your running sense 4.0 which needs an animation kernel patch(still u can use it by disabling animations).
 

·
Registered
Joined
·
5 Posts
Hi Faux -

I've been trying to get this to work all day ... followed your instructions, used the batch file [WinXP SP3] ... and no luck ... just looping after
an 'Optimizing Apps' screen ...

Brand new Vivid, Stock ICS ... rooted ... unlocked ... latest Android SDK updates ... latest version of Sync [for the Windows drivers] ...

Any thoughts ?

Thanks in advance,

-doc

PS - I know it's my fault, not yours!
 

·
Kernel Haxor
Joined
·
1,416 Posts
Discussion Starter · #19 ·
Hi Faux -

I've been trying to get this to work all day ... followed your instructions, used the batch file [WinXP SP3] ... and no luck ... just looping after
an 'Optimizing Apps' screen ...

Brand new Vivid, Stock ICS ... rooted ... unlocked ... latest Android SDK updates ... latest version of Sync [for the Windows drivers] ...

Any thoughts ?

Thanks in advance,

-doc

PS - I know it's my fault, not yours!
Try the manual method:

Instructions:

1.Rename your thermald/mpdesicion from /system/bin folder to thermald_dis/mpdesicion_dis
2.Extract boot image from the provided zip.
3.Plug your phone to pc then open cmd, navigate to your /android/sdk/tools
4.then adb reboot bootloader
5.now run "fastboot flash boot boot.img"
6.hit recovery on bootloader menu
7.Extract the bcmdhd.ko from the provided zip to your desktop
8. go back to your open cmd inside /android/sdk/tools.
9.Run 'adb push /users/youruser/Desktop/bcmdhd.ko /system/lib/modules
10.Now adb reboot
 

·
Registered
Joined
·
5 Posts
Thanks for the quick response ... I've done exactly what is listed ... and I get the same result, bootloops ...

A bit of clarification, please: after step 5, should the phone reboot ?

Thanks again,

-doc
 
1 - 20 of 76 Posts
Top