Hello,
I'm trying to diagnose an issue on my Pixel 7 where notifications for Gmail, Discord, etc. are seemingly not arriving at all while the phone is locked and has been stationary for a few minutes. They appear almost immediately AFTER I unlock the phone. I've missed notifications that were over an hour old due to this. I've run a specific test and captured logs that seem to pinpoint the behavior, and I'm hoping someone has insights.
19:47:30: I locked the phone and placed it on a desk. The logs show the device beginning to enter a sleep state.
I PowerManagerService: Going to sleep due to power_button...
I device_idle: [state=1,reason=no activity]
By 19:50:10, before the email was sent, the logs confirm the device had entered a deeper idle state because it was stationary.
I device_idle: [state=5,reason=s:stationary]
19:51:00: I sent an email to my Gmail account from my PC. The phone remained locked and untouched. No notification arrived.
At 19:51:01, while the phone was locked and the notification was still undelivered, the logs show GCM heartbeat activity (happened before at 19:49:31 too, about 90s earlier, but this was the last one observed during the test)
09-09 19:51:01.956 2787 12154 I AlarmManager: setExactAndAllowWhileIdle [name: GCM_HB_ALARM type: 2 triggerAtMillis: 2560494]
09-09 19:51:01.980 2787 11889 I c2dm : [packet_type=-7,,stream_id=10,last_stream_id=7]
19:53:00: After waiting two minutes, I tapped the screen to wake it, but did not unlock it. The lock screen was visible. I repeatedly woke the screen this way for a full minute. The notification for the email did not appear.
19:54:00: I unlocked the screen with my fingerprint. The logs show the device exiting its idle state because of the unlock.
I device_idle: [state=0,reason=unlocked]
At 19:54:01.169, GmsCompat requests to start a service for Gmail:
D TempServiceBinding:6: create: pkgName com.google.android.gm, duration: 20000, reason: normal-prio FCM, reasonCode: PUSH_MESSAGING_DEFERRABLE
The system immediately unfreezes the Gmail process:
19:54:01.180 I am_unfreeze: [Pid=6825,Process Name=com.google.android.gm,6]
19:54:03: Approximately 3 seconds after unlocking, the phone vibrated and the notification banner for the email sent at 19:51:00 appeared.
I notification_alert: [key=0|com.google.android.gm...buzz=1,beep=0,blink=0...]
There is no logged activity related to the incoming notification between the time it was sent (19:51:00) and the moment the phone was unlocked (19:54:00). The entire process for handling and displaying the notification appears to begin only after the device is unlocked.
I have already tried:
- setting unrestricted battery for all relevant apps,
- disabling private DNS,
- testing on both Wi-Fi and LTE.
To see if it was an issue with my setup, I also created a new user profile (new Google account and only Google Play Services, Google Play and Gmail installed) and was able to observe the same behavior, which meanns it might not be specific to my main profile's configuration.
I'm posting these specific details in case anyone has seen this before or can offer an interpretation of this behavior.
Thanks for reading.