Android OS Forum banner

[KERNEL]CM10/CM9/AOKP Kernel v6.2.1 [8/16] - UV/OC/GPU-BLN-Governors

15975 Views 3 Replies 3 Participants Last post by  xcrazydx
PLEASE READ THIS ENTIRE POST THOROUGHLY BEFORE PROCEEDING...

This is a customized kernel built from SGH-I727 (aka Skyrocket) source code. This ROM has all the fixes from CyanogenMod & Team Chopsticks tree along with some other stuff.

It's very simple to install.
  1. Ensure you've already installed a working ROM
  2. Install Zip from CWM.
  3. Wipe both caches (just to be safe)
  4. Reboot

FSync Control - Courtesy of Ezekeel

FSync Control which can be used to disable the fsync system calls for single files and filesystems (echo 0 > /sys/class/misc/fsynccontrol/fsync_enabled). These fsync syscalls are used by kernel modules and user space programs to flush an I/O buffer (which is in RAM) to disk to make sure that this data is actually savely stored on the disk before executing the next step. Disabling fsync can result in data loss on a crash/freeze since the data is still in the I/O buffer and has not been saved to disk as it should be and can also lead to problems due to race conditions if two or more processes access the same file. On the other hand disabling fsync reduces the number of I/O operations which potentially could reduce the battery drain and also improve I/O performance.
Governors

Wheatley Governor - Courtesy of Ezekeel
http://rootzwiki.com...813#entry405813

Badass (default)
Badass removes all of this "fast peaking" to the max frequency. On a typical system the cpu won't go above 1080Mhz and therefore use less power. To trigger a frequency increase, the system must run a bit @ 1080MHz with high load, then the frequency is bumped to 1350MHz. If that is still not enough the governor gives you full throttle. (this transition should not take longer than 2-5 seconds, depending on the load your system is experiencing).

