Signal-android: Battery drain since Version 4.50

Created on 15 Nov 2019  路  23Comments  路  Source: signalapp/Signal-Android


Bug description

I observe huge battery drain since version 4.50

Steps to reproduce

  • start the phone
  • let some time go by
  • signal consumes around 70% of the phones battery without even being used actively

Actual result:
Huge battery drain
Expected result:
Normal battery usage

Device info


Device: Samsung A3 2017
Android version: 8.0.0
Signal version: 4.50.1

Link to debug log

https://debuglogs.org/f5bd85a34994bc9ab91293928729aff9ab2bb82916656491411d5ad913aef072

Most helpful comment

So i experienced similar issues yesterday, Signal used more than 30% battery after running with a acceptable battery consumption for about one month (Without FCM!)
Now i reverted back to microg's FCM, lets see if this help.

If anyone has Google Play Services disabled and therefore has a persistent notification for Signal in the notification tray -- you will use more battery. Because you don't have the capability to receive FCM messages, we have to keep a websocket open to receive realtime notification, which will keep the mobile radio active, which will negatively affect battery drain.

Might it be possible to implement a custom refresh time, like threema has them?
That the refresh hapepns for example every 5, 10, 15 or 30 minuites, depending on the user's need?

All 23 comments

Looking at your logs, you've been receiving near-constant messages for the duration of the log, which because of the high message influx, only captures the last 7 minutes or so. Not all of these messages are visible -- they include things like delivery/read receipts and stuff.

Is this expected? Was your device offline for some time?

In general, it's very difficult to determine battery problems from logs. If you can, please capture a system bug report and email it to [email protected] (you can upload it via Firefox Send or something if it's too big). Please note that this does contain information about how often other apps on your phone is used, so if you don't want to share it, that's understandable. However, if you do share it, there are tools that can be used to analyze the report and see where/how battery is being used.

I just sent you the system debug log and some more information to [email protected].
Thanks for looking into this!

I am also experiencing this issue on a Pixel 3a. When I check the battery status in Android, signal is the top battery user, showing upwards of 35% of my battery but only a few minutes of active use.

My phone is hardly usable at the moment. The battery only lasts some hours with signal consuming a huge chunk of it. I didn't use signal-desktop for some days, but still the same behaviour on my phone.

@sweah82 Thank you for sending in the bug report! The report was able to confirm some things that line up with what's in your debuglog. Namely, you're receiving many FCM messages, and as a result, we're constantly looking to fetch messages in the background.

An FCM message is basically the push notification system. When we receive one, it means we should go fetch messages from the service. However, not all Signal messages are visible -- for example, you're receiving a lot of delivery receipts. Do you happen to be in any large groups?

Regardless, I think there are some optimizations we can make in the fetching stage.

Also, if you could post another debuglog taken during a time where you don't feel you've been using Signal much, that can help confirm things. Thanks!

@Crumb7e Can you email me a bug report as mentioned in one of my earlier comments? It can me see if you're having a similar problem. At minimum, I'd need a debuglog. Thanks!

Oh, and for posterity, I should say that this doesn't appear to be a regression in 4.50.x. This type of problem could have happened on earlier releases.

@sweah82 Thank you for sending in the bug report! The report was able to confirm some things that line up with what's in your debuglog. Namely, you're receiving many FCM messages, and as a result, we're constantly looking to fetch messages in the background.

As I wrote in my initial report, I had two chats (Note to me + 1 non-group chat) with many (new) 'bad encrytion' messages with a red exclamation mark. There are thousends of them. Couldn't this be related to the FGM messages? Would a debuglog of the desktop app help?

An FCM message is basically the push notification system. When we receive one, it means we should go fetch messages from the service. However, not all Signal messages are visible -- for example, you're receiving a lot of delivery receipts. Do you happen to be in any large groups?

I am in no large groups. There is one with 11 people, the rest has 4 people max.

Regardless, I think there are some optimizations we can make in the fetching stage.

Also, if you could post another debuglog taken during a time where you don't feel you've been using Signal much, that can help confirm things. Thanks!

I'll send another debuglog as soon as possible!

Thank you!

Here's another debuglog: https://debuglogs.org/ea9accd8dbf17790992f5c4c61d004e74cd73c4c09c25f27e322669638688bac

Got 3 messages and sent 1 in the last hour or so.

Thanks!

Ok, yeah, so around 16:00 MEZ today you received what looks to be hundreds of FCM messages. Did anything notable happen around that time? Any new desktop activity or anything? You had mentioned desktop usage in an earlier comment. If so, could you post a desktop debuglog?

Activity between 16:00 and 18:00 looks to be normal. Did you experience any accelerated battery drain during the last couple hours? I know it can be hard to tell sometimes.

Also, one thing you may want to check -- there's bugs that can happen to other users that cause them to send bad-encrypted-messages. If you have one of those chats, go to the conversation, tap the three-dot menu, and hit "reset secure session".

I started the desktop app unintentionally sometime this afternoon. Between 16:00 and 18:00 there was no accelerated battery drain. I startet the desktop app again at around 18:50. There were thousands of unread messages for the 2 chats (note to self and the other one mentioned). I hit the "reset secure session" button in both of them. There were no new messages after that in the "note to self" chat. In the 2nd chat there were more bad-encrypted-messages immediately (but only around 20, then it stopped). It is strange, on the phone I have a "secure session resetted" messages for the "note to self", but not for the other chat. And now that I thunk about it, my brother (the chat with all the messages) got a new phone and a second sim card for the same phone number two weeks ago or sth. like that and used both cards for some hours. Do you think this could cause the problems? Here the debug log of the desktop app: https://debuglogs.org/d44e1a499f9063e9b3d8970f794d7584ca72fb70c69a0dad50cf3ff5b4b921a1

And another one from my phone: https://debuglogs.org/b08f756877de7fdf9f9a00d151506be608301eb88cd40f78cd13d11ee7e130a9

Thank you so much for looking into this!

Just to get some clarification - are these "bad encrypted messages" only on desktop? I don't see any logs to indicate that they would also be on Android?

If it's ever a possibility, I'd love to get a debuglog from your brother and know about their recent Signal interactions. I think the issue mostly seems to lie either with your brother's messages or your desktop instance.

I did not see the bad encrytion messages on my phone. I recognized a draining battery and the heat the app produced. The messages were visible on my destop apps and on my brothers Phone. He wrote me a WhatsApp message (1st time in years 馃槵) and said that he had to kill signal because his phone produced heat and the battery was empty after some hours. So he saw the messages. After that, I reconnected both of my desktop apps and deleted our chat there. My brother deleted the Chat too. A simple reset of the secure session had no effect on either side. Now the problem is gone completely.
I'd love to know what exactly caused the problem, but now a debuglog of my brothers phone doesn't help any more, does it?

I'm affected as well by this battery drain, which is very recent. I think this is related.

Hello,

Signal is my default SMS app and has recently been consuming half of my battery usage. I've been updating it regularly, which is a few times in the last days.

I've been abroad for a week so roaming is enabled. I don't want to pay the fees so I'm not using Signal but WhatsApp at the moment.

I use Blokada DNS over HTTPS or SSL and filtering (the VPN has been constantly disconnecting-reconnecting for a few days now). I'm on a OnePlus guenine OxygenOS but I've disabled most of the Google Framefork Services component, including the Play Services & Play Store, for more than a year, without blocking issues.

To stop this excessive battery consumption, I've enabled App Optimization and I force the App to quit after each use... this is a workaround & cannot last.

Regards

https://debuglogs.org/6df01acd7657b45d3a7569b506638e454543e990c279ff528330d6b3e453efe6

Interesting fact is that VPN disconnections & Signal's excessive battery consumption seem related since they appeared at the same time and disconnections stopped as soon as I optimized & manually killed Signal - which BTW awakes each time flight mode is disabled / an internet connection is established.

Could be a coincidence. But I don't like that at all.

In case Signal has been hacked, I don't want to unOptimize it. But it's probably to late.

I have the same issue on my Pixel 4. Yesterday I did send just one message and received a reply to that message and Signal was the app that used the most of my Battery (~24%). I think there is something wrong going on, reading the comments here it's not clear to me why the app should received many FCM notifications to do things in background when not a lot of traffic is going on.

Looking to the logs: https://debuglogs.org/38ac03b9906a7c9eaff171baeba82759e0b3ea948ddbaab83cb6c8a50645903a the app clearly does too much, compared to how much I used it.

Just for your info, I do not use web/desktop apps, just the mobile one.

Same issue for me on a Nexus5X and Signal version 4.55.8
computer power use =>1005mAh
Mobile radio active => 5h22m 50s
keep awake => 3m22s
CPU foreground => 4m20s
CPU Total => 6m22s
Battery use => 38%

If anyone has Google Play Services disabled and therefore has a persistent notification for Signal in the notification tray -- you will use more battery. Because you don't have the capability to receive FCM messages, we have to keep a websocket open to receive realtime notification, which will keep the mobile radio active, which will negatively affect battery drain.

If you have a stock device with play service (and I mean a real one -- not a rooted device with fake play services), and you're still seeing the persistent notification for signal to keep the websocket open, that's a bug. Check out #8992.

So i experienced similar issues yesterday, Signal used more than 30% battery after running with a acceptable battery consumption for about one month (Without FCM!)
Now i reverted back to microg's FCM, lets see if this help.

If anyone has Google Play Services disabled and therefore has a persistent notification for Signal in the notification tray -- you will use more battery. Because you don't have the capability to receive FCM messages, we have to keep a websocket open to receive realtime notification, which will keep the mobile radio active, which will negatively affect battery drain.

Might it be possible to implement a custom refresh time, like threema has them?
That the refresh hapepns for example every 5, 10, 15 or 30 minuites, depending on the user's need?

@greyson-signal Thank you for your explanation!

I was wondering why WhatsApp on phones without FCM doesn't have this issue. Could you please explain this to us?

Might it be possible to implement a custom refresh time, like threema has them?
That the refresh hapepns for example every 5, 10, 15 or 30 minuites, depending on the user's need?

That would be awesome :)

@greyson-signal

If anyone has Google Play Services disabled and therefore has a persistent notification for Signal in the notification tray -- you will use more battery. Because you don't have the capability to receive FCM messages, we have to keep a websocket open to receive realtime notification, which will keep the mobile radio active, which will negatively affect battery drain.

Does this mean, any AOSP based non-GMS device will be affected, no solution to save battery?
So far I did not see recent other posts which explained this problem for non-GMS.

Was this page helpful?
0 / 5 - 0 ratings