New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Major battery drain when notifications enabled #126
Comments
I'm experiencing exactly the same issue. |
Same here. Saddly I cannot provide any metrics/info due to my phone. But I noticed the impact on battery. I have to confirm this, but I also belive that Molly could be causing my phone to have higher temperatures. I'm using Molly-FOSS (Latest version.) running on Android 10. Thanks for all your work! ❤️ |
Just found this app and wanted to try but now i dont. Am i just using other apps way more excessively then anyone else here, or could my current version rlly have a better power management? |
The battery draining doesn't seem to be consistent. Sometimes the drain goes away and it goes back to normal rates of usage. I have no clue what variables to follow though to make any conclusions on what is causing this |
LibreSignal's fate incoming after this mention?^ |
Are the Signal devs meant to be not aware about the existence of this fork? |
They are aware of this project. There isn't any problem mentioning Molly to the Signal team. |
Awesome! Is there a thread somewhere for reading more details about this? Srry for the offtopic. |
Same here on my Pixel 6 with GrapheneOS without Google Play Services. Interestingly, on mobile data it is always worse than on Wifi. |
How could battery usage for push notifications with websockets be improved? |
I'm on rooted Android 13 on Pixel 7 and have this issue as well. Could the increase in battery consumption just be the "real"/ "pure" one, while the apparent lower usage with Google's Firebase notification service is just "hidden" or concealed inside Google's Play Service own battery usage? TL;DR: The high usage of Molly's own notification service might be "true", while Google's own notification service might be "faked". |
I'm also noticing that Molly is using WAY too much battery power. As others have mentioned, the issue seems to be somewhat sporadic, but recently seems to have grown worse. Happy to provide logs or troubleshooting if it will be helpful. |
may this commit helps in this case: |
Can Molly bring in this pull request, to see if it does help with battery? signalapp/Signal-Android#13337 |
The next release will include it. The person who made that PR also develops for Molly. |
Thank you so much for doing what signal refuses to do |
Would be a huge relief if that fixes it. |
Thanks everyone involved for trying to resolve the issue! However, for a quick test, I built molly with the signalapp/Signal-Android#13337 patch included and it does not resolve the issue on a Fairphone 4 with /e/ OS 1.17. The issue seems unchanged: normal battery drain when on wifi, but extreme battery drain when on mobile network. |
Yesterday we improved the patch, but haven't updated the pull-request yet. Use the beta we just released instead. It includes the latest commit 7257d57. Don't expect miracles, but you should notice less consumption. |
I've experienced similar behavior on GraphenOS with Sandboxed Google Play Services and Molly's FOSS (Fdroid) version. Today I installed the latest non-FOSS version expecting Molly to drain way less battery now using FCM (Firebase Cloud Messaging). But it did not. So I restricted battery usage in Android's battery settings and noticed that my database encryption could not keep unencrypted. Could database encryption be a part of battery drain problem's? |
Could definitely be. Since i'm experiencing similar battery usage where in one phone I have fresh setup of signal, in another I have 20+GB of data. Both signal apks and no play services. Unrestricted battery usage. Although the one with fresh setup uses way less battery. So the problem might be related to database handling and in upstream signal repo. |
Guys, using Molly-UP (or Signal-FOSS by twinhelix if he implements UP) and setting up your own mollysocket for free(visit mollysocket-fly repo) seems to be the only solution for now for the battery drain issue. I just set this up and will report back in a few weeks with an update on how it performs. |
@jayb-g Why does this require the setting up of an external MollySocket server? If the default one built into the app can serve WebSocket notifications why can't it serve UP notifications as well? |
@48-mq Because the default way of getting notifications(using websockets) in molly and in upstream signal is causing battery drain due to improper handling of WS commections or whatever reasons. UP addresses that and eliminates possibility of battery drain due to websockets. I have seen no user reporting low battery usage even after the said fix for it patched in molly. |
@jayb-g the websocket connection is inefficient, so mollysocket allows it to be handled by a server connected to power (where efficiency is less important) and forward the fact that there's a new notification to molly via an efficient notification listener - unifiedpush |
I had assumed Molly had built-in functionality to use its own MollySocket server, but not reviewing the Readme I realize that is not the case. Why can't there be a public (airgapped) MollySocket server just available for everyone to use? The notifications are all encrypted anyway, and I can't image such a public server would consume so many resources that it would come at an exorbitant cost to the Molly community? |
@jm355 I get that. But so why can't apps themselves use this efficient way of sending notifications to users? I believe apps are accustomed to not worry about notifications efficiency since they have been relying on Google and Apple for that from the beginning? And you need a single server anyway to get notifications from different apps efficiently(not having an open connection for each app) |
@48-mq yes you answered your own question. Molly is not Signal. It just uses signal backend which they don't have any control over. |
Is there an existing issue for this?
Bug description
As seen in the image, Molly tops the battery usage chart by a big margin
Usually the first day or two are fine, but then the battery usage ramps up. This same issue also happened with the upstream Signal version and that was the main reason I actually moved to the FOSS Molly version. I think adding unified push as an option might be one solution.
Steps to reproduce
Expected result: A bit more background battery usage compared to doing notifications trough Googles notification system
Actual result: Major battery drain that in some cases can even prevent the phone from charging properly
Molly version
v5.44.5-1-FOSS
Android version
LineageOS 19.1
Device
Fairphone 3
Link to debug log
https://debuglogs.org/android/5.44.5/4300b088ee0dd65914037cc68f00e501434315c0cf59f6ec3cc4aef57c5606a1
The text was updated successfully, but these errors were encountered: