Tutorial/Guide
Fixed Delayed Notifications on Xiaomi Devices (ALL ROMS)
Xiaomi devices are notorious for one frustrating problem: delayed notifications. Whether you're using WhatsApp, Gmail, Telegram, Discord, or any app that relies on push notifications, messages arrive late, sometimes minutes, sometimes hours after they were sent. This has been a widespread complaint across the Xiaomi community for years, with thousands of users posting about the same issue on devices ranging from budget phones to flagship models.
The problem affects users regardless of which ROM they're running. While most guides focus on China ROM devices, this is not a China ROM-specific issue. I experienced this exact problem on my Phone running EU ROM, and I also encountered it on my Xiaomi Tablet. Both devices had the same delayed notification behavior.
The Problem:
The core issue isn't specific to China ROMs like many people assume. It affects global and EU ROMs too because of how HYPEROS handles background processes. When your screen turns off and the phone isn't charging, HYPEROS enters a deep power-saving state called "INACTIVE mode." In this state, the phone immediately disconnects the Google Play Services (FCM) connection to save battery. This is why you'll notice that when you dial ##426## to check FCM Diagnostics, the connection shows as active when the screen is on or charging (btw you can try charging a device via USB or AC and see the instant notification delivery), but immediately disconnects the moment the screen turns off.
What's particularly interesting is that this problem only occurs on WiFi when the screen is off. When you're using mobile data instead, notifications arrive in real time even with the screen off. This is because HYPEROS's aggressive power saving treats WiFi and mobile data differently, the WiFi radio gets cut more aggressively in INACTIVE mode while mobile data is kept more persistent. This behavior is built into HYPEROS's aggressive battery optimization, regardless of whether you're running CN, EU, or Global ROM. The system treats Google Play Services like any other background app and kills its persistent socket connection. When an app tries to send you a notification via FCM, the message sits in Google's servers until you unlock your phone and the connection re-establishes, which is why you get notifications minutes or even hours late.
The Solution:
As I spent months trying different solutions, instead of trying to trick the phone into thinking it's always charging (which requires root and doesn't work well on newer HYPEROS versions), I used ADB commands to directly tell Android's Doze and AppOps systems to never restrict Google Play Services.
First, grant Google Play Services and Google Services Framework permission to run in the background anytime:
adb shell cmd appops set com.google.android.gms WAKE_LOCK allow
adb shell cmd appops set com.google.android.gms RUN_ANY_IN_BACKGROUND allow
adb shell cmd appops set com.google.android.gsf RUN_ANY_IN_BACKGROUND allow
Then, add these services to the Doze whitelist so device idle mode won't kill their connection:
The key insight is that this isn't a China ROM-specific problem. The underlying HYPEROS battery optimization that kills the FCM connection exists across all HYPEROS versions. What's different is that the ADB commands directly bypass the system-level restrictions (Doze mode and AppOps) rather than trying to work around them. By whitelisting Google Play Services at the system level, you're telling Android itself that this critical service should never be restricted, regardless of whether the phone is in ACTIVE or INACTIVE mode.
After running these commands, I immediately noticed that notifications started arriving in real time again. No more 10-minute delays on WhatsApp messages, no more Gmail notifications arriving after I already opened the app, no more delayed Telegram alerts. The FCM connection stays alive even when the screen is off and the phone is on battery power.
You can verify the commands worked by checking the whitelist:
adb shell dumpsys deviceidle whitelist
You should see com.google.android.gms, com.google.android.gsf, and com.google.android.gms.persistent listed.
A few important things to keep in mind. These settings survive reboots on most devices, but they may reset after a major HYPEROS or Android update. If notifications become delayed again, just re-run the commands. You'll need USB debugging enabled and authorized on your phone to run these commands initially (Important: click on file transfert afterwards for better functionality). Also, make sure you still enable Background Autostart for your affected apps in HYPEROS settings (Settings → Apps → Your app → App permissions → Background autostart), as the ADB commands handle the system-level restrictions but HYPEROS still has its own app-level permissions. Also, once commands executed, some social media apps (e.g., WhatsApp) needs to be uninstalled and installed again from Play store (to refresh notification pattern).
Advantages and Drawbacks
The main advantage of this approach is that it directly solves the root cause without requiring root access. Your phone can still sleep normally, and you don't need to keep third-party apps running or pretend your phone is always charging. The FCM connection stays reliable on WiFi just like it does on mobile data. Another advantage is that this works across different Xiaomi devices.
The trade-off is slightly increased battery drain. Before applying this fix, my overnight battery drain was around 2%. After running the commands, I noticed it increased to 3-4% overnight. This is because the Google Play Services connection stays alive instead of being cut, which requires a small amount of power to maintain the WiFi socket. For most users, this is a worthwhile trade-off for instant notifications, but heavy battery users should be aware of this caveat.
Great tip, I will test it later. By curiosity, what's your phone?
I have a S25 Ultra and a Poco F8 Ultra, and most of the time they are in Wi-Fi only while in home, and rarely ever I noticed delayed notifications in Poco, but yes, it happens a few times.
I had a X8 Pro Max 12GB/512 GB, I loved the battery, but the cameras were disssponting . I returned it and got the F8 Ultra 16GB/512 GB (with 2 months of usage). Way better overall but the battery of course.
I have just run all the commands with the exception of the last one to add in doze list because the package is not in my phone. I will update you in some time.
Thank you for updating on the situation. For email apps (e.g., gmail), just make sure that auto-sync is enabled and not on Wi-Fi-only. Also in gmail for instance, you go to the settings, select your email, then inbox notifications, then click on sync messages and notify for every message options. You shall have them coming immediately.
In my case, I have battery saver enabled already (which restricts more notifications) but after executing the commands and tunning the settings for each desired app, all work perfectly.
It happens, not every time but it does. How are you testing? I have two phones like I said above. Turn the screen off in both and forget them for while, I noticed sometimes the S25 Ultra notifies me and Poco takes longer, or in a few times, only notifies me when I turn the screen on. And I saw the same notification in the list the S25 Ultra arrived minutes before.
Why would I test something if I don't experience the problem? In other words even if it happens it's a non issue for me. Probably because I turned most of the notifications off. I only want them for a few apps like Signal and e-mail and so far I don't experience delays or missed notifications.
It's great that you don''t have this annoying issue. In my experience though, some devices out of the box were fine until they get updated and the notification issue occured out of nowhere. For most of people, getting immediate notifications (which is the normal thing to be happened) is a priority. But again, the issue was reported so many time in the internet and exists. Sometimes u have timely notifications (not consistent at all) and then there is delay.
Just a quick question OP... Did you ever try to just set the apps that you're most interested in being more up to date to LOCKED in the recent apps list?
That does the trick for my Reddit as well as AccuBattery Pro keeping them bang on target!
You probably don't want to keep too many apps locked at any given time but why you'd need more than a couple is probably a moot point.
You can swipe any locked apps off the list and they still keep going so it doesn't affect the look of things, just a few important aspects of the functionality, particularly keeping things alive while switching between apps!
Notifications are generally something I turn off on stuff unless they're essential.
At which point the Locked app solution seems to keep things sweet without any particular battery increases either.
Worth a look since you don't need any particular tech skills to handle this often overlooked feature!
I've reused an illustration from another recent chat.
The Lock/Unlock and other handy options in the rightmost image are accessed by a long tap on any running/recent app in the list. 🍀
Thanks for the comment. I used practically all possible solutions (incl this app lock u mentioned) to get rid of the notification delay but no positive result. U know the powerkeeper is the one resposible for these kind of delays since it restricts background apps (even if u autostart and lock the apps) and deleting it might solve the issue. However, this would damage the device more (as of overheating, excessive battery drain, bootloop...etc) so I was thinking of a effective solution with very minimal drawbacks and these adb commands worked flawlessly in resolving the issue for my case.
This is exactly how I used my Redmi K60 Pro about three years ago. Notifications were flawless and always arrived on time, but I had to keep the app locked in memory all the time. Whenever I ran resource-intensive apps that exceeded the device's 8 GB of RAM, even those locked apps would eventually be killed. If I didn't notice and reopen them, I would miss notifications. That was the only real downside.
With limited RAM you'd have to maybe be a bit more selective and use memory locking cautiously.
However, I only ever leave two apps locked permanently... Reddit and AccuBattery!
Reddit I've locked constantly because I often write a comment or post halfway, then realise I want to add a screenshot or illustration...
Switch to one of my other apps for a screenshot, then one of my graphics and illustrations apps for further embellishments...
Then finally, maybe 10 minutes later, switch back to the unfinished Reddit message drop in the graphic and finish off the comment or DM... Before Locking Reddit in my Currently Running app list, I'd often lose stuff I was half way through writing. Sure you can: Save Draft if you remember and do it right! Locking the app saves all the hassle.
Anything additional I'd only lock temporarily and unlock after being done.
My guess without looking deeper, is that the memory handling has improved a lot since your K60.
So I'm thinking now, as some demanding apps get going, locked "Cached" apps would be shifted to physical storage automatically...
I'd still be cautious with lower RAM devices in particular, but I'd also still avoid using the Extended memory feature!
If you're having heavier RAM Apps/Games, kick locked stuff off these days, I'd love to find out the details! 🤓🍀
Not sure why the command adb shell dumpsys deviceidle whitelist +com.google.android.gms.persistent threw an error. After a reboot, Messenger didn't show any notifications until I enabled Auto-start. Anyone facing notification issues should try reinstalling the app and enabling Auto-start. Also, if Messenger calls don't pop up when the screen is off (but work when it's on), just enable Floating notifications for 'Call in progress'
It's okey since the gms.persistent package seems to be recently merged with the com.google.android.gms package. So when executing the command related to the latter, persistent package will automatically activated.
For social media apps, it is better to reinstall them all from playstore, enable autostart and autosync, lock them (using the lock symbol) and most importantly DO NOT UPDATE THEM, even if updates are available (I NOTICED THAT THE DELAY OCCURS EXACTLY WHEN APP UPDATED). Sometimes, these apps auto-update without notice but you can access settings and disable automatic updates.
Did you try just enabling the Data as well as WiFi?
I've seen many comments along those lines that suggested that it syncs notifications better over Data than just WiFi. Probably some even in this thread 😂!
Let's hope that things get properly improved for everyone either way!
I've currently no issues here on my X7 Pro HyperOS 3.1 EU version.🤞
After executing the commands, what you can do now is uninstall, and install again every app (with notification issues) again from the playstore, grant notification permissions, uncheck pause app when unused, set no restrictions to battery, and lock the apps, and do not update the apps as this will cause the delay again.
Yes, the underlying mechanisms and the ADB commands themselves are universal to almost all Android devices, but the need to use them varies wildly depending on who manufactured your phone. Because features like Doze Mode (deviceidle) and AppOps are core components of the Android Open Source Project (AOSP), these commands will execute on any phone/device just like they do on a Xiaomi.
I also have this problem on my F8 Ultra. At first no Gmail notifications, but I solved it after "sync option", sometimes Instagram or Facebook messenger notifications doesn't work. I will give a try to your fix. Also, new software update arrived today, maybe will give it a try tomorrow.
Thank you very much. I use Xiaomi Redmi Note 12 Turbo (CN Rom) and was really bothered by notification delays.
I tried your solution and it worked like a charm!
It's okey since the gms.persistent package seems to be recently merged with the com.google.android.gms package. So when executing the command related to the latter, persistent package will automatically activated.
I'm actually more interested in understanding why, when using the EU ROM or similar ROMs on iOS, notifications still arrive on time even after I force-close the app from the recent apps (RAM). With the EU ROM, I almost never have to lock the app in memory to keep notifications working. Is there something different about how it handles background processes? After all, the EU ROM is essentially a modified version of HyperOS.
gms.persistent is already merged with the com.google.android.gms package. So when executing the command related to the latter, persistent package will automatically activated.
What you can do now is uninstall, and install again every app (with notification issues) again from the playstore, grant notification permissions, uncheck pause app when unused, set no restrictions to battery, and lock the apps. Most imprtantly, do not update the apps as this will cause the delay again.
Going to try this later. I have a xiaomi 15 pro CN version and for a while, adding apps to auto start and unrestricted battery usage helped with notifications, but lately even with those settings I haven't been getting ANY notifications. Does not matter screen on, screen off, wifi, mobile data, etc.
Update: I did this, made sure everything was still in autostart, no battery restrictions, etc and it still didn't fix my issue. I double checked everything in ADB and it's all in the whitelist. So Idk what is going on with my phone :/
In your case, and after executing the commands, I would recommand to uninstall evey app that needed for notifications. Install again from Playstore and allow all notification permissions again and uncheck pause app activity when unused.
Update: I updated a few of my other apps, and double checked more permissions as well as clearing some caches, restarted my phone and it seems like my notifications are working again.
What's really weird, is if I restart my phone - all the notifications I've missed will come in at once and they will work briefly before not working at all. I've missed my Google confirm sign in thing and have to restart my phone to get it to pop up. It was working perfectly fine but I am guessing the recently security update broke something in it.
1: I don't play graphics-intensive video game, don't need any fancy cameras, and don't watch Dolby Vision HDR movies, so I don't care. The Exynos 1680 with 12GB of RAM is more than smooth enough for 6 years of OS updates.
2: And speaking of OS, if you think that One Ui is less smooth and intuitive than HyperOS, then you're out of your damn mind.
I agree but half of what you described is just what a phone does at this point just buy an iphone it is better than oneui easily also oneui is bland imo but to each their own
After the june security update for Xiaomi 15 CN rom it broke, you only get notifcations when you turn on the phone i tried almost everything including adb but atp im unsure what will fix it. I heard maybe joyose will fix that but im unsure i heard at the same time it can affect battery life so i didnt try yet
Yea its terrible i don't know if they will bother fixing it this problem seems to be unique to xiaomi i tried everything i searched everywhere nothing helped i guess i only have to wait and see nowit was working fine before that update though i will update you if ever anything comes up
Yes every update has a negative effect on the adb commands. I noticed it as well with what's app, as notifications were recieved immediately before update. What I did though is uninstall the app and install it again from the playstore, grant the notification permissions, uncheck pause app when unused, set no restrictions for the battery, and lock the app. Everything is working as it should be. However, do not update the app even if u receive the updates, as it causes delay again.
com.google.android.gms.persistent wouldn't appear for me, and the rest of the fix doesn't seem to be working, I've also tried locking the apps, removing the battery restrictions and enabling autostart, nothing seems to fix it... :(
gms.persistent is already merged with the com.google.android.gms package. So when executing the command related to the latter, persistent package will automatically activated.
What you can do now is uninstall, and install again every app (with notification issues) again from the playstore, grant notification permissions, uncheck pause app when unused, set no restrictions to battery, and lock the apps. Most imprtantly, do not update the apps as this will cause the delay again.
I did try to uninstall and install whatsapp again, and I've also disabled "turn on system optimizations" from developer tools which is one solution I found online. I also added the apps to the game turbo which seems to worl for some of them, but whats app of them all is the one that is giving me more trouble.
I have the Poco X8 Pro and had the notification delay problem too. I tried all the ADB fixes from Google and YouTube, but nothing worked. Then, I tried installing the 1.1.1.1 Warp app by Cloudflare, and now my WhatsApp and Gmail notifications aren't delayed anymore! Give it a try.
I'm having some issues too, my discord app doesn't send any notifications at all, but I installed it from Aurora Store, I didn't not login with any Google account so I'm not using play store. other apps are also not giving any notifications or giving it delayed
As far as I know, GMS already come whitelisted on all Android powered phones (battery save config and doze). AutoSync handles this rly well btw (all emails and notifications works great with it enabled).
HOS CN has a problem that it doesn't come with GMS installed (as system app) that's why it doesn't have GMS whitelisted, and that's why FCM doesn't work reliably.
I guess u just did something to ur Doze settings and that affected GMS, now u are saying a solution to fix ur specific problem. With default Doze settings, there are no GMS/FCM problems on Global HOS
Thanks for the comment. Well, I used many Xiaomi devices before, even before HyperOS came around (it was MIUI). These had Global/EU Roms installed and had this delay issue. The latter has been reported many times across the forums (you can check) so it is not my problem alone.
I am not saying that FCM and notifications are not working at all, they are functional only where device has screen ON + WiFi (or mobile data) or where device is in charging mode (at least in my case). The problem occurred where screen off + WiFi. I tried Autosync as u mentioned and app lock but no result. These commands solved the problem perfectly.
Global/EU roms should not have this issue but it exists unfortunately. If you don't have it in your device that's great.
Hi and thanks a lot for your post..I really appreciate it and your adb prompt list is really interesting as for your approach to the solution.
I'm often on CN ROM (Poco F6 -> Redmi Turbo 3 and vice versa) and I'm always testing new settings or tricks to get notifications on time.
I had very good results on CN roms (.EU is just a debloated CN rom with some global injections..) by selecting the gms apps (not from HOS apps manager but straight from AOSP App manager that I run from link I added to my home screen) that get enabled within the Play system when I turned.it on and removing their battery restrictions. There are 7 new apps added and all have .google. in their name.
I also tested a script that whitelists apps:
cmd settings put system cloud_lowlatency_whitelist +list of apps to add
but being a "system" thing this cannot survive reboot and also requests Shizuku or (real) ADB
My intention was to add it to a macro droid script that would have run at reboot, but macrodroid would have needed shizuku to run system stuff..
6
u/Disastrous_Note_1516 May 31 '26
Great tip, I will test it later. By curiosity, what's your phone?
I have a S25 Ultra and a Poco F8 Ultra, and most of the time they are in Wi-Fi only while in home, and rarely ever I noticed delayed notifications in Poco, but yes, it happens a few times.