legendary.kernel.tweaks
LKT is an advanced governor and kernel
tweaks collection that aims to greatly enhance power efficiency and performance.
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.
Using simple functions LKT detects the hardware
of your device then it applies the corresponding changes.
LKT aims to achieve a fair balance between power consumption and performance.
Instead 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, I/O scheduler
to unify the rest of the kernel
parameters for a more consistent experience.
LKT also supports schedutil
and schedutil
based governos in EAS
devices like the Pixel 2. schedutil
does not provide a wide range of tuning parameters but there are some workarounds.
In Snapdragon 835
for example on non performance profile, LKT slightly locks the maximum clock speed of big cores accordingly because big clusters power efficiency dramatically decreases above 2 Ghz, as a trade of losing 15% performance, improving power consumption by 40% or more is a much better deal.
Snapdragon 845
Snapdragon 835
Snapdragon 820-821
Snapdragon 810-808
Snapdragon 801-800-805
Snapdragon 660
Snapdragon 652-650
Snapdragon 636
Snapdragon 625-626
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-Z3580)
- 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
- Increased delay after boot
- Bug fixes
- EAS profiles fixes
- CPU boost fixes for some devices
- Memory management enhancements
- Removed any deep-sleep related tweaks
- Bug fixes
- Important bug fixes
- zRAM is not tweaked anymore and left for the kernel (only disabled for devices +6GB RAM)
- 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
- Unity template update 3.2
- SoC detecion enhancements
- Increased delay at boot before applying tweaks to 1 min
- Minor enhancements
- Bug fixes
- 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
- More Bug fixes
- Fixed some bugs after last update
- SoC detecion enhancements
- Bug fixes
- 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
- SoC detection issues fixes for samsung & other devices
- Fixed system crash & missing logs after last update
- Other minor changes
- Fixed soc.txt file not being created when SoC detection fail
- Added new wakelocks to block
- Adreno Idler parameters changes
- Minor enhancements
- Bug fixes
- SoC detection issues fixes
- Reduced entropy values
- Minor enhancements
- Bug fixes
- 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
- 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
- Minor installation bug fixes
- 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
- 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
- Important chip detection fixes
- Improved swap detection & removal
- Bug fixes
- Bug fixes for manual chip detection workarround
- Minor fixes
- 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
- 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
- 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
- Minor bug fixes
- 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
- 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
- Added missing cpu boost for some SoCs on balanced profile
- Improved swap detection & disabling (again)
- Reviewed & removed some stuff
- Other minor bug fixes & improvements
- 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
- First release
LKT is an advanced tweaks collection that acts on kernel
level. If you don't know how it works then use it at your own risk. I won't be responsible for any damage or loss. Always have backups.
Omar Koulache - korom42
Thanks goes to those wonderful people
- Project WIPE @yc9559 @cjybyjk
- Unity template @ahrion & @Zackptg5
- Magisk @topjohnwu
See also the list of contributors who participated in this project.
- Diving Deep into the Interactive World by @phantom146
- https://www.kernel.org/doc/Documentation
- https://developer.arm.com/open-source/energy-aware-scheduling
- http://man7.org/linux/man-pages/man5/proc.5.html
- https://developer.ibm.com/linuxonpower/docs/linux-on-power-low-latency-tuning/
- https://doc.opensuse.org/documentation/leap/tuning/html/book.sle.tuning/cha.tuning.taskscheduler.html
- https://access.redhat.com/solutions/177953