Skip to content
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

Open
4 tasks
Alias3333 opened this issue Jul 8, 2022 · 118 comments
Open
4 tasks

Excessive battery drain #12341

Alias3333 opened this issue Jul 8, 2022 · 118 comments

Comments

@Alias3333
Copy link


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

@alex-signal
Copy link
Contributor

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

@caveman1973
Copy link

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.

@a13xl
Copy link

a13xl commented Aug 10, 2022

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

@furai
Copy link

furai commented Aug 18, 2022

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.

@caveman1973
Copy link

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

@furai
Copy link

furai commented Aug 19, 2022

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.

@cody-signal
Copy link
Contributor

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.

@furai
Copy link

furai commented Aug 20, 2022

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?

@ahaverty
Copy link

ahaverty commented Aug 28, 2022

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)

@furai
Copy link

furai commented Aug 29, 2022

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

@b0she
Copy link

b0she commented Sep 1, 2022

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

@FuzzyQuils
Copy link

FuzzyQuils commented Sep 5, 2022

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.

@Ronkn
Copy link

Ronkn commented Sep 6, 2022

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

@Toasterbirb
Copy link

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

@drkhsh
Copy link

drkhsh commented Oct 27, 2022

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

@Ronkn
Copy link

Ronkn commented Oct 27, 2022

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

@Ammako
Copy link

Ammako commented Oct 31, 2022

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.

@FedFrog
Copy link

FedFrog commented Oct 31, 2022

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

@furai
Copy link

furai commented Oct 31, 2022

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.

@Toasterbirb
Copy link

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

@starbrights
Copy link

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.

@0-5-0
Copy link

0-5-0 commented Nov 21, 2022

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?

@ermirry
Copy link

ermirry commented Dec 13, 2022

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

@starbrights
Copy link

starbrights commented Dec 13, 2022

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.

@s7m0n
Copy link

s7m0n commented Dec 13, 2022

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

@ermirry
Copy link

ermirry commented Dec 14, 2022

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.

@cody-signal
Copy link
Contributor

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

@ermirry
Copy link

ermirry commented Dec 14, 2022

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

@s7m0n
Copy link

s7m0n commented Dec 15, 2022

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

@cody-signal
Copy link
Contributor

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.

Copy link

stale bot commented May 25, 2024

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.

@stale stale bot added the wontfix label May 25, 2024
@jm355
Copy link

jm355 commented May 25, 2024

The problem is still present, so the issue should stay open

@stale stale bot removed the wontfix label May 25, 2024
@jm355
Copy link

jm355 commented May 25, 2024

Signal should implement unifiedpush

@furai
Copy link

furai commented Jun 13, 2024

Yeah, issue is still there. I've just learnt to live with this fact and I just don't let signal run in background. Means I'm missing a lot of messages right away but I've just learnt to start up signal whenever I grab my phone. Better to do that than have really short battery life.

@Ronkn
Copy link

Ronkn commented Jun 13, 2024

Whatever downstream changes Molly messenger did, worked for me for this issue.

Signal should merge these related changes.

@jayb-g
Copy link

jayb-g commented Jun 13, 2024

@Ronkn since which molly version you are seeing improvements? Are you using websockets for notifications or UP?

@johschmitz
Copy link

I also installed Molly today (v7.8.1-1) to also test the power consumption behavior while being fully reachable again (no app power management restrictions). Let's see.
Of course a backup and re-import of the chat messages was necessary.

@Ronkn
Copy link

Ronkn commented Jun 13, 2024

@Ronkn since which molly version you are seeing improvements? Are you using websockets for notifications or UP?

I've been on it for a while now. 4 months or so. Yes I'm using websockets for notifications. Currently using the latest version available on fdroid.

@ghost
Copy link

ghost commented Jun 13, 2024 via email

@jm355
Copy link

jm355 commented Jun 13, 2024

The ideal solution is definitely for signal to enable unifiedpush

@jayb-g
Copy link

jayb-g commented Jun 14, 2024

@Ronkn @LoveIsGrief can you please share what is the size of User Data for Molly under App Info page? eg for me its more than 20GB(on Signal). I'm trying to understand if that may also have an effect on battery drain.

@jayb-g
Copy link

jayb-g commented Jun 14, 2024

Currently using the latest version available on fdroid.

@Ronkn molly or molly-foss?

@ghost
Copy link

ghost commented Jun 14, 2024 via email

@Ronkn
Copy link

Ronkn commented Jun 14, 2024

@jayb-g
Molly Foss v7.8.1-1-FOSS
Storage and cache: 672mb
Mobile data usage 472mb since June 6th
Not sure if that's what you were looking for?

If it matters, I have all of my conversations set to delete after 2 weeks. I did this on signal too though when I was on it.

@jayb-g
Copy link

jayb-g commented Jun 14, 2024

@Ronkn Ok, I think that's good enough for comparison

@kushagra-xo
Copy link

kushagra-xo commented Jul 29, 2024

This problem still persists and almost makes my phone hard to use with the high idle drains. A fix would be really appreciated.

Edit:
I have also tried Molly FOSS, and i can reproduce similar drains.

@ghost
Copy link

ghost commented Jul 29, 2024

@kushagra-xo do you use google services?

@jayb-g
Copy link

jayb-g commented Jul 30, 2024

The only solution to use signal without battery drain, for now, is to use molly unifiedpush version with mollysocket. It brings down total battery usage of molly-up + ntfy up to 5% at max. As I figure it has been years since the issue and people can't wait forever for signal to fix this.

@kushagra-xo
Copy link

@kushagra-xo do you use google services?

no, i do not.
device: pixel 8
os: grapheneos
android version: 14

@kushagra-xo
Copy link

The only solution to use signal without battery drain, for now, is to use molly unifiedpush version with mollysocket. It brings down total battery usage of molly-up + ntfy up to 5% at max. As I figure it has been years since the issue and people can't wait forever for signal to fix this.

you need to self host mollysocket, which i don't find feasible for me.

@duven87
Copy link

duven87 commented Aug 16, 2024

The only solution to use signal without battery drain, for now, is to use molly unifiedpush version with mollysocket. It brings down total battery usage of molly-up + ntfy up to 5% at max. As I figure it has been years since the issue and people can't wait forever for signal to fix this.

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?
where to get my own hosted mollysocket without having to purchase a server from a provider? no distributors?

@jayb-g
Copy link

jayb-g commented Aug 16, 2024

It brings down total battery usage of molly-up + ntfy up to 5% at max.

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

where to get my own hosted mollysocket without having to purchase a server from a provider? no distributors?

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.
It might also be possible to self host locally but then it would involve exposing it using expose or dynamic DNS, not sure though.

@aventura-ms
Copy link

It brings down total battery usage of molly-up + ntfy up to 5% at max.

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

where to get my own hosted mollysocket without having to purchase a server from a provider? no distributors?

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. It might also be possible to self host locally but then it would involve exposing it using expose or dynamic DNS, not sure though.

After several days of testing I have realized that the consumption has not changed anything with LOS+bitgapps on Pixel 4a.
But yesterday I installed Langis and it's the first time I see the app in 5th position in battery consumption and only 5%. It was always the first with 20-35%.
I think I will stay with it for now.

image

@jayb-g
Copy link

jayb-g commented Aug 19, 2024

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

@aventura-ms
Copy link

that the updates go a little slower in exchange for having a phone that will last many hours more battery, I prefer it.
It seems to be updated often anyway.

image

@johschmitz
Copy link

Signal from Play Store battery usage on a current stock Pixel 8:
Screenshot_20240918-124341

@duven87
Copy link

duven87 commented Sep 18, 2024

What a parasite, not even with google apps yields the battery.
I because they require me Signal at work, otherwise I would have already freed me from it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests