Delayed Whatsapp notifications - Xiaomi Mi A2 Lite Questions & Answers

So I've been having this issue for quite some time, but i guess i got used to it so it didn't pose much of a problem untill now. All of my Whatsapp messages are delayed when screen off and WiFi on, and they come through from 2-4 all the way up to 20+ min after they are sent. As soon as i turn screen on, they pop up on screen.
I assumed that it was due to greenifys rigorous doze settings, so i uninstalled it. Some threads suggested Titanium backup may be culprit, so i uninstalled it too. I also added Whatsapp to battery optimization whitelist and ticked on run in background and unrestricted data usage, but with no success, and also completely reinstalling Whatsapp.
I even reflashed stock pie and oreo, but same thing happens. I suspected that deep sleep might be interfering with cloud messaging services, but even on stock pie device enters deep sleep even with WiFi on in minutes after screen off, so im pretty confused with it all.
I am running Pie v10.0.9.0.PLDMIXM with magisk, busybox, xposed, substratum, gravitybox installed. Apart from that there are no other apps interfering with the system whatsoever.
Any help would be much appreciated.

CrimosUmbro said:
So I've been having this issue for quite some time, but i guess i got used to it so it didn't pose much of a problem untill now. All of my Whatsapp messages are delayed when screen off and WiFi on, and they come through from 2-4 all the way up to 20+ min after they are sent. As soon as i turn screen on, they pop up on screen.
I assumed that it was due to greenifys rigorous doze settings, so i uninstalled it. Some threads suggested Titanium backup may be culprit, so i uninstalled it too. I also added Whatsapp to battery optimization whitelist and ticked on run in background and unrestricted data usage, but with no success, and also completely reinstalling Whatsapp.
I even reflashed stock pie and oreo, but same thing happens. I suspected that deep sleep might be interfering with cloud messaging services, but even on stock pie device enters deep sleep even with WiFi on in minutes after screen off, so im pretty confused with it all.
I am running Pie v10.0.9.0.PLDMIXM with magisk, busybox, xposed, substratum, gravitybox installed. Apart from that there are no other apps interfering with the system whatsoever.
Any help would be much appreciated.
Click to expand...
Click to collapse
It's the system power and ram management. That system kills the processes and doesn't allow them to revive for instant notification. Same happens with facebook and facebook messenger, not only watsapp. Instagram does this also. I receive a follow notification on my iPhone and the notification appears on the Mi A2 Lite only after the screen is on and unlocked.

TheoXSD said:
It's the system power and ram management. That system kills the processes and doesn't allow them to revive for instant notification. Same happens with facebook and facebook messenger, not only watsapp. Instagram does this also. I receive a follow notification on my iPhone and the notification appears on the Mi A2 Lite only after the screen is on and unlocked.
Click to expand...
Click to collapse
Oh i see. i totally get that over agressive ram managment, because even with 4 tabs open, it kills them very soon, to a no avail have i tried to fix it, it seems to be rooted issue...
Do you know any possible fix or workaround for this? Maybe to convert these apps to privileged, e.g. system apps or something? There must be some kind of solution for this.

CrimosUmbro said:
Oh i see. i totally get that over agressive ram managment, because even with 4 tabs open, it kills them very soon, to a no avail have i tried to fix it, it seems to be rooted issue...
Do you know any possible fix or workaround for this? Maybe to convert these apps to privileged, e.g. system apps or something? There must be some kind of solution for this.
Click to expand...
Click to collapse
Nope. Some said that this is purely Xiaomi's fault. But no. I have another Allview phone doing the exact same stuff. This may be an unmodified kernel for the said chipset. Companies like Samsung, Sony, HTC etc. may edit that kernel to be more mild, while Xiaomi, to reduce the costs doesn't.

Related

fire OS using most the battery, new update to blame?

The date I noticed my battery issues coincides with when the update went live. I've tried tinkering as much as I can to disable wake lock permissions in all sorts of apps and using wake lock detector, but I can't really find the culprit.
I'm rooted, on 4.6.3. Is there a way to turn off the OTA check, or fool it into thinking I have 4.6.3.
Is it something else? I have a lot of apps, but the only thing wake lock can tell me about the sheer number of wakes is google play services, which has had it's permission to wake disabled but still is somehow the cause. That and system are about equal. Awake time is 91% since my last full charge and unplug. Not good.
Thanks for any help.
Just to maybe assist you in finding the culprit I'm on 4.6.3 with google apps but no root. I've not experienced any wake locks. Perhaps clearing Google's cache and data?
Sorry I meant I was on 4.6.1 still. Will clear data and see.
adam.nox said:
The date I noticed my battery issues coincides with when the update went live. I've tried tinkering as much as I can to disable wake lock permissions in all sorts of apps and using wake lock detector, but I can't really find the culprit.
I'm rooted, on 4.6.3. Is there a way to turn off the OTA check, or fool it into thinking I have 4.6.3.
Is it something else? I have a lot of apps, but the only thing wake lock can tell me about the sheer number of wakes is google play services, which has had it's permission to wake disabled but still is somehow the cause. That and system are about equal. Awake time is 91% since my last full charge and unplug. Not good.
Thanks for any help.
Click to expand...
Click to collapse
Probably one of those glitches that can be solved by a reboot. However, you can disable updates using hdxposed module for xposed if you want.
Done both of those things plus much more. Anyone else having this issue?
try taking a titanium backup of everything and then factory reset.. with everything backed up to your PC. then root and start restoring everything gradually.. start by social apps and call log and messages.. then your essential apps.. and see.. then add the rest of the apps bit by bit till you find the offending application or maybe something just got screwed will be fixed when the data clears..
just make sure there is nothing out of the norm in your essential apps, meaning they are all tried and tested by everyone.. facebook, whatsapp, keep, launcher.. that stuff. and also make sure in these apps to limit their ability to check every X minutes as they can really drain your battery.
I've disabled wakelock on anything that has reported to use it by wake lock detector that I don't absolutely need to have it. I've uninstalled any non-essential apps. I've done too much tinkering and have too much important app data to risk doing a reset when it may not work.
I need a way to actually get to the bottom of it first.
Why is google play services waking the phone 2000+ times per day? Wake lock detector says the phone has been awake 5 hours out of 10, but then the list of times for each app only adds up to 20 minutes. How do I find out what was keeping it awake the rest of the time?
Possibly some kind of location based frippery. Try removing location access from troublesome app. And turn off auto sync if it's on
Location services are completely disabled. Auto sync is off. Both have been since this started happening.
Used app quarantine to disable almost every app I put on here, and Fire OS is still 51%.
Possible culprits, though I'm not sure if I find it likely: Ultimate dynamic navbar, lightning chat, foscam viewer, google apps, xposed mods (have a few). greenify (that would be ironic), flixter, es file explorer, buildprop editor, calculator, jellybean keyboard, multi timer, skana battery alerts, nova launcher, power toggles, slacker radio, bank app, super user, terminal emulator, outlook, wakelock detector.
Get better battery stats from xda, it gives a better breakdown of wake locks.
Alright what should I look for in there?
Ok here is what I believe I have found out, using network log along with better battery stats.
The phone is waking up constantly due to netbios pings (I know not technically pings), from various computers on my network, mostly my main PC. I don't know why it's doing this. Could be one of many background processes. In my opinion, it shouldn't matter. The phone shouldn't be that stupid.
I was able to... I think, mitigate a lot of this by doing a few things.
The first is editing qcom's ini inside etc/wifi so that if it says offload, I put a 0, I assume it's offloading to the cpu, which causes it to wake for pointless crap. The second thing I did was re-enable optimized wifi. This is probably already on, on everyone else's phone. I turned it off because I was trying to figure out how to tether while connected to a vpn through the phone. Still can't get that to work. And I know how to, because I did it on my nexus prime, but something in the fire OS is f'ing that method up (iptable configs).
I'm considering seeking an app to turn off wifi when the phone sleeps, because better battery shows wifi on 100%, and even with the changes above, I was still responding to some netbios pings in the network (about 1/5th as many). I imagine most networks will have noise like this.
However, even after all this, fire OS is still the main battery draw. Better Battery doesn't account for all the wake time, not even by half.
For now I've put enough time into this.

Android OS wakelock

Hello everybody.
I have recently rooted my phone to try and identify the cause to my fast battery drain, which is primarily from the Android OS process.
I can't seem to find it. I see that the process "system" is working a lot and that the Android OS is awake for way to long.
Maybe you guys can point out something I'm missing here.
I would appreciate every help from you !
Thx
raied115 said:
Hello everybody.
I have recently rooted my phone to try and identify the cause to my fast battery drain, which is primarily from the Android OS process.
I can't seem to find it. I see that the process "system" is working a lot and that the Android OS is awake for way to long.
Maybe you guys can point out something I'm missing here.
I would appreciate every help from you !
Thx
Click to expand...
Click to collapse
This really could be anything. I recently had this and experimented for days whenever I took a break. For me, it turns out that it was my work's wifi hotspot making my phone stay awake to stay connected. I turned off wifi and it was fixed. But this isn't a solution. I ended up connecting to my own wireless repeater and problem was gone.
Bottom line is you'll have to figure out what's going on yourself.
htr5 said:
This really could be anything. I recently had this and experimented for days whenever I took a break. For me, it turns out that it was my work's wifi hotspot making my phone stay awake to stay connected. I turned off wifi and it was fixed. But this isn't a solution. I ended up connecting to my own wireless repeater and problem was gone.
Bottom line is you'll have to figure out what's going on yourself.
Click to expand...
Click to collapse
Thank you for your reply.
I couldn't find any cause to the problem, that's why I thought that maybe another pair of eyes (or more ) might help...
raied115 said:
Thank you for your reply.
I couldn't find any cause to the problem, that's why I thought that maybe another pair of eyes (or more ) might help...
Click to expand...
Click to collapse
I'll tell you what I've done for battery life on my phone and maybe on of those will fix your problem.
1. Uninstall stock bloat (only the stuff actually running in the background; no need to remove stock launcher ect.)
2. Disable Wi-Fi scanning when wifi off
3. Use Amplify to limit wakelocks and alarms
4. Freeze the apps you don't regularly use. I have a titanium backup widget on my homescreen that will unfreeze snapchat and launch it. It is the pressed again to freeze it after use.
5. Greenify apps you don't want running in the background for no good reason. If you get the donate version, you can still get GCM notifications so it's win win. For apps that don't have GCM notifications, it will coalesce the notifications so your phone doesn't wake up as often.
6. Make sure you have all logging turned off from the LG hidden menu.
7. If you're on a bad wi-fi network run by work/school, then get the auto disable IPv6 app on the play store.
8. Use the HEBF Optimzer app to prevent Google wakelocks and battery drains.
9. Use PNF Root app on the play store to custom choose how often your phone checks for GCM notifications.
With these changes, I finish the day with around 4 hours of screen on time doing regular things. Don't believe the posts about 7-8 hours SOT because you don't know what they were doing. I once used my phone as a timer while studying and had the screen on for 3 hours and only drained 12% battery.
absolutely the same issue here. No luck with factory reset, not using whatsapp or messenger, not using wifi, not using mobile data, no luck with any kind of debloating, uninstalling, installing greenify, amplify whatever. In the end, the Android OS will come back and drain the battery. I've spent a way too much time on this issue.
kakaovnik said:
absolutely the same issue here. No luck with factory reset, not using whatsapp or messenger, not using wifi, not using mobile data, no luck with any kind of debloating, uninstalling, installing greenify, amplify whatever. In the end, the Android OS will come back and drain the battery. I've spent a way too much time on this issue.
Click to expand...
Click to collapse
Try clearing the Google Play Services data, then removing all Google accounts and then adding them back. This time, make sure not to agree to any data collection.
When you turn GPS on, it should show as GPS only in the location settings. Disagree to any prompts.
If your location defaults to high energy GPS and networks, then try flicking the toggle on and off very quickly after you have cleared the play services data. This is how I got the prompt for data collection to come back. It's annoying and you have to always disagree but it fixed my mysterious battery drains from android os.

No notifications while on standby. Bluetooth constantly turns off. What gives?

I got my Pixel XL (unbranded) earlier this month, and as much as I wanted to love the phone, two consistent issues keep happening which are making me despise it.
The first issue is my phone refuses to retrieve Push notifications while it's on standby. I will get no notifications from any app until I physically wake my phone. As soon as I pick the phone up and turn on the screen, BAM, a billion notifications. This is true even for Google apps like gmail and hangouts. I have seen lots of threads on this subject dating back years for various devices, and none of the 'solutions' fixes my situation. Battery Optimization isn't on, and even when I toggle it on and exempt all my apps, it still does it. IPv6 is disabled at my home network level. I disabled the Connectivity service. I enabled notification importances and set all apps to high. I turned off WiFi while on standby. I begrudgingly did a full reset. Nothing has worked.
The second issue is related to bluetooth. I cannot get it to stay on. It turns itself off whenever it feels like, so whenever I get into my truck and expect my GPM to start playing, all I get is "The bluetooth stereo device is not connected." I take pride in my attentive driving, which means if I forget to reconnect everything while still in my driveway, I now have to pull over just to get some tunes playing. Getting infuriating...
So, I'm at my last nerve. I turn to the Gods of XDA for your advice before I return this thing. Is there any fix to all this? I'm not opposed to rooting or using custom images. I just want my phone to work.
Thanks in advance for any info you can provide.
Google is aware if the Bluetooth issue, the Feb update caused it. They are working on a fix.
I got nothing on the notifications. Gmail doing that is quite common and goes beyond the Pixel. Never heard of anyone having issues with other apps.
You running any doze programs or task killers?
TonikJDK said:
Google is aware if the Bluetooth issue, the Feb update caused it. They are working on a fix.
I got nothing on the notifications. Gmail doing that is quite common and goes beyond the Pixel. Never heard of anyone having issues with other apps.
You running any doze programs or task killers?
Click to expand...
Click to collapse
It wasn't the Feb update. Bluetooth got bugged in the 7.1.1 update for me personally.
TonikJDK said:
Google is aware if the Bluetooth issue, the Feb update caused it. They are working on a fix.
I got nothing on the notifications. Gmail doing that is quite common and goes beyond the Pixel. Never heard of anyone having issues with other apps.
You running any doze programs or task killers?
Click to expand...
Click to collapse
No, the phone is pretty much stock. I have Skype and a couple games on it, but nothing that would interfere with network connectivity while on standby. Just to be sure, Doze is Battery Optimization in the settings, right? It's default to off, but after experiencing issues, I turned it on and exempted all apps. Didn't work, so I turned it off again.
I've never had this issue with GMail. The latest I have ever been notified of a new email from gmail is about 5 mins. Now, I go hours without them up until I wake my phone. And again, this is for all apps that have actual push notifications. I'll pick up my phone, then get a slew of new emails, skype messages, hangouts, etc...

How to prevent apps from getting killed

Hi all,
I'm running several apps that should run all the time (AdGuard, Network Speed Meter) or for a long time (speed trap warner,...) but OxygenOS kills them after a certain period. Some of them restart automatically, some don't. Of course all of these apps are 'not battery optimized'. Is there any chance to prevent OxygenOS from killing them?
Are there custom ROMs that can overcome this problen?
I'm on the latest OxygenOS Pie Beta, but the behavior was similar on Android O...
Thanks a lot,
W
Did you try locking the app via recents menu?
Thank for the info, didn't know that.
Unfortunately it doesn't help, Adguard and the network monitor don't appear in recents. The speed trap warner automatically starts and stops when I'm in the car, i don't want to open recents manually every time.
Battery - Battery optimisation - Don't optimise
safwankatharudheen said:
Battery - Battery optimisation - Don't optimise
Click to expand...
Click to collapse
This is not changing anything,e ven with disable battery disabled, even with adaptative battery disabled.
I have the same problem. I have not found any solution whatsoever. This is really frustrating. I've made sure apps aren't optimized. Advanced optimization is disabled. Developer options background limit is at standard. I've pinned the apps in recent apps and it still happens. Apps get killed all the time.
For example,
1. I use Google Fit to start tracking a run. Within 10 minutes of tracking, the app is closed and workout not tracked. Its not even like i touched the phone and opened other apps during this.
2. I have VoIP account setup in the default dialer. Calls come through only 50% of the time cause the dialer is closed.
3. YouTube Music, constantly gets closed if i simply pause the music. Within 2 minutes, the app is closed.
4. Trying to transfer 15GB of files through Explorer app from phone to file server, never succeeds if i don't watch the app and keep the screen on.
5. Plex gets closed and therefore my photos don't auto backup with the phone is plugged in.
This is absolutely ridiculous! Why the hell a phone with 8GB of RAM is killing apps is beyond me!
Custom ROM on the same phone, like Lineage OS, no issues. Can have optimization on, battery manager on and all. In fact, battery life is better on custom when its not killing the apps! Seems to be the only solution until OOS can stop killing apps so aggressively.
M3drvr said:
I have the same problem. I have not found any solution whatsoever. This is really frustrating. I've made sure apps aren't optimized. Advanced optimization is disabled. Developer options background limit is at standard. I've pinned the apps in recent apps and it still happens. Apps get killed all the time.
For example,
1. I use Google Fit to start tracking a run. Within 10 minutes of tracking, the app is closed and workout not tracked. Its not even like i touched the phone and opened other apps during this.
2. I have VoIP account setup in the default dialer. Calls come through only 50% of the time cause the dialer is closed.
3. YouTube Music, constantly gets closed if i simply pause the music. Within 2 minutes, the app is closed.
4. Trying to transfer 15GB of files through Explorer app from phone to file server, never succeeds if i don't watch the app and keep the screen on.
5. Plex gets closed and therefore my photos don't auto backup with the phone is plugged in.
This is absolutely ridiculous! Why the hell a phone with 8GB of RAM is killing apps is beyond me!
Custom ROM on the same phone, like Lineage OS, no issues. Can have optimization on, battery manager on and all. In fact, battery life is better on custom when its not killing the apps! Seems to be the only solution until OOS can stop killing apps so aggressively.
Click to expand...
Click to collapse
My app is not killed when i lock it in the switch app menu
There's a whole website regarding that issue on several devices, maybe it helps: dontkillmyapp(dot)com/general#user-solution

