[KERNEL] [Oreo-8.1] [libra/aqua] HateKernel-2.0 -UBERTC-5.3.x

kopter36

Senior Member
Sep 27, 2012
377
193
73
Kuala Lumpur
Introduction
HateKernel is a custom kernel compatible with libra/aqua and on LineageOS 15.1-based ROM (Oreo 8.1.0). This kernel source are forked from Cozzmy13's source (CAF) and are made to improve performance, battery life, features and stability of our device. Obviously, I can't guarantee all of those claims at once due to the fact that there is a trade-off among them, so its up to you for applying tweak or setting-up your device based on your usage criteria.
Image
Damn! I'm too lazy to post any. :silly:
Features
-Boeffla wakelock blocker.
-FAUX sound control.
-KCAL advanced color control.
-CPU boost & input-boost. (off by default)
-Kernel samepage merging. (off by default)
-Power-efficient workqueue. (on by default)
-Disable storage CRC check. (reduce IO overhead)
-FSync on/off. (on by default)
-250Hz tick timer-interrupt & dyntick tickless-idle. (may help with battery and UI lagginess? I'm not sure.)
-Added CPU Governor - relaxed, blu-active, despair, zzmoove, elementalx, wheatley, impulse, bioshock.
-Added IO-Scheduler - fiops, sio, sioplus, zen, vr, maple.
-Exposed all TCP congestion algorithm.
-Proper undervolt. (untweakable. Hardcoded in kernel. Blame QCom)
-Compiled with UBERTC-8.x.x -O2 flag.
-A few more optimization.
Installation instruction
Required - TWRP recovery latest version & Nougat-bootloader.
NOTE: For AnyKernel2 flashable zip, I highly recommend to flash your stock ROM's boot.img first.

Flash via 'fastboot':
1) Download 'HateKernel-x.x.img'
2) Put the image in same folder as fastboot executable.
3) Run thru command "fastboot flash boot HateKernel-x.x.img"

Flash via TWRP recovery (boot.img):
1) Select install and change mode to "Flash Image" in TWRP.
2) Flash 'HateKernel-x.x.img' in 'boot' partition.
3) Obviously, reboot. :eek:

Flash via TWRP recovery (AnyKernel zip) RECOMMENDED
1) I think you should know how at this point.
2) Install as usual. ;)
Downloads
All version >
Credits
*Cozzmy13 for kernel source
*AndropaX
*flar2
*faux123
*savoca
*Boeffla
*jollaman999
*nathanchance
*tester/suggester/advisor and everyone who helped to improve HateKernel
*everyone i forgot to add :)
XDA:DevDB Information
HateKernel, Kernel for the Xiaomi Mi 4C

Contributors
kopter36
Source Code: [url]https://github.com/iZwnMswn/kernel_xiaomi_msm8992[/URL]

Kernel Special Features: Read "Features".

Version Information
Status: WIP
Current Stable Version: HateKernel-3.1
Stable Release Date: 2018-05-28
Current Beta Version:
Beta Release Date:

Created 2018-02-14
Last Updated 2019-03-08
 
Last edited:

kopter36

Senior Member
Sep 27, 2012
377
193
73
Kuala Lumpur
+ Preliminary info.

- Kernel in .img format are only compatible with Lineage-15.1 by Cozzmy13 ONLY. Don't flash it on other ROM even from the same source.

- HateKernel-1.5_r2 and up currently had issue with some device won't be able to boot. I'm currently still working on it.



+ Download info.

- Testbuild : There is 2 version (Lineage-15.1 stock & HateKernel build). Please test both version from lower-number to highest and report back which one is working + state last Stable-release of HateKernel that is working before.

- Experimental release is essentially a beta version but have been tested by me, but sometimes it might not working reliably with certain ROM+variant(libra/aqua).

- Stable release, as the name imply, mostly always working and have no major bug. This version have been tested extensively to avoid complaint from users and headache for me :p

Thank you so much for every feedback.
 
Last edited:
  • Like
Reactions: asiranno and BTBK

kopter36

Senior Member
Sep 27, 2012
377
193
73
Kuala Lumpur
+ Changelog {ascending order}

HateKernel-1.1
- initial build using Google's toolchain. (GCC-4.9)

HateKernel-1.2
- support libra and aqua variants.
- expose all standard CPU governors + add elementalx.
- expose all standard IO-schedulers.
- expose all standard TCP congestion algorithms.
- input-boost and CPU-boost.
- enable RCU boost.
- Kernel Samepage Merging.
- implement display_state API.
- msm8992 initial overclocking.
- Slimbus overclock.
- enable Error Detection and Correcting log capability.
- enable CTS and SHA512 crypto for ARMv8.
- use asymmetric-key-type for crypto.
- compiled with UberTC-4.9.X (GCC-4.9.4)

HateKernel-1.3
- add CPU governors > (bioshock, blu_active, despair, impulse, relaxed, wheatley, zzmoove)
- add IO-schedulers > (fiops, maple, sio, sioplus, vr, zen)
- add WireGuard support.
- revert msm8992 initial overclocking.
- undervolt CPU with stable value.
- fix display_state implementation.
- compiled with UberTC-5.3.X (GCC-5.3.1)

HateKernel-1.4
- add KCAL advance color controls.
- add FAUX sound controls.
- add Boeffla wakelock blocker.
- 1000Hz ticks + dynamic tickless-idle.
- disable storage CRC check.
- FSync on/off.
- remove Edge-Touch for touchscreen.
- enable ARM's v8 hw CRC32.
- enable parallel crypto engine.
- compiled with -O3 flags.

HateKernel-1.5_r2 {stable} {alternative}
- based on HateKernel-1.1 config with stable features.
- fixed Synaptic's touchscreen issue.
- revert some minor features and optimization in favor of stability.
- compiled with -O2 flags again.

HateKernel-1.6b {staging}
- based on Hatekernel-1.4 config with fixed Synaptic's navigation button issue.
- 100Hz timer interrupt tick.
- enable MSM kgsl triple buffer.
- improve scheduler for SMT operation.
- a lot of underlying optimization.
- optimize very likely/unlikely branch (yes, I'm aware of security-hole for this one)
- fully compiled with -O3 flags (don't worry about cache miss, trust me)

ps : This list is depreciated. I will clean this as soon dev-build are complete ;)
 
Last edited:

kopter36

Senior Member
Sep 27, 2012
377
193
73
Kuala Lumpur
long time not see a custom kernel, cool :p
so if you use kernel based on Los 15.1, can I use this for other roms based los15.1 kernel?

nicee, will this compatible with others 15.1 based?
It should work. I've no idea if my kernel will broke something on other LoS-15.1 based rom as I've only tested it on unofficial LoS15.1 by Cozzmy13 but sure, try it and if something breaks, I'll try my best to fix it. :good:
 

kopter36

Senior Member
Sep 27, 2012
377
193
73
Kuala Lumpur
i've got bootloop on NOS....:rolleyes:
I can see that rom used Cozzmy13 kernel source which is the same tree of my kernel. Probably something changed in boot.img ramdisk for NOS kernel. I try to make anykernel patcher tonight.

Sidenote : HateKernel 1.3 already compiled with GCC 5.3.1 (ubertc-5.3.X) and booted up properly. Will released tonight with some other changes. ;)
 

Ippfcox

Senior Member
Sep 14, 2016
83
17
0
威海
I can see that rom used Cozzmy13 kernel source which is the same tree of my kernel. Probably something changed in boot.img ramdisk for NOS kernel. I try to make anykernel patcher tonight.

Sidenote : HateKernel 1.3 already compiled with GCC 5.3.1 (ubertc-5.3.X) and booted up properly. Will released tonight with some other changes. ;)
Thanks guy! You are really great!
 

hanuraiga

Senior Member
May 10, 2014
259
66
0
Middle of Knowhere
I can see that rom used Cozzmy13 kernel source which is the same tree of my kernel. Probably something changed in boot.img ramdisk for NOS kernel. I try to make anykernel patcher tonight.

Sidenote : HateKernel 1.3 already compiled with GCC 5.3.1 (ubertc-5.3.X) and booted up properly. Will released tonight with some other changes. ;)
Awesome... I'll be waiting ;)
 

kopter36

Senior Member
Sep 27, 2012
377
193
73
Kuala Lumpur
Is this kind of kernel features only available on kernel version 3.18.xx or is it also available on kernel version of 3.10.xxx
Most of those features are not limited to 3.18.xxx kernel. I've seen most of it implemented on Nexus 5X's custom kernel which share same kernel version with our device with the only exception is Qnovo charging driver. In fact, I've seen some of those features implemented on 3.10.9x which arent upstream to latest version at all.
 
Last edited:

kopter36

Senior Member
Sep 27, 2012
377
193
73
Kuala Lumpur
HateKernel-1.3 is up

Changelog ;
-upgrade compiler to UBERTC-5.3.X (GCC-5.3.1)
-revert overclocking code until I found (if possible at all) working code
-proper undervolt to keep thermal-throttle a bit manageable
P.s: Not much changes in this version because I'm currently on holidays. Regarding kernel-patcher (AK2/lazyflasher), I'm currently still learning to do that. Very sorry guys. :( Development for more feature and upstream will continue soon.


To-do list ;
-upstream with latest CAF tag for msm8992
-upstream security patch
-Boeffla wakelock blocker
-backport zRam, F2FS and ext4 driver
-Adreno idler
I'm open to any suggestion to add other feature, just make sure its reasonable. Would be a great help too if you can point me to the commit if available. ;)
 

flammenwerferx

Senior Member
May 8, 2016
200
88
28
Indonesia
Changelog ;


P.s: Not much changes in this version because I'm currently on holidays. Regarding kernel-patcher (AK2/lazyflasher), I'm currently still learning to do that. Very sorry guys. :( Development for more feature and upstream will continue soon.


To-do list ;

I'm open to any suggestion to add other feature, just make sure its reasonable. Would be a great help too if you can point me to the commit if available. ;)
Well, I'mma just suggesting these

1. KCAL Advanced Color Contol [with satutation, contrast and etc. Control]
2. Faux Sound Control [this really useful especially if somebody is experiencing a hissing noise on their headset, so they can reduce the output volume through this control]
3. Intelliplug or any hotplugging [only if it's really necesarry]
4. Adreno idler / booster of course (You've mentioned)
5. Upstreaming to the latest CAF (You've aforementioned)
6. ZRAM LZ4 Backport (On your to-do list)
7. Some kind of power efficient workqueue maybe
8. So-called boeffla wakelock (if i ain't mistaken the name)

:D

PS : Anyway, undervolting seems working flawlessly, I've never reached 50°C now on normal chatting usage (usually it is around 50-55°C after one hour usage)
 
Last edited:
Our Apps
Get our official app!
The best way to access XDA on your phone
Nav Gestures
Add swipe gestures to any Android
One Handed Mode
Eases uses one hand with your phone