How to make Xiaomi phone not switched off from inactivity: all methods of 2026

Why Xiaomi Shuts Down When It’s Down and How to Fix It

Do you leave Xiaomi charging on the table and find a black screen an hour later? Or does the phone go out in the middle of listening to music through a Bluetooth speaker? The problem of auto-disconnecting when inactive is familiar to many owners of Redmi, POCO and Mi smartphones β€” especially after upgrades to MIUI 14/15 or HyperOS. The reasons lie in the aggressive energy saving policy that Xiaomi implements at the firmware level.

In this article, 5 proven ways to turn off auto-shutdown, including hidden developer settings, ADB commands, and even circumventing restrictions through third-party utilities. We’ll explore why standard methods (like turning off a screen timeout) don’t always work, and what to do if the phone turns off after 5-10 minutes regardless of charging. All instructions are relevant for 2020-2026 models, from the Redmi Note 10 Pro to Xiaomi 14 Ultra.

⚠️ Important: Some methods require unlocking the bootloader or root 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: Setting up screen and sleep timeout

The most obvious but often overlooked step is to adjust the time of automatic disabling of the display. In MIUI/HyperOS, these settings are spread out across different menus, which confuses users. Here's how to find them:

  1. Open the Settings β†’ Display.
  2. Select screen timeout and set the maximum value of 30 minutes (on some models, Never is available).
  3. Return to the main settings menu and go to Battery β†’ Sleep mode.
  4. Turn off the automatic sleep mode option or set your sleep time to Never.

⚠️ Note: On HyperOS phones (e.g. Xiaomi) 13T or Redmi K60) The path to sleep settings may be different: Settings β†’ Battery β†’ Battery settings β†’ If you never have the option, select the maximum possible value (usually 1-2 hours).

Is the "Energy Saving" mode turned off in the battery settings

Is the maximum screen timeout set?

Are Adaptive Brightness and Automatic Sleep Mode disabled?

Is the firmware updated to the latest version?-->

This method works in 60-70% of cases, but may not help if:

  • πŸ”‹ The phone turns off even when connected to charging.
  • πŸ“± You have custom firmware installed (for example, LineageOS or Pixel Experience).
  • πŸ”„ The problem arose after the update. MIUI.

Method 2: Disabling Battery Optimization for Applications

Xiaomi aggressively optimizes the background of applications, which can lead to forcedoze (forced β€œfalling asleep”) even active processes.

  1. Go to Settings β†’ Applications β†’ Application Management.
  2. Select an app that should not fall asleep (like YouTube Music or Google Maps).
  3. Click Battery Optimization and select No Limits.
  4. Repeat for all critical applications.

For mass optimisation disabling:

  1. Activate Developer Mode (click 7 times on the MIUI version in Settings β†’ About Phone).
  2. Back to Settings β†’ Additionally. β†’ For developers.
  3. Find the option to limit background processes and set a standard limit (or no limits, if available).

πŸ’‘

If you turn off your phone after that, check the settings of Google Play Services, which is sometimes the service that blocks background activity, and you also need to install it without any battery optimization restrictions.

πŸ“Œ Note: On POCO F5 Redmi Note 12 with HyperOS, the path to optimization settings can look like this: β†’ Annexes β†’ Permits β†’ Special access β†’ Optimizing the battery.

Method 3: Using Developer Mode (without ADB)

The developer menu has key parameters that affect the behavior of the phone when it is inactive.

  1. Activate Developer Mode (see instructions above).
  2. Go to Settings β†’ Additional β†’ For developers.
  3. Find and disconnect: πŸ”„ Automatic shutdown in case of inactivity (if any). πŸ“΅ Turn off mobile data in sleep mode. πŸ”‹ Optimization MIUI battery-power.

Turn on:

  • ⚑ Do not turn off the screen when charging (if available).
  • πŸ”„ Background activity without restrictions.

Step 2. Follow the commands:

adb shell settings put global stay_on_while_plugged_in 3


adb shell dumpsys deviceidle force-idle




adb shell settings put global battery_saver_constant 0

Transcript of commands:

  • πŸ”Œ stay_on_while_plugged_in 3 β€” keep off the screen when charging (1 = net-only, 3 = from any source).
  • πŸ“΅ Force-idle – Resetting the state of inaction.
  • πŸ”‹ battery_saver_constant 0 β€” power-saving.

⚠️ Warning: After restarting the phone, the effect of commands ADB To make the changes permanent, use the Tasker task or the auto-execution script at startup.

Standard screen settings

Optimizing the battery for applications

Developer mode

ADB-team

I've tried nothing.-->

Method 5: Third-party sleep control applications

If you don't want to dig into the settings, you can use specialized utilities. The best options for Xiaomi:

  • πŸ› οΈ Keep Alive - mimics user activity, preventing shutdowns. Works without root, but requires permission for Special Access.
  • ⚑ Battery Guru disables optimization for selected applications. MIUI HyperOS.
  • πŸ”„ Tasker is for advanced users, and you can create a task that wakes up your phone every 5 minutes.