How to listen to music in the background on Xiaomi: 5 working ways for MIUI

Why music stops when the screen is locked

Xiaomi smartphone users often face a problem: their favorite track is interrupted when the screen goes out or you switch to another application, the reason for this is the aggressive optimization of power consumption in the MIUI firmware, which automatically suspends the work of β€œbackground” processes, especially on budget models (Redmi 9A, Poco M3) and devices with a small amount of RAM.

In this article, we’ll look at 5 proven ways to get music to play in the background, from standard MIUI settings to developer-sided bypassing restrictions. All methods have been tested on current firmware versions (including MIUI 14/15 on Android 13/14) and work even on older devices like Xiaomi Mi A2 or Redmi Note 7.

Before you start, make sure that the problem is not in the player itself. For example, YouTube Music and Spotify require a premium subscription for background play, and some streaming services (such as Yandex Music) can block the sound when the application is folded because of the fact that the user is not able to play the video. DRM-Our instructions concern local audio files and players that support the default background mode (Google Play Music, VLC, Poweramp, et al.).

Method 1: Configure auto-optimization in MIUI

The easiest way to do this is to turn off the energy saving for a music app, and in MIUI, this is done via the Battery and Performance menu, but the path may vary depending on the firmware version. On new devices (Xiaomi 13/14, Redmi Note 12), the algorithm is this:

  1. Open Settings β†’ Battery and Performance β†’ Battery Management
  2. Select applications (or battery optimization).
  3. Find your music player on the list (like VLC or Musicolet).
  4. Select the "No Limits" (or "Not Optimize") mode.

On older versions of MIUI (before MIUI 12), the path is different: Settings β†’ Applications β†’ Application Management β†’ [Select Player] β†’ Battery β†’ No Limits.

⚠️ Warning: After updating the firmware, the battery optimization settings may reset. Check them after each major update MIUI.

If the player still stops, try it again:

  • πŸ”„ Reboot your phone after changing your settings.
  • πŸ“± Remove the application cache (Settings) β†’ Annexes β†’ [Player] β†’ Warehouse β†’ Clear the cache).
  • πŸ”‹ Disable the "Ultra-Economic" mode in the battery settings (it blocks background processes completely).
πŸ“Š What player do you use for music?
YouTube Music
Spotify
VLC
Local Player (Poweramp, Musicolet)
Other

Method 2: Permits for background work

MIUI has a hidden menu where you can manually allow an application to run in the background, a method that is particularly useful for streaming services that are often blocked by the system.

  1. Open Settings β†’ Applications β†’ Application Management.
  2. Select your music player (such as Spotify or Yandex Music).
  3. Slip on "Permissions," then "Additional."
  4. Activate the switches: "Autostart" (allows the player to start when the phone is turned on), "Background activity" (critical for playback when the screen is locked), "Show notifications" (some players require a notification to work in the background).

Android 12+ may require additional permission for β€œExact Location” (yes, that’s weird, but some players request it to work properly).If it’s not on the list, don’t worry, it’s not critical.

Auto-start on.|Background activity permitted|Notifications activated|Battery optimization is offline-->

If the player still stops, try resetting its default settings: Settings β†’ Apps β†’ [Player] β†’ Additional β†’ Reset settings.

Method 3: Use of notifications (for streaming services)

Some apps (like YouTube Music or SoundCloud) require their notification to remain active for background playback, and if you accidentally "swip" the player's notification, the music will stop.

  1. During playback of the track, expand the notification panel.
  2. Find a notification from the player (usually with the buttons "Pause" / "Next track").
  3. Press the notification and select "Do not delete automatically" (or "Accumulate").

On MIUI 14+, you can also configure notification priority: Settings β†’ Notifications β†’ [Player Name] β†’ Importance β†’ High.

⚠️ Note: Fixed notifications may interfere with everyday use. If the player supports a widget on the lock screen (for example, Poweramp), use it instead of fixing it.

YouTube Music has a separate life hack: turn on the β€œOnly Sound” mode (button in the player), and the notification will be less intrusive, but the music will continue to play in the background.

πŸ’‘

If the player notification disappears after the screen is locked, check the lock screen settings in MIUI. Turn off the option "Hide confidential content" - it can block media notifications.

Method 4: ADB-Teams for Advanced Users

If standard methods don't work, you can manually turn off optimization via ADB (Android Debug Bridge), which requires a computer and a little bit of technical skill, but it gives 100% results.

  1. Turn on Developer Mode on your phone: Settings β†’ About Phone β†’ MIUI version (shap 7 times).
  2. Activate "Debugging by" USB" in the developer menu (Settings) β†’ Additionally. β†’ For developers).
  3. Connect your phone to your PC and execute the command in the terminal/command line: adb shell dumpsys deviceidle whitelist +com.example.music (replace com.example.music with your player package, for example, com.spotify.music or com.maxmpz.audioplayer for Poweramp).
  4. To completely disable optimization, use: adb shell settings put global hidden_api_policy 1 (requires a reboot of the phone).

To install any of these players:

  1. Download APK from the official website (for example, musicolet.com for Musicolet).
  2. Allow installation from unknown sources (Settings β†’ Applications β†’ Special Rights β†’ Installation of Unknown Applications).
  3. After installation, immediately open the battery settings for the new player and turn off optimization (see Method 1).

Musicolet and VLC don’t require additional permissions to work in the background, unlike streaming services, making them ideal for Xiaomi devices with low RAM (for example, Redmi 8A or Poco C31).

πŸ’‘

Alternative players (Musicolet, VLC) often work in the background β€œout of the box”, while popular streaming services (Spotify, YouTube Music) require additional settings or premium subscriptions.

Additional Advice and Frequent Mistakes

Even after all the settings, the music can be interrupted due to the specific features of MIUI.

  • πŸ”‹ Performance mode: In some firmware (MIUI 13 for Poco) has a separate Performance switch in the battery settings. Set it to High".
  • πŸ“΅ Traffic savings: If you listen to music over the mobile Internet, turn off background traffic restriction for the player (Settings) β†’ SIM-maps and mobile networks β†’ Transfer of data β†’ Saving traffic).
  • πŸ”„ Autocleaning RAM: V MIUI There's a memory clearing feature when you lock the screen. Turn it off in Settings. β†’ Additionally. β†’ Cleanup.

A common mistake is that users confuse background play (music plays when the screen is locked) and multitasking (music plays when the app is rolled up). For example, Spotify can work in a rolled-up form, but stopping when the screen is locked is different and is solved in different ways.

If you use custom firmware (like LineageOS or Pixel Experience), there are usually no problems with background music, but remember that informal firmware can take away your warranty and stability.

Why does music stop after 5-10 minutes?
You probably have Adaptive Battery Mode enabled in MIUI. It pauses the background processes after a few minutes of inactivity. Turn it off in Settings β†’ Battery β†’ Battery Mode β†’ Standard.
How to listen to YouTube in the background without premium?
Officially, no (Google restriction), but you can use: Firefox browser with the "Request Desktop Site" extension (please include in the browser menu). NewPipe app (unofficial YouTube client with support for backgrounds). VIP-modified versions of players (e.g. YouTube Vanced) but no longer updated). ⚠️ Note: Using modified apps may violate YouTube rules and lead to account ban.
Does this method work on Xiaomi with Android Go?
On Android Go devices (such as Redmi Go or Poco C1), optimization options are limited. Try: Use lightweight players (Musicolet or Simple Music Player). Turn off "Lite mode" in settings (Settings β†’ Additional β†’ Lite mode).
The music plays in the background, but it's interrupted when you call. How do you fix it?
This is standard Android behavior -- music gets muted during a call. If you don't restore after a call: Check the player settings (the Poweramp has an option to "Restore after interruption"). Update the firmware -- there was an error in the older versions of MIUI (before MIUI 12) with the recovery of the audio stream.
Can I listen to music in the background on Xiaomi without the Internet?
Yes, if the music is stored locally (on a memory card or in a phone memory). To do this: Download the tracks in the player (in Spotify or YouTube Music this requires a premium); Use local players (Musicolet, BlackPlayer). MIUI block access SD-mapping).