How to permanently disable sleep mode on Xiaomi Mi 9: 5 working ways

Why Xiaomi Mi 9 is constantly going to sleep and how to fix it

Sleep mode on the Xiaomi Mi 9 is one of the most controversial features of MIUI. On the one hand, it saves battery power by blocking background processes and limiting the operation of applications. On the other hand, it often interferes: interrupts downloads, stops music in headphones or even resets the connection with a smart watch. If your smartphone too aggressively โ€œfalls asleepโ€ without waiting for a screen timeout, the problem lies in the settings of battery optimization or automatic memory cleaning.

In this article, weโ€™ll look at all the ways to turn off sleep, from standard MIUI settings to hidden settings via ADB. Itโ€™s important to understand that a complete shutdown can reduce battery life by 15 to 30 percent, so weโ€™ll also show you how to set up selective shutdown only for the right applications. If youโ€™re using the Mi 9 as a multimedia center, for navigation or streaming, these instructions will help avoid connection breaks and lags.

Warning: Some methods require unlocking the bootloader or superuser rights. If you are a beginner, start with the safe ways (sections 2โ€“3) and then move on to the advanced ones (sections 4โ€“5).

Method 1: Disabling Battery Optimization for Individual Applications

The easiest and safest method is to remove the desired programs from the optimized list, which will not turn off sleep completely, but will prevent the background processes for selected applications (for example, music players or instant messengers).

Instructions:

  • ๐Ÿ“ฑ Open the Settings. โ†’ Annexes โ†’ Application management.
  • ๐Ÿ” Select an app that should not โ€œfall asleepโ€ (like Spotify or Telegram).
  • โšก Slip on the item Battery Optimization.
  • ๐Ÿ”„ In the window open, select No Limitations.

For convenience, we have compiled a list of applications that most often require optimisation disabling:

Type of applicationExamplesEffects of optimization
Music playersSpotify, YouTube Music, VK MusicInterrupt playback after 5-10 minutes
MessengersTelegram, WhatsApp, ViberDelayed or lost notifications
Navigators.Google Maps, Yandex.Navigator, WazeLoss of loss GPS-background
Fitness trackersMi Fit, Google Fit, StravaIncorrect calculation of steps/calories

โš ๏ธ Attention: After update MIUI Battery optimization settings can be reset. Check them after each major update (especially when switching to a new version of Android).

๐Ÿ“Š What apps do you most often โ€œfall asleepยป?
Music players
Messengers
Navigators.
Fitness trackers
Others

Method 2: Configure screen timeout and sleep mode

If the problem is not optimization, but in too short a time before going to sleep, change the screen timeout. On the Mi 9, it is 30 seconds by default, but it can be increased to 10 minutes or turned off completely (not recommended for battery).

How to change it:

  1. Go to Settings โ†’ Screen โ†’ Screen timeout.
  2. Choose the maximum value of 10 minutes (or 30 minutes if available).
  3. Return to Settings โ†’ Screen โ†’ Sleep Mode
  4. Turn off the option Automatic transition to sleep mode.

On some firmware (e.g. MIUI 12.5+), these items may be called differently:

  • ๐Ÿ”„ Scheduled sleep. โ†’ turn off;
  • ๐ŸŒ™ Adaptive illumination โ†’ manually;
  • ๐Ÿ”‹ Screen energy saving โ†’ Choose High Quality.

๐Ÿ’ก

If the screen goes out quickly after changing the settings, check the Security app โ†’ Battery Optimization โ†’ Power Modes. Perhaps Super Power Saving mode is on, which ignores user settings.

Method 3: Disable Automatic Memory Cleanup (RAM)

Xiaomi Mi 9 aggressively clears RAM when the device is locked, which leads to the closure of background applications and simulated โ€œsleep modeโ€. To avoid this, turn off automatic cleaning:

Steps:

  1. Open the Settings. โ†’ The phone.
  2. Tap 7 times on the MIUI version to activate the developer mode.
  3. Back to Settings โ†’ Additionally. โ†’ For developers.
  4. Find the option to Do Not Save Actions (or Limit Processes) and turn it off.
  5. Also turn off Memory Cleanup when you lock.

After that, the applications will stay in memory longer, but note:

  • โš ๏ธ Possible hangovers with multitasking;
  • ๐Ÿ”‹ Increase battery consumption by 5-10%;
  • ๐Ÿ“ฑ The phone can get hot when used intensively.

Battery charge > 50%|Backup of important data is made|Background tasks (antivirus, cleaners) are disabled)|Processor temperature (not higher than 40)ยฐC)-->

Method 4: Using ADB to Deeply Shut Down Sleep Mode

If standard methods donโ€™t work, youโ€™ll need to use Android Debug Bridge (ADB), which allows you to turn off sleep mode at the system level, but requires a PC connection and basic command line knowledge.

Step-by-step:

  1. Download ADB Tools and unpack the archive.
  2. On your phone, activate Debugging over USB in Settings โ†’ For developers.
  3. Connect the Mi 9 to your PC and run the cmd in the folder with ADB.
  4. Enter the command to check the connection: adb devices must appear serial number of the device.
  5. Execute the optimisation disable command for all applications: adb shell dumpsys deviceidle force-idle
  6. To turn off Doze Mode (deep sleep mode) use: adb shell settings put global device_provisioned 1 adb shell dumpsys deviceidle disable

Once these commands are executed, the sleep mode will be turned off completely, but this can lead to accelerated battery discharge (up to 20% per night in standby mode).

adb shell dumpsys deviceidle enable

โš ๏ธ Note: Some banking applications (e.g., SberBank Online or Tinkoff) may block devices with Doze Mode disabled as โ€œhacked.

What is Doze Mode and why is it dangerous to shut it down?
Doze Mode is an Android power saving mechanism that limits the background activity of applications when the device is not in use. Completely turning it off leads to: 1. Increase background traffic (online Internet consumption will increase by 2-3 times). 2. Rapid battery discharge due to constant sensor activity (GPS, Wi-Fi scanning). 3. Possible disruptions in the operation of system services (for example, automatic time synchronization). On the Xiaomi Mi 9 with a 3300 mAh battery, this can reduce battery life from 1.5 to 0.8-1 days at an average load.

Method 5: Third-party applications for sleep control

If you don't want to dig into settings or use ADB, install one of the specialized apps that lets you flexibly adjust your phone's sleep behavior without rooting permissions.

Top.-3 applications for Xiaomi Mi 9:

  • ๐Ÿ› ๏ธ Greenify โ€“ suspends unwanted apps but leaves selected ones to work; supports Boost Mode to ignore optimization.
  • โšก Battery Optimizer (by Xiaomi) โ€“ Xiaomiโ€™s official application for fine-tuning power consumption (available in all regions).
  • ๐Ÿ”„ Donโ€™t Kill My App! โ€“ Shows you which apps are killing the system and helps you whitelist them.

Example of setting up Greenify:

  1. Install the app from Google Play.
  2. Grant Special Access rights (in Android settings).
  3. Add the required apps to the Ignored List.
  4. Activate Boost Mode in the application settings.

Advantages of third-party applications:

  • โœ… No need to root-right;
  • โœ… Flexible settings for each application;
  • โœ… Possibility of rollback of changes.

Disadvantages:

  • โŒ They may conflict with MIUI Optimizer;
  • โŒ Some functions are paid;
  • โŒ Require constant work in the background (independently consume the battery).

๐Ÿ’ก

Third-party apps are the best choice for users who want to maintain a balance between autonomy and performance, and they allow you to turn off sleep mode only for critical tasks without affecting system processes.

Frequent mistakes and their solutions

Even after the sleep mode is turned off, Xiaomi Mi 9 users face problems, and letโ€™s look at typical situations and how to fix them.

Problem 1: The phone still โ€œfalls asleepโ€ in 1-2 minutes.

  • ๐Ÿ”น Check the screen settings โ†’ Sleep regimen โ†’ Sleep schedule (possibly automatic time-out enabled).
  • ๐Ÿ”น Remove โ€œoptimizerโ€ applications (for example, DU Battery Saver or Clean Master, which can override system settings.

Problem 2: After the sleep mode is turned off, the phone gets very warm.

  • ๐Ÿ”น Disable Do not save actions in the developer settings (see Method 3).
  • ๐Ÿ”น Set a limit FPS for games Settings โ†’ Special facilities โ†’ Optimizing games.

Problem 3: Notifications in messengers do not work.

  • ๐Ÿ”น Enable Auto-Run for the application in Settings โ†’ Annexes โ†’ Autostart control.
  • ๐Ÿ”น Check the Battery Optimization settings (see Method 1).
  • ๐Ÿ”น Update the application to the latest version (older versions may have bugs with work in the background).

Problem 4: After the MIUI update, all settings reset.

  • ๐Ÿ”น Make a backup of settings through Settings โ†’ Additionally. โ†’ Backup.
  • ๐Ÿ”น Use Xiaomi. ADB/Fastboot Tools for Automatic Application of Commands After Updating.

FAQ: Answers to Frequent Questions

Can I turn off sleep without root rights?
Yes, most of the methods in this article (except for deep customization via ADB) do not require root, but standard MIUI settings or third-party applications like Greenify are enough.
Why does the battery quickly go down after the sleep mode is turned off?
Sleep mode saves up to 30% of charge by blocking background processes. After it is turned off, applications continue to work in the background, consuming energy. CPU To mitigate the effect: Turn off auto sync for unnecessary accounts; Use Plane Mode at Night; Limit background activity through Settings โ†’ Annexes โ†’ Permits โ†’ Auto-start.
How to check if my Mi 9 is working on sleep mode?
Simple test: Run music playback in Spotify or YouTube Music. Lock the screen and wait 10 minutes. If the music stops, sleep mode is active. Use the adb shell dumpsys deviceidle for a detailed diagnosis.
Is it safe to turn off Doze Mode on a permanent basis?
No, it's not recommended. Doze Mode is a critical power saving mechanism in Android. Shutting it down will result in: Accelerated battery wear (due to constant discharge cycles); CPU overheating (Snapdragon 855 in Mi 9 is prone to trottling); System services (e.g. Google Play Services) that are unstable. Use this method only temporarily (e.g. for testing) or for individual applications.
Is there a difference between MIUI 12 and MIUI 14?
Yes, in the new MIUI (13+) versions, Xiaomi has tightened its energy saving policy. Major changes: MIUI version MIUI Sleeping Mode Features MIUI 12 Manual optimization setting for each application. Doze Mode can be disabled via ADB. MIUI 13 Added Deep Sleep Mode (removes all background processes after 30 minutes of inactivity). MIUI 14 Automatic background activity restriction for all applications except system. Requires a manual addition to the whitelist. On MIUI 14, you may need to completely disable sleep mode, unlocking the bootloader and installing a cast core.