-
-
Notifications
You must be signed in to change notification settings - Fork 6.3k
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
Excessive battery drain #12341
Comments
Please fill out the sheet properly, and check if there are other issues related to this one first. |
Same issue on Pixel 6a with GrapheneOS without Google play services.
Pixel 6a |
Exactly the same issue with LineageOS 19.1 on OnePlus9T without google services. If my assumption is correct maybe we could poll in intervals which could probably lower the battery drain? I don't need to get every message instantly and I'd be happy to have a setting allowing me to check for new messages every 1-5 or so minutes. Side note: I'm pretty sure it's been happening as well on older versions of Android. I've been using signal this way without google services for at least 3 years and battery drain was always an issue. |
I had a Pixel 3 and for the past years I've never seen Signal in the top list of apps that used more battery. For me it's recent. +3 months I think. I don't want to install an old version to test it |
One thing I've noticed for sure is that if you lock your screen with Signal in foreground - then it's draining battery even faster. |
Hi folks, unfortunately there's not much we can analyze as Android doesn't surface this information to us to include in our debuglogs. We'd need an Android Bug Report which dumps A TON OF INFORMATION about your entire device. Which is why we don't like asking for them. If you are able to reproduce this on a test device and willing to send us a report, please do so via email to cody at signal dot org. If you're tech savvy, and want to investigate it using the tooling we would, then you can check out Battery Historian at https://developer.android.com/topic/performance/power/battery-historian to get more details on what exactly SIgnal is doing that's draining your battery. |
Once I get my hands on a free device to fiddle with I could probably debug it. But it won't happen for another month and I have barely any experience with Android development. Anything in particular what to look for? Any tips other than link above? |
I use |
I'm having this issue using calyxos on a pixel 4a, using websockets for push notitcations. Accounts for 15% battery drain over 10 hours, all the while I had not touched the phone. Same issue with my wife's pixel 4a running calyxos except she's using MicroG cloud messaging for notifications. Both on Android 12. Both signal 5.48.3 |
I'm also experiencing this battery draining issue with Molly-FOSS, a Signal fork without google play services and I think it uses websockets for notifications. My battery drain is at this level I have also posted an issue about it to the respective fork repo mollyim/mollyim-android#126 and apparently this issue is an upstream issue, so I'm also posting about it here The issue contains some more information and a debug log |
Same issue on a Pixel 6 with GrapheneOS without Google Play Services. Seems to be worse on mobile data than on WiFi. |
I don't care anymore as I'll be unsintalling signal once sms support is dropped. I'm not using multiple apps to communicate. Time for Element/Matrix |
How's it looking with 5.53.8? It used to be that Signal was consistently at the top of my list in battery usage, but now it sits all the way down at the bottom alongside my keyboard. I'd be interested in knowing if people are still struggling with this, or if the various improvements in the newer version have actually helped. |
Same issue with Pixel 7 Pro stock, so with Android 13. VIdeocalling is borderline impossible (20% in 10 mins, super hot phone) and generally Signal takes a lot of battery even for normal chatting |
I didn't see any difference, issue persists on newer versions. |
It has been a bit better for me. Signal is still topping the charts, but not with as outrageous numbers as before. My phones battery lasts at least for 1-2 days, so its at acceptable levels I'd say.
Can confirm. I made a group video call and my phone got extremely hot during it. I think other participants in the call also had to plug their phones into a charger because it was draining so much battery. Their devices had google play services installed though, so that's most likely an entirely different issue |
As of me I wouldn't call battery drain excessive, but definitly more than other messangers/apps. |
I've noticed on my Pixel 6a phone with GrapheneOS that if I launch Signal Messenger then back out of it or press home (leaving it in the "system tray" let's say) then the battery usage is quite high. If I however bring up the "system tray" and clear all apps from the "system tray" or background then the Signal battery usage goes way down and the Signal background service still seems to work fine (I get calls/messages). This is opposite to how I've seen it work when using the Tutanota client for example. If I clear the Tutanota client from the "system tray" then battery usage goes way up and if I leave it running in the "system tray" then battery usage is way down. After a fresh reboot for example without launching any apps then Tutanota would use lots of battery but Signal would use little battery. After launching both apps without clearing the "system tray" then Signal battery usage would go up but Tutanota's would go down. I would hope that there's a smart way for each app to find out if they're cached and then behave accordingly. Has anyone experienced this behavior? |
I am also experiencing severe battery drain with signal in the background. I'm using a Pixel 4a with stock Android 13. My battery went from 50% to dead overnight with signal being the biggest battery user in each two hour section of the battery usage graph shown below. I was also fast asleep during these hours, so I was not using the app. |
I found the reason for my higher power consumption (compared to my previous installation). I use microG and this includes cloud messaging. Usually this can be used by apps, but it seems that Signal doesn't use it first. So it has to do this job on it's own. After delete and reinstall it recognises the microG service and returns to a moderate power drain. BTW: Power drain has been low in Flight mode. Please check that too. |
Same/similar issue here. |
So after my comment yesterday, I changed Signals battery profile in Android 13 from Optimized to Restricted and charged the device to 100%. Waking up this morning, my overnight battery drain is waaaay better. I lost about 10% battery overnight vs the 50% lost when signal was set to Optimized. Signal is definitely putting in over time in the background when it shouldn't be. |
To those newly posting on this issue, are you using the background websocket without google push notifications or using push notifications? Additionally, if you are able to reproduce this issue on a test device, providing an Android Bug Report is the most helpful for looking at battery drain issues. I call out test device because an Android Bug Report contains a ton of personal information we'd rather you not send us and likely you'd rather not share. Here's the tool we like to use to look at battery usage, feel free to use it yourself and report back what you see: |
@cody-signal since I am using stock Android 13 (not rooted), I am assuming that I am just using google's push notifications as is. I'm going to look around for a test device that supports the latest version of Signal to see if I can gather more data. |
Hi, just to be sure on the push notification questions. If i go to App-Info on Signal and then notifications all are enabled. In case of other things for testing - let me know. Edit:
|
The easiest way would be to look at your debuglog and in the top block there will be a line like:
If it's false, you are in websocket mode, and if true, you are using Google's push notification system. Based on your device details I'm going to guess you are in push mode, but it's worth double checking. |
you need to self host mollysocket, which i don't find feasible for me. |
Ah! with only mollyup + ntfy.sh I won't get any difference at all? |
@duven87 this is as good as it gets. For now. On signal you might get up to 50% or more battery usage as reported by users.
Fly.io used to have free quota, the answer already links to the repo mollysocket-fly, which guides on how to set it up. Even if not free, it might cost you well under $5 or you can try aws but I have no experience with it. |
After several days of testing I have realized that the consumption has not changed anything with LOS+bitgapps on Pixel 4a. |
@aventura-ms Langis might not be up to date. Whereas molly is same as latest signal as of now, and fast enough with follow up updates. |
What a parasite, not even with google apps yields the battery. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
some activity |
This issue seems to still persist. I now updated to Android 15 and will see if that helps somehow. |
Dupe: #9729 |
Potential solution:
The second setting is only available when the first setting is not set to Unrestricted. This is also how it's being done with Thunderbird for Android: https://support.mozilla.org/en-US/kb/configure-push-email-thunderbird-android#w_alarms-reminders-permission-for-android-13-and-above And at first glance it also seems to noticeably reduce the battery drain on Signal. It remains to be seen though if the WebSocket based Signal notifications still arrive quickly and reliably with those app settings. |
I switched to Molly a year ago and it solved all of my problems (your backup eitll transfer fine). I linked the solution that they had at some point in this ticket or another, but signal doesn't seem to care. So that is my reccomendation. |
Right. If the message and call notifications are instant, then it would be a good workaround for the time being since signal team doesn't seem to be interested in working towards a fix at all. |
Unfortunately this does not seem to solve the excessive battery drain either after all. The battery is still being drained massively. So probably the only "solution" at the moment would be to completely block the battery background usage for Signal and to open the app manually on a regular basis to check for new messages/calls. Which would essentially no longer be instant messaging and therefore would unfortunately make Signal on Android somewhat impractical. @Meredith-Signal @greyson-signal @alex-signal @cody-signal @nicholas-signal @mtang-signal @clark-signal @jim-signal @moiseev-signal @akonradi-signal @andrew-signal @ehrenkret-signal @rashad-signal @adel-signal @eager-signal @jrose-signal @jlund-signal @jon-signal @nina-signal Why would Signal on Android be so dependent on Play Services / FCM? Is there no way this issue can be solved without installing Play Services / FCM? And is there a specific reason for why there are no updates on this issue (and its duplicate)? |
use molly. It has a better websockets implementation, or supports unifiedpush if you set up mollysocket. Why the signal devs haven't integrated any of that is a mystery to me, but at least molly does |
Not according to: mollyim/mollyim-android#126 And Signal Android users should not have to use a fork in the first place just to get basic functionality working. And:
Each Signal Android user having to set up a separate server to be able to receive real-time notifications can not be considered a solution either.
Not according to: mollyim/mollyim-android#126
Which is probably referring to: #13337 Even if Molly has merged that already, it does not seem to make a difference. @Meredith-Signal @greyson-signal @alex-signal @cody-signal @nicholas-signal @mtang-signal @clark-signal @jim-signal @moiseev-signal @akonradi-signal @andrew-signal @ehrenkret-signal @rashad-signal @adel-signal @eager-signal @jrose-signal @jlund-signal @jon-signal @nina-signal Any update? |
I agree it's not a solution. For one thing, a fork is always gonna be at least a little behind upstream so security fixes will take longer to get to those users, but I get minimal drain from molly using websockets. It does actually connect differently, it removes unneeded connections whereas signal has a few that stick around. So for me, the downsides of using a fork are worth good battery life |
Not according to: mollyim/mollyim-android#126 (comment) Quote:
And:
Not according to: mollyim/mollyim-android#126 (comment) Quote:
|
To add, what might also be worth mentioning: According to #13704 , apparently the issue is not even fixed even when using Play Services / FCM. |
Honestly I'm writing off signal and sticking with Molly. I've unsubscribed to this ticket and others I've been subscribed to, and keep getting tagged in them. This issue has been going on for Please don't continue to @ me. Thank you and good luck. I hope you resolve the issue someday for all of the users that rely and value this project. Edit: |
@Ronkn : Does molly responds fast enough for operating calls? So does it ring? |
@starbrights yes, no problems at all |
Cf. #12341. |
I've also had this problem recently following an update to (somewhere around) 7.30.1 (now running 7.33.2) and have been trying to find the cause since. I'm using:
For me this problem affected latest versions of both Signal and Molly on LineageOS. From my testing, it looks like Signal and Molly remained active (with Allow background usage set to Optimized) much more than previous versions. My phone was warm and the battery would drain in a matter of hours. By watching messages received from signal-cli in daemon mode, I could see a flood of unusual envelopes containing "Received a sync message" from both Signal and Molly at intervals varying roughly 1 to 4 seconds (see below, device 1 is Signal Android, device 4 is Molly):
Looking at the Signal app debug logs, I noticed messages with similar intervals from StorageSyncJob:
In the periods where I didn't see excessive background battery usage (there were some), these messages did not appear in the app debug log and signal-cli did not print "Received a sync message" messages to stdout (I kept an eye on this because I had to write a small Bash script to filter these from the stdout of signal-cli in order to read other messages). I then wondered if Signal and Molly were trying to synchronise something with signal-cli, so I updated signal-cli to the latest version from https://github.com/AsamK/signal-cli/wiki/Binary-distributions. Both the Signal app debug log messages about StorageSyncJob and the signal-cli messages are now silent. Was this a bug in signal-cli? At least in my case, this appears to have fixed the issue and reduced the battery usage to what it was before (it's still the most active app in the battery usage list). Unfortunately all of the debuglogs linked in this issue are returning 404 so I cannot check if they have the same StorageSyncJob messages. |
Bug description
Describe here the issue that you are experiencing.
Steps to reproduce
Actual result: Describe here what happens after you run the steps above (i.e. the buggy behaviour)
Expected result: Describe here what should happen after you run the steps above (i.e. what would be the correct behaviour)
Screenshots
Device info
Device: Manufacturer Model XVI
Android version: 0.0.0
Signal version: 0.0.0
Link to debug log
https://debuglogs.org/android/5.42.7/c7b1be0c78f85a3b2a937a657ee325af04675bebf433f621f5e74e6439a97e7e
The text was updated successfully, but these errors were encountered: