Hi All,
I have Redmi Note 12 Pro 5G, currently running official version 14.0.10.0.SMOEUXM. I've read multiple complaints about missing alarms and push notifications in some versions of MIUI 14. I'm experiencing the same problems with the official version and I know that xiaomi.eu roms are based on the official ones, so decided to share my findings.
I have some applications (developed by me) that use the AlarmManager to do some work in background from time to time and noticed that the alarms sometimes stop until these apps are launched again. I thought it is random, but later found it is not random at all and can be reproduced with 100% success. The problem occurs every time after the camera is started and is caused by something called CameraBooster. When the camera is started this appears in the log:
06-12 08:48:31.666 1417 1889 I CameraBooster: camera boost: 0, memThreshold: 0
06-12 08:48:31.666 1417 1889 I CameraBooster: freeMemory: 2533088 cameraThreshold: 2550861
06-12 08:48:31.666 1417 1889 I CameraBooster: getCameraBoostCriticalKillList adjThreshold = 200
Then the system freezes most of the apps, multiple messages like these can be seen in the logcat:
06-12 08:48:31.669 1417 1886 D GreezeManager: FZ uid = 10148 reason =LAUNCH_MODE success !
06-12 08:48:31.669 1417 1886 D GreezeManager: FZ uid = 10148 pid = [ 3981 ] reason : LAUNCH_MODE caller : 16
...
...
After the camera is fully started, multiple messages like this appear in the log:
06-12 08:48:32.010 1417 2215 D GreezeManager: THAW uid = 10103 pid = [ 3728 ] reason : provider caller : 1000
...
...
But, these are only for the system apps, all user-installed apps remain frozen, even these locked in the task manager and with disabled battery optimizations. The TAWN messages for the user apps appear later, most of the time after more than 15 minutes, but not always.
Now the worse part - along with freezing the apps, all their scheduled alarms (or at least these scheduled for the near feature) are not allowed to fire, instead, messages like this appear in the log at the times when the alarms should fire:
06-12 08:49:08.351 1417 1785 D GreezeManager: cached alarm!
These alarms are send later to the apps, sometimes with delay, sometimes only when the app is manually started. Messages like this appear in the log:
06-12 09:00:41.451 1417 1886 D Aurogon : sendPendingAlarm uid = 10261
The whole problem with this is that sometimes these cached alarms are not delivered until the next manual launch of the apps and of course the apps cannot reschedule their background work until the cached alarms are delivered.
The above parts of the log are from my experiment - I use a calendar app which shows notification, I snooze the notification for 1 minute, then start the camera. In 100% of the cases the alarm firing 1 minute later is cached, then sometimes it comes after 15+ minutes, but sometimes if the device goes asleep they do not fire at all until I don't start the app again manually many hours later.
For the push notifications I'm not sure, but I guess the problem is similar and could be also related to the camera booster.
Hope my little investigation will help to the developers of the xiaomi.eu roms
I have Redmi Note 12 Pro 5G, currently running official version 14.0.10.0.SMOEUXM. I've read multiple complaints about missing alarms and push notifications in some versions of MIUI 14. I'm experiencing the same problems with the official version and I know that xiaomi.eu roms are based on the official ones, so decided to share my findings.
I have some applications (developed by me) that use the AlarmManager to do some work in background from time to time and noticed that the alarms sometimes stop until these apps are launched again. I thought it is random, but later found it is not random at all and can be reproduced with 100% success. The problem occurs every time after the camera is started and is caused by something called CameraBooster. When the camera is started this appears in the log:
06-12 08:48:31.666 1417 1889 I CameraBooster: camera boost: 0, memThreshold: 0
06-12 08:48:31.666 1417 1889 I CameraBooster: freeMemory: 2533088 cameraThreshold: 2550861
06-12 08:48:31.666 1417 1889 I CameraBooster: getCameraBoostCriticalKillList adjThreshold = 200
Then the system freezes most of the apps, multiple messages like these can be seen in the logcat:
06-12 08:48:31.669 1417 1886 D GreezeManager: FZ uid = 10148 reason =LAUNCH_MODE success !
06-12 08:48:31.669 1417 1886 D GreezeManager: FZ uid = 10148 pid = [ 3981 ] reason : LAUNCH_MODE caller : 16
...
...
After the camera is fully started, multiple messages like this appear in the log:
06-12 08:48:32.010 1417 2215 D GreezeManager: THAW uid = 10103 pid = [ 3728 ] reason : provider caller : 1000
...
...
But, these are only for the system apps, all user-installed apps remain frozen, even these locked in the task manager and with disabled battery optimizations. The TAWN messages for the user apps appear later, most of the time after more than 15 minutes, but not always.
Now the worse part - along with freezing the apps, all their scheduled alarms (or at least these scheduled for the near feature) are not allowed to fire, instead, messages like this appear in the log at the times when the alarms should fire:
06-12 08:49:08.351 1417 1785 D GreezeManager: cached alarm!
These alarms are send later to the apps, sometimes with delay, sometimes only when the app is manually started. Messages like this appear in the log:
06-12 09:00:41.451 1417 1886 D Aurogon : sendPendingAlarm uid = 10261
The whole problem with this is that sometimes these cached alarms are not delivered until the next manual launch of the apps and of course the apps cannot reschedule their background work until the cached alarms are delivered.
The above parts of the log are from my experiment - I use a calendar app which shows notification, I snooze the notification for 1 minute, then start the camera. In 100% of the cases the alarm firing 1 minute later is cached, then sometimes it comes after 15+ minutes, but sometimes if the device goes asleep they do not fire at all until I don't start the app again manually many hours later.
For the push notifications I'm not sure, but I guess the problem is similar and could be also related to the camera booster.
Hope my little investigation will help to the developers of the xiaomi.eu roms