You are listening to your favorite playlist, put your smartphone in your pocket - and the music suddenly stops. Is this a familiar situation? The reason lies in Android's aggressive power saving settings, which automatically suspend background processes when the screen is locked. But this is not a verdict: the problem can be solved both by standard system tools and with the help of third-party utilities.

In this article we will examine 7 proven methods saving music playback when the screen is off - from basic settings to hidden developer options. You will learn why YouTube Music, Spotify or VK Music may behave differently, how to bypass MIUI/EMUI restrictions, and what to do if none of the methods work. We will pay special attention to problems on Samsung, Xiaomi and Huawei โ€”brands with the most aggressive battery optimization.

We warn you right away: some solutions will require manual intervention in system settings. If you are a beginner, start with the first points and move on to complex ones only if necessary. For experienced users, we have prepared a section with ADB commands and settings Build.prop.

1. Check the application's energy saving settings

The first thing you need to do is exclude the music application from battery optimization mode. Android by default limits background activity to improve battery life. For multimedia players, this rule often becomes a problem.

Instructions for most versions of Android:

  • ๐Ÿ“ฑ Open Settings โ†’ Applications
  • ๐Ÿ” Find your music application (for example, Spotify or Yandex Music) and tap on it
  • ๐Ÿ”‹ Select Battery โ†’ Battery optimization (or Energy consumption on Xiaomi)
  • โŒ Set the switch to Do not optimize or No restrictions

On smartphones Samsung the path may be different: Settings โ†’ Device care โ†’ Battery โ†’ Settings (โš™๏ธ) โ†’ Background activity. Here you need to manually add the application to the list of allowed ones.

๐Ÿ’ก

If there is no "Battery" item in the application list, try an alternative path: Settings โ†’ Battery โ†’ Power saving mode โ†’ Applications without restrictions.

โš ๏ธ Attention: On some firmware (for example, ColorOS from Oppo), after disabling optimization, it is required restarting the applicationfor the changes to take effect. Just close the player through the recent applications menu and open it again.

2. Set up auto-lock screen

Sometimes the problem lies not in the application, but in The screen lock time is too short. If the screen goes blank after 15-30 seconds, the system may perceive this as a signal to pause all background processes - including music playback.

How to increase the timeout:

  1. Go to Settings โ†’ Display โ†’ Sleep/Screen lock
  2. Select the maximum value (usually 5 or 10 minutes)
  3. If the option is missing, check the section Settings โ†’ System โ†’ Advanced โ†’ Sleep mode

For owners Xiaomi i Redmi it is important to disable the function "Unlock when rising" in the display settings - it may conflict with background playback. Also check if "Super power saving" is enabled in the battery section.

๐Ÿ“Š Which music app do you use most often?
Spotify
YouTube Music
Yandex Music
VK Music
Local player
Other
Manufacturer Path to battery settings Features
Samsung Device care โ†’ Battery โ†’ Settings (โš™๏ธ) โ†’ Background activity Manual addition of each application is required
Xiaomi/Redmi Settings โ†’ Battery โ†’ Application selection โ†’ No restrictions You need to disable "Auto Cleaning" in the settings security
Huawei/Honor Settings โ†’ Battery โ†’ Launching applications The application must be in the "Manual management" section
Google Pixel Settings โ†’ Battery โ†’ Battery optimization Fewer restrictions on default

3. Use Do Not Disturb correctly

Do Not Disturb (DND) mode may conflict with background playback if configured incorrectly. Many users do not know that this mode disables all media notificationsby default, including controlling the player from the locked screen.

How to set up DND for music:

  • ๐Ÿ”” Open Settings โ†’ Sound โ†’ Do Not Disturb
  • ๐ŸŽต Select Media in the section "Allow exceptions"
  • ๐Ÿ”Š Make sure the slider "Media sounds" is turned on
  • โธ If the problem persists, disable DND completely while listening.

A Android 12+ function has appeared that can block music. Check: "Focus modes", which can block music. Check: Settings โ†’ Digital well-being โ†’ Focus mode โ†’ Set rules.

What to do if the music is interrupted by notifications?

If playback stops when it arrives notifications, check the priority settings in Settings โ†’ Notifications โ†’ Priority notifications. Disable the "Interrupt media" option for unnecessary applications.

4. Problems with specific applications

Some players have built-in restrictions background playback. For example, the free version YouTube Music stops the music when the screen is locked if the device is not connected to charging. A Spotify may require a premium subscription for some features.

Solutions for popular applications:

  • ๐ŸŽง YouTube Music: Connect the charger or activate Premium. An alternative is to use YouTube Vanced (unofficial client)
  • ๐ŸŽต Spotify: In the application settings, enable "Offline mode" and download playlists in advance
  • ๐Ÿ“ฑ VK Music: Update the application before the latest version - in older versions there was a bug with background playback
  • ๐ŸŽถ Local players (Poweramp, Musicolet): Check the settings "Alarm/Timer" - they may conflict with the background mode

Critical information for Xiaomi users: MIUI 12+ firmware has a hidden "Deep Optimization" function that kills all background processes 5 minutes after blocking. To disable it, you need to run the ADB command (see section 6).

โš ๏ธ Attention: If you use Deezer or Tidal, check the settings "Stream quality". Some codecs (for example FLAC) may cause crashes when playing in the background due to high CPU load.

5. Alternative players with built-in background support

If standard solutions do not help, consider changing the music application. Some players are specially optimized for working in the background and bypass Android limitations.

Top 5 players with reliable background playback:

  1. Musicolet โ€”does not require an Internet connection, works without battery optimization
  2. Poweramp โ€”has a setting "Ignore battery optimizations" in the settings menu
  3. VLC - universal player with support for all formats and stable operation in the background
  4. BlackPlayer - minimalistic player with function "Keep service alive"
  5. Pulsar - open source, no aggressive optimization

For streaming services, this would be a good alternative SoundCloud โ€”it is less aggressive towards background playback than Spotify or Apple Music. If you need offline music, try AIMP with the track caching function.

Delete old application cache|Disable battery optimization for new player|Check memory permissions|Adjust uniform volume in sound settings|Test playback with locked screen-->

6. Advanced solutions: ADB and developer settings

If all the previous methods did not work, it's time to move on to system settings. This section is for experienced users, as it requires working with ADB and changing configuration files.

Method 1: Disabling optimization via ADB

adb shell dumpsys deviceidle force-idle

adb shell settings put global adaptive_battery_management_enabled 0

Method 2: Changing the file build.prop (requires root)

Add the line:

ro.config.nocheckin=1

Method 3: Developer Settings

  • Activate developer mode (7 taps on Build number in Settings โ†’ About phone)
  • Go to Settings โ†’ System โ†’ For developers
  • Disable "Limit background processes" and "Inactive applications"
  • Turn on "Do not turn off the screen during charging" (for testing)
๐Ÿ’ก

Changes via ADB are reset after resetting the settings or updating the firmware. Repeat the procedure after each major update.

โš ๏ธ Attention: On some devices Huawei and Honor after disabling optimization via ADB may battery consumption will increase by 15-20%. Monitor the charge level in the first days after the changes.

7. Hardware solutions and extreme measures

If software methods do not help, the problem may lie in hardware limitations of your device. Here's what you can do:

Extreme measures:

  • ๐Ÿ”Œ Use OTG cable and connect an external DAC - this will make the system think that it is active playback
  • ๐Ÿ“ถ Enable Modem mode (tethering) - some firmware does not optimize applications when Internet distribution is active
  • ๐Ÿ”„ Reset reset settings to factory settings (make a backup first!) - this will eliminate conflicts in system settings
  • ๐Ÿ›  If the device is old (Android 7 and below), consider custom ROM firmware (for example LineageOS)

For devices with MediaTek processors (many models Xiaomi, Realme, Tecno) there is a problem with audio drivers. In this case, only updating the firmware or replacing the device will help.

If none of the methods worked, the last option remains - use external player. Connect iPod, MP3 player or even a second smartphone via Bluetooth. This is a radical solution, but it is guaranteed to eliminate problems with background playback.

FAQ: Frequently asked questions

Why does the music turn off exactly 5 minutes after blocking?

This is the standard timeout for background processes in Android 8+. that if the screen is turned off for more than 5 minutes, the user does not interact with the device and you can pause unnecessary tasks. On Xiaomi, this interval can be reduced to 2 minutes.

Does disabling the "Adaptive Battery" help?

Partially, the Adaptive Battery learns your habits and can block applications that you rarely use. (Settings โ†’ Battery โ†’ Adaptive battery) will help, but does not guarantee a 100% result - you need to combine it with other methods.

Is it possible to solve the problem without root access?

Yes, in In 90% of cases, root is not required. It is enough to correctly configure energy saving, use a suitable player and, if necessary, use ADB commands (they do not require root). Root is only needed to edit system files like build.prop.

Why is there no such problem on the iPhone?

iOS has a different mechanism for managing background processes. Apple allows music applications to run in the background by default, while Android gives manufacturers the freedom to optimize the battery. That is why on Samsung and Xiaomi the problem occurs more often.

How to check which application is blocking music?

Use BetterBatteryStats or the built-in battery monitor (Settings โ†’ Battery โ†’ Battery usage). Look for applications marked "Killed by the system" or "Stopped" in the logs. Frequent culprits: Facebook, Messenger, Clean Master.