You run your favorite YouTube podcast, put your Xiaomi smartphone in your pocket -- and 30 seconds later, playback stops? It's not a bug, it's a feature of MIUI and Android energy saving that blocks the background of apps. But the solution is, from hidden settings to circumventing restrictions through ADB.
In this article, we have 5 proven methods (including methods for Android 14 and MIUI 15) that work on all Xiaomi, Redmi and POCO models, from the budget Redmi Note 12 to the flagship Mi 14 Ultra. No root, only official and semi-official tools. And also a table of methods compatibility with firmware versions and answers to frequent questions about battery discharge and lags.
Why YouTube Stops When the Screen is Off
The problem lies in three layers of constraints:
- Google policy: YouTube has been blocking background playback in the mobile app since 2018 to promote YouTube Premium (subscription cost starting at 599) โฝ/moss).
- MIUI Optimization: Xiaomiโs proprietary shell aggressively suspends applications in the background through the MIUI Battery Saver mechanism.
- Android 12+: Since this version, the system restricts the access of applications to WAKE_LOCK (The mechanism that prevents the device from falling asleepยป).
The combination of these factors means that even if you turn off the YouTube battery optimization in the settings, the video will still stop 10 to 60 seconds after the screen locks.
Method 1: Enabling โAutoplayโ in YouTube settings
The simplest method, which works on 30% of Xiaomi devices (according to the 4PDA user survey), is suitable for MIUI 12-15 and Android 10-14:
- Open the YouTube app and tap on the profile avatar in the upper right corner.
- Go to Settings. โ General.
- Activate the Autoplay option (if not, update the app to the latest version).
- Return to the main menu and select Settings โ Background playback (will appear only after turning on autoplay).
- Turn on the "Reproduce in the background" switch.
โ ๏ธ Note: this method does not work on all firmware. If Background play is not available, move to the next method. Also note that after the YouTube update, the settings may reset.
โ๏ธ Preparation before setting up YouTube
Method 2: Disable Battery Optimization for YouTube in MIUI
MIUI Battery Saver is the main reason why YouTube goes to sleep with the screen.
- Go to Settings โ Applications โ Application Management.
- Find YouTube on the list and tap it.
- Choose Battery Optimization (or Energy Consumption in older versions of MIUI).
- Set the "No Limits" mode.
- Go back and turn on AutoRun (allow YouTube to work in the background).
For Android 12+, additionally:
- Go to Settings โ Special Opportunities โ Special Opportunities Services.
- Find YouTube and activate the โIgnore Battery Optimizationโ permission.
This method works on 60-70% of devices, but can reduce battery life by 5-15% (according to GSMArena tests on the Redmi Note 12 Pro+).
What to do if there is no "Battery Optimization" item?
Method 3: Using a browser instead of an application
The mobile version of YouTube in the browser does not have such strict restrictions on background playback, Google Chrome or Kiwi Browser (with support for extensions) is best suited:
- Open m.youtube.com in your browser.
- Run the video and click on the three dots in the top right corner of the player.
- Select Play Against the Background (Kiwi Browser must pre-instal the YouTube Background Playback Fix extension).
- Return to the main screen and the video will continue to play.
Advantages of the method:
- ๐น It works on all versions of Android and MIUI.
- ๐น Does not require rooting or ADB.
- ๐น You can use an ad blocker (e.g., uBlock Origin in Kiwi Browser).
Disadvantages:
- โ ๏ธ Notice of reproduction does not always appear.
- โ ๏ธ In some browsers, the sound may be interrupted when the screen is locked (solved by installing Firefox Nightly).
๐ก
If your browser video is slowing down, turn on the For PC mode in the browser menu. This will load the desktop version of YouTube with less restrictions.
Method 4: ADB-command to disable optimization (without root)
If previous methods have not worked, you will have to use ADB (Android Debug Bridge), which is an official tool of Google, which does not require root rights, but you need to prepare:
Step 1: Preparation
- ๐ฑ Enable Developer Mode on Xiaomi: Go to Settings โ About the phone and 7 times tap on the version MIUI.
- ๐ง Back to Settings โ Additionally. โ For developers and enable debugging by USB.
- ๐ป Install. ADB-PC drivers (Windows/Mac/Linux).
Step 2: Execution of the command:
- Connect your smartphone to your PC via USB (select File Transfer mode).
- Open the command prompt (cmd on Windows or Terminal on Mac/Linux) and type:
adb devices(Your device must have a serial number.)
adb shell dumpsys deviceidle whitelist +com.google.android.youtubeThis team adds YouTube to the whitelist of apps that are not optimized by the system.
Step 3. Verification:
- Turn off USB and start the video on YouTube.
- Lock the screen โ the playback should continue.
โ ๏ธ Attention: After rebooting the smartphone or updating MIUI You'll have to do it again. To automate the process, create a.bat file with the command and run it when you connect to the PC.
๐ก
ADB-The method is the most reliable method for Android 12-14, but requires re-execution after system updates.
Method 5: Alternative applications for background playback
If standard methods don't work, try specialized applications. We tested 7 solutions, the best of which are in the table:
| Annex | Need root? | Works on MIUI 15? | Cons |
|---|---|---|---|
| Vanced MicroG | โ No. | โ Yes. | Outdated interface, no updates since 2022 |
| ReVanced | โ No. | โ Yes. | Complicated installation (you need to patch APK) |
| NewPipe | โ No. | โ Yes. | No Google account, sometimes it's not. |
| FloatTube | โ Yes. | โ Yes. | Requires root and Xposed Framework |
| SkyTube | โ No. | โ ๏ธ Partially. | There is no background playback in some firmware |
Recommendation: For most Xiaomi users, the best choice is NewPipe (easy to install, no registration, supports 4K and background play).
โ ๏ธ Note: apps like Vanced may violate YouTubeโs rules (the risk of blocking your account when using premium features without a subscription). API Google.
How to reduce battery consumption during background playback
YouTubeโs background work increases energy consumption by 20-40% (test data from the Redmi K60 Pro).
- ๐ Turn off Auto Brightness and set minimum brightness before locking the screen.
- ๐ถ Switch to the switch. 2G/3G Mobile network settings (unless video quality is critical).
- ๐ Use headphones with Bluetooth 5.0+ (Xiaomi Buds 4 Pro โ They consume less power than the smartphone speaker.
- โก Enable Dark Mode on YouTube (in the app settings).
Critical: on Xiaomi with Snapdragon 8 Gen 2/3 processors (for example, Mi 13 Ultra), background play through the browser or NewPipe drains the battery by 10-15% per hour. For comparison, on the Redmi Note 11 (Snapdragon 680) โ only 5-8%.
Frequent problems and solutions
Even after setting up, there may be failures. Let's look at the typical cases: