[Kernel][3.4.113][DualBoot] Chrono Kernel R5.10

Which CPU frequency is maximum stable for your device?


  • Total voters
    238
Search This thread

Mohammad Jebreeni

Senior Member
Oct 16, 2014
100
27
28
Mersin, Turkey
Hey again @ChronoMonochrome :D , Hope you're having a good day / night.

Would it be ok to ask you for updates regarding the dual-boot feature? Also, most links are broken. I, and the whole community I believe, would be very thankful if you could provide us some new links as it's not that easy to know which kernel version (for instance) is the best to use for the dual-boot feature.

Thanks in advance! :)
 

ChronoMonochrome

Senior Member
Jan 29, 2014
2,276
4,927
Stavropol
Hey again @ChronoMonochrome :D , Hope you're having a good day / night.

Would it be ok to ask you for updates regarding the dual-boot feature? Also, most links are broken. I, and the whole community I believe, would be very thankful if you could provide us some new links as it's not that easy to know which kernel version (for instance) is the best to use for the dual-boot feature.

Thanks in advance! :)

Hey, haven't been here for a while. I will check out the links to see what are down.
I'm pretty sure the main link to the kernel and the related stuff is still up:
http://xda.mister-freeze.eu/XDA-files/ChronoMonochrome/kernel/

Hey again @ChronoMonochrome :D , Hope you're having a good day / night.

Would it be ok to ask you for updates regarding the dual-boot feature?
I'm not working on this anymore.
Anyway, what kind of update is necessary here?
 

brewzip

Member
Mar 13, 2016
20
1
Hi Chrono, do you know about a method to make an Android 5+ rom pass SafetyNet? a2n+cm11 seems to achieve this goal, but its kernel is likely not portable to higher OS versions.

I'm trying to pass it on your testing cm13 rom, but any rom other would be fine.
 

ChronoMonochrome

Senior Member
Jan 29, 2014
2,276
4,927
Stavropol
Hi Chrono, do you know about a method to make an Android 5+ rom pass SafetyNet? a2n+cm11 seems to achieve this goal, but its kernel is likely not portable to higher OS versions.

I'm trying to pass it on your testing cm13 rom, but any rom other would be fine.

It's possible to bypass SafetyNet by installing Magisk.
This is not compatible with our device kernel format, however S2 got it working.
You need the Android build enviroment to prepare such a kernel.
 
  • Like
Reactions: brewzip

brewzip

Member
Mar 13, 2016
20
1
Yeah, I know about magisk and red about the problems with this device. Unfortunately trying with the build environent is not a viable option for me.
I tried myself something with various stuff already available. Flashing your AOSP UltimateROM 6.0.1 with your last 5.10 kernel, disabling debugging and removing su from /system/xbin, I managed to pass at least the Basic Integrity, but the CTS fails. It should depend from the settings in /system/build.prop like the fingerprint (tried from stock) and Selinux, which I think it's impossible to set as Enforcing, since your kernel has it disabled, isn't it?

Any idea if I can proceed from this point? Anyway, I don't really care about having root or particular roms, I simply need any setup above KitKat that can pass Safetynet completely for this phone.

Edit: With the J5 (android 6.0) fingerprint data it seems to pass all checks, using the app Safetynet Test, while Safetynet Helper gives an APIError:7. Weird.
 
Last edited:

Top Liked Posts

  • There are no posts matching your filters.
  • 87

    Custom kernel for Samsung Galaxy Ace 2

    Features:

    • Only one universal kernel for JB, KK and LP-based ROMs
    • CPU, GPU and DDR OC support
    • more governors and I/O schedulers
    • Lite kernel - some kernel features moved to modules
    • fully working BLN
    • Sweep2wake && Doubletap2wake
    • CPU freq settings for suspend
    • Full F2FS support
    • SELinux support
    • UKSM support
    • ABB-charger tweaks



    Credits:


    @dh.harald and @hafidzduddin for contribution on codina sources
    @ Team Canjica for a base for this kernel
    @ Nova Fusion for F2FS implementation
    @zwliew for contribution on TC kernel
    @cocafe for LiveOPP, GPU OC, abbamp and abb-charger tweaks and many cool patches which I've used from his kernel
    @faux123 for dynamic Fsync implementation
    @Christopher83 for dynamic management of dirty page writebacks implementation
    @KINGbabasula for contribution on TC kernel sources
    @boype for SIOPlus tweaks and OndemandPlus governor
    @Adi_Pat for abbamp, kernel tweaks
    @PolishVodka for initramfs scripts for 4.2.x and 5.0.x
    @Rox for help in fixing initramfs scripts for 4.1.2
    @ace2nutzer for optimization CPU OC and for whatever scripts which I have used in my kernel
    @Meticulus for BLN, Sweep2wake and Doubletap2wake
    @mkaluza for huge LiveOPP/Mali improvements and Dynamic governor
    @yanpol199 for help with F2FS support in TWRP
    @ all users who tests this kernel and directs the development along the right path
    @ all those users, who I forgot to mention (PM me if so)
    Team Win for TWRP recovery
    CyanogenMod Team for CWM recovery
    Phil3759 for philz recovery
    Samsung for opening kernel source
    Linus Torvalds for Linux sources

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

    To install kernel with F2FS support read installation method in 3rd post


    To install kernel with dual boot support, proceed this method.

    Since R2.12.1 has been released, no need to care about bootscripts, kernel package will install it itself.


    Source Code:

    r6.0
    < r6.0


    Download:
    FTP


    Thanks @S.AMU for providing FTP-Server
    Thanks @shaqman89 for providing build server



    XDA:DevDB Information
    Chrono Kernel, Kernel for the Samsung Galaxy Ace II

    Contributors
    ChronoMonochrome, cocafe, faux123, zwliew, mkaluza, Meticulus, KINGbabasula, ace2nutzer, TeamCanjica
    Source Code: https://github.com/ChronoMonochrome/Chrono_Kernel-1/commits/master-3.10

    Kernel Special Features: Swappable ramdisk, UKSM, dual boot support

    Version Information
    Status: Stable
    Current Stable Version: R5.1
    Stable Release Date: 1974-11-11
    Beta Release Date: 1974-11-11

    Created 2014-06-24
    Last Updated 2017-10-27
    46
    Changelogs and features

    Bug list:

    • -


    Changelog

    (old changelog)

    R2.10

    Build from R2.6 sources with re-added all changes in LiveOPP, cpufreq_limits module, some interfaces from 2.9.x (usb sw reset, PonKey emulator on voldown/up).
    R2.9
    • Mali OC module v2.0:
      • added interfaces boost_hispeed1, boost_hispeed2.
      • added interfaces mali_threshold_freq_down and mali_threshold_freq_up
        (new interfaces manual)

        1) mali_threshold_freq_down/up:
        echo new value to tweak it:
        Code:
        echo 150 > /sys/kernel/mali/mali_threshold_freq_up
        2) mali_boost_hispeed(2)
        Use command
        Code:
        echo idx=X > /sys/kernel/mali/mali_boost_hispeed2
        to tweak its freq.

        following command is to tweak its threshold:
        Code:
        echo threshold=220 > /sys/kernel/mali/mali_boost_hispeed2

    • partially re-enabled touchboost (it actually was enabled even on 2.7.4, but I forgot to mention)
    • reverted suspend/hibernate/freezer etc. commits to hopefully fix reboots issue in deepsleep
    • fixed APE_25_OPP (in suspend it actually used APE50 previously)
    • minor fixes in cpufreq_limits driver

    R2.8
    • Mali OC module v2.0(detailed description in 3rd post):
      • added interfaces boost_hispeed1, boost_hispeed2.
      • added interfaces mali_threshold_freq_down and mali_threshold_freq_up
    • partially re-enabled touchboost (it actually was enabled even on 2.7.4, but I forgot to mention)
    • reverted suspend/hibernate/freezer etc. commits to hopefully fix reboots issue in deepsleep
    • fixed APE_25_OPP (in suspend it actually used APE50 previously)
    • minor fixes in cpufreq_limits driver


    (2.7.6)
    - fixed broken GPU scaling algorithm (removed /sys/kernel/mali/mali_scaling_dynamic)

    (2.7.5)

    - partially reverted LiveOPP voltage autocalibration
    - fixed unstable mali tunables and added interface mali_scaling_dynamic
    Code:
    echo 1 > /sys/kernel/mali/mali_scaling_dynamic

    When mali_scaling_dynamic is used, mali will scale between mali_boost_low and mali_boost_high using all steps between these mentioned. mali_stats provides statistics about mali utilization on each step.
    - removed some GPU freq steps

    (2.7.4)

    - new governor Dynamic (thanks to mkaluza)
    - new GPU scaling algorithm (thanks to 1N4148 ) - ondemand-like GPU governor
    - LiveOPP: reworked avs-based varm recalibration algorithm

    (2.7.3)

    • added governor OndemandPlus (thanks to boype)
    • removed governors with hotplugging support
    • added interface to tweak PLLDDR freq on suspend:

      Code:
      echo on > /sys/kernel/cpufreq/pllddr_raw
      To control freq are used raw PLLDDR register values:
      Code:
      echo suspend=0x000050158 > /sys/kernel/cpufreq/pllddr_raw # 675 MHz
      Code:
      echo resume=0x000050168 > /sys/kernel/cpufreq/pllddr_raw # 798 MHz
      PLLDDR freq can be checked via
      Code:
      cat /sys/kernel/liveopp/pllddr
      Settings applies after 3 sec after suspend/resume.
      Too low suspend or too high resume value may cause reboot. Please note that this setting still experimental and unstable itself, so it's disabled by default.
    • adjusted some GPU OC defaults
    • fixed BT issues

    (2.7.2)
    - fixed pllddr_cross_clocks instability
    - removed unneeded DDR_50_OPP requirement on screen on (should prolong battery lifetime).

    2.7
    • many various commits from Linux 3.3 (thanks @faux123)
      • improved hotplugging mechanism
      • updated RCU system
      • kernel scheduler
      • memory management
      • etc...
    • LiveOPP:
      • recalibrate varm and vbbx on boot (better stability)
      • added interface to OC some clocks that depends on PLLDDR
    • reimplemented sweep2wake and doubletap2wake (thanks @Meticulus)
    • enabled UKSM (thanks @cocafe)
      - better RAM performance with tiny cost CPU. Boot time will be increased by 3 sec, it's ok.
    • uploaded kernel for s6d.


    R2.6
    • ABB-charger:
      • reverted most of changes. It's only uses custom voltage table, termination current 150 mA and some other tweaks, provided by ace2nutzer.
      • added tweakable interfaces for termination current(better battery lifetime).
    • LiveOPP:
      • added most ape_25_opp switch interface
      • added steps 85, 350, 450 MHz.
      • ddrpll interface renamed to pllddr ;D
    • added input boost support for most of governors (thanks to zwliew for original patch)


    R2.5
    - only one kernel version for all ROMs/Filesystems/codina(p), please note that installation method is different from usual installation
    - Switch to single platform RTC driver - AB500 (finally fixed all problems with clock freeze issue) [golden-guy]
    - update LiveOPP from CoCore
    - reworked and added DDRPLL boost [WIP]
    R2.4
    • completely rewritten screenoff limits driver
    • added steps 30, 125, 150, 175 MHz, increased voltage on various steps for stability
    • enabled SELinux again
    • various fixes in FAT filesystem
    • re-added exFat support
    • re-added ZenX
    • abb charger fix v2 [ace2nutzer]
    • zRam script moved to init.d (to be able to change zRam size) on CM11
    • new package installation script, with little changes by me (thanks to borkins for help with this)
    R2.3.2
    • improved battery live (full credit to ace2nutzer)
    • reduced liveopp table (too hard to search stable/optimal voltage)
    • Reverted all commits from tuna kernel (these changes are tested not well, may cause instability)
    • temporarily disabled SELinux

    R2.2
    • LiveOPP 2.2:
      • no longer use setting ARM OPP (this previously caused lags)
      • simple algorithm for setting clock and voltages
      • use only pll, external clock no longer used
      • use only 1 varm selection
    • Big LiveOPP table (51 step: 46, 69,..., 1244 MHz)
    • Added and optimized new governor ZenX
    • Added FIFO I/O scheduler
    • Moved more kernel stuff to modules
    • TWRP 2.8.0.0
    R2.1.5
    • Huge update from Tuna Hybrid kernel by @faux123 ( a lot thanks to him! :) ) :
      • a lot various commits from Linux Kernel 3.3-rc3
      • various fixes backported from Linux 3.5
    • fixed 3G/WiFi data arrows again
    • reduced kernel: 628 Mb RAM is available
      Reverted from R2.1:
      • update of device-specific drivers from Novathor 3.4 kernel
      • "ARM: 7493/1: use generic unaligned.h"
    (R2.0.2)
    • update from TC kernel
    • moved all networking modules to kernel (fixed lost data usage, tethering, etc.)
    • added module autoload (read below)
    • renamed interface /sys/kernel/cpufreq/screenoff_cpufreq_limits -> /sys/kernel/cpufreq/cpufreq_limits_on_suspend

    R2.0-refresh
    • Cleaned kernel source tree from some doubtful commits
    • moved some kernel features to modules(thanks to mkaluza for idea and most of changes)
      • 9p, CIFS, NTFS file systems
      • some unneeded ipv6 features
      • HID drivers
      • most of governors
    • slightly decreased boot time(in my case, from 8500 to 8330 ms)
    • slightly increased available RAM - 628 MB (thanks to reduced kernel size)
    • Huge LiveOPP improvement by mkaluza:
      • improved overclock stability, added all extended steps
      • UV 100-400 MHz steps to 0x12-0x14 (lower power consumption)
      • added state APE_25_OPP, used only with screen off(originally introduced by mkaluza, adapted for codina by me)
      • allowed change APE_OPP and DDR_OPP from LiveOPP
      • changed step 1228 MHz -> 1248 MHz (may cause reboots, need to find out optimal voltage)
    • Mali improvements by mkaluza
    • temporarily removed 25 MHz step (don't know how to add it with new LiveOPP, all attempts is caused boot loop)

    (R1.6.3)
    • revert "update sweep2wake and doubletap2wake by Meticulus"
    • add cpufreq steps: 25, 500, 700 MHz; remove: 1050, 1100, 1250 MHz (only 12 CPU freq step is allowed)
    R1.6
    • ARM: 7493/1: use generic unaligned.h (This has the
      benefit of better code generated especially for ARMv7 on gcc 4.7+
      compilers.)
    • register rear cam flash as LED (for BLN) - thanks to @Meticulus
    • update sweep2wake and doubletap2wake by Meticulus
    • add LMK timeout interface - @cocafe
    • Fix max freq not capped on suspend bug on Lulzactive (it was conflicted with screenoff cpufreq limits driver)
    (R1.5.2)
    R1.5.1
    Bugfixes
    reverted to LK 3.2.0
    • fixed disappeared data usage monitor and probably data arrows also
    • fixed wifi/usb tethering - hopefully, need tests
    • fixed incorrect display of RAM occupied by some applications
    • fixed incorrect phone recognition on codina P in CWM/TWRP - thanks to @ace2nutzer

    R1.5
    Completely reworked file systems update:
    • fixed reboots, apps FC
    • fixed CWM loop
    • fixed huge battery drain (hopefully)
    • F2FS backported to Linux 3.2
    R1.4
    • Bumped to Linux 3.2.9
    • File systems: big update from LK 3.2
    • Writeback: update from LK 3.2
    • Reduced wlan_rx_wake wakelock by half - zwliew
    • F2FS support in /system
    • Fixed more potential and real memory leaks in kernel
    • Removed u8500 hotplug driver again

    R1.3
    • added BLN separate configuration of blink on and off delays
    • added MCDE tweaks (read below)
    • tweaked PegasusQ governor (based on script by ace2nutzer)
    • fixes:
      • reverted commits which caused most of random reboots reasons
      • finally fixed kernel panic in CFQ I/O scheduler (I hope so)
      • interactive governor reverted to stock TC

    R1.2
    • workaround for s6d display bug (separate kernel version - soon)
    • CPU freq settings for screen off
    • Updates from linux kernel 3.2 (currently updated to 3.2):Reverted:
      • Proportional Rate Reduction for TCP
      • Power management update from 3.2
      • 1000 MHz messy workaround, provide another workaround instead

    r1.1
    • Fixed 100 MHz bug
    • Added 300 MHz CPU step
    • Added VR I/O scheduler again (thanks to @cocafe for fixes compile errors)
    • Updates from Linux Kernel 3.2:
      • Process bandwith controller
      • Thin provisioning and recursive snapshots in the Device Mapper
      • I/O-less dirty throttling, reduce filesystem writeback from page reclaim
      • Proportional Rate Reduction for TCP
      • Memory management (Cross Memory Attach, "vmscan: add block plug for page reclaim", "thp: mremap support and TLB optimization", etc.)
      • Networking
      • Device Mapper
      • Virtualization
      • Crypto
      • Tracing/Profiling

    r1
    • backport new zRam driver from 3.5 LK by @faux123. Also enables LZ4 compressor for zRam.
    • add u8500 hotplug driver by @zwliew again
    • revert voltage of display and other regulators to stock
    • add vpnclient.ko
    • a somewhat fixes and optimizations from CoCore - thanks to @cocafe
    • fix lagfree, lulzactiveq and interactive wrong tunables
    • adjust voltage(0x37) for 1200 and 1250 MHz
    17.08.2014
    • Undervolt display from 1800 to 1400 mV
    • Undervolt various regulators
    • Revert CFQ to 3.0 branch to fix reboot issue
    • Add Lionheart governor, disable InteractiveQ and Hotplug
    • Support for 4.2.x ROMs (thanks to @PolishVodka for initramfs)
    12.08.2014
    • fixed CFQ reboot issue (i hope so :) )
    • reboot into recovery from extended power menu should work (JB 4.1.2)- thanks to Rox
    • TWRP recovery instead CWM for ext4 kernel versions
    • Update to 3.1.10
    9.08.2014
    • Fixed reboot issue (I hope so)
    • Add BFQ scheduler again
    • Fixed UMS bugs - thanks to cocafe
    • Upgrade kernel to 3.1.1


    4.08.2014
    • Fixed bug of random change min CPU freq to 1Ghz.
    • Removed u8500 hotplug driver
    • Update sioplus from boype@github.com
    • Temporarily removed BFQ and VR I/O scheds because they are became broken for some reasons.
    • Update LMK from boype@github.com
    • Updates from 3.1 LK:
      Sound cards, input devices, watchdogs, networking, staging, multifunctional devices, ... etc. See full list of changes on github.
    29.07.2014
    • Added CPU 100MHz freq step
    • U8500 hotplug driver - zwliew
    • Universal exfat driver - zwliew
    • Switch to SLUB again
    • Updates from LK 3.1:
      • SLUB
      • Memory management (6/7 commits)
      • VFS (9/10 commits)
      • Dynamic writepage throttling
    21.07.2014
    • revert CPU voltages to default for 0-3 steps
    • some changes in memory management
    17.07.2014
    • Switch to SLQB memory allocator
    • Update BFQ I/O sched from v7r3 to v7r5
    • Enable UHID support (testing)
    • Some fixes in memory management
    • Remove some buggy "fixes" from last build
    5.07.2014
    • fixed headset bug that appeared in last build
    • fixed the file permissions for CoCore Manager (for JB)
    4.07.2014
    • F2FS support (still only KK version)
    • Usb drivers from STEXperia sola kernel instead stock samsung
    • (probably, UMS bug has been fixed. For me it works perfectly now.)
    • LZ4-compressed kernel support
    • minor fixes
    27.06.2014
    • sources updated
    • enabled init.d support in kernel (JB)
    • added Lagfree governor
    • added ROW I/O scheduler
    23.06.2014
    • fixed cpu oc via 3rd party apps
    • lowmemorykiller should be less aggressive
    19.06.2014
    • cwm 6.0.48 instead stock recovery
    14.06.2014
    • initial build




    Kernel Tweaks:


    (GPU/CPU undervolting and related tweaks)

    Undervolting the CPU/GPU will bring battery savings but possible instability.
    1) to undervolt CPU use ChronoKernel app or via init.d scripts:
    Code:
    echo *cpufreq* varm=xx > /sys/kernel/liveopp/arm_summary
    for example, following sets voltage varm=0x10 for 200 MHz:
    Code:
    echo 200000 varm=0x10 > /sys/kernel/liveopp/arm_summary
    or
    Code:
    echo 200000 varm-=10 > /sys/kernel/liveopp/arm_summary
    (default varm voltage for 200 MHz is 0x1a but, code above sets 0x1a - 0xa(10) = 0x10 )
    2) to undervolt GPU use init.d script:
    Code:
    echo x vape=yy > /sys/kernel/mali/mali_dvfs_config
    Example:
    Code:
    echo 2 vape=0x1c > /sys/kernel/mali/mali_dvfs_config
    "2" stands for DVFS idx (look at mali_boost_high/mali_boost_low).
    To prevent overriding of such settings by ChronoKernel app, add line to your init.d script after GPU undervolting
    Code:
    chmod 444 /sys/kernel/mali/mali_dvfs_config
    Don't change voltage of both GPU/CPU at the same time - otherwise if you'll get reboot if won't know what it caused. The same is for different frequencies - if you'll change voltage of too many steps you won't know which frequency caused reboot. It's not easy process, though, following method simplifies it: https://github.com/mkaluza/i9070_kernel_CoCore-E/wiki/Undervolting-janice .
    3) Custom LiveOPP table.
    By default some LiveOPP steps such as 100, 200, 500 ... MHz aren't used. You can re-enable those by following way:
    Code:
    echo 200000 enable=1 > /sys/kernel/liveopp/arm_summary
    Or use CK app instead. Don't enable it unless it uses the same voltage as 400 MHz. The same is for the rest frequencies - until some of them uses same voltage, no point to enable steps with lower freq. I've added 100 MHz just to further make some tests with it once again. It can't use lower varm than 200 MHz - that's why it's disabled by default. Furthermore, not all phones well keep undervoltage, that's why 100-400 MHz steps uses same stock voltage varm=0x1a.
    UPD. thanks to @borkins for this nice editor LiveOPP ARM steps: http://xdaforums.com/showpost.php?p=60311291&postcount=2921


    (CPU freq management tweaks)

    • CPU freq. limiter for screen OFF, adjust it via:
      Code:
      SYSFS=/sys/kernel/cpufreq/cpufreq_limits_on_suspend
      echo min=100000 > $SYSFS
      echo max=400000 > $SYSFS
      echo on > $SYSFS
      Too low frequency may cause freezes after wakeup and sound scrathes. If you use Dynamic govermor, it make no sense to use cpufreq limiter, because Dynamic already takes care about CPUfreq usage optimization. For more, read wiki.
    • Input boost
      This feature has been originally written by zwliew.
      Not all governors support input boost. Supported governors: ondemand, interactive, conservative, ZenX, lionheart and some others. Dynamic governor has its own boost interface.
      Default boost frequency is 400 MHz.
      Code:
      echo 450000 > /sys/kernel/cpufreq/input_boost_freq # echo '0' to disable
      echo 35 /sys/kernel/cpufreq/input_boost_ms


    (BackLight Notification)

    To configure time intervals of BLN blinking type(bln_ondelay stands for time of blink and bln_offdelay - delay between two blinks):
    Code:
    echo bln_ondelay=500 > /sys/kernel/bln/blink_mode
    echo bln_offdelay=6000 > /sys/kernel/bln/blink_mode

    Make sure BLN enabled:
    Code:
    echo 1 > /sys/class/misc/backlightnotification/enabled
    
    #  to enable bln_wakelock.
    echo on > /sys/kernel/bln/bln_wakelock


    Use /sys/devices/virtual/misc/backlightnotification/blink_mode to changes modes.
    Blink modes:
    • 0 = no blinking
    • 1 = blink backlight only
    • 2 = blink backlight + rear cam flash
    • 3 = blink rear cam flash only


    (Module autoload)

    Now there is a simple way to load modules at boot. Just move needed modules to /system/lib/modules/autoload and reboot device(or execute /etc/init.d/00autoload)


    (DDR overclock)

    This feature has been developed by me and allows you to improve DDR and GPU performance. Please note, that DDR OC might work unstable and cause filesystem corruption. Though, DDR clock of 975 MHz has been highly tested and should work fairly stable on most devices.
    Overclocking DDR over 975 MHz is highly NOT recommended, especially in case if you not sure that you can deal with possible consequences.
    How to OC DDR:
    1) by using
    this script .
    2) by using Terminal Emulator(in example below 975 MHz):
    Code:
    echo 0x5017f > /sys/kernel/liveopp/pllddr_oc_on_suspend
    This setting will be applied right after disabling screen.


    (Minimum APE/DDR OPP on screen on)

    This feature has been developed by me and allows to set minimum APE/DDR OPP states which are used when screen is ON. APE controls many systems such as an image, video, audio system etc. DDR OPP determines performance of DDR. Default values are APE50 and DDR50. Lower states(APE25/DDR25) reduces power consumption, but may cause graphical glitches like screen blinking or filling it by vertical grey lines. If you don't have mentioned effects, it's recommended to use APE25/DDR25:
    Code:
    echo ddropp=25 > /sys/devices/pri_lcd_ws2401.0/mcde_screenon_opp 
    echo apeopp=25 > /sys/devices/pri_lcd_ws2401.0/mcde_screenon_opp
    * if you don't have folder /sys/devices/pri_lcd_ws2401.0, use /sys/devices/pri_lcd_s6d27a1 instead.


    (Screen refresh rate)

    This feature has been developed by cocafe and modified by me. Lower lcdclk frequency cause less power usage, but too low values makes system unusable.
    Following command allows to change screen refresh rate:
    Code:
    echo x > /sys/kernel/mcde/lcdclk
    use
    Code:
    cat /sys/kernel/mcde/lcdclk
    to see supported lcdclk modes. Default mode is 60 Hz which is recommended in most typical cases. If you've screen tearings, blinking etc. change resresh rate mode to "60+ Hz":
    Code:
    echo 0 > /sys/kernel/mcde/lcdclk


    (ABB charger tweaks)

    added tweakable interfaces for termination current. To adjust it type(just an example):
    Code:
    echo 90 > /sys/kernel/abb-chargalg/termination_curr_1st
    echo 70 > /sys/kernel/abb-chargalg/termination_curr_2nd
    curr_2nd should be less or same as curr_1st. Lower values prolongs battery lifetime, but also slows battery charging.
    Default values are curr_1st == curr_2nd == 150 mA. Please note, too low values maybe aren't usable.


    (Dynamic FSync)

    This feature has been developed by Faux123 and allows to dynamically manage the synchronous writes performed on file system (FSync).
    It uses asynchronous writes when the screen is on, instead of synchronous writes, to have better performance and a slightly lower battery drain, while when the screen is off the synchronous writes are re-enabled to flush all the outstanding writes and prevent possible data loss.

    How to enable/disable the Dynamic FSync (default enabled):

    1) By downloading and using Trickster MOD
    2) By directly editing the file /sys/kernel/dyn_fsync/Dyn_fsync_active and setting 1 to enable the dynamic fsync, 0 to disable it (note that set value will be lost after a reboot/shutdown)
    3) By using Terminal Emulator (note that set value will be lost after a reboot/shutdown)
    - Open Terminal Emulator
    - Run this command to disable the dynamic fsync feature
    Code:
    su
    echo 0 > /sys/kernel/dyn_fsync/Dyn_fsync_active
    - Or run this command to re-enable the dynamic fsync feature
    Code:
    su
    echo 1 > /sys/kernel/dyn_fsync/Dyn_fsync_active


    (Software CRCs)

    Disabling software CRCs gives you a slight bump(10-30% is what they say) of MMC performance, at the cost of a possibility of your Ace 2 freezing randomly.
    Code:
    echo 0 > /sys/module/mmc_core/parameters/use_spi_crc


    (Dynamic dirty page writebacks)

    This feature has been developed by Christopher83 and allows to dynamically manage the dirty page writebacks with two different intervals, one when the screen is on and another when the screen is off.
    It is based on a commit of Francisco Franco, but instead of using hard coded values and of disabling at all the dirty page writebacks while the screen is on (possibility of data loss).
    By using a higher interval we have better performance and less battery consumption, with a very low risk of data loss.

    How to customize the dynamic dirty page writebacks feature (default disabled):


    Three new procfs parameters are exposed inside /proc/sys/vm path:
    - dynamic_dirty_writeback is the activation status of this feature, set 1 to enable it, set 0 to disable it and use the standard behaviour
    - dirty_writeback_active_centisecs is the interval for the dirty page writebacks when the system is active (screen on), the default value is 1500 centisecs (15 seconds)
    - dirty_writeback_suspend_centisecs is the interval for the dirty page writebacks when the system is suspended (screen off), the default value is 500 centisecs (5 seconds)

    1) By directly editing one of the file written above inside /proc/sys/vm and setting the preferred value (note that set value will be lost after a reboot/shutdown)
    2) By using Terminal Emulator (note that set value will be lost after a reboot/shutdown)
    - Open Terminal Emulator
    - Run this command to disable the dynamic dirty page writebacks feature
    Code:
    echo 0 > /proc/sys/vm/dynamic_dirty_writeback
    - Or run this command to re-enable the dynamic dirty page writebacks feature
    Code:
    echo 1 > /proc/sys/vm/dynamic_dirty_writeback
    - Run this command to set customize the two intervals (30 seconds while the screen is on, 10 seconds when the screen is off)
    Code:
    echo "3000" > /proc/sys/vm/dirty_writeback_active_centisecs
    echo "1000" > /proc/sys/vm/dirty_writeback_suspend_centisecs


    (Storages switch)


    By default, this kernel comes with internal and external storages switched. You can revert this behavior, by changing the line
    Code:
    use_swap=1
    to
    Code:
    use_swap=0

    in file /ramdisk/fstab_specs.txt and flashing the kernel package. This setting will remain until you format /ramdisk partition.


    (Tweak app)
    ChronoKernel settings
    Thanks mars_army for this app!

    Bug reports:



    after experiencing a random reboot, type in terminal:
    Code:
    su
    cat /proc/last_kmsg > /storage/sdcard0/last_kmsg.txt
    report it in the thread and attach the last_kmsg.txt
    32
    Other information

    How to install kernel with F2FS support:

    For those who don't know what F2FS is, check these links out:
    General info
    Benchmarks

    Warnings
    1. Make sure you have a standard kernel for backup that uses ext4 just in case. If anything goes wrong, just install the backup kernel and reboot to recovery.
    2. You will have to wipe your /data and /cache partitions for this. Basically factory reset.
    3. For 2, you could try to backup data and restore after formatting. I haven't tried this but I could work.

    Installation method of kernels with full F2FS support:

    Before installation make sure that you have at least ~25% free space on each partition that will be formatted to F2FS.

    • for CWM:
      1. make backup
      2. format /system partition to F2FS (and also /data and /cache if you didn't do it before)
      3. restore /system partition
    • for TWRP
      1. disable md5 generation
      2. make backup of /system
      3. find backup folder, run terminal and rename file system.ext4.win to system.f2fs.win (it won't work via filemanager)
        Code:
        mv system.ext4.win  system.f2fs.win
      4. format /system as f2fs
      5. restore backup
    Then install kernel.


    To install kernel on ROM that isn't supported by installer:

    (supported ROMs):

    Stock ROM 4.1.2
    CyanogenMod 10.1*
    CyanogenMod 10.2*
    CyanogenMod 11*
    CyanogenMod 12

    * most ROMs that based on this ROM are also supported. Despite of that some ROMs are supported, they can work incorrectly due to difference in their initramfs scripts(ramdisk).

    1. Install needed ROM first,
    2. Type following command in terminal emulator:
    Code:
    cd /
    find . -xdev | cpio -o -Hnewc | gzip -9 > /sdcard/x.y.z.cpio.gz
    where x.y.z is OS version (for example - CM11-based ROM - 4.4.4.cpio.gz)
    3. put this file in installer at osfiles/x.y.z/ (e.g. osfiles/4.4.4/4.4.4.cpio.gz)
    4. install kernel


    To install a new ROM that is not F2FS compatible:

    Use EXT4 to F2FS converter script
    or edit the updater-script as follows
    (manual method)

    1. Replace strings
    "mount("ext4", "EMMC", "/dev/block/mmcblk0p3", "/system");"
    with string
    "run_program("/sbin/busybox", "mount", "/system");"

    2. Replace string
    "format("ext4", "EMMC", "/dev/block/mmcblk0p3", "0", "/system");"
    with string
    "run_program("/sbin/mkfs.f2fs", "/dev/block/mmcblk0p3");"

    3. Add string
    "run_program("/sbin/busybox", "mount", "/data");"
    after strings
    "run_program("/sbin/mkfs.f2fs", "/dev/block/mmcblk0p3");"
    "run_program("/sbin/busybox", "mount", "/system");"

    4. Add string
    "unmount("/data");"
    before string
    unmount("/system");



    Fix for CodinaP, recognized as Codina in recovery (thanks @fluffi444 )
    http://xdaforums.com/showpost.php?p=58839849&postcount=2448

    Various tweaks (thanks @xo.en )

    do NOT use swapiness more than 30, bigger values can bog machine down!
    small advice:
    Code:
    #!/system/bin/sh
    #chmod -R 755 /system/etc/init.d
    chown root:root /proc/sys/vm;
    
    echo "30" > /proc/sys/vm/swappiness;
    busybox chmod ugo+rw /proc/sys/vm/vfs_cache_pressure;
    echo "50" > /proc/sys/vm/vfs_cache_pressure;
    echo "2000" > /proc/sys/vm/dirty_expire_centisecs;
    echo "1500" > /proc/sys/vm/dirty_writeback_centisecs;
    busybox chmod ugo+rw /proc/sys/vm/dirty_ratio;
    echo "90" > /proc/sys/vm/dirty_ratio;
    busybox chmod ugo+rw /proc/sys/vm/dirty_background_ratio;
    echo "75" > /proc/sys/vm/dirty_background_ratio;
    echo "512" > /sys/devices/virtual/bdi/default/read_ahead_kb;
    echo "10" > /proc/sys/fs/lease-break-time;
    echo "4" > /proc/sys/vm/page-cluster;
    echo "5360" > /proc/sys/vm/min_free_kbytes;
    echo "8" > /proc/sys/vm/min_free_order_shift;
    echo "0" > /proc/sys/vm/oom_kill_allocating_task;
    echo "1" > /proc/sys/vm/overcommit_memory 
    busybox sysctl -w kernel.random.write_wakeup_threshold=256;
    busybox sysctl -w kernel.random.read_wakeup_threshold=1376;

    and

    Code:
    #!/system/bin/sh
    
    chmod 0644 /sys/module/lowmemorykiller/parameters/adj
    echo "0,3,6,10,12,15" > /sys/module/lowmemorykiller/parameters/adj;
    
    chmod 0644 /sys/module/lowmemorykiller/parameters/minfree
    echo "1024,2048,2560,4096,6144,8192" > /sys/module/lowmemorykiller/parameters/minfree;
    
    chmod 0644 /sys/module/lowmemorykiller/parameters/debug_level
    echo "0" > /sys/module/lowmemorykiller/parameters/debug_level;

    works miracles in my case, especially second one, imho it would be hard to use different values, i was trying different setups for YEARS(with this machine), so it is not just random throw. Bigger LMK REALLY makes things worse here. It usually has tremendous influence over fluidity of gui, and whole sys.



    Odin kernel

    with TWRP
    with CWM
    16
    R2.2

    New build is out!
    Changelog:
    • LiveOPP 2.2:
      • no longer use setting ARM OPP (this previously caused lags)
      • simple algorithm for setting clock and voltages
      • use only pll, external clock no longer used
      • use only 1 varm selection
    • Big LiveOPP table (51 step: 46, 69,..., 1244 MHz) - voltages are based on previous table, i.e. it's uses pretty conservative values. Please, report if you have experienced reboot.
    • Added and optimized new governor ZenX (very similar to InteractiveQ, but not the same)
      Originally this governor prefer to unplug CPU1 as often as it possible, due to this CPU0 almost always worked at max freq.
      But it was very good for tuning - now it prefer to replug second core instead causing big load on CPU0. Tested with min CPU freq @ 276 MHz.
      For now it is used 714 MHz as hispeed freq, I'm not sure if that best decision, I'll optimize it for most lower freq.
    • Added FIFO I/O scheduler (very simple sched, practically almost same that noop)
    • Moved more kernel stuff to modules
    • TWRP 2.8.0.0
    Bugfixes:
    • fixed screenoff min/max freq bug (previously sometimes stuck at screenoff settings after wakep) - need feedback, still not sure if it works as expected. It turned out that this feature never worked e.g. with following settings - 46-276 MHz @ screen off, 322-1200 MHz @ screen on - I tried to fix it, but I've failed.
      Just don't use settings like mentioned. As an example, these settings works: 46-400 MHz @screen off, 322-1200 MHz @screen on.

    Hit thank button if you like it ;)
    15
    Thanks for your attention, guys. Though I said that abandon development for a while, it's not easy to refuse hobby.
    I hope that what I have said before was is somewhat exaggerated. All fault is my inactive lifestyle and irregular order of day(yep, I'm student and 20 years old), as a consequence - different diseases of the digestive tract (so for me there are still remains not the most pleasant moments of treatment).
    but I was not too honest with myself - even abandoning it, change the way of life is not so easy. Why am I writing this here? probably just wanted to express these thoughts.