Signal-Android icon indicating copy to clipboard operation
Signal-Android copied to clipboard

Excessive battery drain

Open Alias3333 opened this issue 2 years ago • 116 comments

  • [ ] I have searched open and closed issues for duplicates
  • [ ] I am submitting a bug report for existing functionality that does not work as intended
  • [ ] I have read https://github.com/signalapp/Signal-Android/wiki/Submitting-useful-bug-reports
  • [ ] This isn't a feature request or a discussion topic

Bug description

Describe here the issue that you are experiencing.

Steps to reproduce

  • using hyphens as bullet points
  • list the steps
  • that reproduce the bug

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

Alias3333 avatar Jul 08 '22 19:07 Alias3333

Please fill out the sheet properly, and check if there are other issues related to this one first.

alex-signal avatar Jul 11 '22 13:07 alex-signal

I noticed Signal showing on my battery most use list. IMG_20220731_100138

I'm using GrapheneOS in a Pixel 5. Battery optimization is disabled since I'm not using Google Services for push notifications.

Signal is version 5.44.3. previous two versions showed the same problem.

caveman1973 avatar Jul 31 '22 01:07 caveman1973

Same issue on Pixel 6a with GrapheneOS without Google play services.

  • Download Signal from Aurora Store (or Homepage)
  • Start Signal
  • Give Access to Contacts, Sensor and Network
  • Try Battery use optimazed and unrestricted
  • Close App
  • Wait for a while (e.g. 1h)
  • Check Battery use in Settings: Signal is running all the time and burn down battery (20% of Battery use for 10 min usage, whole day, is normal)

Pixel 6a Android 12 Build-Num. SD2A.220601.004.2022080500 Signal 5.44.4

Debug: https://debuglogs.org/android/5.44.4/c31749b0bb1ff1e8a99be8fe1cad3dc8cfbc7055f04d791e4dcb7eaf16759702

a13xl avatar Aug 10 '22 18:08 a13xl

Exactly the same issue with LineageOS 19.1 on OnePlus9T without google services. I don't know how it works exactly but I guess the custom signal service is maintaining connection at all times to get the messages as soon as they arrive.

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.

furai avatar Aug 18 '22 08:08 furai

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

caveman1973 avatar Aug 19 '22 06:08 caveman1973

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.

furai avatar Aug 19 '22 09:08 furai

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.

cody-signal avatar Aug 19 '22 14:08 cody-signal

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?

furai avatar Aug 20 '22 11:08 furai

I hope it's appropriate to drop some info here on what seems to be the same issue recently for myself. I can't say I've seen these warnings from signal over the last year, but seem to get them regularly for the last few days.

Signal v5.48.2 OnePlus 7T Pro OxygenOS v11.0.9.1.HD01BA (Android 11)

ahaverty avatar Aug 28 '22 11:08 ahaverty

I use Don't optimise option per recommendation from signal cause otherwise you can stop receiving messages altogether.

furai avatar Aug 29 '22 09:08 furai

I had to delete Signal on my phone, it killed my battery. Samsung A52s 5G image

b0she avatar Sep 01 '22 13:09 b0she

Have the exact same issue here, Pixel 4 running GrapheneOS based on Android 13. Weirdly though I only started seeing the awful battery life after the Android 13 update so I'm not 100% sure it's entirely Signal's fault. Screenshot_20220905-142432 Incidentally I'll be giving battery historian a go, I've done a tiny bit of android dev and may be able to isolate what could be causing this. (My guess is the websocket code's going haywire due to changes in Android 13 but that's assuming other people in this thread are also on 13)

Edit: looking again it looks like other android versions have the issue as well.

FuzzyQuils avatar Sep 05 '22 04:09 FuzzyQuils

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

Ronkn avatar Sep 06 '22 22:09 Ronkn

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 image

I have also posted an issue about it to the respective fork repo https://github.com/mollyim/mollyim-android/issues/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

Toasterbirb avatar Sep 13 '22 05:09 Toasterbirb

Same issue on a Pixel 6 with GrapheneOS without Google Play Services. Seems to be worse on mobile data than on WiFi.

drkhsh avatar Oct 27 '22 09:10 drkhsh

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

Ronkn avatar Oct 27 '22 11:10 Ronkn

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.

Ammako avatar Oct 31 '22 02:10 Ammako

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

FedFrog avatar Oct 31 '22 09:10 FedFrog

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.

I didn't see any difference, issue persists on newer versions.

furai avatar Oct 31 '22 10:10 furai

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.

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

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

Toasterbirb avatar Oct 31 '22 11:10 Toasterbirb

As of me I wouldn't call battery drain excessive, but definitly more than other messangers/apps. I am running it without playservices, but with microG instead. It seems not support it's push service, although it would be possible. I just have no choice.

starbrights avatar Nov 20 '22 13:11 starbrights

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?

0-5-0 avatar Nov 21 '22 21:11 0-5-0

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.

image

ermirry avatar Dec 13 '22 14:12 ermirry

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.

starbrights avatar Dec 13 '22 17:12 starbrights

Same/similar issue here. Not at home so no adb or further tools at hand atm. Just now charging to 100% for another cycle. Any hints on what to try/test. Currently Signal is set to use "Intelligent Control" for Battery. Somehow it seems to stay active and not really go to idle even in background. Device is a OnePlus 7T

signalbatterydrain

s7m0n avatar Dec 13 '22 20:12 s7m0n

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.

ermirry avatar Dec 14 '22 12:12 ermirry

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: https://developer.android.com/topic/performance/power/battery-historian

cody-signal avatar Dec 14 '22 15:12 cody-signal

@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.

ermirry avatar Dec 14 '22 17:12 ermirry

Hi,

just to be sure on the push notification questions. If i go to App-Info on Signal and then notifications all are enabled. Or would i need to check another place as well. Unfortunately i currently do have only my main device available. When back home i might be able to try battery historian to look on my own bug report - but to be honest that will not be soon (currently short on free time and not back till next year).

In case of other things for testing - let me know. Let me also say thanks for providing Signal and your efforts

Edit: Also some details on my device:

  • Oneplus 7T
  • Android 11/ Oxygen OS 11.0.9.1HD65BA
  • Not rooted
  • Security update: 2022-06-01
  • Google Play system update 1 August 2021

s7m0n avatar Dec 15 '22 17:12 s7m0n

The easiest way would be to look at your debuglog and in the top block there will be a line like:

FCM : <false|true>

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.

cody-signal avatar Dec 15 '22 18:12 cody-signal