[KERNEL] [GSM/LTE/CDMA] [4.0.4] CMPlus for Tuna [11 JUN]

Search This thread

ch33kybutt

Retired Recognized Developer
Oct 25, 2008
635
812
Requires:
1) a rooted GNex
2) a custom recovery
3) someone who knows what 1) and 2) mean.

( ... provided as-is ... use at your own risk ... won't be held responsible ... blah blah blah ... etcetera, etcetera ... )

I'm not really focused on getting the best benchmark results, as they mainly focus on raw throughput for CPU, GPU and memory, which anyone can easily top with some questionable hacks and a freezer. Not really real-world testing, imho. No benchmark app that I know of can effectively provide test results for latencies and responsiveness (but if anyone knows any benchmark which can measure that, please let me know). Reducing latency and improving responsiveness for the best possible user experience is, and will always be, my main aim for this kernel, whilst also trying not to wreak too much havoc on battery life.

CMPlus kernel is based on stock CM9 kernel with additional features that I think are useful. Initially built it for CM9, but also tested in other ROMs such as AOKP, ARHD, BAMF, BlackICE, CNA, Gummy, Liquid, etc. This kernel is mainly for my personal use, but anyone is free to download and use. Note that I am not obliged to accede to any/all requests, so apologies in advance for not answering all questions and requests, as I really, really don't have the time for thread management and really, really dislike the hassle of answering questions that have been answered countless times before.

This kernel has all existing features of stock CM9 Kernel (384MHz GPU, TUN, KSM, CIFS, NFS). All I've done are minor changes, so 99.999% of the credit deservingly goes to KalimochoAz, teamhacksung, CM team and of course, Google. And more so the devs listed below ...

Current version:
- Additional 200, 528, 1072, 1420 & 1500 MHz MPU frequency steps
- Disabled unnecessary debug options
- Enabled relevant ARM errata
- Optimized RWSEM & CRC32 algorithms (Ezekeel)
- SLQB memory allocator
- SIO I/O scheduler
- Optimized conservative, interactive & ondemand cpufreq governors (interactive as default)
- Alternative governors: Lazy & Wheatley (Ezekeel), Smartass2 (Erasmux) & Lulzactive (Tegrak)
- Removed powersave and userspace cpufreq governors
- Westwood+ as default TCP advanced congestion control
- Userspace voltage control (Michael Huang)
- Undervolted nominal VDD_MPU, VDD_IVA & VDD_CORE by 50mV
- Reduced regulator voltages to VAUX3 and VUSIM for reduced screen-on battery consumption
- Less conservative temperature throttling thresholds
- Fast charge patch (Chad Froebel)
- BLX: Battery Life eXtender, Sound Control, Touchwake, Vibration Control, Fsync Control (Ezekeel)
- User control of WiFi PM mode on sleep (PM_MAX default)
- Gamma Preset to control contrast levels
- Customizable startup script for controlling SmartReflex, Sound Control, BLX, Touchwake, Vibration, WiFi PM, Fsync, Gamma Preset and Color Control settings
- Screenstate modes to control settings for CPU Scheduler, Virtual Memory & Music Mode
- Other relevant patches from Omapzoom, Codeaurora & Android/kernel-common
- Compiled using a self-built Linaro 4.7.1 toolchain optimized for Tuna

- Applicable for both Maguro & Toro variants of Tuna (all sound kinda fishy to me)
- Koush's anykernel format, so does not modify existing ramdisk.
- Install in custom recovery

For real issues, please provide the following:
- ROM name and version
- Copy-n-paste dmesg & last_kmsg output to http://pastebin.com/ and provide URL
Code:
1. Start terminal emulator session
2. > su
3. # dmesg > /sdcard/dmesg.txt
For reboot/freeze problem, replace Step 3 above with
3. # cat /proc/last_kmsg > /sdcard/last_kmsg.txt
4. Paste contents of resultant txt files to pastebin.com
5. Post pastebin URLs here in this thread for diagnosis
- What you were doing with your phone at the time ;)

In other words, help me to help you. Clairvoyancy and telepathy are a couple of skills that I don't possess ... yet ;P

I do this for masochistic tendencies fun, so won't accept donations. But if you feel the inescapable urge to part with your ill-gotten gains hard-earned savings, then why not donate to where it actually matters.
 
Last edited:

ch33kybutt

Retired Recognized Developer
Oct 25, 2008
635
812
Startup script for CMPlus kernel

CMPlus kernel now includes a startup script with a customizable initialization file (/etc/cmplus.conf)

Settings below are customized to my preference. To customize, copy /etc/cmplus.conf to /sdcard/cmplus.conf then modify it yourself and save it. Your settings will survive any factory or system wipes, as long as /sdcard/cmplus.conf exists.

Script will first check for presence of /sdcard/cmplus.conf. If exists, it will load your settings then bypass my settings. If doesn't exist, then it will load my settings from /etc/cmplus.conf (see below)

Code:
# filename: /system/etc/cmplus.conf
# ==========================================
# Initialization file for /system/bin/cmplus
# ==========================================
# To survive /system wipes, copy this file to /sdcard/cmplus.conf then modify accordingly

# Enables/disables cmplus script
# 0 = disabled 
# 1 = enabled
ENABLED=1

# Enables/disables Screenstate modes (Screen-ON = Performance, Screen-OFF = Economy)
# 0 = disabled 
# 1 = enabled
SCREENSTATE=1

# Specifies min & max CPU frequency when screen-off and headset inserted (DEPENDS ON SCREENSTATE=1)
#  0 or blank = disabled (default)
#  1 = 200MHz 
#  2 = 350MHz 
#  3 = 528MHz 
#  4 = 700MHz 
#  5 = 920MHz 
#  6 = 1072MHz 
#  7 = 1200MHz 
#  8 = 1350MHz 
#  9 = 1420MHz 
# 10 = 1500MHz 
MUSIC_MIN_FREQ=1
MUSIC_MAX_FREQ=4

# Enables/disables SmartReflex 1.5 adaptive voltage control
# 0 = disabled 
# 1 or blank = enabled (default)
SMARTREFLEX=

# Sets volume boost setting for headset/headphones
# 0 or blank = disabled (default)
# 1 = low boost
# 2 = medium boost 
# 3 = high boost
VOLUME_BOOST=

# Enables/disables high performance audio for headset/headphones
# 0 or blank = disabled (default) 
# 1 = enabled (WARNING: May increase battery drain during music playback)
HIGHPERF_SOUND=

# Enables/disables fast charge via USB
# 0 or blank = disabled (default)
# 1 = enabled
FAST_CHARGE=

# Sets maximum charging limit for battery (BLX)
# 0 to 100 (default=100)
BLX_LIMIT=

# Enables/disables Touchwake (tap to reactivate screen after timeout)
# 0 or blank = disabled (default)
# 1 = enabled 
TOUCHWAKE=1

# Sets time to keep Touchwake active after screen timeout, in milliseconds
# 0 = indefinite (default=45000)
WAKE_DELAY=30000

# Sets level of vibration for haptic feedback
# 1000 to 1500 (default=1450)
VIBRATION=

# Sets status of WiFi on sleep (PM_MAX to save battery, PM_FAST for speed)
# 0 or blank = PM_MAX (default)
# 1 = PM_FAST
WIFI_PM=

# Enables/disables Fsync (single file/filesystem sync)
# 0 = disabled (WARNING: Disabling fsync increases the risk of data loss on a crash/freeze)
# 1 or blank = enabled (default)
FSYNC=

# Specifies max CPU frequency when screen-off
#  1 = 200MHz 
#  2 = 350MHz 
#  3 = 528MHz 
#  4 or blank = 700MHz (default)
#  5 = 920MHz 
#  6 = 1072MHz 
#  7 = 1200MHz 
#  8 = 1350MHz 
#  9 = 1420MHz 
# 10 = 1500MHz 
SCREEN_OFF_MAX_FREQ=

# Selects GAMMA preset to control contrast
# 0 or blank = disabled (default) 
# 1 to 10 = Lowest to Highest (WARNING: Software-based feature, enabling may slow down device response)
GAMMA_PRESET=7

# =================================================================================
# Your ROM's built-in Colour Controls may override all color control settings below
# =================================================================================

# Pause script X seconds to try to override any ROM color control settings ...
# Leave blank to disable pause
PAUSE=

# Set GAMMA Levels
# unknown range (default=0) 
RED_GAMMA=
GREEN_GAMMA=
BLUE_GAMMA=

# Set Color Multipliers
# 0 = min, 4294967290 = max, (default=2004318071)
# WARNING: High levels (>2100000000) may cause screen burn-in damage
RED_MULTI=
GREEN_MULTI=
BLUE_MULTI=
 
Last edited:

ock

Senior Member
Mar 9, 2010
1,007
1,382
Nice work from a fellow Singaporean!

I'll be following your work closely.

Sent from my Galaxy Nexus
 

apratomo

Senior Member
Mar 22, 2007
299
9
Jakarta
This is nice, I'll try it. Just switch to cm from aokp.

Edit: just install this, seems okay. Love the ability to uv. Do you guys have any recommendations for governor?

First time I tried with cm is hotplug, but it gave me freeze, so now back to on demand

Sent from my Galaxy Nexus using XDA
 
Last edited:

franciscofranco

Recognized Developer
Dec 9, 2010
24,724
136,402
Carcavelos
Good job. I'll try this this commit "Reduced regulator voltages to VAUX3 and VUSIM for reduced screen-on battery consumption" on mine as well. Will bring feedback.
 

Gingernut78

Senior Member
Sep 17, 2011
584
212
Great, was wondering why nobody did a CM9 Tuna kernel with added extras.

Thanks

P.S Would you be a gent and write up a little how to build a kernel from source for our device on Ubuntu, I've been trying to compile one from Kalimochos source just for kicks but haven't got very far at all.

Cheers once again.
 

carloscarvalho

Senior Member
Oct 16, 2011
221
31
Brasília
I'm using this kernel. Thanks for the job.

But i'm a kernel noob :D i just install and.... this is it.. i just install :rolleyes:

There's something i need to do to have the best performance ?
 

ogdobber

Inactive Recognized Developer
Nov 4, 2008
3,256
1,827
Good job. I'll try this this commit "Reduced regulator voltages to VAUX3 and VUSIM for reduced screen-on battery consumption" on mine as well. Will bring feedback.

saw that as well. interesting...
good to have you here;)
btw, i was just in Singapore last december (went to ZoukOut, among other things). Actually walked into SGbest and bought my galaxy nexus there
 

yyz71

Senior Member
I like this kernel.. But after I flashed it my colors are off. More like a pinkish color. Was using Francos Nightly #123 with the color control app. Using B29 AOKP. Any suggestions?
63f214de-ed20-9af6.jpg


Sent from my Galaxy Nexus using XDA App
 

ogdobber

Inactive Recognized Developer
Nov 4, 2008
3,256
1,827
I like this kernel.. But after I flashed it my colors are off. More like a pinkish color. Was using Francos Nightly #123 with the color control app. Using B29 AOKP. Any suggestions?

Sent from my Galaxy Nexus using XDA App

turn down your red in "color multipliers tuning" in aokp performance settings
I noticed a pinkish hue after applying the patch. dropped it from .42xxxxxxxx to .36xxxxxxxx and it look correct for me know


Bet that you have gotten an export version then since GN was not launched at that time.....

Sent from my Galaxy Nexus using Tapatalk

well it is was yakjuxw (what is that? I thought asian market?)....now just yakju
 

Top Liked Posts

  • There are no posts matching your filters.
  • 63
    Requires:
    1) a rooted GNex
    2) a custom recovery
    3) someone who knows what 1) and 2) mean.

    ( ... provided as-is ... use at your own risk ... won't be held responsible ... blah blah blah ... etcetera, etcetera ... )

    I'm not really focused on getting the best benchmark results, as they mainly focus on raw throughput for CPU, GPU and memory, which anyone can easily top with some questionable hacks and a freezer. Not really real-world testing, imho. No benchmark app that I know of can effectively provide test results for latencies and responsiveness (but if anyone knows any benchmark which can measure that, please let me know). Reducing latency and improving responsiveness for the best possible user experience is, and will always be, my main aim for this kernel, whilst also trying not to wreak too much havoc on battery life.

    CMPlus kernel is based on stock CM9 kernel with additional features that I think are useful. Initially built it for CM9, but also tested in other ROMs such as AOKP, ARHD, BAMF, BlackICE, CNA, Gummy, Liquid, etc. This kernel is mainly for my personal use, but anyone is free to download and use. Note that I am not obliged to accede to any/all requests, so apologies in advance for not answering all questions and requests, as I really, really don't have the time for thread management and really, really dislike the hassle of answering questions that have been answered countless times before.

    This kernel has all existing features of stock CM9 Kernel (384MHz GPU, TUN, KSM, CIFS, NFS). All I've done are minor changes, so 99.999% of the credit deservingly goes to KalimochoAz, teamhacksung, CM team and of course, Google. And more so the devs listed below ...

    Current version:
    - Additional 200, 528, 1072, 1420 & 1500 MHz MPU frequency steps
    - Disabled unnecessary debug options
    - Enabled relevant ARM errata
    - Optimized RWSEM & CRC32 algorithms (Ezekeel)
    - SLQB memory allocator
    - SIO I/O scheduler
    - Optimized conservative, interactive & ondemand cpufreq governors (interactive as default)
    - Alternative governors: Lazy & Wheatley (Ezekeel), Smartass2 (Erasmux) & Lulzactive (Tegrak)
    - Removed powersave and userspace cpufreq governors
    - Westwood+ as default TCP advanced congestion control
    - Userspace voltage control (Michael Huang)
    - Undervolted nominal VDD_MPU, VDD_IVA & VDD_CORE by 50mV
    - Reduced regulator voltages to VAUX3 and VUSIM for reduced screen-on battery consumption
    - Less conservative temperature throttling thresholds
    - Fast charge patch (Chad Froebel)
    - BLX: Battery Life eXtender, Sound Control, Touchwake, Vibration Control, Fsync Control (Ezekeel)
    - User control of WiFi PM mode on sleep (PM_MAX default)
    - Gamma Preset to control contrast levels
    - Customizable startup script for controlling SmartReflex, Sound Control, BLX, Touchwake, Vibration, WiFi PM, Fsync, Gamma Preset and Color Control settings
    - Screenstate modes to control settings for CPU Scheduler, Virtual Memory & Music Mode
    - Other relevant patches from Omapzoom, Codeaurora & Android/kernel-common
    - Compiled using a self-built Linaro 4.7.1 toolchain optimized for Tuna

    - Applicable for both Maguro & Toro variants of Tuna (all sound kinda fishy to me)
    - Koush's anykernel format, so does not modify existing ramdisk.
    - Install in custom recovery

    For real issues, please provide the following:
    - ROM name and version
    - Copy-n-paste dmesg & last_kmsg output to http://pastebin.com/ and provide URL
    Code:
    1. Start terminal emulator session
    2. > su
    3. # dmesg > /sdcard/dmesg.txt
    For reboot/freeze problem, replace Step 3 above with
    3. # cat /proc/last_kmsg > /sdcard/last_kmsg.txt
    4. Paste contents of resultant txt files to pastebin.com
    5. Post pastebin URLs here in this thread for diagnosis
    - What you were doing with your phone at the time ;)

    In other words, help me to help you. Clairvoyancy and telepathy are a couple of skills that I don't possess ... yet ;P

    I do this for masochistic tendencies fun, so won't accept donations. But if you feel the inescapable urge to part with your ill-gotten gains hard-earned savings, then why not donate to where it actually matters.
    19
    3.0.34-CMPlus-Tuna-120611
    Changelog
    * Updated to Linux 3.0.34
    * Compiled using latest Linaro GCC-4.7.1 compiler customized for Tuna
    14
    3.0.32-CMPlus-Tuna-120524
    Changelog
    * Updated to Linux 3.0.32
    * Reverted to TREE_PREEMPT_RCU from JRCU
    * Disabled SCHED_AUTOGROUP as it had no visible performance boost
    * Updated cmplus script
    ---- Removed modification of vm.drop_caches in Screenstate as it caused instability
    ---- Back to using my own personal preferences as default settings :p
    13
    3.0.32-CMPlus-Tuna-120531
    Changelog
    * Reverted Wifi voltage back to stock 2.0V
    * Tweaked and re-enabled Lulzactive cpufreqgovernor
    * Added fix for I2C crash by Imoseyon
    * Changed to Vibrator Control by Ezekeel (removed Morfic's)
    * Enabled CONFIG_AIO with extra patch to reduce I/O latency
    * Re-disabled ARCH_POWER in sched_features.h (no improvement)
    * Misc updates from Omapzoom and Codeaurora
    * Updated cmplus script
    ---- Removed Hotplug from Screenstate mode as it caused instability
    11
    3.0.31-CMPlus-Tuna-120511
    Changelog
    * Enabled ARM sched_mc & sched_smt (multi-core & multi-threading) support
    * Added simple workaround to CM9's run-parts "no-forking" problem
    ---- Screenstate mode (Screen-ON = performance, Screen-OFF = economy) now enabled by default
    * Misc patches from android/kernel-common

    Thanks to a simple sysinit workaround, users of CM9-based ROMs (CM9, Skankwich, ParanoidAndroid) can now enable Screenstate mode, and also Music mode & Hotplug. Also enabled support for sched_mc & sched_smt which is supposed to improve CPU scheduler's decision making when dealing with multi-core chips and multi-threading.