You can tweak the Phase 2 (1080MHz) and Phase 3 (1350MHz) via sysfs (if you don't know, then just leave it alone).

NOTE: Due to it's nature, this is not a benchmark governor. It is meant as a governor that gives you a smooth experience while saving battery.

Lagfree
Lagfree is similar to ondemand. Main difference is it's optimization to become more battery friendly. Frequency is gracefully decreased and increased, unlike ondemand which jumps to 100% too often. Lagfree does not skip any frequency step while scaling up or down. Remember that if there's a requirement for sudden burst of power, lagfree can not satisfy that since it has to raise cpu through each higher frequency step from current. Some users report that video playback using lagfree stutters a little.

InteractiveX
Created by kernel developer "Imoseyon," the InteractiveX governor is based heavily on the Interactive governor, enhanced with tuned timer parameters to better balance battery vs. performance. The InteractiveX governor's defining feature, however, is that it locks the CPU frequency to the user's lowest defined speed when the screen is off.

Lazy
This governor from Ezekeel is basically an ondemand with an additional parameter min_time_state to specify the minimum time CPU stays on a frequency before scaling up/down. The Idea here is to eliminate any instabilities caused by fast frequency switching by ondemand. Lazy governor polls more often than ondemand, but changes frequency only after completing min_time_state on a step overriding sampling interval. Lazy also has a screenoff_maxfreq parameter which when enabled will cause the governor to always select the maximum frequency while the screen is off.

GPU Overclocking
GPU is stock clocked at [email protected] & [email protected] (default).

Example: To increase maximum GPU frequency in 3D mode to 320 MHz:
echo 320000000 > /sys/devices/platform/kgsl-3d0.0/kgsl/kgsl-3d0/max_gpuclk

Example: To increase maximum GPU frequency in 2D mode to 266 MHz:
echo 266667000 > /sys/devices/platform/kgsl-2d0.0/kgsl/kgsl-2d0/max_gpuclk
echo 266667000 > /sys/devices/platform/kgsl-2d1.1/kgsl/kgsl-2d1/max_gpuclk

Available frequencies:
3D: 320000000, 300000000, 266667000, 228571000, 200000000, 177778000, 27000000
2D: 266667000, 228571000, 200000000

Kernel-based MPDecision
100% kernel-based multi-core decision! (should cpu1 be online or not?)
This replaces your /system/bin/mpdecision binary which is disabled by the CWM flashable.

Check /sys/kernel/msm_mpdecision/conf/ for the configuration.

startdelay = time until mpdecision starts doing it's magic (70000)
delay = time between checks (500)
pause = if something else plugs in the cpu, fall asleep for 10000
scroff_single_core = if the screen is off, don't plug in cpu1 (1)
nwns_threshold_up = runqueue threshold, if this is reached cpu1 will be hotplugged (35)
nwns_threshold_down = runqueue threshold, if this is reached cpu1 will be unplugged (5)
twts_threshold_up = time threshold, this amount of time must have passed (250)
twts_threshold_down = same as above (250)
enabled = enable(1) or disable(0) mpdecision. This does not affect scroff_single_core!
(all times are in ms)

CURRENT

Version 6.2.1 - http://d-h.st/NWo <-- CM10 Alpha 2 and beyond
Version 6.2 - http://d-h.st/qn6 <-- CM10 Alpha 2 and beyond
Version 6.1 - http://d-h.st/kB2 <-- CM10 Alpha 2 and beyond (file description says CM9, but it really is CM10)
Version 6.0.3 - http://d-h.st/hEI <-- CM9 and CM10 Alpha 1a only UPDATED with latest 6.2.1 for CM9
Version 5.4.5 - http://d-h.st/ngT <-- CM9 only

Battery life problems?
Read this first...http://forum.xda-dev...d.php?t=1759541

Then go here to grab Better Battery Stats (BBS) ... http://forum.xda-dev...d.php?t=1179809

Mega thanks to...

Team Chopsticks
Cyanogenmod Team
showp1984
gokhanmoral
faux123
TamCore
Ezekeel
FraciscoFranco
h0tw1r3
...and the other many countless kernel devs that I've Kang'd from
See less See more
  • Like
Reactions: 1
1 - 2 of 4 Posts
I don't claim credit for any unique code. I've managed to cobble this together from the following sources with various tweaks of my own to get it all running.


Hope I'm not violating any form of informal code of conduct in grabbing your guys' code.

CHANGELOG

Version 6.2.1
Merged Kernel up to 3.0.41
InteractiveX and Interactive screen off max freq set to 594Mhz
ram_console added to help debug CM10 - post /proc/last_kmsg to pastebin and link here

Version 6.2
Added new Governors: Lazy, Lagfree, InteractiveX (this is V2), Interactive updated to V3 (Imoysen didn't change the name for V3)
Fixed governor change not setting CPU1 (thanks to Imoysen) - No more governor setting scripts!
Added BFQv4 i/o scheduler

Version 6.1
Merged Kernel up to 3.0.40 (works great this time)
FSync control
WiFi PM control
Added fixes from Team Chopsticks git to get Alpha 2 working...not everything, but some of the juicer pieces
LMK from 3.4 kernel
Wheatley governor added - Please test and report back
As always see Github for all the bit/bytes

Version 6.0
Reverted back to 3.0.8 kernel core
Incorporated JB necessities
See Github for the bits/bytes

Version 5.5.3
Disabled ZRAM, Westwood, and LZO kernel compression
Removed some frequency steps - UnderVolting should be a little easier since there will be less knobs to turn
Changed some GPU iofractions
Updated pegasusQ governor - Works pretty good. Disable mpdecision, though. See OP to set "enabled" to 0.
Added some JB compiler options - Would be curious to see if this works OOB if someone wants to try on JB ROM

Version 5.5.1
Big update - Merged Linux kernel up to 3.0.39 (latest and greatest fixes/enhancements)
Enable ZRAM
TCP congestion control changed to Westwood (Google it)
jRCU for small systems
WiFi tweaks for battery life and flexiblity
Check out my Github commit log for a complete list - There's just too many

Version 5.4.5
Fixed 2D GPU bus speed
Implemented fixed ala Team Chopsticks to prevent emmc erasure to prevent bricking
Minor tweaks - Trying to fix vbus_present wakelock

Version 5.4.4
Added kernel-based 3-phase thermal management
OC GPU by default
DVFS disabled

Version 5.3.2
Updated OC code to default to 1.512Ghz, but OC up to 1.89Ghz (doesn't work for me very well, but ymmv) - Thanks to jjiggens for the help!
Volume bug fixed (would remain max or silent)
New BLN code
Check Github commit log for full details

Version 5.3
Really removed 1.836Ghz OC this time
UTF-8 support added back in
Reverted voltages back to the default - should fix instabilities for some. I would suggest under-volting as they start pretty high

Version 5.2z
Removed 1.836Ghz OC - Use 5.2 if you reallllly want that extra juice.

Version 5.2
SGH-I717 (Note) Source code base
GPU Overclocking support (see OP)
Upped max OC to 1.836GHz (defaults to 1.782Ghz)

Version 5.1
UTF-8 support
Various fixes
Compiler optimizations
BLN support

Version 5.0
UCLF6-based Source (e.g. official SGH-I727 from Samsung)
BadAss, SmartAssV2 Governors
OC to 1.782Ghz
Added GPU-level control to BadAss
Lowered BadAss Phase 2 Freq to 702Mhz (you can chance ala sysfs)
Hopefully reduced wifi wakelocks by filtering more unnecessary packets
VR and SIO schedulers added (let me know how they work out)

Version 3.3
RAMDISK updates from CM9
Badass tweaked for better battery (e.g. lowered phase2/3 frequencies)
Installs init.qcom.post_boot.sh with badass set as default for CPU0 & CPU1 and disables mpdecision <-- IF YOU MADE CHANGES TO THE ONE INSTALLED, MAKE A BACKUP OF YOUR'S AND COPY OVER MINE AFTER YOU INSTALL
Added support for HFP 1.6 wideband speech
Disabled GENTLE_FAIR_SLEEPERS

Version 3.2
BLN added back in
Governors: Badass (thanks showp1984), PegasusQ, SmartAssV2, standard ones
Toolchain updated to 4.6.3
Compiler optimizations
Raised max OC to 1.782Ghz
Kernel-based MPDECISION (thanks showp1984)
Various fixes (you can check my github commit log)
WiFi: WiFi wakelock reductions (tell me if things are out of whack)
WiFi: Power off wlan interface when wifi disabled to save battery
Touchscreen lock fix (ala Team Chopsticks)

Version 2.8
Non-standard governors removed - Not really aSMP aware and caused all sorts of funky weirdness
Underclocking enabled
Clock voltages tweaked - UV for some battery savings

Version 2.5e
Reverted back to fixed max freq @ 1.728Ghz (temp until I get some other things fixed)
SmartAssV2 tweaks
Fixed L2 Frequency inconsistencies (I think this was causing the freq to stick at 1.242Ghz)
Updated PegasusQ code

Version 2.4d
Added Pegasusq governor

Version 2.3
Min/Max CPU Frequency can now be set
SmartAssV2 Governor tweaked for battery life

Version 2.2.1a
Reverted early suspend/late resume driver mod

Version 2.2
Tweaked SmartAssV2 and Lulzactive governors
Added some other power tweaks
Disabled BLN - I think this is causing some problems atm. Will add back once they're ironed out.

Version 2.1
Tweaked Lulzactive and SmartAssV2 governors
Added OC/UV code from Faux123 repo

Version 2.0
Added Lulzactive governor

Version 1.0
Stock Kernel compiled from source with SmartAssV2 governor

My Github - https://github.com/InstigatorX
See less See more
  • Like
Reactions: 1
1 - 2 of 4 Posts
This is an older thread, you may not receive a response, and could be reviving an old thread. Please consider creating a new thread.
Top