Notifications Issues

I know this will be almost impossible to solve with suggestions, but some of my notifications don't come through until I unlock my phone. Most notably WhatsApp. I've turned off all battery optimisation options, removed it from the sleeping apps list, allowed background data and turned off data saver. Still have the same issue.
I have naptime installed so turned that off as well.
What's strange is that a few days ago all my notifications started coming through as normal for a few hours, and then stopped again.
I know the only way to solve this is probably a factory reset, but with loads of tweaks I've gotten it so my battery life is amazing. Leaving it overnight it drains around 3% and depending on how I use it I get around 8h of SOT with 50% battery left so I don't really want to factory reset.
What launcher are you using?
I feel your pain with factory resets.
There needs to be a backup settings to cloud so you can easily restore them after a reset or even a change of phone.
I understand your frustration with this issue, I experimented it as well when I started using my device, back then I did not fully knew about all the battery optimization settings, but, when trying to get all the notifications right, I stumbled upon an app named PNF-no root, which is meant to fix the push notifications from sms, email, whatsapp, etc, I tried so many things, that I honestly can not say if this PNF solved the issue, but in the end my notifications became normal, so, I kept using it, you can give it a try, that is, before you reset your phone, it might help
Do you at least move your phone? Because a lot of apps, to bypass the system's optimisation that put apps to sleep, is that their wake up workaround is gyroscopic based.
That's why WhatsApp and such use a lot the sensor while it has nothing to do about in the first place.
If a battery monitor works for you, you can check that for WhatsApp.
winol said:
I understand your frustration with this issue, I experimented it as well when I started using my device, back then I did not fully knew about all the battery optimization settings, but, when trying to get all the notifications right, I stumbled upon an app named PNF-no root, which is meant to fix the push notifications from sms, email, whatsapp, etc, I tried so many things, that I honestly can not say if this PNF solved the issue, but in the end my notifications became normal, so, I kept using it, you can give it a try, that is, before you reset your phone, it might help
Click to expand...
Click to collapse
Thanks I have installed it and will see if that works.
Nastrahl said:
Do you at least move your phone? Because a lot of apps, to bypass the system's optimisation that put apps to sleep, is that their wake up workaround is gyroscopic based.
That's why WhatsApp and such use a lot the sensor while it has nothing to do about in the first place.
If a battery monitor works for you, you can check that for WhatsApp.
Click to expand...
Click to collapse
Yes I've got it on me all day. It's never left anywhere for extended periods of time.
Nastrahl said:
Do you at least move your phone? Because a lot of apps, to bypass the system's optimisation that put apps to sleep, is that their wake up workaround is gyroscopic based.
That's why WhatsApp and such use a lot the sensor while it has nothing to do about in the first place.
If a battery monitor works for you, you can check that for WhatsApp.
Click to expand...
Click to collapse
Yes I've got it on me all day. It's never left anywhere for extended periods of time.
I've just installed a push notification tester app and my phone goes into doze immediately once I lock my phone and the screen turns off it seems.
If I request a notification, it comes through with the phone unlocked but if I set a delay of a few seconds and lock the phone before it comes through, nothing will happen until I wake my screen up.
Any ideas on how to solve this?
I worked out what the problem was!
I have a VPN that is set to disconnect when my screen turns off to save battery. At the same time I enabled the Android setting that blocks all connections without VPN. Of course when the screen turns off and the VPN disconnects, my phone was blocking all outside connections, hence me not getting any notifications.
Well, I am glad you figured it out

Categories

Resources