[KERNEL] Ares-Kernel {KlteXXX}

The~Skater~187

Senior Member
Nov 4, 2011
1,630
1,901
0
Niantic
****Ares-Kernel****
****By****
****The~Skater~187****


This kernel is a combination of SmartPack/Boeffla-Venom Samsung Galaxy S5 Lineage OS kernel, with some tweaks and additions from around the net. I have decided that since SmartPack was EOL and with sunilpaulmathews ok, I would just combine our two kernels (since fbs has Boeffla-Kernels covered) to make it easier for me to maintain his work and my own.


/* DISCLAIMER! *\
*I am not responsible for any damage to your device*
* Everything you are doing on your device is at your own risk*
*Don't forget to make a back up before flashing*


~~~~~~~~~~~~~~~Flash at own risk~~~~~~~~~~~~~~~~~~

/* Supported devices *\
klte: SM-G900F, SM-G900AZ, SM-G900M, SM-G900R4, SM-G900R7, SM-G900T, SM-G900V, SM-G900W8, SM-S902L
kltekor: SM-G900K/L/S
kltedv: SM-G900P/I
klteduos: SM-G900FD, SM-G900MD
kltekdi: SCL23

/* Compatibility *\
DO NOT FLASH OVER CUSTOM KERNELS!
This kernel is only meant to work on Lineage-OS 15.1/16 and nothing else. However, it may work on other LOS-15.1/16 (and AOSP) based Oreo/Pie ROMs
This kernel will NOT work in Samsung Stock and other TW ROMs.


/* How-to-Install *\
*Download Kernel*

1. Go to recovery (TWRP recommend)
2. Flash Kernel
3. Reboot and enjoy



/* Incorporated SmartPack Features *\

Build from latest Lineage OS source code.
Built using latest GCC-8.x.
Anykernel for compatibility with maximum devices.
Linux Kernel version is updated to 3.4.113
Kernel tweaker app recommend: SmartPack-Kernel Manager (Please note: official Kernel Adiutor is NOT fully compatible with this kernel).
Added features include...
CPU voltage control
CPU Freq Gov: INTELLIDEMAND, INTELLIACTIVE, SMARTMAX, LIONHEART, NIGHTMARE, ADAPTIVE, ALUCARD, ZZMOVE, etc.
(for those who want to use zzzmove, I strongly suggest to carefully read this forum post by @Saber)
CPU hotplugs: Lazyplug, Alucard, and mako hotplug.
Full control over AC, USB and Wireless charging rate in SmartPack-Kernel Manager (Default charging rates: AC: 1800 mA; USB 700 mA; Wireless: 900 mA).
Boeffla Sound to control speaker and headphone volume.
(for official KA users, follow these instructions by @Exzu to create respective custom controllers for Boeffla Sound and Fast Charge.)
Adreno_Idler
CPU Input boost (configurable in SmartPack-Kernel Manager)
IO schedulers: FIOPS, SIO, VR, ZEN, FIFO, TRIPNDROID.
TCP congestion algorithms: Westwood, reno, cubic etc.
FRandom
Dynamic sync control 2.0
Boeffla Generic Wakelock Blocker
268 MHz CPU underclocked frequency cycle
Additional 27 MHz GPU frequency step (idle frequency)
KCAL v2
SELinux "Enforcing" by default (can be switched to "Permissive" in SmartPack-Kernel Manager)
a lot more...


/* Incorporated Boeffla-Venom Features *\

*Enable OC to 2995:
-DISCLAIMER: (You Must Adjust Voltages for you OWN specific device on higher OC steps. (I AM NOT RESPOSIBLE FOR YOUR DEVICE)
*Fast Charge
*ZZmoove adjusted to acommodate Overclocking (Thanks to Legitsu)
*Tweak bandwith on higher OC steps (Thanks to ktoonsz)
*Deadline I/O Tweaks (Ktoonsz)
*Fix memory leak with sysfs when stats table are freed (Ktoonsz)
*Bump up Max Voltage (Adjusted for higher OC) (Ktoonsz)
*Dirty Writeback Tweaks
*Increased VM_MAX_READAHEAD to 512 (default)
*Increased default entropy levels (both read and write)
*Optimized Kernel Samepage Merging
*QuickWakeup (Thanks CrazyGamer)
*PowerSuspend (Thanks Faux123)
*Cortex_A15 Optimizations (Fusion-Rom Dev Team)
*Slimbus Overclock (Ktoonsz)
*Slimbus Optimized Overclocking Of Master Component (CrazyGamer)
*VFP Tweaks (Ktoonsz)
*EXT4 Tweaks(Ktoonsz)
*GPU Overclocked up to 657 (Ktoonsz)
*Disable Swap Readahead
*Increase Maximum Swappiness
*Kernel mode neon (ShinySide)
*Disable Direct Reclaim File Pages
*Enable Unaligned Capability For ARM (CrazyGamerGR)
*Update min-default adreno frequency to be 200 MHz (kholk)
*Fixed memory entry leak when calling Adreno Convertaddr (Shubhraprakash Das)
*Changed clock rates to 19.2 MHz (Faux123/Qualcomm)
*Optimized Sched/Fair a bit (Faux123)
*Applied many new compiler optimizations (Synergy kernel Team & Decimalman)
*Zswap: Uses LZ4 now (if available)
*Support for LZ4-compressed kernel
*Fix memory leak in Mass Storage
*Added back Intellithermal V.2 Thermal Engine (for those who prefer it)
*Modified LowMemoryKiller (fbs)


/* Downloads Can Be Found Here *\


/* Special note to Korean S5 users *\
(Thanks to sunilpaulmathews defconfig files)
Flashing this kernel after AOSP/LOS based Oreo/Pie ROMs originally build for the klte (SM-G900F) variant SHOULD allow the use of those ROMs on SM-G900S/K/L.

/* Acknowledgements *\

@haggertk for LineageOS for Galaxy S5
@Lord Boeffla
@franciscofranco
@Sultanxda
@arter97
@faux123
@CrazyGamerGR
@Saber
@nathanchance
@ZaneZam
@osm0sis for AnyKernel project
@Grarak for Kernel Adiutor
@sunilpaulmathew
@justjr for SmartPack efficiency profile
@ktoonsez
@KazuDante
@fbs
@kholk
@decimalman
@Synergy Kernel Team
Many other XDA developers


XDA:DevDB Information

Ares-Kernel, Kernel for the Sprint Samsung Galaxy S5

Contributors
The~Skater~187, sunilpaulmathew
Source Code: https://github.com/187MoD/Ares-Kernel

Kernel Special Features: Boeffla-Venom + SmartPack Kernels


Version Information

Status: Beta
Current Beta Version: Beta-v1.6
Beta Release Date: 2019-02-15

Created 2019-02-15
Last Updated 2019-08-26
 
Last edited:

The~Skater~187

Senior Member
Nov 4, 2011
1,630
1,901
0
Niantic

***Ares Kernel Changelog***


~~~~~Beta-v1.7~~~~~

*Up-to-date with Lineage-OS source as of 01.01.2020
*Update Intelli-plug to version 3.9 (Compliments of Pascua28)
*sound: Compiled with -Os optimization (Compliments of Pascua28)
*A few other optimizations


~~~~~Beta-v1.6~~~~~
*Up-to-date with Lineage-OS source as of 08.25.2019
*Compiled using Bleeding-Edge Toolchain 9.2
*Cortex A-15 MSM-memutil optimizations for better memory performance
*GPU compiler optimizations
*Enable: Frontswap
*Enable: Runtime compcache
*Removed un-supported SOC features (Thanks pascua28)
*Fix possible memory leak in slub.c (Thanks pascua28)
*Add Missing xor-neon file
*Compiled with many new compiler optimizations
*Plus more


~~~~~Beta-v1.5~~~~~

*Up-to-date with Lineage-OS source as of 07.15.2019


~~~~~Beta-v1.4~~~~~

*Up-to-date with Lineage-OS source as of 05.27.2019
*Compiled with "Bleeding-Edge-Toolchain" 9.1
*Compiled with 03 compiler optimizations


~~~~~Beta-v1.3~~~~~

*revert: disabled "CAF" cpu policy save code (Fixed cores not scaling properly)
*MSM Limiter updated


~~~~~Beta-v1.2~~~~~

*Up-to-date with Lineage-OS source as of 03.19.2019
*reverted to stock Lineage-OS LMK (Low Memory Killer)
*bumped OC up to 3072 -DISCLAIMER: (You Must Adjust Voltages for you OWN specific device on higher OC steps. I AM NOT RESPONSIBLE FOR YOUR DEVICE!)
*bumped up voltage overhead to hopefully help stabilize new OC step
*added Intelliplug_hotplug driver (Now default hotplug service)
*added Touchboost driver (adjusted for 3072 oc)
*added MSM CPU Limiter (adjusted for 3072 oc)
*enabled Arch Power
*added the ability to Toggle Arch Power And Sleepers (compatible with SmartPack Manager)
*disabled "CAF" cpu policy save code (Faux123)
*added msm_mem_utils for added memory performance
*disabled constant spam in dmesg from 'undefined instruction' print statement in traps.c
*ZZmoove: adjusted to acommodate Overclocking to 3072
*added Boeffla-compiled In-Kernel Busybox
*some other things


~~~~~Beta-v1.1~~~~~

*Up-to-date with Lineage-OS source as of 03.02.2019
*Ares-Kernel boot script: update default profile settings (credits: justjr)
*import Core Control fix (sunilpaulmathew)
*import "Hotspot" fix (sunilpaulmathew)
*added a compatible version of "Tuned" LowMemoryKiller (fbs)
*added support for lz4 compressed kernel
*added some compression tweaks to help with boot performance
*driver/char: add missing frandom commits
*fs/sdcardfs/mmap.c: add AIO optimization flag compatibility fix up
*kernel/power: add missing quickwakeup commit
*Optimized ARM RWSEM Algorithm (Faux123)
*Tuned thermal management a bit
*Some other stuff


~~~~~Beta-v1.0~~~~~

-Initial Merge of SmartPack/Venom Sources
*Synced With latest LineageOS Sources as of 02.13.19
*Built with Latest 8.2.1 toolchain using SunilPaulMathews build Framework
*Compatible With Kernel Auditor & Should Be Compatible SmartPack-Kernel Manager
*Enable OC to 2995:
-DISCLAIMER: (You Must Adjust Voltages for you OWN specific device on higher OC steps. I AM NOT RESPOSIBLE FOR YOUR DEVICE)
*Boeffla Sound
*Fast Charge
*ZZmoove: adjusted to acommodate Overclocking (Thanks to Legitsu)
*Enable 268 mhz underclock (Thanks to SunilPaulMatthew)
*Tweak bandwith on higher OC steps (Thanks to ktoonsz)
*Tweak deadline: Allow 0ms deadline latency, increase the read speed (Ktoonsz)
*Set audience sleep delay to 0 to fix delay upon making phone calls
*Async I/O latency to a ssd greatly increased (34% gain,kleikamp & Ktoonsz)
*Fix possible memory leak with sysfs when stats table are freed (Ktoonsz)
*Bump up Max Voltage (Adjusted for higher OC) (Ktoonsz)
*Dirty Writeback Tweaks
*Increased VM_MAX_READAHEAD to 512
*Increased default entropy levels (both read and write)
*Optimized Kernel Samepage Merging
*QuickWakeup (Thanks CrazyGamer)
*PowerSuspend (Thanks Faux123)
*Cortex_A15 Optimizations (Fusion-Rom Dev Team)
*Add Missing Graphite Define (Ktoonsz)
*Slimbus Overclock (Ktoonsz)
*Slimbus Optimized Overclocking Of Master Component (CrazyGamer)
*VFP Tweaks (Ktoonsz)
*EXT4 Tweaks(Ktoonsz)
*GPU Overclock up to 657 (Ktoonsz)
*Disable Swap Readahead
*Boeffla wakelock blocker (Thanks to sunilpaulmathew & franciscofranco)
*Increase Maximum Swappiness
*Kernel mode neon (ShinySide)
*Disable Direct Reclaim File Pages
*Enable Unaligned Capability For ARM (CrazyGamerGR)
*Update min-default adreno frequency to be 200 MHz (kholk)
*Fixed memory entry leak when calling Adreno Convertaddr (Shubhraprakash Das)
*Change clock rates to 19.2 MHz (Faux123/Qualcomm)
*Optimize Sched/Fair a bit (Faux123)
*Applied many new compiler optimizations (Synergy kernel Team & Decimalman)
*Zswap: Uses LZ4 now (if available)
*Support for LZ4-compressed kernel
*Fix memory leak in Mass Storage
*Alucard, LazyPlug & Mako Hotplugging
*Enabled VNSWAP
*Added back Intellithermal V.2 Thermal Engine (for those who prefer it)
*Modified LowMemoryKiller (fbs)



# All Changes
# Signed Off
# By
# The~Skater~187
 
Last edited:

The~Skater~187

Senior Member
Nov 4, 2011
1,630
1,901
0
Niantic
Reserved

~~~~~~~~~~~ Please note~~~~~~~~~~~
If you need support, please supply the following or support will not be given:
*Device Variant
*Current Rom & Android Version
*Bootloader & Baseband version
*Recovery & Version
*Recovery Log
I can't help if the only details given are "It didn't work" or "I can't flash this".
 
Last edited:

ItzRsh

Senior Member
Aug 19, 2018
53
11
0
Thanks for ur good kernel. Flashed on haggertk android pie no problem so far. At first I was getting random reboots,it caused by my magisk modules. I disable them and the problem fix. Thanks again.
LKT magisk module on this kernel cause random reboots.
 
Last edited:
  • Like
Reactions: The~Skater~187

jstandfest

Member
Apr 17, 2013
36
12
0
So I popped over to this thread you linked to from the Venom thread and want to make sure I'm clear. This kernel (Ares-Kernel) should not be used on a Resurrection Nougat based ROM? I think that Resurrection Nougat ROM is a Lineage 14 based ROM, correct? Or even though it is Lineage 14 based, can the Areas-Kernel still be used because it is based off Lineage.

Thanks for any clarification. Left this post in other thread to just to make sure I got it in right spot. Disregard which ever one is posted in wrong spot. Thanks.
 
  • Like
Reactions: The~Skater~187

justjr

Senior Member
Mar 24, 2013
984
485
0
37
Cuiaba
Hey, good work mate!
Thanks for it, we were orphan but you came and adopted us, LOL, kidding.
Just some thoughts on it.

I've found that, on thermal tab, vd restriction cant be disabled while core control is enabled. That used to happen on smartpack kernel but sunil get rid of it, maybe he can help. They are not made to be active together and can make the phone super slow and prone to crashes when it gets hot and they both kick in.

I also couldn't help to notice it's using my efficiency profile as defaults (on signature), and it's awesome, they work great don't they? Haha. I assume you grabbed it with the smartpack source code, since sunil's kernel used my profile as defaults.
There are some things that are outdated thought, specially page-cluster should be back to 0 on virtual memory as it is also prone to failures (apps don't working properly, like, a black screen without responses, based on my experiences) and crashes, min_sample_time is 0 and should be 40000 (one of the interactive governor tunables), which is an overlook by myself on an early release of my profile but fixed on the latest one already. I would recommend this small changes on the defaults, as well as the tunable io_is_busy 0 to let multicore power saving disabled.

I'm glad that you're also using it but I would also like to ask proper credits for it, I know, is not code, but demanded me months of studying and testing to get it almost where I wanted! There's a little history on the thread on my signature. :cowboy:
 
Last edited:

The~Skater~187

Senior Member
Nov 4, 2011
1,630
1,901
0
Niantic
Hey, good work mate!
Thanks for it, we were orphan but you came and adopted us, LOL, kidding.
Just some thoughts on it.

I've found that, on thermal tab, vd restriction cant be disabled while core control is enabled. That used to happen on smartpack kernel but sunil get rid of it, maybe he can help. They are not made to be active together and can make the phone super slow and prone to crashes when it gets hot and they both kick in.

I also couldn't help to notice it's using my efficiency profile as defaults (on signature), and it's awesome, they work great don't they? Haha. I assume you grabbed it with the smartpack source code, since sunil's kernel used my profile as defaults.
There are some things that are outdated thought, specially page-cluster should be back to 0 on virtual memory as it is also prone to failures (apps don't working properly, like, a black screen without responses, based on my experiences) and crashes, min_sample_time is 0 and should be 40000 (one of the interactive governor tunables), which is an overlook by myself on an early release of my profile but fixed on the latest one already. I would recommend this small changes on the defaults, as well as to let multicore power saving disabled.

I'm glad that you're also using it but I would also like to ask proper credits for it, I know, is not code, but demanded me months of studying and testing to get it almost where I wanted! There's a little history on the thread on my signature. :cowboy:
I do apologize about the credit issue, I thought I had put your name in the acknowledgment section right before ktoonsz last night, as I noticed your name on a few of the files in the RamDisk. I will definitely straighten that out and thank you for pointing that out. You are correct, I so far have just synced SmartPack source, then started applying things from my other kernel for now. I wanted to get something up-to-date and stable out for you guys before I started diving deeper into other kernel related things.

As for the rest of your suggestions, I will look into them for sure. Feel free to p.m. me with any thoughts or other suggestions.

Sent from my kltespr using Tapatalk
 

justjr

Senior Member
Mar 24, 2013
984
485
0
37
Cuiaba
I do apologize about the credit issue, I thought I had put your name in the acknowledgment section right before ktoonsz last night, as I noticed your name on a few of the files in the RamDisk. I will definitely straighten that out and thank you for pointing that out. You are correct, I so far have just synced SmartPack source, then started applying things from my other kernel for now. I wanted to get something up-to-date and stable out for you guys before I started diving deeper into other kernel related things.

As for the rest of your suggestions, I will look into them for sure. Feel free to p.m. me with any thoughts or other suggestions.

Sent from my kltespr using Tapatalk
Many thanks!

On other news, I was getting some random reboots, and found out that it was because of my undervolt settings. It's super weird, because they never gave me any problems since 3~4 months with the smartpack kernel, and it should be a setting particular to my specific device/cpu, and have the same limits across any kernel. I used the same across lots of roms, and different versions of smartpack, for nougat, oreo and pie, so, I hope you can see why I find this very weird.
But, I don't know if it's actually a 'bug', I will find some time to fine tune it, raise some voltages to see where I can go with Ares kernel without crashing. For now I'm using the default voltages.
 
  • Like
Reactions: The~Skater~187

The~Skater~187

Senior Member
Nov 4, 2011
1,630
1,901
0
Niantic
Many thanks!



On other news, I was getting some random reboots, and found out that it was because of my undervolt settings. It's super weird, because they never gave me any problems since 3~4 months with the smartpack kernel, and it should be a setting particular to my specific device/cpu, and have the same limits across any kernel. I used the same across lots of roms, and different versions of smartpack, for nougat, oreo and pie, so, I hope you can see why I find this very weird.

But, I don't know if it's actually a 'bug', I will find some time to fine tune it, raise some voltages to see where I can go with Ares kernel without crashing. For now I'm using the default voltages.
I did do a bit of an overhaul on the voltage table when I added the higher oc steps, due to the fact that on my other kernel lower voltages stock we're causing problems and random freezes.

Sent from my kltespr using Tapatalk
 
  • Like
Reactions: justjr

justjr

Senior Member
Mar 24, 2013
984
485
0
37
Cuiaba
Yeah, I'm sure you know, undervolting need to be done step by step, making sure the lowest you can go, device specific, so risking repeating myself, same voltages should probably 99,99% of the time works across any kernel/rom on a given device. I don't think it is the undervolt anymore.
It took a while but I still had some reboots with default voltage, once I was finally able to press up and home right after it, so it rebooted directly to TWRP and I copied the last_kmsg, it's attached, all configs were on default. I hope it helps to find out what it may be.
I'm back on smartpack for now, cause the same setup and profile runs without no problems, so I think it should not be a problem just on my end, is it? Anybody else?
Fun fact, I was are able to dirty install smartpack kernel over ares and vice-versa and it detected and updated itself without any problems.

I'm able to go kinda low here with no crashes:
660
670
680
690
700
710
720
730
745
750
775
795
825
865
925
965
990
1005
1035
1060


@The~Skater~187 edit: oh, I just noticed, there's no option to input 268 MHz voltage. My voltages are getting placed on the wrong frequency because of that, found the problem!
I recovered the backup I just made before installing the kernel, I had installed the shushified bootleggers 3.0 on top of the unshushified 3.0, they are the same rom except for official (shushified) status, but anyway, that may be the cause of some of my problems, adding up to the 268 missing voltage that was overlooked by me.

After that I installed Ares kernel again with no undervolt and gone to sleep. Woke up today, and no reboots, then I was trying to test undervolting it and found out about the missing 268 voltage, so every previous voltage I used was getting used on 1 clock step above, so, not enough power for sure.
Just put my exactly same volts on their correspondent freq and no reboots until now!

It also seems that Core Control is staying enabled and VD Restrictions is disabled correctly now too. So, if you experience the same you may disregard it as well.
 

Attachments

Last edited:

Latako

Member
Aug 23, 2018
24
19
0
Thanks for this!!

Great so far, this with Pie ROMs is the best battery life I've had since stock.

4-5 hours sot, 7h active, 12h idle..(gsam stats) on this original 2800mah. I've gone from 4-5 charges a day to 1-2.

And kernel brightness control keeps the flickers away.


Edit: did notice both vdd and core thermals being active, didn't cause any overheating/reboots (i often run cpu info as overlay) but I stuck with core control only to be safe. It doesn't stick after reboot.
S5 klte
 
Last edited:

justjr

Senior Member
Mar 24, 2013
984
485
0
37
Cuiaba
Edit: did notice both vdd and core thermals being active, didn't cause any overheating/reboots (i often run cpu info as overlay) but I stuck with core control only to be safe. It doesn't stick after reboot.
S5 klte
Yeah, after some further analysis, I came to find out exactly the same.
After a reboot both VDD and CC come back up, and I have to do a little dance, like, disable vdd and cc, enable intellithermal, then enable only cc, or something like that, then it will stick with only cc until the next reboot.
 

chkdsk90

Member
Apr 10, 2018
20
11
3
Hey, good work mate!
Thanks for it, we were orphan but you came and adopted us, LOL, kidding.
Just some thoughts on it.

I've found that, on thermal tab, vd restriction cant be disabled while core control is enabled. That used to happen on smartpack kernel but sunil get rid of it, maybe he can help. They are not made to be active together and can make the phone super slow and prone to crashes when it gets hot and they both kick in.

I also couldn't help to notice it's using my efficiency profile as defaults (on signature), and it's awesome, they work great don't they? Haha. I assume you grabbed it with the smartpack source code, since sunil's kernel used my profile as defaults.
There are some things that are outdated thought, specially page-cluster should be back to 0 on virtual memory as it is also prone to failures (apps don't working properly, like, a black screen without responses, based on my experiences) and crashes, min_sample_time is 0 and should be 40000 (one of the interactive governor tunables), which is an overlook by myself on an early release of my profile but fixed on the latest one already. I would recommend this small changes on the defaults, as well as the tunable io_is_busy 0 to let multicore power saving disabled.

I'm glad that you're also using it but I would also like to ask proper credits for it, I know, is not code, but demanded me months of studying and testing to get it almost where I wanted! There's a little history on the thread on my signature. :cowboy:
So is it possible to use your profile without any errors?