If youโve ever experienced a Xiaomi smartphone freeze, sudden reboots, or a โLMKD detectedโ message in your system logs, this is the stuff for you. LMKD (Low Memory Killer Daemon) is a little-known but critically important component of the Android operating system that works at the core level. In Xiaomi devices (especially custom firmware or MIUI models), it often causes controversy among users: some consider it a โlifelineโ for stability, others โ a source of problems.
In practice, LMKD is responsible for emergency RAM release when the system is on the verge of failure, but its behavior can vary depending on the version of MIUI, the model of the smartphone (for example, Redmi Note 12 Pro+ or POCO F5) and even from the installed applications. In this article, we will discuss how LMKD works, why it is activated, and what to do if its actions lead to undesirable consequences โ from lags to complete bricking of the device.
Now, let's warn you right away that interfering with LMKD without understanding the mechanisms can make problems worse, but for power users and customization enthusiasts, knowing the nuances of this demon opens up the possibility of fine-tuning performance. Let's start with the basics.
What is LMKD and how is it related to Xiaomi?
LMKD (Low Memory Killer Daemon) is a system process in Android that monitors the use of RAM (RAM) and forcibly closes applications when it is not enough. In Xiaomi devices, its role is especially noticeable due to two factors:
- Aggressive memory optimization in MIUI, aimed at extending battery life.
- Use modified Linux kernels where LMKD trigger thresholds may differ from pure Android.
For example, on Xiaomi 13 Ultra with 12 GB of RAM, the demon can start killing background processes already when the memory is 80 percent full, while on the POCO X3 Pro with 6 GB, this threshold can be lower โ about 70 percent.
Key feature of Xiaomi: in some firmware MIUI (especially the global versions) LMKD Integrated with memory extension (memory expansion) ROM), And that adds another layer of complexity, and if the system decides that an application is consuming too much resources, it can not only shut it down, but also transfer some of the data to virtual memory on the drive.
Interesting fact: on Qualcomm Snapdragon processor devices (like the Redmi K60 Pro), LMKD may work differently than on MediaTek (like the Redmi Note 12), due to differences in memory management at the chipset level.
LMKD activation: When the system decides to kill an application
LMKD works for a reason, but it has to be done in a certain way, and here are the main triggers that are specific to Xiaomi devices:
- ๐ Lack of RAM: If free RAM less 10-15% (The threshold depends on the model, the demon begins to close the background processes. 4 GB RAM This can happen more often than on the flagships with 8+ GB.
- ๐จ Critical application error: if the program leaks memory (for example, Facebook or TikTok in some versions), LMKD It is forced to terminate it to prevent the collapse of the system.
- โก High priority of foreground processes: if a resource-intensive application (game, video editor) is running in the foreground, the demon will sacrifice background tasks to ensure its stable operation.
- ๐ Updating the system or firmware: during installation OTA-update MIUI LMKD can aggressively clean the memory, which sometimes leads to freezes.
Especially often, problems with LMKD are observed after MIUI updates, when memory management settings change. For example, after switching from MIUI 13 to MIUI 14, many Xiaomi 12T users complained about frequent reboots - this was due to the new demon settings.
Important: On devices with unlocked bootloader and custom firmware (such as Pixel Experience or LineageOS), the LMKD trigger thresholds can be changed, leading to unstable performance.
How to check if LMKD works on your Xiaomi?
How to disable or configure LMKD on Xiaomi (for power users)
By default, LMKD cannot be disabled through standard MIUI settings, which is a secure system process. However, there are several ways to affect its operation, but all require the rights of a superuser (root) or an unlocked bootloader.
- ๐ง Changing the trigger thresholds: through file editing /sys/module/lowmemorykiller/parameters/minfree. For example, the echo team "18432,23040,27648,32256,36864,46080" > /sys/module/lowmemorykiller/parameters/minfree set new values (relevant to Android) 10-12).
- ๐ ๏ธ Magisk modules: modules like LMK Tweaker or Universal LMK Tweaks lets you flexibly customize demon behavior without manual file editing.
- ๐ฑ Shutdown through ADB: For some firmware, the adb shell su command works -c "stop lmkd, but itโs a temporary solution โ after the reboot, the demon will start again.
โ ๏ธ Attention: Incorrect settings LMKD This can lead to complete system instability, including endless bootloops, for example, if you set thresholds too high for a device with a computer. 4 GB RAM, The system will start killing critical processes, such as system_server, Which will cause the interface to crash.
For rootless users, the only safe way to reduce the impact of LMKD is to:
- Disable unnecessary background processes in battery settings (Settings โ Battery โ Battery Optimization).
- Use the "Light Mode" in MIUI (Settings โ Special Opportunities โ Easy Mode), which reduces the load on the system.
- Update the firmware to the latest version โ new MIUI builds (starting with 14.0.5) optimized memory management algorithms.
Backup your data via Mi Cloud or TWRP
Check the version of MIUI in Settings โ About the phone
Make sure that the battery charge is > 50%
Install Magisk (if you plan to use modules)
-->
Typical LMKD Mistakes on Xiaomi and How to Fix Them
If LMKD is not working properly, it can be different, from accidental crashes of applications to complete inability to boot the system.
| Symptoms. | Possible cause | Decision |
|---|---|---|
| Applications are closed immediately after folding | Too aggressive LMKD settings in MIUI | Deactivate "Optimization" MIUI" in the developer settings or update the firmware |
| The phone is rebooted when the camera is opened. | LMKD kills camera process due to memory shortage | Clear the camera cache (Settings โ Apps โ Camera โ Storage) or roll back the app update |
| Message "LMKD detected" in the logs | Conflict with the custom core or Xposed module | Return the stock core or disable conflicting modules |
| Phone hangs on MI logo after update | LMKD Kills Critical Processes During OTA | Log in to Recovery and clear cache (Wipe Cache Partition) |
One of the most insidious bugs is Xiaomi.eu, an unofficial firmware for global devices. In some builds (like the Redmi K40), LMKD mistakenly recognizes regular applications as leaky memory and kills them, even if there are enough resources, the solution is to reflash the device to the official MIUI Global or roll back to an older version of Xiaomi.eu.
โ ๏ธ Note: if after the manipulation of LMKD The phone stopped turning on (black screen, no boot vibration), do not try to flash it through the Fastboot without first unlocking the bootloader. In 80% of cases, this leads to a hard brick! EDL.
LMKD and custom firmware: what you need to know before firmware
Users who install alternative firmware (such as ArrowOS, HavocOS or crDroid) on Xiaomi devices often find that LMKD behaves in an unpredictable way.
- ๐ In custom cores (such as FrancoKernel or Kiran Kernel), memory management algorithms are altered that may conflict with demon settings.
- ๐ฆ Some firmware (especially Android 13-based ones)+) use LMKD with the new Memory Reclaim mechanism, which leads to double-killing processes.
- ๐ง In firmware like LineageOS, thresholds LMKD They can be overstated, which makes the system appear โbrake-freeโ even with free memory.
Recommendations for Xiaomi owners with custom firmware:
- Before you run your firmware, check on forums (such as XDA-Developers or 4PDA) to see if there are any LMKD bugs for your model and selected firmware.
- If you have frequent reboots after firmware, try turning off ZRAM (memory compression) in the kernel settings โ sometimes this helps stabilize the demonโs work.
- Use memory monitoring applications like Simple System Monitor or DevCheck to track when LMKD is triggered.
๐ก
If after installing custom firmware, the phone began to reboot often, try in the file. /vendor/build.prop line up ro.config.low_ram And change it from true to false, and that turns off aggressive memory optimization for low-volume devices. RAM.
LMKD Alternatives: Can You Do Without It?
In theory, LMKD is not the only way to manage memory in Android, but there are alternative approaches that can be applied to Xiaomi devices:
- ๐ Greenify: an application to โfreezeโ background processes that can reduce the load on the environment LMKD. It works without root, but it is more effective.
- ๐ Kernel Adiutor: A utility for fine-tuning the kernel, including memory management options.
- ๐ก๏ธ Disable Service: a tool to disable system services (requires root), with which you can temporarily suspend LMKD.
However, it is impossible to completely abandon LMKD on Xiaomi, which will lead to the fact that the system simply will not properly handle the memory deficit. For example, on a POCO F3 with the demon turned off, graphic artifacts begin to fill up the RAM by 95%, and then an emergency reboot follows.
๐ก
LMKD is not an enemy, but a defense mechanism against the complete collapse of the system, and is only justified if it is not working properly (e.g., killing processes for no reason) and there are no other ways to solve the problem.
The future of LMKD: what will change in the new versions of MIUI and Android
With the release of Android 14 and MIUI 15 (expected in 2026), the LMKD mechanism will undergo changes, according to insiders Xiaomi:
- ๐ฎ V MIUI 15 The implementation of dynamic thresholds for LMKD, which will adapt to the current load (for example, in games or multitasking).
- ๐ For devices with 8+ GB RAM (For example, Xiaomi 14 or Redmi. K70) Demon aggression will be reduced as memory deficit becomes less critical.
- ๐ Android 14 will be a new one API Memory Management (ActivityManager.isLowMemoryKillerEnabled()) that will allow applications to better interact with the memory LMKD.
Expect to see more transparency in the demon in future Xiaomi firmware, too. Now users often don't understand why their apps are shutting down, but MIUI 15 may have a notification like, "The system has freed up memory for stable operation. Closed: [app list]" - as already implemented in some of OnePlus' OxygenOS firmware.
For those who like to experiment with settings, the good news is that Android 14 will allow you to flexibly configure LMKD over ADB without having to get root permissions.
adb shell device_config put activity_manager max_cached_processes 20This will increase the number of cached processes, which will reduce the frequency of the demon.