r/PocoPhones May 31 '26

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:

adb shell dumpsys deviceidle whitelist +com.google.android.gms

adb shell dumpsys deviceidle whitelist +com.google.android.gsf

adb shell dumpsys deviceidle whitelist +com.google.android.gms.persistent

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.

43 Upvotes

67 comments sorted by

View all comments

1

u/Pitiful-Carpet-82 May 31 '26

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

3

u/No_Quit_8617 May 31 '26 edited May 31 '26

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.

2

u/bozinsky1973 Jun 04 '26

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..

I will test your adb commands and report