Development [KERNEL][AOSP/MIUI] N0Kernel 2.3

Search This thread

esszett

Senior Member
Jan 20, 2019
144
98
Sony Xperia Ion
Fairphone
What rom are you using?
Havoc 4.14

I have done a relatively large number of things to keep the idle and the active power consumption as low as possible and to stay away from a charger as long as possible. However, NOK 2.3 (Bat) seems to be the first kernel that knows how to support me perfectly here and it seems to behave even better than the kernel shipped with HavocOS. As soon as a complete cycle has run through, I can say more. ATM it looks good.
 
  • Like
Reactions: sandiskusb

CRNO

Senior Member
Jul 15, 2014
207
41
switch from kernel to other one it is flash normal or i need full wipe of system ?
 

Top Liked Posts

  • There are no posts matching your filters.
  • 28
    DISCLAIMER: I AM NOT RESPONSIBLE IF YOUR PHONE BRICKS! YOU ARE FLASHING THIS KERNEL AND ITS YOUR CHOICE TO DO IT OR NOT TO DO IT AND YOU'RE THE ONE DOING IT. I JUST WANT TO HELP OTHERS OUT.
    REQUIREMENTS: UNLOCKED BOOTLOADER AND AOSP BASED ROM, IT MAY WORK PERFECTLY FINE ON MIUI AS WELL BUT I DO NOT GIVE SUPPORT FOR IT, SORRY.


    Features:

    - Based on IMMENSITY KERNEL;
    - Compiled with Proton Clang 13.0.0;
    - Only 0.02-0.07 jitter in uibench.
    - Sultan's Devfreq Boost;
    - Sultan's IRQ Affine API;
    - Sultan's Simple LMK;
    - Modified CpuSets;
    - Latest caf tag and linux upstream merged;
    - RCU backported from 5.4 caf kernel;
    - Kernel/power backported from 5.4 caf kernel;
    - Sleep states from soc/qcom backported from 5.4 caf kernel;
    - Binder backported from 5.4 caf kernel;
    - KGSL improvements;
    - Cache improvements;
    - PmQoS improvements;
    - Disabled walt;
    - Scheduler Improvements;
    - Updated Energy Model from freqbench result;
    - Latest Srandom by josenk;
    - Sultan's pidmap optimisation & pidmap header shrink optimization SWITCH which massively improve performance in games made in Unity Engine (such as GENSHIN IMPACT), thanks to @lybxlpsv. How this works? You have to use lyb kernel manager from playstore, open it, allow it root, go to profiles and create a profile, select the profile and enable sultan's optimisations (PID HEADER SHRINK OPTIMISATION & PID MAP OPTIMISATION AND THEN APPLY SETTINGS FOR THIS PROFILE), and press on the square to get the app list you can apply the profile. Please do not select other games than UNITY ENGINE based games, because you will get banned in games with anti-cheat such as pubg & codm, if you don't enable it on those or globally you won't get banned and everything will be fine, its especially made for unity games.
    - Many other improvements, you can check my github.

    Download:
    Google Drive.
    Source: Github.
    Support Group: Telegram.

    Special thanks to:

    - UtsavTheGreat;

    - Ayrton990;

    - Sultanxda;

    - GtrCraft;

    - Sahil Sonar;

    - Many other great devs that i have picked commits from.
    14
    Changelog:

    N0Kernel 2.3:
    - Upstreamed to v4.19.235;
    - Merged LA.UM.9.12.r1-14000-SMxx50.QSSI13.0 caf tag in kernel tree;
    - Merged LA.UM.9.12.r1-14000-SMxx50.QSSI13.0 caf tag in qcacld-3.0 subtree;
    - Merged LA.UM.9.12.r1-14000-SMxx50.QSSI13.0 caf tag in qca-wifi-host-cmn subtree;
    - Merged LA.UM.9.12.r1-14000-SMxx50.QSSI13.0 caf tag in fw-api subtree;
    - Merged LA.UM.9.12.r1-14000-SMxx50.QSSI13.0 caf tag in techpack/display subtree;
    - Merged LA.UM.9.12.r1-14000-SMxx50.QSSI13.0 caf tag in techpack/audio subtree;
    - Merged LA.UM.9.12.r1-14000-SMxx50.QSSI13.0 caf tag in techpack/video subtree;
    - Merged LA.UM.9.12.r1-14000-SMxx50.QSSI13.0 caf tag in techpack/camera subtree;
    - Merged LA.UM.9.12.r1-14000-SMxx50.QSSI13.0 caf tag in techpack/data subtree;
    - Backported sleepstates in soc/qcom entirely from 5.4 caf kernel;
    - Backported kernel/power entirely from 5.4 caf kernel apart pm_qos;
    - Backported binder from 5.4 caf kernel;
    - Backported latest changes in RCU from 5.4 caf kernel;
    - Updated some arm routines;
    - Improved bitmap;
    - Minimised wakeup time of android's alarm timer which is used very often;
    - Tuned scheduler capacity margin;
    - Made battery percentage more linear, what this means? Now it wont drain so slow between 100-90% and very fast between 30-0%, it should be more linear/monotonic than before;
    - With all the changes done, idle drain should be drastically improved now, battery life and performance as well;
    - More improvements and changes under the hood, just check my github.

    N0Kernel 2.2:
    - Upstreamed to v4.19.234;
    - Merged LA.UM.9.12.r1-13800.02-SMxx50.QSSI12.0 caf tag in kernel tree;
    - Merged LA.UM.9.12.r1-13800.02-SMxx50.QSSI12.0 caf tag in qcacld-3.0 subtree;
    - Merged LA.UM.9.12.r1-13800.02-SMxx50.QSSI12.0 caf tag in qca-wifi-host-cmn subtree;
    - Merged LA.UM.9.12.r1-13800.02-SMxx50.QSSI12.0 caf tag in fw-api subtree;
    - Merged LA.UM.9.12.r1-13800.02-SMxx50.QSSI12.0 caf tag in techpack/display subtree;
    - Merged LA.UM.9.12.r1-13800.02-SMxx50.QSSI12.0 caf tag in techpack/audio subtree;
    - Merged LA.UM.9.12.r1-13800.02-SMxx50.QSSI12.0 caf tag in techpack/video subtree;
    - Merged LA.UM.9.12.r1-13800.02-SMxx50.QSSI12.0 caf tag in techpack/camera subtree;
    - Merged LA.UM.9.12.r1-13800.02-SMxx50.QSSI12.0 caf tag in techpack/data subtree.
    - Dropped LNRG for srandom;
    - Introduced latest srandom 1.40 by josenk;
    - Updated arm routines to their latest version from arm (memcmp, strcmp, strlen, memcpy, memmove, memchr);
    - Backported rpmsg from 5.4 caf kernel;
    - Backported soc/qcom from 5.4 caf kernel, this drastically improves idle drain;
    - Added new cpu idle governor, CPU_IDLE_GOV_TEO which improves idle drain;
    - Backported PM_SLEEP_MONITOR and softirq changes which improve idle drainl
    - Backported FUSE passthrough from 5.4;
    - Backported haptics driver from MI12 series thanks to Utsav;
    - Debloated and optimised focaltech_spi driver (touchscreen driver);
    - Optimised charging current. How this works? Temperature limit now its 43C from 48C which xiaomi uses as default, with that your PMIC can burn and your phone will get bricked, in order not to reduce charging speeds so dramatically because of the temperature limit i optimised how current works, reduced the peak current to a lower value (5300mah repsectively) and increased mid and low values in order to keep a stable temperature so it can charge almost as fast as before while keeping your device cooler and safe.
    - Back to CONFIG_HZ_250, better, more efficient, better jitter;
    - Added scheduler fixes and improvements from pixel;
    - Optimised console framebuffer;
    - Optimised spinning loop for arm64;
    - Backported CFQ changes from samsung's kernel, thanks to Utsav;
    - Introduced ZSWAP + VBSWAP which will replace ZRAM because its a more efficient way which uses both ram and storage which will reduce i/o and cpu overhead therefore having better results, value has been set to 4gb. This will improve ram management.
    - Improved UFS speeds;
    - Zsmalloc optimisations;
    - Lowered Display's Jitter to match with the jitter results with N0kernel, this drastically improves response time and percived smoothness.
    - Fixed Reddit/other apps small images;
    - IF YOU HAVE TELEGRAM/WAPP SWIPING ISSUSES ON AOSP, FLASH MIUI VERSION, IT WILL BOOT AND WORK ACCORDINGLY, SOME ROMS REQUIRE THE FIX MIUI ALSO NEEDS.
    - More changes under the hood which i forgot.


    N0kernel 2.1:
    - Downstreamed to 4.19.227. Why? Because miui sucks and some users bootloop because of that;
    - Fixed bootloop on MIUI, reason above;
    - Fixed freezes/random reboot when watching netflix or other instances;
    - Moved all KGSL and Display workers to SCHED_RR to keep up with the low jitter in order to reduce janks;
    - Swiched to 300HZ scheuler tickrate from 250HZ to achive a smoother experience, our jitter is low enough to not need 250hz now;
    - Updated cpuset configuration;
    - Affined cpu input boost worker to prime core to reduce delays;

    N0kernel 2.0:
    - Introducing Battery version of N0kernel which improves battery life without sacrificing much from performance.
    - Upstreamed to v4.19.229;
    - UNICODE VERSION IS MEANT FOR AOSPA, DO NOT USE THAT VERSION ON MIUI.
    - Added cpu input boost from Sultan;
    - Added Simple LMK from Sultan which will improve gaming stability;
    - Boosting cpu to render upcomming frames to reduce jank;
    - Building with Ofast optimisations;
    - Marked KGSL workqueues to CPU INTENSIVE;
    - Added low_prio_worker thread to KGSL to free gpu memory, affining more important threads on perf cluster with higher priority;
    - Upstreamed dtc to v1.6.1-19;
    - Removed a lot of logging and debugging to reduce overhead in order to improve performance;
    - Increased data processing limit in KGSL;
    - Backports from linux mainline kernel in lib/list_sort, lib/string_helpers and atomic;
    - Added back full frequency table to support better xiaomi's thermals as well as thermal modules;

    N0kernel 1.9:
    - Upstreamed to 4.19.227;
    - Introduced LRNG - Linux Random Number Generator which is much faster than traditional one;
    - Using dedicated kmem_cache pool to avoid costly dynamic memory allocations;
    - Scheduler improvements;
    - Removed xiaomi's UFS/f2fs "optimisations", they were doing worse than better.
    - Using the better samsung ufs tw/hpb drivers;
    - Inline the spinlock function family regardless of preemption;
    - Reverted back to default gpu frequency calculation. This will make your gpu to not ramp up frequencies in normal usage, reducing the power consumption.
    - Lowered ddr boost frequency which improves battery life;
    - Crypto improvements
    - Nuked hysteresis feature;
    - Properly set gpu timeout;
    - Reverted qcom's KGSL timelines which add a considerable ammount of overhead, and they are not used by anything.
    - Added miui's millet optimisations;
    - Don't allow s2idle to be used, will use only deepsleep;
    - Changed default SCHED_RR timeslice from 100 ms to 1 jiffy;
    - Implemented f2fs rapid GC from arter97;
    - Scrapped entirely qualcomm's pmqos usage for UFS;
    - Implemented simple IRQ-affined PM_QoS operations for UFS;
    - Using HIGH priority workqueue for ufs gating work;
    - Using SCHED_FIFO for KGSL workqueue;
    - Added KGSL POPP back.

    N0kernel 1.8:
    - Fixed gestures in MIUI;
    - Using PELT_UTIL_HALFLIFE_16 instead of PELT_UTIL_HALFLIFE_32 for better smoothness;
    - Reverted some commits that were decreasing performance;
    - Aligned defconfig with CAF.

    N0kernel 1.7:
    - Removed 90hz support (because its bad and causes issuses with adaptive refresh rate for 60/120hz);
    - Compiled with Proton Clang 13.0.0;
    - Merged LA.UM.9.12.r1-13700-SMxx50.QSSI12.0 CAF tag in kernel tree;
    - Merged LA.UM.9.12.r1-13700-SMxx50.QSSI12.0 CAF tag in qcacld-3.0 subtree;
    - Merged LA.UM.9.12.r1-13700-SMxx50.QSSI12.0 CAF tag in qca-wifi-host-cmn subtree;
    - Merged LA.UM.9.12.r1-13700-SMxx50.QSSI12.0 CAF tag in fw-api subtree;
    - Merged LA.UM.9.12.r1-13700-SMxx50.QSSI12.0 CAF tag in techpack/display subtree;
    - Merged LA.UM.9.12.r1-13700-SMxx50.QSSI12.0 CAF tag in techpack/audio subtree;
    - Merged LA.UM.9.12.r1-13700-SMxx50.QSSI12.0 CAF tag in techpack/video subtree;
    - Merged LA.UM.9.12.r1-13700-SMxx50.QSSI12.0 CAF tag in techpack/camera subtree;
    - Merged LA.UM.9.12.r1-13700-SMxx50.QSSI12.0 CAF tag in techpack/data subtree;


    N0Kernel 1.6:
    - Fixed the message pop-up on boot "There's an internal problem with your device".

    N0Kernel 1.5:
    - Rebased again on IMMENSITY KERNEL;
    - Upstreamed to v4.19.225;
    - Fixed an issuse where after fully charging the phone it would have a massive battery drain;
    - Drastically reduced idle drain;
    - Significantly improved battery life;
    - Improved performance;
    - Improved the performance stability;
    - Improved ram management;
    - The phone heats less than previous versions;
    - Introduced Sultan's pidmap optimisation & pidmap header shrink optimization SWITCH which massively improve performance in games made in Unity Engine (such as GENSHIN IMPACT), thanks to @lybxlpsv. How this works? You have to use lyb kernel manager from playstore, open it, allow it root, go to profiles and create a profile, select the profile and enable sultan's optimisations (PID HEADER SHRINK OPTIMISATION & PID MAP OPTIMISATION AND THEN APPLY SETTINGS FOR THIS PROFILE), and press on the square to get the app list you can apply the profile. Please do not select other games than UNITY ENGINE based games, because you will get banned in games with anti-cheat such as pubg & codm, if you don't enable it on those or globally you won't get banned and everything will be fine, its especially made for unity games.
    - More stuff has been changed but the changelog would be too big, check my github for more.


    N0Kernel 1.4:
    - Compiling now with AOSP Clang 12.0.7;
    - Enforced deep sleep whenever the phone is on idle for lower idle drain;
    - Merged LA.UM.9.12.r1-13400-SMxx50.0 caf tag;
    - Upstreamed to v4.19.216;
    - Improvements for sched pelt;
    - Binder backports;


    N0Kernel 1.3:
    - Rebased on Optimus Drunk Kernel v11.17 (the one based on quantic kernel);
    - Merged LA.UM.9.12.r1-13300-SMxx50.QSSI12.0 caf tag;
    - Upstreamed to v4.19.213;
    - Introducing Simple LMK by SultanXDA;
    - Fixed Internal Error message at boot;
    - Many other misc improvements, check my github for more details.


    N0Kernel 1.2:
    - Rebased on latest IMMENSITY Kernel;
    - Merged latest caf tag LA.UM.9.12.r1-12900-SMxx50.QSSI12.0 in kernel tree, qcacld-3.0, qca-wifi-host-cmn & fw-api;
    - Added support for "Increased Touch Responsiveness" that most of the roms have as a feature;
    - Using sched capacity margins values from latest pixel devices;

    - Other misc improvements.

    N0Kernel 1.1:
    - Optimised pidmaps from Sultanxda should improve gaming experience, especially unity based games.
    - Reduced walt window size.
    - Forced colocate for foreground and top-app.

    N0Kernel 1.0:
    - Initial release.
    5
    The battery life on the battery version is unbelievably good
    Thanks @EmanuelCN
    I'm glad you like it, next version will be even better, soon™ .
    5
    Changelog:

    N0Kernel 2.3:
    - Upstreamed to v4.19.235;
    - Merged LA.UM.9.12.r1-14000-SMxx50.QSSI13.0 caf tag in kernel tree;
    - Merged LA.UM.9.12.r1-14000-SMxx50.QSSI13.0 caf tag in qcacld-3.0 subtree;
    - Merged LA.UM.9.12.r1-14000-SMxx50.QSSI13.0 caf tag in qca-wifi-host-cmn subtree;
    - Merged LA.UM.9.12.r1-14000-SMxx50.QSSI13.0 caf tag in fw-api subtree;
    - Merged LA.UM.9.12.r1-14000-SMxx50.QSSI13.0 caf tag in techpack/display subtree;
    - Merged LA.UM.9.12.r1-14000-SMxx50.QSSI13.0 caf tag in techpack/audio subtree;
    - Merged LA.UM.9.12.r1-14000-SMxx50.QSSI13.0 caf tag in techpack/video subtree;
    - Merged LA.UM.9.12.r1-14000-SMxx50.QSSI13.0 caf tag in techpack/camera subtree;
    - Merged LA.UM.9.12.r1-14000-SMxx50.QSSI13.0 caf tag in techpack/data subtree;
    - Backported sleepstates in soc/qcom entirely from 5.4 caf kernel;
    - Backported kernel/power entirely from 5.4 caf kernel apart pm_qos;
    - Backported binder from 5.4 caf kernel;
    - Backported latest changes in RCU from 5.4 caf kernel;
    - Updated some arm routines;
    - Improved bitmap;
    - Minimised wakeup time of android's alarm timer which is used very often;
    - Tuned scheduler capacity margin;
    - Made battery percentage more linear, what this means? Now it wont drain so slow between 100-90% and very fast between 30-0%, it should be more linear/monotonic than before;
    - With all the changes done, idle drain should be drastically improved now, battery life and performance as well;
    - More improvements and changes under the hood, just check my github.
    N0kernel 2.3 released :D
    4
    Changelog:

    N0kernel 2.0:
    - Introducing Battery version of N0kernel which improves battery life without sacrificing much from performance.
    - Upstreamed to v4.19.229;
    - Enabled Unicode to support AOSPA;
    - Added cpu input boost from Sultan;
    - Added Simple LMK from Sultan which will improve gaming stability;
    - Boosting cpu to render upcomming frames to reduce jank;
    - Building with Ofast optimisations;
    - Marked KGSL workqueues to CPU INTENSIVE;
    - Added low_prio_worker thread to KGSL to free gpu memory, affining more important threads on perf cluster with higher priority;
    - Upstreamed dtc to v1.6.1-19;
    - Removed a lot of logging and debugging to reduce overhead in order to improve performance;
    - Increased data processing limit in KGSL;
    - Backports from linux mainline kernel in lib/list_sort, lib/string_helpers and atomic;
    - Added back full frequency table to support better xiaomi's thermals as well as thermal modules;
    Released 2.0. :D