[KERNEL][13/09/13][306|188v4][3.xx][AOSP & SENSE4][S2W][GAMING][BATTERY][UV]XM-Kernel

So:

  • New Wi-Fi driver

    Votes: 130 77.4%
  • Old Wi-Fi driver

    Votes: 38 22.6%

  • Total voters
    168
  • Poll closed .
Search This thread

Top Liked Posts

  • There are no posts matching your filters.
  • 326
    [KERNEL][13/09/13][306|188v4][3.xx][AOSP & SENSE4][S2W][GAMING][BATTERY][UV]XM-Kernel

    Please read and follow the notes and installation instructions.
    They are not there for fun.

    inSwq.jpg
    Features:

    • Quad 1.5GHz
    • MPDECISION from showp1984
    • CPU Hard Cap (Your max freq setting will be respected)
    • CPU UV Interface
    • GPU@520MHz
    • Separate 2D/3D OC Interface
    • EMC OC Interface
    • LP Core OC
    • Audio Min. Freq. Interface
    • NTFS R/W
    • GPU UV Interface
    • Sweep2Wake
    • DoubleTap2Wake
    • Fast Charge
    • Governors: powersave,pmc,conservative,smartmax,ondemand,touchdemand,gaming,interactive,performance
    • I/O schedulers: noop,sio,row,deadline
    • Optimized gaming and battery life (1,2,3,4,5)
    • USB Mass Storage (On most Sense ROMs, you need Lyapota mod pack for this. Except Viper, it works on Viper out of the box.)
    • MHL (Only on Sense and old AOSP ROMs)
    Differences between AOSP and Sense versions:
    • BLN
      • Sense: Auto-BLN on every ROM.
      • AOSP: Support for CM's BLN function.
    • Touchscreen calibration control
      • Sense: Auto-switch by switching governors
      • AOSP: Disabled

    Changelog:
    Beta:

    #306
    • Rebuilt with Linaro 4.8 -O3. Should give more performance with better battery life.
    #305
    • smartmax updates from maxwen.
    #304
    • Disable JRCU, according to maxwen it caused lockups.
    • #303 cpu clock changes reverted.
    • Switching governors will no longer update calibration control.
    • Touch-screen updates(S2W,DT2W) from maxwen.
    • Variant info added back.
    #303
    • Included maxwen's double-tap to wake (needs sysfs enable), and inner CPU clock changes.
    #302
    • Included maxwen's fixes for freq. locks and LP mode switch with OC.
    #301
    • Default UV removed.
    #300
    • AOSP Audio fixed.
    #299
    • Replaced 640MHz with 620MHz in freq table to be compatible with LP OC.
    #298
    • Imported maxwen's CPU code to hopefully solve freq-lockups for everyone, and a few other things, so:
    • Added switchable LP OC to 620MHz.(Needs to be enabled through sysfs)
    • Added sysfs interface to configure audio min. freq.
    #296
    #295
    • RIL boost removed again
    #294
    • PMC values updated.
    • Touchscreen calibration control enabled via sysfs. (Thx maxwen)
    • On Sense calibration control will change with governor: gaming/interactive->off for best gaming experience, smartmax/pmc->on to prevent call bug.
    #293
    • RIL Boost added back, as it was not the reason of freq. lock.
    • CPU related things are at #285. (I'm afraid of saying this again, but this should fix the frequency issue)
    • Smartmax (and so do PMC) updated to latest version.
    #291
    • RIL Boost removed. Hopefully this will prevent frequency lockups.
    #290
    • Frequency weirdness around 475MHz should be fixed now.
    #289
    • Fixed min.freq stuck at 475MHz.
    • Fixed PMC ideal freq.
    #288
    • Panel back to stock.
    • Wi-Fi back to stock.
    • Possible solution for screen not turning on from maxwen.
    #286
    • Panel update reverted.
    • Suspend updates from maxwen.
    #285
    • Old wi-fi driver.
    • Smartmax fixes from maxwen.
    • Previously introduced high freq usage fixed.
    #283
    • Suspend/resume updates from maxwen and trip.
    • Panel update from trip.
    #282
    • Wi-Fi config updates from kozmikkick.
    #281
    • Added maxwen's fix to prevent high freq. spikes.
    #280
    • Backlight brightness and BLN unlinked again.
    #279
    • Smartmax boost duration fix. (Thx maxwen)
    • Auto-BLN defaults to much lower button brightness.
    • Backlight brightness value will limit BLN too.
    • Wi-Fi fix from kozmikkick. (Thx to trip also)
    #274
    • Reverted video updates, as worse performance reported.
    #273
    • Auto-BLN fixes.
    • Throttling from 80°C.
    • Video driver updates from trip.
    • Sleep/Resume updates from maxwen.
    #268
    • Removed sustain_load from interactive/gaming.
    • Reduced default readahead size to 128KB.
    • UMS fixed.
    #266
    • Added back Auto-BLN.
    • Added interface to configure maximal backlight brightness. (See the bottom of this post) (Requested by Tabtoub)
    • For UMS you need to disable USB debugging first. This will be fixed in next version.
    #262
    • Rebased on 188v2, with everything important added back. This means (changes from #259):
    • More performance.
    • Less heat.
    • More stability.
    • LP Core max freq. back to 475MHz.
    • Stock freq. table. Stock UV table.
    • SCHED_MC is back. (Group task to cores option in Trickster)
    • 8 step DVFS table.


    Old releases:

    #259
    • DVFS Table and so OC Interfaces(GPU/2D/EMC) reduced to 6 steps.
    #257
    • Performance and stability improvements.
    • Low LP Core freqs reduced for better battery.
    • DVFS Table and so OC Interfaces(GPU/2D/EMC) reduced to 6 steps.
    • 25MHz removed as it caused too much lag.
    • Another try to fix touchscreen unresponsiveness.
    • Auto-BLN won't change your button backlight settings.
    #252
    • UV fixes.
    • Auto-BLN configurable. (See the bottom of this post)
    #250
    • Fixed min. freq. and some other weird bug, introduced in the last update.
    #249
    • Auto-BLN now only included in Sense build. +Some fixes.
    • Kernel updated to 3.18 base. (Only the sleep code changed)
    • Some task scheduler tweaks. (May fix alarm bug)
    • PMC updated to v7 interactive.
    • 2D & 3D clocks synced by default for better performance.
    #247
    • Initial version of Auto-BLN. (Back Light Notification will work automatically on every ROM.)
    #243
    • CPU Throttling level lowered to 80°C.
    • Stock ondemand added back, if some ROM defaults to it.
    • Core<->CPU possible difference raised to stock 300mV. (This can cause less heat, more stability, but slightly less fps)
    • Another try to fix "can't answer call" bug on sense.
    • Some driver updates from Nvidia.
    • Included pabx's headphone tweak for AOSP users.
    #241
    • UV should work for everyone now.
    • CPU<->Core voltage difference raised to 250mV. (See more about this in the Notes section)
    • New algorithm written for picking the lowest but still statisfactory core voltage. -> Less heat.
    • Min. possible CPU voltage reduced to 600mV.
    • Min. possible Core voltage reduced to 800mV.
    • Enabling GPU(core) UV will no longer result in unlocking GPU<->Core voltage relation.
    • Shared clock between emc and mpe from Trip for more bandwith.
    • Lock mpe to 3D clocks, again for more bandwith.
    #235
    • EMC (Memory Controller) OC Interface. (See the bottom of this post)
    • Support for Viper UMS.
    • 51MHz added for incompatible ramdisks, and 600MHz removed.
    • PMC Tuneable.
    • Another try to fix "can't answer call".
    #232
    • Separate kernel for AOSP and SENSE based ROMs. (Trying to solve the "can't answer call" bug on Sense)
    • AOSP version def. ramdisk is CM10.1(nightly), Sense def. ramdisk is my modified Ordroid 13.0
    • Audio min freq. bug fixed.
    • Wi-Fi driver reverted to 3.14.
    #227
    • CPU and CORE VDD brought closer for more stable performance.
    • Default RamDisk: Ordroid 13.0. Should be good for any sense ROM. Please try to use this without repacking on sense ROMs, or else you will lose these tweaks. (But I can't promise that it would work for yours too.)
    • RamDisk changes:
      • Disabled pnpmgr. -> Fix for facebook cap resetting, and 25MHz resetting to 100Mhz.
      • Removed some crazy boot time settings, locking to quad-core, or 1-core depending on some things.
      • Removed defaulting to ondemand.
      • (I suggest every sense ROM developer to do the same.)
    #226
    • Performance bottleneck fixed.
    • Added Shan89's Performance May Cry smartmax tweaks as "pmc" governor.
    #224
    • LP core OC'd to 500MHz, thus it can be used more, saving more battery.
    • Min. freq lowered to 25MHz, save more battery if we don't need any performance.
    • Freq table set to nice and round frequencies.
    • Benchmark scores on CPU will be lower. I didn't find the actual reason for that, but in every day usage and gaming wise this won't have any effect.
    #217
    • Optimized memory functions.
    • Some video driver changes for MHL. (Needs test from sense guys)
    #212
    • AHB and IOMMU driver reverted...it caused worse battery and more heat for me.
    #211
    • A lot of scheduler optimizations and fixes, that help a lot in gaming. (Thx Metallice)
    #210
    • Added Tegra AHB driver. (Thx kozmikkick & Metallice)
    • Updated IOMMU driver. (Thx kozmikkick)
    • Lowered 2D max. freq to stock again.
    #207
    • Separate CPU DVFS table per variant is back for stability, with only minor UV.
    #206
    • Performance bottleneck fixed.
    • A little more voltage on cpu. (~25mV)
    • Different DVFS Table for Variant 0.
    #200
    • A little UV back on core. (25-50mV depending on clock)
    • Default Variant 3 freq. table. (So you might not be able to UV that much, and of course clear tuner app data.)
    • GPU min. clock is 247 again.
    • Small fixes.
    • Default ramdisk is CM10.1 Beta 10.
    #198 (Still alpha)
    • Core clocks changed to safer values.
    • Seems to fix interactive/gaming issue.
    #197(Quite much change...it's better to call this alpha version then.)
    • Interactive and gaming governors seem to quad-lock this to max freq...better not use them.
    • "Redesigned" DVFS table. Now every HOX will use 1 table(Variant1's) regardless of anything. -> Clear tuning app data
    • New Wi-Fi driver. (Thx kozmikkick)
    • Internal Core clock limit disabled(for GPU OC).
    • Small fixes from upstream.
    • GPU OC Interface back to 8 clocks.
    • GPU min. freq is at 267.
    • Pre-UV on CPU removed.
    • Pre-UV on Core removed.
    • Default readahead size is 4096KB.
    #192
    • Previous lag should be fixed.
    • Added kernel changes for CM B10 BLN. (But repack needed)
    #191
    • Better CPU spinlock handling. (A little faster and less overhead)
    • Spearate 3D and 2D OC Interface. (See the bottom of the post)
    • Video drivers is the same as #106.
    • Gaming governor added.
    • Interactive tweakable again.
    xmiste10.jpg

    Stable:

    188v4
    • Added button_brightness interface.
    • Added PMC governor.
    • Added Auto-BLN, but disabled by default.
    188v2

    • --Changes since #188>
    • AOSP Ramdisk: CM10.1 B10.
    • Sense Ramdisk: Ordroid 13. Should work for the most sense ROM.
    • Added gaming governor.
    • MHL fixed.
    • Viper UMS fixed.
      --<Changes since #188
    • Better synced the core freqs. Should solve some issues, and even less heat.
    • Interactive is providing much better gaming now, as we have don't have to avoid heat that much.
    • Fastcharge doesn't need replug to be activated. (Thx to maxwen)
    • EMC(memory) ratio changed. (Thx to kozmikkick)
    • Switched to JRCU.
    • Boot freq is at 1300MHz. You can change that to lower of higher with your favorite tuner app, preferably Trickster Mod.
    • Some unnedded high boosts lowered to be more battery friendly.
    • Some cherry-picks from maxwen.
    • GPU OC and GPU UV interface added. (These are only for experts and brave warriors. For more information see the bottom of this post).
    • Please from now on use Trickster Mod to change anything. (Don't forget to accept the changes in the top right corner!)
    • Video drivers close to stock. MHL should work on stock, and in older AOSP ROMs(with ICS blobs).
    • Smartdimmer disabled by default. For enabling it, see the bottom of this post.
    • UMS works on stock ROMs with lyapota's modpack. (Thanks for n3o for the kernel part, and Zulake for testing)
    • Voltage control interface changes. (more info, even more info)
    • Audio min. freq is at 204MHz
    • Implemented proper voltage control. You NEED to clear the data of the apps that can change voltages to let them reset the default values!
    • S2W register threshold increased to prevent loss of touch on buttons.
    • Disabled Gentle Fair Sleepers
    • Added arm topology awareness patch and enabled arch power management
    • GPU min. freq. lowered to 247MHz for stability.
    • LED backlight fix. (Faster wake, thx to Thoemy)
    • Added TouchDemand governor per request.
    • ROW optimizations. Should be even smoother.
    • Switch to fget_light in do_fsync() -> Less overhead in fsync -> More battery, more speed.
    • Added ROW I/O scheduler and set as default.
    • Added smartdimmer from trip.
    • Disabled optimized RWSEM algorithm. (Possible cause of freezes)
    • Variant info on sysfs introduced. (/sys/kernel/debug/t3_variant, cpu_process_id is your variant. Reworked from faux's code.)
    • Various fixes/optimizations, mostly from faux's n4 kernel. (more info on github)
    • Little longer boost for smartmax.
    • Global input boost cap from maxwen.
    • Driver updates & other kernel fixes. (See github for more information)
    • USB Mass storage fix.
    • CIFS Support.
    • SIO added.
    • Better compression. (Smaller kernel size)
    #106
    • GPU OC to 520MHz.
    • Driver updates from Nvidia.
    • Smartmax grovernor from maxwen. (It should be better for battery life, now this is the default)
    • Lower LP voltage from TripNRaVeR.
    • Fix LP lockup.
    • Fix for errors when trying to change governors on some ROMs.
    • SW AES optimized. (~30-50% faster)
    • HW Accelerated AES enabled.
    • Frequency lockup fixed.
    • Some other fixes from n3o and lord.
    • Replaced stock hotplug algorithm with MPDECISION. (Thx to showp1984 for the code).
    • Some fixes from maxwen.
    • Proper Hard Cap. Now it will be kept during suspend/resume.
    • Voltage Control.
    • Introducing CPU Hard Cap - Restoring after suspend is not working yet. For that use SetCPU "On Screen Unlock" profile.
    • Updated Touchscreen driver(Now should work for everyone)
    • Voltage Control
    • Volume wake
    • USB Fast charge
    • A few optimization for better gaming.
    • CPU tuning works
    • Fix for multitouch that S2W broke
    • Added Sweep2Wake
    • Working CPU hotplug and everything else
    • GCC optimizations (Compiled with linaro 4.7)

    Notes/Issues/User guide:

    • The absolute stable version is 188v4, please consider anything above as a beta.
    • Use smartmax for daily/battery and gaming for performance/gaming.
    • If you want extra battery, and you are ready to give up smoothness for it, then use "pmc" governor, more info here.
    • If you want even more performance then you can use interactive or ondemand with gaming boost.
    • If you have hiccups in music, use interactive there too.
    • If too much heat generated during games, cap your CPU to 1-1.2GHz, the performance difference will be minimal, also a safe undervolt (25-50mV) should help a lot.
    • About UV: CPU VDD should be close to Core VDD, by default there is a 100-300mV(depending on kernel) lock between them. Core minimal voltage is 950 at default. This means even if you set 100mV to any freq, it won't go below 650-850. And this also means, if you UV your GPU, while you have CPU UV, CPU UV that seemed stable can become unstable.
      So if you plan on UVing GPU, you should UV that first, and CPU only after that.
    • I'm not responsible for any damage, this kernel might cause.
    • Thanks to pabx, maxwen, n3ocort3x, tbalden, kozmikkick, showp1984,TripNRaVeR and everyone who contributed to this kernel.
    • There might be a 1sec delay after wake one sense roms, before the screen processes touches. It's a S2W thing, if you don't want it, disable S2W.(See below)
    • Here is an awesome guide about how to get the maximum out of your phone, both in battery and performance

    Auto-BLN Issues:
    • Green led might stuck after removing from charger if there is an unseen notification. Just check the notification to solve.
    • Green led might not come up after a finished charge.
    • BLN will not work while charging the phone.

    AOSP Installation:

    1. Repack!
    2. Install modules from recovery (Install the zip)
    3. Wipe dalvik cache. Yes, it's important, the versions could have some binary level differencies (from different compiler options) which can lead to unknown behaviour with old dalvik code.
    4. Erase fastboot cache
    5. Flash kernel image with fastboot

    Sense Installation:

    1. Install modules from recovery (Install the zip)
    2. Wipe dalvik cache. Yes, it's important, the versions could have some binary level differencies (from different compiler options) which can lead to unknown behaviour with old dalvik code.
    3. Erase fastboot cache
    4. Flash kernel image with fastboot
    5. If you have problems with some functions not working on your ROM, then repack. Otherwise it's not needed.


    Configuring kernel parameters:

    S2W Configs:
    Turn off:
    Code:
    echo "0" > /sys/android_touch/sweep2wake
    Or you can download "Sweep2Wake-Widget" from Google Play.
    Button panel locks to s2w after this distance:
    Code:
    /sys/android_touch/s2w_register_threshold
    Screen turns on/off after this distance:
    Code:
    /sys/android_touch/s2w_min_distance
    Direction independent(1 - Yes, 0 - No):
    Code:
    /sys/android_touch/s2w_allow_stroke

    DoubleTap2Wake Configs:
    Turn on:
    Code:
    echo "1" > /sys/android_touch/s2w_allow_double_tap

    Activate fast charge:
    Code:
    echo '1' > /sys/devices/platform/htc_battery/fast_charge

    Enable smartdimmer:
    Code:
    echo "1" > /sys/devices/tegradc.0/smartdimmer/enable

    To get your variant:
    Code:
    cat /sys/kernel/debug/t3_variant
    (Or see it in a root explorer)
    cpu_process_id is your variant.

    3D Tuning:
    If you want to change clocks, you have to write the whole clock table again, from up to down. In case you want to reset to default, this is it:
    Code:
    echo '520 520 520 520 492 484 380 247' > /sys/devices/system/cpu/cpu0/cpufreq/gpu_oc
    If you want to set them at boot, use an init script. Here is one. Just copy to /system/etc/init.d and set the permissions to executable by everyone with a root explorer. (Thx to Byrana)
    Here is a flashable script that will work on newer kernels too for everyone. It also enables fast_charge. (Thx again Byrana)

    2D Tuning:
    If you want to change clocks, you have to write the whole clock table again, from up to down. In case you want to reset to default, this is it:
    Code:
    echo '520 520 520 520 492 484 380 247' > /sys/devices/system/cpu/cpu0/cpufreq/two_d_oc
    You should NOT OC this higher than 3D.

    EMC Tuning:
    If you want to change clocks, you have to write the whole clock table again, from up to down. In case you want to reset to default, this is it:
    Code:
    echo '667 667 667 667 408 408 408 408' > /sys/devices/system/cpu/cpu0/cpufreq/emc_oc
    If you want to OC let's say to 800MHz:
    Code:
    echo '800 800 800 800 667 667 408 408' > /sys/devices/system/cpu/cpu0/cpufreq/emc_oc

    Auto-BLN Control:
    Interface:
    /sys/class/leds/button-backlight/auto_bln
    Values:
    • 0: BLN OFF/Green led ON
    • 1: BLN ON/Green led ON
    • 2: BLN ON/Green led OFF
    Example:
    Turn off Auto-BLN:
    Code:
    echo '0' > /sys/class/leds/button-backlight/auto_bln
    The changes will apply from the next notification.

    Backlight button brightness:
    Interface:
    /sys/class/leds/button-backlight/button_brightness
    Values:
    • 0-255: 0 is off, 255 is the maximum possible.
    Example:
    Code:
    echo '50' > /sys/class/leds/button-backlight/button_brightness
    The changes will apply from the next backlight turn on.

    GPU Voltage control:
    If you want to enable this you should write '1' to /sys/devices/system/cpu/cpu0/cpufreq/gpu_voltage.
    In command line that is:
    1. Code:
      echo '1' > /sys/devices/system/cpu/cpu0/cpufreq/gpu_voltage
    2. After that you need to restart your voltage control app (Trickster Mod).
    3. Now you will see the GPU frequencies multipled by 1000 to separate them from the CPU frequencies. So you will see 520000MHz, etc.
    Be advised that there are a really few HOX's that can handle more UV on Core, than the preset 50.
    Also incrasing your Core voltage over 1300mV is NOT ADVISED AT ALL. Almost everything uses this voltage on your motherboard.
    If you want to enable the values at boot, you need an init script that enables it, so later Trickster mod or anything can set them.

    LP OC:
    Interface:
    /sys/module/cpu_tegra/parameters/enable_lp_oc
    Values:
    • 0: LP OC OFF
    • 1: LP OC to 620MHz
    Example:
    Turn on LP OC:
    Code:
    echo '1' > /sys/module/cpu_tegra/parameters/enable_lp_oc

    Audio Min. Freq.:
    Interface:
    /sys/module/snd_soc_tlv320aic3008/parameters/audio_min_freq
    Example:
    Change audio min. freq. to 204MHz:
    Code:
    echo 204000 > /sys/module/snd_soc_tlv320aic3008/parameters/audio_min_freq

    Save settings:
    If you want any of the above settings saved, you can use iba21's recovery package.

    Battery life:
    vip1.jpg

    Source:
    GitHUB
    BitBucket

    DONATORS
    (Thank you)​
    fantomster,evo1rs,71nh0,dsonex,Lextermina(3),Byrana,97_3,glen.ricky,Whiskey103,damanrico,RiceDie(3)
    attachment.php

    XMkernel2.png
    67
    Well guys, the time has come. I'm flying in the morning. There will be no updates until September. I hoped that I can make a last one, but that's probably won't happen due to time limitations.

    Thanks for all the testing, reporting, and supporting each other.

    Everyone have a nice summer! See you, guys :)
    59
    REPACKS(Click)

    If your ROM is not in the list, then you should repack yourself, or wait until there is a repacked version out.
    You can use this tool to repack the kernel: [TOOL]One X One Click v1.9 then please upload it to d-h.st:
    username: xmrepacks
    password: xmrepacks
    For file name use the following: xm_kernel_<num>_<rom>.img or xm_kernel_<num>_<rom>.zip if you include the modules, for example: xm_kernel_95_viper336.img
    And for description use the following: XM-Kernel #<num> for <rom>, for example: XM-Kernel #95 for Viper 3.3.6
    Tick to Make it public.
    I'm trusting you, that you won't upload anything else than repacked XM-kernels. Please don't fail my expectations.


    There is an alternative link for repacked boot images, thanks to Whiskey103: http://www.whiskey103.nl/Onex_kernels/index.php?dir=xm/Repacked/
    44
    I'm here guys. :)
    But don't get too excited, there won't be many releases before the new source comes out.
    After that I will see how happy I will be with the battery life.

    Sent from my Nexus 7 using XDA Premium HD app
    34
    TODO:
    • Release the next stable version.