FORUMS
Remove All Ads from XDA

LKT 🏁 legendary.kernel.tweaks - Advanced Governor & Kernel Tweaks

671 posts
Thanks Meter: 1,209
 
Post Reply Email Thread

High performance & power saving tweaks for all devices (THAT ACTUALLY WORK)

Introduction
LKT is a cumilation of different strategies that target certain kernel settings. What makes this special and stand out from the crowd is being universal and device specific at the same time. And it's also BS free. Using simple functions LKT detects the hardware of your device then it applies the corresponding changes. It does support all mainstream platforms including Snapdragon, Kirin, MediaTek etc. covering hundreds of devices.
These tweaks have been tested and can stand up to 12-14H of SOT with no-compromise on performance all smooth as a baby's bottom.
However, it should be noted that this does not apply to gaming, facebook, snapchat, instagram and heavy camera usage ...etc
Nothing can be done for anything that is an automatic battery killer and forces maximum resources usage at all the time.

How does it work?
LKT aims to achieve a balance between power consumption and performance. Compared to tuning the parameters manually, LKT adopts Project WIPE open source interactive parameters for all mainstream SOCs that are generated via machine learning AI and can adapt to multiple styles of workload sequences. This idea is similar to EAS, which takes into account both performance and power consumption costs through power consumption models and workload sequence. But obviously, EAS has a much lower response time and replaces tuning with decision logic. In addition, it also includes other parameter tuning, such as HMP scheduler parameters, virtual Memory, GPU, IO blocks tuning, and doze rules to unify the rest of the kernel parameters for a more consistent experience.
LKT also supports schedutil and other EAS governors in devices like the Pixel 2. Unlike interactive, schedutil does not provide a wide range of tuning parameters but there are some workarounds. In Snapdragon 835 for example depending on what profile is selected, LKT limits the maximum frequency of big cores accordingly because big clusters power efficiency of SD835 dramatically decreases above 2 GHz, as a trade of losing 15% performance, improving power consumption by 40% or more is a much better deal.

Features
  • Multi-Profile
  • Improved smoothness & battery life
  • Advanced interactive governor tuning (Project WIPE)
  • EAS devices Support
  • RAM management enhancements
  • IO blocks enhancements
  • Enabled & configured wakelock blocking
  • Disabled a excessive logging at kernel level (Improves battery life as well as performance)
  • Other miscellaneous adjustments to enhance power efficiency

Profiles
Quote:

Battery - Can acheive ~2 hours or more longer on-screen battery life, may lag in some scenarios where the load fluctuates dramatically.

Balanced - Can acheive ~1.5 hours or more longer on-screen battery life with little performance compromise .(Recommended)

Performance - Can acheive ~1 hour longer on-screen battery life , same as balanced profile with more responsiveness. .

Turbo - Ideal for intense high demanding tasks, where the load drastically fluctuate (not necessarily in games) . Will ensure reducing lags by ~90% for no more than ~20% increase power in consumption.

Requirements
Installation
  • Flash in TWRP or Magisk manager
  • Follow the given instructions
  • Reboot
Read the FAQ from here or here before asking anything. (Regularly updated)

Credits
Code:
Project WIPE contributors  Github
yc9559 - @CoolApk
cjybyjk - @CoolApk

Special Thank
Zackptg5 & ahrion - Unity template
topjohnwu - Magisk
osm0sis - Busybox
Contributors
@korom42

Sources
Original XDA thread
Github

License
Licensed under the GNU General Public License v3
Attached Files
File Type: zip LKT-v1.7.1.zip - [Click for QR Code] (1.93 MB, 376 views)
The Following 6 Users Say Thank You to korom42 For This Useful Post: [ View ] Gift korom42 Ad-Free
 
 
1st February 2019, 11:47 PM |#2  
OP Senior Member
Flag Algeirs
Thanks Meter: 1,209
 
Donate to Me
More
FAQ(frequently asked question)

Also check for FAQ here (More often updated)

• How do I apply these tweaks?
Simply flash LKT zip in recovery or Magisk app then reboot.
• Do I have to be rooted?
Yes, LKT needs either Magisk or SuperSU or init.d support.
Beware that LKT is a collection of advanced tweaks that act on kernel level. If you don't know how it works, then please try this at your own risk. I won't be responsible for any damage or loss. Never forget to make backups.
• What are the available profiles ?
Quote:

Battery: Can acheive ~2 hours or more longer on-screen battery life, may lag in some scenarios where the load fluctuates dramatically

Balanced: Can acheive ~1.5 hours or more longer on-screen battery life with little performance compromise (recommended)

Performance: Can acheive ~1 hour longer on-screen battery life , same as balanced profile with more responsiveness

Turbo: Ideal for intense high demanding tasks, butter smooth gaming for a long periods. Will ensure reducing lags by ~90% for up to ~20% more power consuption than stock.

• How to switch between profiles?
  • Method 1
To access the command controls screen using terminal type
Code:
su
lkt
Then follow the instructions
  • Method 2
Now you can also you run these commands to directly switch profiles (must run with root permissions)
Code:
    lkt 1 (for battery profile)
    lkt 2 (for balanced profile)
    lkt 3 (for performance profile)
    lkt 4 (for turbo profile)
  • Method 3
You can also to re-flash the module twice to change the profile but you will have to reboot using this way.
• Can I use LKT with another MOD ?

** Compatibility list** You can still these mods since they do not affect LKT parameters.
  • Universal XML Patcher
  • GMS Doze
  • ForceDoze, Naptime, Greenify, Amplify, Power Nap
  • MCS (Magic charging switch) & Charging control mods..etc
  • BlackenedMod (Pixel 2)
** Incompatibility list ** Do not use similar mods with LKT, here is a list of some known MODs that will interfere
  • AKT (Advanced Kernel Tweaks)
  • Spectrum
  • Helix Engine
  • L-Speed
  • GovTuner
  • Every bullsh*t placebo MOD like : CrossBreeder, NFS, KITANA, FeraDroid ..etc
  • Heavily tweaked ROM such as : xXx (OP6/6T)
• Will this work on my ROM & Kernel ?
It should work on almost every Stock, AOSP or Lineage based ROM & Kernel
The only problem is with heavily tweaked ROMs, they can interfere with LKT.
• Will this work on my device?
This mod support a large list of devices you can check the compatibility list.
• How to make sure that LKT is working ?
Using a file explorer with root access check LKT logs in the location below ( share & upload yours in case of having troubles)
Code:
/data/LKT.prop
•I cannot find or open LKT logs
To properly open LKT.prop you need a file manager with root access your app may not be working correctly. Here's some apps I can recommendYou can also access your alogs using terminal by running this code
First type su then copy and past this line :
Code:
cat /data/LKT.prop
• My logs are incomplete
Make sure you are using the latest version of Magisk 18.0+
Install busybox by @osm0sis
• My device Lags or not longer smooth What do I do?
This can happen and it's a normal thing. As I have stated before, all these tweaks have been done for fit certain usage which might not be the same as yours. Because this, your device may lag in some scenarios under heavy loads (If you are experimenting huge lags, you have done something wrong). And yes, this can be fixed. We have a couple of ways of fixing it. First of all if you are using battery profile try switching to another one, if this doesn't help you consider the following steps :
  • Do a factory reset
  • Get rid of unnecessary background apps
  • Try a different ROM or Kernel
  • Try another profile
• These settings don't work & I'm not getting great screen on time
Keep in mind these tweaks have been tested on certain scenario that might not the same as yours, read the introduction in OP to understand more about this. However if you are getting worse results than before you are probably doing something wrong and here are some recommendations for you
  • Do a factory reset
  • Get rid of unnecessary background apps
  • Try a different ROM or Kernel
  • Try another profile
• How to update LKT?

Dirty flash the new zip or install the update via Magisk manager and it will automatically upgrade.
• How to uninstall LKT?

Flashing the module for the second time will remove LKT. You can also remove it from Magisk app.
Compatibility

Quote:

  • Snapdragon 845
  • Snapdragon 835
  • Snapdragon 820-821
  • Snapdragon 810-808
  • Snapdragon 801-800-805
  • Snapdragon 660
  • Snapdragon 652-650
  • Snapdragon 636
  • Snapdragon 625-626-630
  • Snapdragon 615-616
  • Snapdragon 450
  • Snapdragon 435
  • Snapdragon 430
  • Snapdragon 425
  • Snapdragon 410-412
  • Snapdragon 400
  • Exynos 9810 (Samsung)
  • Exynos 8895 (Samsung)
  • Exynos 8890 (Samsung)
  • Exynos 7420 (Samsung)
  • Kirin 970 (Huawei)
  • Kirin 960 (Huawei)
  • Kirin 950-955 (Huawei)
  • kirin 650-655-658-659 (Huawei)
  • Helio x20-x25 (MT6797-MT6797T)
  • Helio x10 (MT6795-MT6795T)
  • Helio P10 (MT6755)
  • Intel atom Z3560-3580

**Please note that even if your device isn't listed here some parameters may still apply

Changelog
Code:
v1.5.2 (11/03/2019)
- Disabled GPU thermal restrictions on Mediatek SoCs
- Various fixes and CPU enhancements for Mediatek SoCs
- Removed zRAM (SWAP) configuration
- Other minor changes & enhancements 
- Bug fixes

v1.5.1 (07/03/2019)
- Bug fixes

v1.5.0 (06/03/2019)
- EAS fixes and performance enhancements
- GPU parameters adjustements
- Disabled GPU thermal restrictions on Snapdragon SoCs
- Adreno Idler tweaks enhancements
- Storage scheduler enhancements
- Memory management enhancements
- Various zRAM & SWAP optimisations
- Other minor changes & enhancements 
- Bug fixes

v1.4.9 (09/02/2019)
- Memory management adjustments
- Fixed interactive governor parameters being overwritten by system after a while for some devices
- Added back deep-sleep enhancements props
- SWAPs/zRAM are no longer disabled
- Auto-detect existing profile when upgrading (user interaction is not needed anymore)
- Minor bug fixes

v1.4.8 (05/02/2019)
- Increased delay after boot
- Bug fixes

v1.4.7 (04/02/2019)
- EAS profiles fixes
- CPU boost fixes for some devices
- Memory management enhancements
- Removed any deep-sleep related tweaks
- Bug fixes

v1.4.6 (02/02/2019)
- Important bug fixes
- zRAM is not tweaked anymore and left for the kernel (only disabled for devices +6GB RAM)

v1.4.5 (01/02/2019)
- Re-worked EAS profiles
- Prefer schedutil on EAS kernels
- Added CPUSET optimizations
- Added schedtune optimizations
- Added control groups (CGroups) optimization
- Enabled zRAM for 4GB RAM devices
- Enabled & adjusted Low memory killer 
- IO block tuning enhancements
- FileSystem (FS) enhancements
- Enabled Fast Dormancy (may help with cellular network idle drain)
- Major bug fixes


v1.4.4 (19/01/2019)
- Unity template update 3.2
- SoC detecion enhancements
- Increased delay at boot before applying tweaks to 1 min
- Minor enhancements
- Bug fixes

v1.4.3 (16/01/2019)
- Unity template update v3.1
- Fixed changing LKT profile not sticking after reboot
- Added ability to change profiles with simple commands (useful for tasker)
```
lkt 1 : for battery profile
lkt 2 : for balanced profile
lkt 3 : for performance profile
lkt 4 : for turbo profile
```
- EAS fixes
- Improved compatibility for custom kernels
- Removed Low Memory Killer tweaks
- Swapping is no longer disabled for devices less than 4GB RAM 
- Bug fixes

v1.4.2 (01/01/2019)
- More Bug fixes

v1.4.1 (01/01/2019)
- Fixed some bugs after last update

v1.4.0 (01/01/2019)
- SoC detecion enhancements
- Bug fixes

v1.3.9 (29/12/2018)
- Added command line controls
- Now LKT perefers interactive if kernel has both schedutil & interactive
- Less aggressive LMK
- Crash fix for some devices
- Other minor changes & bug fixes

To access the new commands screen using terminal type
```
su
lkt
```
Then follow the instructions

v1.3.8 (28/12/2018)
- SoC detection issues fixes for samsung & other devices

v1.3.7 (27/12/2018)
- Fixed system crash & missing logs after last update
- Other minor changes

v1.3.6 (27/12/2018)
- Fixed soc.txt file not being created when SoC detection fail
- Added new wakelocks to block
- Adreno Idler parameters changes
- Minor enhancements
- Bug fixes

