[Kernel]ICS,CM9/CM7(v004b1/v029)OC~1.73GHz/UV/True Dual Core/Power Savings[Apr-14]

faux123

Senior Member
Dec 16, 2010
8,536
34,426
113
West Los Angeles
www.canonspike.com
NOTICE: This is COMPATIBLE with ALL AOSP/CM7/CM9/OpenSense Based ROMs
(Thanks to Albinoman887, scorp2kk, intervigilium and vorbeth for pull requests and contributions.)

For frequency control use fauxclock from Google Play

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 XDA members and fellow Sensation users:

This is my eleventh kernel hack. I want to thank Cyanogen, CyanogenMod members, 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 CM7 Source Code. So it is COMPATIBLE ONLY WITH CM7/AOSP Sensation 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).


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 (Android 4.0.x) ***************
<< Fast NoHz >>
[ CFS-OnDemand ] (Mainline Edition)
The File ==> Latest AOSP Sensation Kernel (1.73 GHz) <==

*************** GINGERBREAD (Android 2.3.x) ***************
<< Fast NoHz >>
[ CFS-OnDemand ] (Mainline Edition)
The File ==> Sensation Kernel 029 (1.73 GHz) <==

[ CFS-OnDemand ] (Extreme Edition :eek: -- Should work with most phones but NOT GUARANTEED!)
The File ==> Sensation Kernel 029 (1.73 GHz, ZCACHE, GPU @ 320 MHz) <==

[ Optional: ]

The File ==> Modified Sensation Thermal Throttler Configuration <==



Optional Under voltage: Version 0.1.4+ ONLY
Code:
[ to over volt ALL frequencies by 25000 uv (microvolts) ]
echo "+25000" > /sys/devices/system/cpu/cpufreq/vdd_table/vdd_levels
[ to under volt ALL frequencies by 25000 uv (microvolts) ]
echo "-25000" > /sys/devices/system/cpu/cpufreq/vdd_table/vdd_levels

[ to set a specific frequency (ie 1.18 GHz) 
  with a specific voltage (ie 1.0875 volts) ]
echo "1188000 1087500" > /sys/devices/system/cpu/cpufreq/vdd_table/vdd_levels
CPU Frequency Voltage Table
Code:
  192000:   812500
  310500:   812500
  384000:   812500
  432000:   812500
  486000:   837500
  540000:   850000
  594000:   862500
  648000:   875000
  702000:   900000
  756000:   925000
  810000:   937500
  864000:   962500
  918000:   962500
  972000:   962500
 1026000:   975000
 1080000:   987500
 1134000:  1000000
 1188000:  1012500
 1242000:  1025000
 1296000:  1050000
 1350000:  1075000
 1404000:  1100000
 1458000:  1112500
 1512000:  1125000
 1566000:  1150000
Low Voltage - Under Volt the processor, therefore uses Less Battery, but NOT ALL CHIPS can handle Under Volt.. If you experience instability, try the Stock Voltage Version.

Stock Voltage - Uses the voltage values from ORIGINAL HTC Kernel Source.

There are NO PERFORMANCE DIFFERENCE between the Under Volted and Stock Voltage versions!


1. download the above file (via phone directly or to a PC)
2. copy the downloaded zip file to /sdcard/download/
3. Open ROM Manager and select "Reboot into Recovery" and select "OK"
4. Once in recovery, select "wipe cache partition", select "Yes", then select "advanced", then select "Wipe Dalvik Cache", then select "Yes" again. Once finished, click the back button to go back to the main recovery menu. On that menu, select "Install Zip From SDCad", then select "Choose zip from SDCard", then go to /sdcard/download and select the downloaded zip file and let it run its script.
5. Once the script is done, select "reboot system now"

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


NEWS BULLETIN:

Version 001 for AOSP/CM9/OpenSense is out! Major thanks to all those who worked on OpenSense device tree! Version 029 is OUT for GB!

Please don't hesitate to talk among yourselves and help each other out... The XDA 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 :D

Follow me on :

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

Attachments

Last edited:

faux123

Senior Member
Dec 16, 2010
8,536
34,426
113
West Los Angeles
www.canonspike.com
Version History

Version 012 (deprecated)

- EXT 4 Support, CIFS + UTF-8 (NLS Support)
- Kineto_gan Support (WiFi Calling)
- BFQ I/O Scheduler default
- TUN VPN support added
- SLQB memory allocator added and made default
- BFQ I/O scheduler added and made default
- Added NEON and other Snapdragon Compiler optimizations
- Patched kernel to version 2.6.35.14
- Tweaked Voltage Table for more stability
- Allowed unaligned memory access
- Reverted CPU Clock Table back to CAF version
- OC up to 1.512 GHz CAF Fast Version
- Added CAF Patches to msm/cpufreq
- OC CPU up to 1.782 GHz, L2 Cache up to 1.512 GHz
- Added CAF Patch to force max frequency for all cores via sysfs mfreq
- Added Bluetooth BNEP support
- Introducing Synchronous L2 Cache (1.56 GHz version ONLY)
- Introducing L2 Cache Bandwidth Boost (from max 310MHz to 360MHz)
- CAF Patch msm: acpuclock: Subscribe to _FROZEN CPU notifiers
- CAF Patch msm: pm-8x60: Remove redundant code for restoring ACPU Clock Rate
- CAF Patch msm: acpuclock-8x60: Use hotplug notifications for CPU, L2, BUS, voltage
- Added back Scaling_Available_Frequecies sysfs entries (For Mike1986 and other ROM devs)
- Introducing GPU 2D/3D Overclocking <img src="http://rootzwiki.com/public/style_emoticons/default/biggrin.png" class="bbc_emoticon" alt=":D">
- 3D Engine from 266.6 MHz to 320 MHz (both versions will benefit from this boost)
- Fast NoHz RCU (An RCU designed for Tickless kernel, which is our kernel)
- CAF msm: clock-8x60: Refresh PDM and TSSC halt bits at boot (Bug Fix)
- CAF msm: 8660: Add barriers to SMP boot code (Stability patch)
- CAF msm: clock-local: Add memory barriers for later move to _relaxed accessors (Stability patch)
- CAF ARM: SMP: Make resched-ipi-while-offline warning less verbose (Slight performance tweak)
- CAF msm: clock-8x60: Vote for mmfpb_a_clk at 64MHz (Bug fix)
- CAF mmc: core: put eMMC in sleep (cmd5) mode before suspend (Power Saving)
- CAF msm: clock-8x60: Don't disable clocks in reg_init (Bug fix)

Version 014 (deprecated, CM7 Alpha1 ONLY)

-Introducing Global CPU Voltage Table (Under volt capability via sysfs interface, inspired by snq adapted for Snapdragon Dual-Core by me )

Version 019 (deprecated, CM7 Alpha2+)

Applied many FrameBuffer patches from CAF
Applied couple more KGSL patches from CAF
Revenge of CFS, CFS Enhancement ;) (Interactive latency greatly reduced, make it BFS like)
Applied many FrameBuffer patches from CAF yet again
Added New Early suspend drivers for 2D and 3D GPU engines
Re-Enabled KGSL Ringbuffer Power Management Overrides
Updated to JHash3
Updated Cpufreq to copy policy from siblings
Fixed memory leak in cpufreq stats
Removed CPU from NoHz Idle fair cgroup
Shorten 1080P start up latency
Fixed USB Gadget Serial Crash
Applied more MSM FrameBuffer updates from CAF
Fixed random SPI Operational State Invalid error
Added histogram capability for MSM video
Added lock/unlock for KGSL Early Suspend Drivers
Updated KGSL power level change
Revert Reg Init Patch from earlier (cause of instability)
Optimized memcpy and memmove for string library calls (real working version ;) )
fixed audio unmapped memory crash
fixed inaccurate D-Cache size Macro

Version 020 (deprecated, CM7 Alpha2+)

CFS Autogroup Version 2.0 (Super Charged CFS)
Fixed Kernel/Timekeeping issue
Fixed Full / Stretched Screen issue for Video Player
Patched FB and KGSL
Fixed Random Reboot issue (took me a week to verify this fix)
Revenge of JRCU ;) (JRCU tweaked for better performance and battery savings)
Removed ALWAYS ON ADM Clock to save battery
Moved Data Mover to early suspend for cleaner exit

Version 023 (deprecated, CM7 Alpha2+)

Added XZ Compression support to 2.6.35 kernel
Added XZ Compression support for kernel image
Added XZ Compression RAMDisk support (boot time)
Used the git implementation of SHA-1 to reduce boot time by 11%
Updated qdsp6v2 to block write until buffer is full
Updated trivial bug fix for SMP macro
Added newly optimized CRC32 Improves EVERYTHING that uses it including TCP/IP, File Systems etc...
Added newly optimized CRC32c improves EXT4 metadata performance and anything else which uses CRC32c
Patched msm_serial_hs_lite (better battery life)
Patched qdsp6v2 to fix unexpected power consumption (better battery life)
Patched mdp4_overlay to flush RGB pipe when solid fill mode is used (better battery life)
Patched clock-8x60 to add a lower gsbi_uart_clk entry to save power (better battery life)
Lowered Camera Flash limit from 30% to 10%
Tweaked conservative governor for better interactive performance
Enabled Deep Power Management Options (better battery life)
Lowered CPU Minimum Voltage (better battery life)
Gate smi_2x_axi_clk off when smi_clk is disabled (better battery life)
Fixed performance level computation for VCD (better performance)
Added local control of vpe_axi_clk and rot_axi_clk (better battery life)
Removed unnecessary checks from DMA engine (more efficient DMA Engine == performance)
ARM Patch: Use CTR for the I-cache line size on ARMv7 (better performance)
Enabled inline locks for ARM (performance)
CPU workqueue optimization (limit some workqueues to single thread)
patched qdsp6v2 to Set tx and rx flags based on current device
patched display to avoid staging up two pipes at same mixer_stage
Added GPU slumber (whenever screen is off, GPU is set to sleep)
Added idle wait support for SMP
Fixed AXI clock bug in GPU
Fixed L2 Cache Synchro bug (better performance)
Updated spin lock code (better performance)
Reduced WiFi voltage to min recommended by datasheet (better battery)
Reduced other sub-system voltages by 5~10% (better battery)
Eliminated unnecessary macro from decompressors (code clean up)
Wind down GPU turbo mode if idling (better battery)
compiled with latest code sourcery (better performance)
Fixed Power Management memory leak
Added 2 way call record capability (thanks to mdeejay!)
Patched wakelock to latest AOSP
Patched audio DSPs
Patched Ondemand Governor for better power savings.

Version 024 (deprecated, CM7 Alpha2+)

NoHz RCU set as default
Disable BCM4329 wake irq when stopped (battery saving fix)
Re-order PPP packets in PPPoLAC and PPPoPNS (VPN bug fix)
PLL clock training with higher frequencies for better stability (stability enhancements)
mfd - Fix memory leak in debug probe
Introducing GPU 2D scaling governor (Enabled, completely original coding from me)
-- now it will scale from 145.455MHz~200 MHz depending on usage (this should save additional battery while screen is on).
Introducing IntelliDemand CPU governor
-- Built-in Screen Off profile (like SmartAss)
-- Built-in Browsing detection (enabled, completely original coding from me)
(this will limit cpu clock to max 1.0 GHz while browsing web, book, email etc)
Adjusted 3D and 2D GPU scaling and initial states for better compatibility with Rosie

Version 025 (deprecated, CM7 Alpha2+)

msm72k_udc: Replace dma_coherent_pre/post_ops with mb/rmb
nfs: writeback pages wait queue
block: limit default readahead size for small devices
make default readahead size a kernel parameter
smd_pkt: Extend read operation to receive data larger than SMD FIFO
pet watchdog from console driver
Correct the number of slave ports in the system
watchdog: increase pet time to ten seconds
led: enable dynamic LED brightness
mm/vmalloc.c: eliminate extra loop in pcpu_get_vm_areas error path
Revert "qup_i2c: Calculate combined write length for multiple write transactions" (broke Sensors )
restart: call secure code to disable arbiter
restart: Handle reset interrupt from pmic
pmic8058-xoadc: request's done late into suspend
pmic8058-xoadc: Add mpp_config call on configure
Remove pm_runtime_suspended() from __pm_generic_call
HDMI: Support for 480p 16:9 in HDMI Driver
qdsp6v2: Reduce the pcm write timeout value
enable ldo's in PHY resume path (usb)
Add suspend/resume for TSENS (thermal sensor)
While powering down flush all the rpcrouter workqueues (rpc)
Reader thread to allocate memory without holding a spinlock (rpc)
Reorganize the usage of spinlocks in RPC Router reader thread
Update RPC client's cb_list_lock to use spinlocks
Retry callback registration on timeout (rpc)
Add smd_tiocmset api without spinlocks
Close smd ports upon failure to open.
print lock name for lockdep_init_error
execute lockdep_init as early as possible
board:clocks: add comments to make trouble shooting easier
smd_tty: restrict DS port platform driver
smd: add closing state to subsystem restart
smd_pkt: add subsystem restart loopback server reinit
smd_tty: add subsystem restart loopback server reinit
smd: add check for LOOPBACK_TTY platform device
Add 10 microsec delay before fetching setup_data (usb)
Simplify ACA state machine to support standard ACA (usb)
Recovery point SEI support for ISDB-Tmm (vidc)
Copy the End of Sequence flag (vidc)
Fix H.263 30fps standard resolution encoding.
Override SP profile to ASP for MPEG4 decoding.
Remove check for allocation of sequence buffer size. (vidc)
Update firmware memory size. (vidc)
Fix GOB Header for H.263 encoding.
Increase the decoder input buffer size.
Return the correct error code for IOCTL. (vidc)
Set correct divx codec type.
Handle b-frame not supported error.
Increase the kernel SMI memory size. (vidc)
Report bitstream errors to driver client.
add change to print MFC firmware version
Removed check for comparing DPB Size
add Check for infinite intraperiod configuration.
Fix to handle non-fatal sequence header errors. (vidc)
Fix not coded vop handling in decode order.
add mdp revision number
increase mdp max burst size
Calculate combined write length for multiple write transactions (i2c)
Fix input handler crash (ondemand, intellidemenad)
Add htc off-alarm support from XE source
updated sii9234 tpi driver from XE source code
USB misc code updates from XE source
enable android USB gadget projector support
Added thermal trip critical retry from XE source
updated DMA engine from XE source
fixed minor HTC battery driver coding derp
Added HTC Beats headset support from XE source
kernel:sched: avoids loadavg Moire
don't call task_group() many times in set_task_rq()
block level disk cache target for device mapper
Do not destroy old sched domain on cpu_up
Do not block when waiting to free old root domain
Check for extended quiescent state at start of gp (rcu)
Don't allow cpu to get console lock during hotplugging (printk)
Add the function 'cpu_hotplug_inprogress'
Remove extraneous boot_secondary delay

Version 026 (deprecated)

PM / Sleep: fixed coding derp from "Drop pm_op() and pm_noirq_op()"
mfd: timpani-codec: Handle register write for numbers more than cached one
mfd: timpani-codec: Write register defaults when disabling devices
msm_fb: Remove Audio Packet Control Register setup
mfd: timpani: Retry upon I2C failure.
msm_fb: Check for ACP and ACFG register before reset core.
msm_serial: add PM_RUNTIME code from CAF
mm: retry page fault when blocking on disk transfer
msm: kgsl: Do not allow SLUMBER from INIT
PM / Sleep: Drop pm_op() and pm_noirq_op()
PM / Sleep: Unify diagnostic messages from device suspend/resume
sched/rt: code cleanup, remove a redundant function call
ARM: Add optimised swahb32() byteswap helper for v6 and above
hugetlb: Replace BUG() with BUILD_BUG() for dummy definitions.
kernel.h: Add BUILD_BUG() macro.
msm: kgsl: New low power level
msm: vidc: print message as kernel info instead of error
camera:gemini: update gemini engine from hTc Ruby
battery: battery driver and charging driver update
mm: Android Ashmem update from hTc Ruby
misc: android pmem update from hTc Ruby source code
mfd: marimba core update from hTc Ruby
board: ARM kernel update from Ruby source code
cpufreq: add two-phase to ondemand and intellidemand

Version 027 (deprecated)

input/misc/gpio: update input GPIO driver from PyramidLE source
vidc: 1080p: Override profile to ASP for XVid/Divx456
Re-enabled ZRAM

Version 028 (deprecated)

Updated Zcache and ZRAM to latest Linux-next patches
Added Google's Snappy Compression for ZRAM

Version 029 (Current, CM7 Alpha2+)

Init: Multithread initcalls to auto-resolve ordering issues.*
memcg: let css_get_next() rely upon rcu_read_lock()*
idr: make idr_get_next() good for rcu_read_lock()*
mm: implement WasActive page flag (for improving cleancache)*
zcache: fix deadlock condition*
Revert "msm: kgsl: Clocks should be set to the active level during NAP"*
Revert "partition_sched_domains: Do not destroy old sched domain on c…*
mmc: core: Prevent too long response times for suspend*
 
Last edited:

BrokenWall

Senior Member
Feb 16, 2011
602
180
0
Atlanta
I have tested this kernel and it runs very smooth, most things so far work. There are a few hiccups but they could also be due to not having kernel source for the cm7 rom yet.

Im not posting screenshots since it scores about the same as sense based roms. Linpack is a bit low but that could be a number of factors. Overall importance is that the rom is smooth and very agile
 

drewcubus

Member
Sep 30, 2010
20
4
0
Thank you!

Thanks a ton for all the work you do. At first I was afraid this phone wasn't going to have much love (I came from Mytouch slide), but I have been overwhelmed by the amount of people that are putting out quality work for it

Prepare to have your thanks button massaged a few times.
 
  • Like
Reactions: Sharkbaitjon

Part Four

Senior Member
Feb 10, 2010
1,162
62
0
Wiped cache, dalvik, flashed 1.78 then thermal patch. Rebooted. Getting constant reboots shortly after ADW EX finishes loading. Won't stop.
 

nory82688

Senior Member
Jan 8, 2011
876
140
0
South Jersey
man, tonight just keeps on getting better and better lol first we get cm7, then xboarder fixes his AOSP rom due to cm7 , then faux comes out with a cm7/AOSP OC kernel... this phone just became the best out , easily.
 

pablo1215

Senior Member
Aug 10, 2009
236
30
0
Wiped cache, dalvik, flashed 1.78 then thermal patch. Rebooted. Getting constant reboots shortly after ADW EX finishes loading. Won't stop.
I tried the 1.78 and worked but bootlooped during cf bench, odd because I have been able to run the 1.78 kernels before but we shall see. I'll be testing heavily tonight.


Edit: Okay she's running just fine on 1.5 so maybe my phone cant handle 1.78.......anymore ....??
 
Last edited:

Part Four

Senior Member
Feb 10, 2010
1,162
62
0
hm... my beta tester has tested with 1.78 GHz version and verified that essential capabilities were working correctly. :p
I don't doubt it. All phones are different. With this 1.78, my phone would freeze and reboot after ADW finished loading, but all of your 1.78 versions worked perfectly for me on Melvin's Beast ROM. Trying 1.56 now.