LMK Controller

Magisk KSU

LMK Controller is a systemless module designed to give you full control over Android's Low Memory Killer. Through adaptive kernel detection and a clean WebUI accessible via MMRL, it seamlessly applies RAM tuning profiles to eliminate unnecessary app reloads and improve multitasking performance.

Total RAM Management

Fine-tune how your system handles background processes with kernel-level adjustments and dynamic swappiness monitoring.

Three Tuning Profiles

Choose between Performance for gaming, Stability for daily balanced multitasking, or Default for near-stock behaviour.

Adaptive Kernel Detection

Automatically identifies and applies the correct tuning strategy for Classic LMK, PSI LMKD, and Legacy LMKD kernels upon boot. No manual configuration is required.

Automatic Boot Persistence

Your selected profile is stored securely and reapplied automatically on every reboot via a persistent boot service.

Under the Hood: How it Works

The Low Memory Killer is a core Android subsystem responsible for freeing up RAM when things get heavy. Most OEM defaults are overly aggressive, causing annoying app reloads and stuttering. LMK Controller overrides these thresholds depending on your kernel structure.

On modern kernels (PSI LMKD), it adjusts ro.lmk.* properties and sets up a background PSI monitor. For older kernels, it directly writes threshold values (in pages) to the /sys/module/lowmemorykiller/parameters/minfree driver. ZRAM compression algorithms (lz4 or zstd) are also dynamically configured based on your chosen profile.

# Key paths managed by LMK Controller
Profile Save Path: /data/adb/modules/lmk_controller_feerd/lmk_mode
Service Execution: /data/adb/service.d/lmk_controller.sh
Diagnostic Boot Log: /data/adb/lmk_controller/service.log

Frequently Asked Questions

Your device needs to run Android 8.0 or higher. It also requires Magisk 20.4+ or KernelSU, and a WebUI environment like MMRL or KSU WebUI to interact with the interface.

The module scales its settings automatically. On devices with less than 3 GB of RAM, swappiness is dynamically increased by 20 and the dirty_background_ratio is minimized to heavily compensate for the smaller memory pool.

No. LMK Controller manages its settings intelligently by utilizing lmkd.reinit and fallback SIGHUP kill signals to force userspace properties without needing a secondary reboot cycle.

Module Info

  • Version v1.3
  • Module By
    ferrdishx
  • Contributors ferrdishx, feerd, George Machen
  • Source Code View Repository
  • Tags
    #LMK #Low Memory Killer #Kernel #Performance #MMRL #Magisk Module #KernelSU
  • Requirement
    Magisk KernelSU
  • Latest Update