v1.3.5 (26/12/2018)
- SoC detection issues fixes
- Reduced entropy values 
- Minor enhancements
- Bug fixes

v1.3.4 (24/12/2018)
- Added support for snapdragon 4xx series
- Added support for Helio P10 (MT6755), kirin655, kirin658, kirin659
- Fixed LTE Signal bug
- Fixed some parameters not being applied
- Fixed detection bug for snapdragon 660
- Added device support check in logs
- Unity template update 2.2
- Script enhancements
- Bug fixes

v1.3.3 (23/12/2018)
- EAS parameters adjustments
- Reverted HMP scheduler changes
- Fixed RAM capacity & CPU frequency not displayed properly in LKT.prop
- Crashes bug fix
- Scrolling bug fix
- Crashing apps bug fix
- Minor enhancements
- Bug fixes

v1.3.2 (22/12/2018)
- Minor installation bug fixes

v1.3.1 (22/12/2018)
- EAS tuning is back for more devices (manual parameters - not WIPE) 
- EAS parameters adjustments
- HMP scheduler adjustments
- Updated RAM detection method
- Memory management fixes
- LMK enhancements
- Added Lazyplug tunning
- Removed busybox check
- Module template updated to latest UNITY 2.1
- Module installation fixes
- Minor enhancements
- Bug fixes

v1.3.0 (19/12/2018)
- Fixed hardware auto-detection fail after last update for some devices
- Added support for sultanxda cpu boost implementations
- Updated to latest UNITY template 2.0
- Bug fixes and refinemetns

v1.2.9 (18/12/2018)
- Important chip detection fixes
- Improved swap detection & removal
- Bug fixes

v1.2.8 (18/12/2018)
- Bug fixes for manual chip detection workarround

v1.2.7 (18/12/2018)
- Minor fixes

v1.2.6 (17/12/2018)
- Added manual workarround for devices with unrecognized chip (Huawei,Xiaomi etc..)
- Removed EAS support (except sd845) untill further notice (too experimental)
- Corrected SD845 configs
- Agressive tunded LMK for Turbo profile for better gaming experience
- Fixed Termux app conflicts
- Bug fixes and refinemetns

v1.2.5 (17/12/2018)
- Added Performance & Turbo profiles
- Added partial support (balanced profile only) for exynos9810, kirin650, sd615
- Fixed battery drain for EAS devices
- Fixed some devices not being recognized (again)
- Fixed some bugs with low RAM devices
- Fixed RAM capacity not being displayed correctlly
- Script refinements
- A lot of bug fixes

v1.2.4 (16/12/2018)
- Fixed connectivity issues for some devices
- Improved SOC chip recognition for some devices
- Other minor bug fixes & refinements
 Thanks to @pKrysenko & all telegram group members for testing

v1.2.3 (15/12/2018)
- Minor bug fixes

v1.2.2 (14/12/2018)
- EAS parameters enhacements
- Memory tuning enhancements
- Added support to SD615/SD616
- Changed hardware detection method
- I/O scheduler changes
- Removed forced doze for GMS & ril services
- Improved scrolling & FPS in applications
- Added detailed battery health check
- Other minor bug fixes & improvements

v1.2.1 (07/12/2018)
- Fixed a bug that makes governor parameters not stick after a while
- Fixed a bug where CPU is not recognized correctly (Improved SoC detecting)
- Other minor bug fixes & improvements

v1.2 (05/12/2018)
- Added missing cpu boost for some SoCs on balanced profile
- Improved swap detection & disabling (again)
- Reviewed & removed some stuff
- Other minor bug fixes & improvements

v1.1 (04/12/2018)
- Fixed a bug where chip name in upper case isn't recognized
- Swap partitions detecting improvements
- Some small but important script code fixes
 Thanks to whalesplaho @XDA for testing and discovering this

v1.0 (04/12/2018)
- First release

Downloads
• Google Drive

You can also download LKT from Attachments or Magisk repo

Beta testing & Support
The Following 3 Users Say Thank You to korom42 For This Useful Post: [ View ] Gift korom42 Ad-Free
1st February 2019, 11:56 PM |#3  
PoochyX's Avatar
Senior Member
Thanks Meter: 164
 
More
Will this change any of my settings in kernel auditor and HEBF optimizer? Cause you said don't use with L speed and L speed can change some of my kernel parameters in kernel auditor and HEBF can if not setup the right way.... Does this module have a U.I

PoochyXXX
2nd February 2019, 09:06 PM |#4  
OP Senior Member
Flag Algeirs
Thanks Meter: 1,209
 
Donate to Me
More
Quote:
Originally Posted by PoochyX

Will this change any of my settings in kernel auditor and HEBF optimizer? Cause you said don't use with L speed and L speed can change some of my kernel parameters in kernel auditor and HEBF can if not setup the right way.... Does this module have a U.I
PoochyXXX

It's better to not use any other mods with this so they won't conflict, if your device is supported you won't need anything else
This module does have a UI, to access it via terminal type su then lkt and follow the instructions. Please refer to the help section next time before asking anything.
2nd February 2019, 09:11 PM |#5  
PoochyX's Avatar
Senior Member
Thanks Meter: 164
 
More
Quote:
Originally Posted by korom42

It's better to not use any other mods with this so they won't conflict, if your device is supported you won't need anything else
This module does have a UI, to access it via terminal type su then lkt and follow the instructions. Please refer to the help section next time before asking anything.

Alright will do

PoochyXXX
3rd February 2019, 10:19 AM |#6  
Member
Thanks Meter: 6
 
More
Unistaller zip.......?
Plz

Sent from my GT-I9500 using Tapatalk
3rd February 2019, 05:24 PM |#7  
OP Senior Member
Flag Algeirs
Thanks Meter: 1,209
 
Donate to Me
More
Quote:
Originally Posted by nomigujjar

Unistaller zip.......?
Plz

Sent from my GT-I9500 using Tapatalk

Read the FAQ
4th February 2019, 12:18 PM |#8  
PasSlert's Avatar
Member
Flag Bruxelles
Thanks Meter: 22
 
More
Hello,

My device is Samsung Note 4 - SM-N910F.

I'm not on Samsung but on AOSP (6.0.1 - because of some outdated xposed mods) as I prefer stock, bloatware-less, android ROM.

The thing is, battery life has always been worse than original Samsung ROM, mainly because of doze not being strict enough, and lack of wakelocks optimisation.

Naptime, Greenify and Amplify helped me reducing those issues, along with Kernel Adiutor underclock increasing battery life. And Icebox for freezing battery using when screen is turned off.

Now comes your work, I flashed your zip. I was a bit skeptical of what it could make to my OS to magically improve battery life... But I have to be honest, it improved blocking those ridiculous wakelocks when my phone is idle.

See by yourself : 0.2% of battery during 6h sleep (airplane mode on, because radio waves). When it is usually 0.8% to 1%. Ofc when phone is used like using camera, it won't do magic over battery, but those unnecessary wakelocks event seems to be fixed.

So, yes. Thank you, thank you very much.
Attached Thumbnails
Click image for larger version

Name:	Screenshot_20190203-070229.jpg
Views:	586
Size:	195.1 KB
ID:	4699418  
26th February 2019, 03:51 PM |#9  
Junior Member
Flag Marseille
Thanks Meter: 2
 
More
I got a weird bug on the poco f1 using lkt (mostly balanced profile) when I charge my battery indicator get stuck to 75%. However it still charge since it rest a bunch of time stuck to 75%

Rom xiaomi.eu
Kernel Extreme kernel v9
6th March 2019, 04:58 PM |#10  
Member
Thanks Meter: 0
 
More
Hello. I installed the zip without problems and restarted my phone. Nowhere, however, do I see something of cloudy. Neither at Mtweaks or in the info settings themselves. How do I know that it works now? And how can I change the profiles?
7th March 2019, 10:06 PM |#11  
OP Senior Member
Flag Algeirs
Thanks Meter: 1,209
 
Donate to Me
More
Quote:
Originally Posted by cosmobi

Hello. I installed the zip without problems and restarted my phone. Nowhere, however, do I see something of cloudy. Neither at Mtweaks or in the info settings themselves. How do I know that it works now? And how can I change the profiles?

Read the F.A.Q
Post Reply Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread