Open benneti opened 2 years ago
Battery usage screenshots:
EDIT: Also relevant notification setting
Same issue here on a Moto g 5g. The point where the curve becomes flat is where I have killed the app.
Also, I switched to the gplay version for now, because there the drain seems normal.
Does increasing the sync interval from 60 seconds to 300 (1min to 5mins) help?
If increasing the interval reduces the battery drain then unfortunately the app is behaving as expected. The fdroid variant is using an interval polling mechanism to check for new messages which means (if the OS/ROM allows for it) the device will wake up every 60 seconds. Some OEMs/ROMs incorporate an exponential backoff when a device becomes inactive/dozing whereas others will allow for exact repeated scheduling.
The google play variant uses Google Play Services and FCM to only wake up the device when a message is received, drastically reducing the amount of wake ups needed.
If increasing the interval does not reduce the battery usage then we can investigate further as this may mean there's a rogue service running non-stop
I think I tried to increase the poll interval (to a few minutes) with no significant effect but I did not do any comparison measurements; right now I use the google play version, but I will double check.
Actually I think I cannot reproduce this anymore on 1.4.8. I'll keep an eye on the battery drain for the next few days with the 60s intervall but after two hours in the background right now it says 0% used which is what I would expect!
After leaving it in running in the background over night, it only drew about a percent in the same hour as the 10% before which I think is fine. @gdkrmr is it better for you on 1.4.8 or is it still drawing much?
That's great news, thanks for confirming! Battery is one of those tricky areas where the GooglePlay variant and FDroid behave differently, along with OEMs/ROMs having their own sets of battery optimisations.
There's nothing that stands out in the changelog from 1.4.4 to 1.4.8 that specifically targets battery issues which has me a little paranoid that we could unknowingly reintroduce the issue in the future
if we get more confirmations or no new reports in a few days, I'd be tempted to close this issue
I'm having quite a bit of battery drain too. I wasn't sure where it was coming from but I can confirm that element is at the top of the list for battery usage (at 19%).
I'm running 1.4.14, I think from F-Droid.
Steps to reproduce
Outcome
What did you expect?
Element should go to the background and try to save a bit more battery.
What happened instead?
Element is seen as active even in the locked phone state and drains a lot of battery.
Your phone model
Fairphone 4 (5G)
Operating system version
Android 11
Application version and app store
Element 1.4.4, olm 3.2.10 from F-Droid
Homeserver
synapse homeserver 1.54.0
Will you send logs?
Yes