How to make Xiaomi phone turn off at a certain time: 5 proven ways

Why you need to automatically turn off your smartphone and who will need it

Have you ever gone to bed with your phone in your hand and woke up in the morning with a battery dead and a dozen notifications? Or forgotten to turn off your gadget before an important meeting, causing it to run out at the most inopportune moment? Automatic shutdown of Xiaomi on a schedule solves these problems - and this is not the only scenario where the feature turns out to be useful.

Owners of Redmi, POCO and Black Shark smartphones often find that standard MIUI settings do not offer an obvious way to schedule a device shutdown, while this option saves battery power, prevents overheating at night, and even helps to maintain β€œdigital hygiene” β€” for example, if you want to limit your time using your gadget before bedtime. In this article, we will discuss 5 working methods, including hidden shell functions and third-party tools with minimal risks.

Importantly, not all methods are equally secure. Some work at the system level and do not require superuser rights, others use automation with limited resolutions, we will note the pros and cons of each, and also tell you how to avoid common mistakes β€” for example, why the phone can not turn off when YouTube Music or Google Maps is working in the background.

Method 1: Built-in sleep mode (MIUI 14–15)

Starting with MIUI 14, Xiaomi’s firmware has a hidden tool for managing device time, Sleep Mode, which doesn’t turn the phone off completely, but puts it into a deep sleep state with all background processes switched off, which effectively simulates shutting down for most tasks. This method requires no root rights and works on 90% of current models, including the Redmi Note 12, POCO X5 and Xiaomi 13T.

How to turn on:

  • πŸ“± Open the Settings. β†’ Screen. β†’ Sleep regimen.
  • ⏰ Set the beginning and end times for β€œsleep” (e.g. 23:00 to 7:00).
  • βš™οΈ Turn on the option to disable mobile data and Wi-Fi.
  • πŸ”’ Activate the Do Not Disturb to block notifications.

Turn on Sleep Mode in Screen Settings

Set a start and end time

Turn off mobile internet and Wi-Fi during sleep

Activate the "Do Not Disturb" mode

Check for alarm clock exceptions (if necessary)

-->

Limitations of the method:

  • ❌ The phone does not turn off completely - it remains possible to receive calls (if not turn off). SIM-hand-write).
  • ❌ Some apps (like WhatsApp or Telegram) may ignore restrictions if they have permission to work in the background.
  • ❌ In the models with MIUI 13 and older, the path to settings may be different: try Settings β†’ Always on screen and locking β†’ Sleep regimen.

⚠️ Warning: If after activating "Sleep Mode" the phone discharges faster, check the list of applications with permission to Autorun in Settings β†’ Annexes β†’ Permits β†’ Autostart. Turn off unnecessary programs.

Method 2: Automate with Google Assistant (without root)

If your Xiaomi runs Android 11 and later, you can use Google Assistant to create a shutdown routine.This method does not require installing additional apps and works even on blocked downloaders. The main advantage is flexibility: you can schedule a shutdown for specific days of the week or tie to an event (for example, connecting to a charging).

Instructions:

  1. Activate Google Assistant by saying β€œOK, Google” or holding the Home button.
  2. Say, "Create a routine to turn off the phone at 23:00."
  3. In the menu that opens, select Add Action β†’ Device Management β†’ Turn off your phone.
  4. Keep your routine and confirm your permits.

Important nuances:

  • βœ… It works on all models with Google Mobile Services (including Google Mobile Services). POCO F5 redmi K60).
  • ❌ It does not work if the phone is discharged to 5% or less.
  • ❌ Requires an active internet connection to synchronize routines.

Built-in MIUI function

Google Assistant

Third-party annexes

MacroDroid/Tasker

Another option

-->

MethodRoot is required.It's offline.Support for MIUI 12–15
Sleep regimen❌ No.βœ… Yes.βœ… 14–15
Google Assistant❌ No.❌ No.βœ… 11–15
MacroDroid❌ No.βœ… Yes.βœ… 12–15
ADB-team❌ No.βœ… Yes.βœ… All versions.

Method 3: MacroDroid (maximum flexibility)

For those who need advanced settings, such as turning off their phone when they are low-charged or after charging is complete, MacroDroid is a good option, allowing you to create root-free automatic scripts using built-in Android features, and Tasker has the advantage of a simpler interface and a free version with basic features.

Step-by-step:

  1. Install MacroDroid from Google Play.
  2. Create a new macro: Trigger β†’ Time / Date β†’ Time.
  3. Specify the time of shutdown (for example, 23:30).
  4. In the Actions section, select Power Management β†’ Turn off the device.
  5. Save the macro and give the app permission for Special Access (in Android settings).

Additional opportunities:

  • πŸ”‹ Turn off when battery is 100% (useful for battery health).
  • πŸ“΄ Shutting down when connecting to a specific Wi-Fi network (e.g., home).
  • πŸ”• Ignoring the rule on weekends.

⚠️ Note: Some Xiaomi models (e.g. Redmi) 10C) MacroDroid may not see the shutdown option due to manufacturer restrictions. In this case, use an alternative action: Launch the shell command with the su code. -c reboot -p (root).

How to get around the MIUI restrictions for MacroDroid?
If MacroDroid does not have the option to turn off the device, try: 1. Install ADB on your PC and execute the command: adb shell pm grant com.arlosoft.macrodroid android.permission.SHUTDOWN 2. Reboot your phone. 3. MacroDroid will have a hidden action to turn off.

Method 4: ADB-shutdown

This is a solution for advanced users who are not afraid to work with Android Debug Bridge (ADB), which does not require root rights, but involves connecting the phone to the computer for initial setup, and then turning off automatically on a schedule, even if the phone is not connected to the PC.

Instructions:

  1. Download Platform Tools on PC.
  2. Turn on USB Debugging on your phone: Settings β†’ About Phone β†’ MIUI version (click 7 times to become a developer), then Settings β†’ Additional β†’ Developers β†’ Debugging over USB.
  3. Connect your phone to your PC and perform at the terminal: adb shell dumpsys deviceidle force-idle adb shell am broadcast -a android.intent.action.ACTION_SHUTDOWN
  4. To schedule a shutdown for a specific time, use Tasker or Automate with the action Execute the shell command and paste the code from item 3.

Advantages of the method:

  • βœ… It works on all versions. MIUI, including the old ones (e.g. Redmi 5 Plus on the MIUI 10).
  • βœ… No additional applications (except for the ADB PC-only).
  • βœ… You can combine with other commands (for example, pre-close all applications).

πŸ’‘

If, after the execution, ADB-commands the phone restarts instead of turning off, add su before it -c (requires root) or use an alternative command: adb shell input keyevent 26 (power-button simulation).

Method 5: Physical button + smart alarm (for models without software)

If your Xiaomi is running on custom firmware or you have a Black Shark with stripped down functionality, you can do without software solutions. This will require a smart socket (for example, Xiaomi Mi Smart Plug) and a standard alarm app.

How to set up:

  • πŸ”Œ Connect the phone charger to a smart outlet.
  • ⏱️ In the socket app (Mi Home) create a rule: Turn off power at 23:00.
  • πŸ“± Set your phone alarm at 22:55 with a reminder to β€œSwitch off your phoneΒ».
  • πŸ”„ When the power outlet shuts down, the phone will run out and turn off after 10-15 minutes (unless connected to another source).

Pros and cons:

βœ… It works on any model, even without it. MIUI.❌ Requires the purchase of a smart socket (~1 500 β‚½).
βœ… It doesn't load the phone system.❌ The phone won't shut down instantly.
βœ… It can be combined with other smart devices (e.g., turn on a night light).❌ It won’t work if the phone isn’t charging.

Common Mistakes and How to Avoid Them

Even after setting it right, turning it off automatically may not work, and here are 5 of the most common causes and ways to fix them:

1.Background apps block shutdown

Some programs (e.g. Google Maps in navigation mode or Zoom during a conference) ignore the system commands.

  • πŸ›‘ Before going to bed, manually close all active apps through the recent.
  • πŸ”§ In Battery Settings, Turn Off Optimization for Critical Applications.

2. Incorrect time settings

If the phone is switched to another time zone or if Automatic Date and Time is on, the schedule may be confused.

  • ⏰ Settings β†’ System system β†’ Date and time β†’ Time zone.
  • πŸ”„ Turn off automatic synchronization if you live in a region with a winter/summer time switch.

3. MIUI restrictions for third-party applications

The MIUI shell aggressively closes the background processes, so that MacroDroid or Tasker work stably:

  • πŸ”’ Add the app to Battery Exclusions (Settings) β†’ Battery β†’ Optimizing the battery).
  • πŸ“± Enable Auto Start and Work Permit in the background for it.

⚠️ Attention: POCO F4 GT And other Xiaomi gaming smartphones can be activated Game Turbo mode, which blocks automation. β†’ Special facilities β†’ Game Turbo.

4. Conflict with the Developer Regime

If you've previously enabled USB debugging or other options for developers, they may interfere with the shutdown.

  • πŸ”§ Settings β†’ Additionally. β†’ For developers β†’ Do not turn off the screen (should be turned off).
  • πŸ”„ Turn off the debugging. USB, if you don't use ADB.

Hardware restrictions

On some models (for example, Xiaomi 12S Ultra), the shutdown function is locked at the kernel level, in which case only:

  • πŸ”§ Installation of custom recaveri (TWRP) and modified core firmware.
  • πŸ“± Using a physical power button (see Method 5).

πŸ’‘

Before setting up the auto-off, turn everything off. VPN-Applications and antiviruses (such as Avast or Kaspersky) often block system commands, perceiving them as a potential threat.

FAQ: Answers to Frequent Questions

Can you set up auto-shutdown on Xiaomi without third-party apps?
Yes, but with limitations. MIUI 14-15 is a β€œSleep Mode” (Settings) β†’ A screen that simulates a shutdown. On older versions, you'll have to use Google Assistant or ADB.
Why doesn’t the phone turn off at the scheduled time?
The reasons may be different: πŸ”‹ Battery charge below 5% (system blocks shutdown). πŸ“± In the background, a high priority application (for example, a navigator) is running). βš™οΈ Time/date settings are lost. πŸ”§ MIUI closed the background automation process (check battery exceptions). First try restarting the phone and resetting the settings.
Will the auto-shutdown work if the phone is discharged?
No. If the battery is critically low (usually <5%), the system ignores the shutdown commands to avoid being completely discharged, in which case the phone will turn off on its own, but not on schedule.
How to cancel the scheduled shutdown?
The method depends on the method of setting: πŸ“± Sleep Mode: Turn it off in Settings β†’ Screen. πŸ€– Google Assistant: Remove the routine in the Assistant app. πŸ“² MacroDroid: Turn off macros in the app's main menu. πŸ’» ADB: Adb shell am broadcast command -a android.intent.action.CANCEL_SHUTDOWN.
Can I schedule a shutdown for specific days of the week?
Yeah, but not in every way: βœ… MacroDroid and Tasker support flexible schedules (for example, weekdays only). βœ… Google Assistant allows you to create routines based on the days of the week. ❌ Built-in "Sleep Mode" in MIUI Works on one schedule for all days.