Why Xiaomiโ€™s Music Turns Off When Screen Locks โ€“ and How to Fix It

You listen to your favorite playlist, lock the Xiaomi screen, and the music suddenly stops. Familiar situation? This problem is found on most devices running MIUI (from Redmi Note 10 to Xiaomi 13), and its causes lie in both the system settings and the peculiarities of the application. 80% of the time, it is not the firmware bugs that are to blame, but the aggressive optimization of the MIUI battery, which suspends background processes, including audio playback.

In this article, weโ€™ll look at all the possible causes, from the banal (forgot to enable the permission for the application) to the specific (conflict with the Adaptive Battery function), youโ€™ll learn how to set up autostop music through the MIUI menu, which applications are most often blocked by the system, and what to do if the problem appeared after the update, and also why on some models (for example, POCO F5) music works in the background without problems, and on others (Redmi 9A) it does not.

1. MIUI battery optimization: the main culprit of the problem

MIUI's proprietary shell is known for aggressive power optimization. By default, the system limits the background activity of applications to extend battery life. Music players (including Spotify, YouTube Music, and even the standard Mi Music) often fall under this ban, especially if you rarely use them.

How does it work? When you lock the screen, MIUI analyzes which apps are not critical to the user and pauses their processes. A music player without special permissions falls into this category. The solution is simple: you need to manually add the application to the optimization exceptions.

  • ๐Ÿ”‹ The path to settings: Settings โ†’ Battery and productivity โ†’ Optimizing the battery
  • ๐ŸŽต Action: Find your music app (e.g., your music app, VK Music, tap it and select it without restrictions
  • โšก Important: Google Play Music and Apple Music may require additional AutoRun permission

โš ๏ธ Attention: After update MIUI before 14+ The list of applications in the battery optimization menu may be reset!

Permissions for background reproduction

Even if you have disabled battery optimization, music may stop due to a lack of permits to work in the background. MIUI requires separate confirmation for activities such as:

  • ๐Ÿ“ฑ Auto-start (permission to start when screen locks)
  • ๐Ÿ”„ Background activity (opportunity to work without an open window)
  • ๐Ÿ“ถ Use of data in the background (for streaming services)

How to check:

  1. Open Settings โ†’ Applications โ†’ Application Management
  2. Select your music player (such as SoundCloud)
  3. Go to Permits and enable all items related to background mode
  4. Go back and tap the battery limitations. โ†’ No restrictions.

Battery optimization enabled โ†’ No restrictions.

Auto-start allowed

Background activity is on

Use of mobile data in the background (for streaming) is allowed)-->

If you use YouTube Music, note an additional limitation: the app may stop playback due to Googleโ€™s policy (especially on uncertified devices), in which case installing a modified version (Vanced or ReVanced) will help.

3. conflict with the function "Adaptive Battery" (Adaptive Battery)

Starting with MIUI 12, the firmware has added Adaptive Battery, which uses machine learning to predict which apps you wonโ€™t need anytime soon, and limits them. Unfortunately, the algorithm often gets it wrong by blocking music players.

How to turn it off:

  1. Go to Settings โ†’ Battery and Performance โ†’ Adaptive Battery
  2. Turn off the slider or add a music app to exceptions
  3. Restart the device (required!)
Xiaomi modelMIUI versionAvailability of Adaptive BatteryRecommended action
Redmi Note 1113.0.5+Yes.Disable or add an exception
POCO X4 Pro14.0.2Yes (hidden in Additional)Turn it off completely.
Xiaomi 12T13.2.4Yes.Add a player to the exceptions
Redmi 10A12.5.7No.Check battery optimization

โš ๏ธ Note: On some firmware (for example, MIUI EU) Disabling Adaptive Battery can lead to increased battery consumption 10-15%. Weigh the pros and cons!

MIUI Global

MIUI China

MIUI EU (Europe)

MIUI Russia

Other/Castomic-->

4. Problems with specific applications (Spotify, VK Music, YouTube)

Not all music services work equally well with MIUI.

  • ๐ŸŽง Spotify: Often stopped due to conflict with Google Play Services.The solution is to clear the cache of Google services.
  • ๐ŸŽถ VK Music: Requires additional permission to display over other windows (for mini-player).
  • ๐Ÿ“บ YouTube/YouTube Music: Blocked because of DRM-Protection on non-certified devices.
  • ๐Ÿ“ฑ Standard Mi Music: Can glitch after the update โ€“ will help reset the settings of the application.

For Spotify, there is a separate instruction:

1. Open Settings โ†’ Applications โ†’ Application Management โ†’ Spotify


2. Slip "Storage" โ†’ Clear the cache




3. Go back and turn on:




- Auto-start.




- Background activity




- Display over other windows




4. Restart the application

If the problem persists, try alternative clients:

  • ๐Ÿ…ฟ๏ธ Poweramp (paid but stable)
  • ๐ŸŽต Musicolet (no internet requirement, offline)
  • ๐Ÿ“€ BlackPlayer (well optimized for the game) MIUI)

๐Ÿ’ก

If the music stops only in Bluetooth headphones, try resetting their settings: โ†’ Bluetooth โ†’ โš™๏ธ near-device โ†’ Forget this device, then plug it back in.

5. Mistakes after the MIUI update: what to do?

After major updates (e.g., from MIUI 13 to MIUI 14), users often find that the music stops playing when the screen is locked.

  • ๐Ÿ”„ Resetting permits (MIUI Resets the battery optimization settings)
  • ๐Ÿ› Bugs in newer versions (e.g. in the MIUI 14.0.3 was a bug with MediaSession)
  • ๐Ÿ“ฑ Changes in the policy of background processes (in MIUI 14+ restrictions tightened)

Algorithm of action:

  1. Check out the MIUI version in Settings โ†’ About Phone. If itโ€™s a recent update (released less than 2 weeks ago), wait for the patch.
  2. Reset the settings of all music apps: Settings โ†’ Apps โ†’ [Select player] โ†’ Storage โ†’ Clear data
  3. Turn off Adaptive Battery and MIUI Optimization (see sections above).
  4. If nothing helps, try to roll back to the previous version of MIUI via Fastboot.
How to get back to the previous version of MIUI?
1. Download the necessary firmware from the Xiaomi Firmware website (choose the version for your model!). 2. Rename the file to update.zip and put it in the root of the phone's memory. 3. Go to Settings. โ†’ The phone. โ†’ Updating the system โ†’ โ‹ฎ โ†’ Select a firmware file. 4. Confirm the rollback. โš ๏ธ All data will be erased!

On some devices (for example, Xiaomi 11T) after upgrading to Android 13, a bug with AudioFocus appears - the system "forgets" that the music application is active, in which case only waiting for an official fix from Xiaomi will help.

6. Hardware causes: when the "iron" is to blame

If all software methods have been tried and the music is still turned off, the problem may lie in the hardware:

  • ๐Ÿ”Š Faulty speaker or 3.5mm connector (on older models like the Redmi 5). Check playback via Bluetooth headphones.
  • ๐Ÿ”‹ Worn-out battery (at a charge level below 15% MIUI forcefully kills background processes).
  • ๐Ÿ“ฑ Processor overheating (on POCO F3 Check the temperature in the settings. โ†’ The phone. โ†’ Status.

How to diagnose:

  1. Connect the headphones โ€“ if the music is playing, the problem is the dynamics.
  2. See the error log: Settings โ†’ About Phone โ†’ Debugging โ†’ Error logs Look for records with AudioManager or MediaPlayer.
  3. Check the battery health using the code: ##4636## โ†’ Battery If wear level > 30%, replace the battery.

โš ๏ธ Note: On devices with MediaTek Helio (e.g. Redmi) 9C) Sometimes, the overheating hardware goes off, which shuts down the audio processor, and then only repairs can help.

7. Alternative solutions: if nothing works

If standard methods donโ€™t help, try:

  • ๐Ÿ› ๏ธ Install custom firmware (e.g. Pixel Experience or LineageOS). On pure Android, background play is less common.
  • ๐Ÿ”„ Using Automatic Tasks via MacroDroid or Tasker: Create a Macro: Trigger: Screen is Off Action: Launch the App [your player]
  • ๐Ÿ“ฑ External player (e.g, USB-C Some users of Xiaomi 12 Pro solve the problem like this.

For advanced users, there is a radical method โ€“ disabling MIUI Optimization via ADB:

adb shell


settings put global miui_optimization_disabled 1

โš ๏ธ It'll shut down all the branded chips. MIUI, But it can solve the problem of background play. Not recommended for beginners!

๐Ÿ’ก

Before installing custom firmware, backup through Settings โ†’ Additional โ†’ Backup and Reset. Without a backup, you risk losing data when unlocking the bootloader!

FAQ: Frequent questions about playing music on Xiaomi

โ“ Why music plays 5 seconds and stops when the screen is locked?
This is a typical sign of aggressive battery optimization. Check: Background permissions for the player; Adaptive Battery settings (turn it off); App updates (sometimes bugs are fixed in new versions); If the problem persists, try another player (like Poweramp).
โ“ YouTube Music stops music, but it works offline?
It's probably my fault. DRM-Google restrictions. Solutions: Install a modified client (YouTube Vanced or ReVanced). Check the device certification in Settings โ†’ Google โ†’ Device certification. Turn off optimization. MIUI Google Play Services.
โ“ After updating MIUI The music is quieter and off. How to get back to the same volume?
In the new versions MIUI Sound management policy has changed. Try: Enable Dynamic Range in the sound settings. Turn off Adaptive Sound (Settings) โ†’ Sound. โ†’ Reset the Equalizer settings in the player. If the volume problem, check if No Sound mode is activated through Settings. โ†’ Sound. โ†’ Sound modes.
โ“ The Redmi Note 8 Pro has music on it, and the Redmi Note 11 Pro+ โ€” No, why not?
The reasons may be different: the Redmi Note 11 Pro+ runs on MIUI 13/14, which tightens restrictions on background processes. The new models use a different audio codec (Snapdragon Sound) that can conflict with players. The Note 8 Pro ran MediaTek Helio G90T, and the Note 11 Pro+ ran Snapdragon 695, which has a different power management policy. Solution: set up Adaptive Battery and player permissions (see sections above).
โ“ Can you make sure that the music does not stop when the battery is low?
Yes, but it will require sacrifices: Turn off the Energy Saving (Settings) โ†’ Battery โ†’ Energy saving regime โ†’ Off. Add the player to the Battery Optimization exceptions. Set a minimum shutdown threshold for the battery. 5% through ADB: adb shell settings put global low_power_mode_trigger_level 5 โš ๏ธ This will reduce battery life on 15-20%!