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

Signal consumes half of my battery (no google services or microG) #9729

Open
4 tasks done
someone1239 opened this issue Jun 11, 2020 · 84 comments
Open
4 tasks done

Signal consumes half of my battery (no google services or microG) #9729

someone1239 opened this issue Jun 11, 2020 · 84 comments

Comments

@someone1239
Copy link


Bug description

I installed Signal a few days ago, but it consumes close to 50% of my battery, more than all my other apps combined, when I barely even used it (answered one short call, sent and received < 5 messages).
I'm on grapheneOS so no google services and no microG. I posted the issue on reddit, and one person also on grapheneOS showed me a screenshot where Signal took 7% of their battery, with about the same time since full charge.
Battery optimization is off, I can't even turn it on. App runs constantly in foreground (which I assume is normal for the websockets).

Steps to reproduce

  • use Signal with no google services or microG

Actual result: Signal takes between 40 and 50% of battery life
Expected result: Signal should take ~10% of battery life

Screenshots

180aacb7-4a2f-46bc-ab2a-ce82e362eeda3

Device info

Device: Google Pixel 3a
Android version: 10
Signal version: 4.62.4 (6520) from website

Link to debug log

https://debuglogs.org/ab69b49388ae783727c5d47318d25296311a9f8f0cce64991fb28ae0830f2a34

@teynav
Copy link

teynav commented Jun 12, 2020

Can you say if disabling battery optimization still doesn't improve anything?

@someone1239
Copy link
Author

Can you say if disabling battery optimization still doesn't improve anything?

Battery optimization is already off, and I can't turn it on anyway (the option is grayed out)

@willemkuijpers
Copy link

40 ? I got 108 % lol

@someone1239
Copy link
Author

someone1239 commented Jun 28, 2020

Update: I switched to wifi recently instead of 4g, and the battery consumption has been much better since.

Here's the debug log in wifi: https://debuglogs.org/826d0a11eed1b55bbaf8d858247cae6615a7f74f3efe3a99d091d700371ead10
I noticed I don't have the java.io.EOFException anymore, I'm not sure if this is related to my problem.

I switched back to 4g: https://debuglogs.org/68c5e8bba6b9c80ae09e996b91e4059e7c9c5fe410c9b92afb0babe56057b8ad and I had 4 of these errors in 30 minutes.

@ghost
Copy link

ghost commented Jul 2, 2020

Update : I reinstalled GrapheneOS (without Google Services / MicroG) and Signal this week and the behavior is strictly the same as the one reported in this thread.
In wifi, no problem of battery consumption.
In 4G, excessive battery consumption.

Last month, when I tested GrapheneOS and therefore Signal above, I encountered the same problem : excessive battery consumption.
Something to know and that I have in common with someone1239: my provider is a french provider (Sosh/Orange in my case)
I had not tested in wifi but as someone1239 tested and that it was better, maybe the provider is at fault.

@ioctl-user
Copy link

I have the same problem with Signal 4.67.3 (6802), battery usage by the app is very high.
Here is my log given after a little time since boot: https://debuglogs.org/b2e0271e025f80209847b46d4aac52142da8320e8ad3f93045ca9fbeca61fb28

There are a lot of "java.io.EOFException" . It looks like 55000ms keep alive alarm is not working.

@ioctl-user
Copy link

ioctl-user commented Aug 25, 2020

There are a lot of "java.io.EOFException" . It looks like 55000ms keep alive alarm is not working.

Update. This problem and this message were caused by additional app to force Doze mode.

However, even with 55000 ms timer working, battery drain is about 1%/hour. At that, there are two threads, that awake in 55 sec timeout each (you can see it in log), and after some period of running they "loose synchronization", so device wakes twice in a 55 sec.

It seems they are running in IncomingMessageObserver class inside of localPipe and unidentifiedLocalPipe objects.
Is it possible, to use only one keep alive thread to save battery?

@pierre07
Copy link

pierre07 commented Oct 5, 2020

Same problem for me with Signal 4.69.6 on a Nexus 5X
This issue exists since 2017 and is still not resolved ? Or signal-service-java is a solution?

@vctls
Copy link

vctls commented Jan 14, 2021

Isn't this a duplicate of #8658 ?

@pierre07
Copy link

Isn't this a duplicate of #8658 ?
My phone use Cyanogenmod / android 6.0.1 without any google services.
It should be the same problem as described for Lineage on #8658 ....

@roppppp
Copy link

roppppp commented Jan 15, 2021

same problem, ( wifi only no problems )

========= SYSINFO =========
Time : 1610725912367
Manufacturer : Sony
Model : Xperia XZ2 Compact
Product : H8324
Screen : 1080x2016, xxxhdpi (480), 60.00 hz
Font Scale : 1.0
Android : 10 (8137a96f34, lineage_xz2c-userdebug 10 QQ3A.200805.001 8137a96f34)
ABIs : arm64-v8a, armeabi-v7a, armeabi
Memory : 82M (17.93% free, 512M max)
Memclass : 192
OS Host : lineage-buildkite
Censored : false
Play Services : false (9)
FCM : false
Locale : de_DE
Linked Devices: false
First Version : 759
App : Signal 5.1.8 (768, 7682)
Package : org.thoughtcrime.securesms (doDiFGKPO1r)

@kyljys
Copy link

kyljys commented Jan 31, 2021

My excessive drainage disappeared after downgrading to a version of omnirom without microg. (No gapps)
Only other thing I did was downgrading magisk to v. 21.3.

@Bean-Beret
Copy link

After having had this issue on several lineageOS and a shiftOS-L device (all without gapps) I looked at the corresponding implementations of other opensource android messenger apps.
While Signal opens a web socket connection in a foreground process and places a sticky notification to ensure it staying active, other apps tend to go with a polling method using an alarm timer to wake up every 5 to 15 minutes to check for new messages before going back to sleep again.

As a test, I tried to replicate something similar in Signal: Close websocket connection if backgrounded, reconnect every 5 minutes or while app is in foreground. This mitigates the problem somewhat. With this method Signal still uses 3 to 5 times more battery than other messenger apps, but it came down to around 12% from 60% or more on a full charge of my samsung s6 with lineageOS (opening connection every 5 minutes). This is still not good but bearable:

Bean-Beret@fda5ebe
This code is just a "proof of concept" and is not meant to be considered finished (I am no java or android developer).

Downside to a polling mechanism like this is, that voice calls will be missed if the app is running in background (it will notify about a missed call as soon as it is polling, however.

This will not be a replacement to the method Signal implements. People may prefer to have instant delivery of messages and calls over battery efficiency. However, it could be an alternative: What I could think of, is offering an advanced option to enable a such a method of periodic connection, instead of the original method (only if no gapps are detected). So people with the battery drain problem could chose it if they want.

I know that Signal does not want more options by development ideology and implementing a mechanism like this might not be a solution to the root cause of the problem, but thinking of this issue being present since years and popping up again all the time, a workaround could be appropriate.

@ioctl-user
Copy link

There is an idea, how decrease power consumption without breaking calls.

So, it seems for now battery consumed because of two reasons:

  1. Radio module, that is always active. At that, it seems, phones with GApps should keep it working all time.

  2. CPU, that active about 1 second each minute, because Signal send packet to the server and await response.

Reason 1 exists in Googled phones also, and, it seems, it doesn't consume too much battery.
So, we can assume, that reason 2 is the main problem.

I have the following suggestion: Use UDP instead of TCP to check notifications.

In this case Signal will wake up, send a keep alive packet and go to sleep while waiting for a response. Server can send keep alive response in the same moment when request received, or, may be, await for 30 seconds before sending it, or, may be doesn't send it at all (if one-way "ping" is enough to keep mobile connection on).
So, Signal will not wait for response in active state and consume CPU. This may help.

In other words I suggest implement something like Google push notifications for one specific app without using Google servers.

@beatjost
Copy link

Also have those battery drain on a Huawei phone (P40) without GMS... Would also prefer a better battery life over instant notification. 👏

@Bean-Beret
Copy link

Using UDP is actually a good idea. Probably that's they way whatsapp does it, where delays were never an issue, but we will never know...
This would also require a server-side change which I doubt signal-staff will implement, as we de-googled users are (yet) a very small minority and not all of us encounter this issue, nevertheless.

However, I created a build with the above-mentioned workaround (periodic fetch) based on @tw-hx FOSS fork, which also lets you send locations on de-googled devices using OSM.

It still is a hacky "fix", but if you like, you can kick the tires:
https://github.com/Bean-Beret/Signal-Android/actions/workflows/fossbuild.yml

There is a branch with 5 minute and one with 10 minute periodic fetch. On a shift5me phone with shiftOS-L the 5 minute version was enough to get the battery drain lower than the one of threema or telegram. On a galaxy S6 with lineageOS 14 the 10 minute version is necessary to do the same.

I do not find enough time right now to work on this to derive a proper feature/pull request. So if anyone would like to catch up from here, please do.

@ioctl-user
Copy link

One more suggestion.

Signal with MicroG services doesn't consume battery. Phone battery drain in sleep state reduced about 3 times comparing to that one without GAPPS/MicroG.
So, MicroG can be used as a reference implementation for client side.

@trint99
Copy link

trint99 commented Apr 21, 2021

Samsung S7 on wifi. I chatted a buddy around lunchtime. We exchanged a couple of memes. Now, 3 hours later, this.
Screenshot_20210421-144405_Settings

@tw-hx
Copy link
Contributor

tw-hx commented Apr 21, 2021

All good points and I find very high websocket battery use too.

The underlying issue appears to be that some mobile networks don't exempt Signal's connection from early closure (they do for Google and a few others) so Signal has to send keepalives every 55 seconds. Both the server and the client have a short idle timeout ~1 min.

Two potential fixes:

  • As @ioctl-user suggested above, perhaps optimise the wake threads so that they are at most once per minute, if this is an issue.
  • Extend the server idle timeout to 10 minutes, and adjust the client to send keepalives once per minute on cell networks and once every 10 minutes on WiFi, as WiFi networks are presumably better behaved with long lived connections. Conversations, an Android XMPP client, uses a 10 minute timeout for all its communications and has good community feedback.

@Rufusdotrufus
Copy link

Same issue. Pixel 2. Graphene OS no google. Signal uses 10% of battery in 4 hours. Phone was 100% charged and sitting idle and unused. No option to optimize battery use as its greyed out.

@Pillendreher
Copy link

I'm running Signal with MicroG and still see a significant idle drain that only goes away once I use Greenify to hibernate Signal. So I can't really confirm that everything's fine wiht MicroG running as a Play services replacement.

@ioctl-user
Copy link

I'm running Signal with MicroG and still see a significant idle drain

May be Signal is not using MicroG in your case? Check the "FCM" status in Signal log, it should be "true".

If it's not, you can try reconfiguring MicroG or reinstalling Signal and reregister on server.

@Pillendreher
Copy link

I'm running Signal with MicroG and still see a significant idle drain

May be Signal is not using MicroG in your case? Check the "FCM" status in Signal log, it should be "true".

If it's not, you can try reconfiguring MicroG or reinstalling Signal and reregister on server.

The log is indeed showing FCM as "false". I'll try to change that and report back :)

@Robinhio83
Copy link

Problem still persists if not connected to WiFi. Pixel 5 with GrapheneOS, no Google.

@3hhh
Copy link

3hhh commented Aug 12, 2021

With MicroG Signal needs to be forced to use it on my device via pref_gcm_disabled = false in org.thoughtcrime.securesms_preferences.xml on my device. That solves the battery drain with MicroG.

However since a few months Signal then unregisters itself every few weeks. So I guess that setting breaks something else.

@grote
Copy link

grote commented Sep 1, 2021

Signal is also draining my battery super fast. The log isn't conclusive. Sometimes it seems to wake up right after setting the timer and then there's lots of garbage location ongoing:

09-01 15:32:04.403 27363 27375 I crime.securesm: Background young concurrent copying GC freed 3111157(47MB) AllocSpace objects, 0(0B) LOS objects, 66% free, 24MB/72MB, paused 287us total 184.149ms
09-01 15:32:18.226 27363 27375 I crime.securesm: Background concurrent copying GC freed 3160911(48MB) AllocSpace objects, 0(0B) LOS objects, 66% free, 24MB/72MB, paused 143us total 258.853ms
09-01 15:32:54.150 27363 22682 I WebSocketConnection: [normal:120503640] Sending keep alive...
09-01 15:32:54.150 27363 22682 I WebSocketConnection: [unidentified:87203251] Sending keep alive...
09-01 15:32:54.154 27363 27363 W AlarmSleepTimer: Waking up.
09-01 15:32:54.154 27363 22682 W AlarmSleepTimer: Setting alarm to wake up in 55000ms.
09-01 15:33:01.578 27363 27402 W IncomingMessageObserver: Application level read timeout...
09-01 15:33:01.580 27363 27402 D IncomingMessageObserver: Network: true, Foreground: false, FCM: false, Censored: false, Registered: true, Websocket Registered: true, Proxy: false
09-01 15:33:01.580 27363 27402 D IncomingMessageObserver: Reading message...
09-01 15:33:01.680 27363 27363 I JobSchedulerScheduler: Waking due to job: 0
09-01 15:33:13.385 27363 27375 I crime.securesm: Background young concurrent copying GC freed 3133646(48MB) AllocSpace objects, 0(0B) LOS objects, 66% free, 24MB/72MB, paused 270us total 181.476ms
09-01 15:33:27.206 27363 27375 I crime.securesm: Background concurrent copying GC freed 3164866(48MB) AllocSpace objects, 0(0B) LOS objects, 66% free, 24MB/72MB, paused 208us total 269.136ms
09-01 15:33:49.154 27363 22682 I WebSocketConnection: [normal:120503640] Sending keep alive...
09-01 15:33:49.154 27363 22682 I WebSocketConnection: [unidentified:87203251] Sending keep alive...
09-01 15:33:49.163 27363 22682 W AlarmSleepTimer: Setting alarm to wake up in 55000ms.
09-01 15:33:54.807 27363 27375 I crime.securesm: Background young concurrent copying GC freed 3136444(48MB) AllocSpace objects, 0(0B) LOS objects, 66% free, 24MB/72MB, paused 279us total 169.427ms
09-01 15:34:01.581 27363 27402 W IncomingMessageObserver: Application level read timeout...
09-01 15:34:01.582 27363 27402 D IncomingMessageObserver: Network: true, Foreground: false, FCM: false, Censored: false, Registered: true, Websocket Registered: true, Proxy: false
09-01 15:34:01.582 27363 27402 D IncomingMessageObserver: Reading message...
09-01 15:34:08.661 27363 27375 I crime.securesm: Background concurrent copying GC freed 3162639(48MB) AllocSpace objects, 0(0B) LOS objects, 66% free, 24MB/72MB, paused 149us total 265.197ms
09-01 15:34:36.289 27363 27375 I crime.securesm: Background young concurrent copying GC freed 3144256(48MB) AllocSpace objects, 0(0B) LOS objects, 66% free, 24MB/72MB, paused 273us total 139.256ms
09-01 15:34:44.164 27363 22682 I WebSocketConnection: [normal:120503640] Sending keep alive...
09-01 15:34:44.165 27363 22682 I WebSocketConnection: [unidentified:87203251] Sending keep alive...
09-01 15:34:44.172 27363 22682 W AlarmSleepTimer: Setting alarm to wake up in 55000ms.
09-01 15:34:50.185 27363 27375 I crime.securesm: Background concurrent copying GC freed 3157164(48MB) AllocSpace objects, 0(0B) LOS objects, 66% free, 24MB/72MB, paused 168us total 263.869ms
09-01 15:35:01.583 27363 27402 W IncomingMessageObserver: Application level read timeout...
09-01 15:35:01.585 27363 27402 D IncomingMessageObserver: Network: true, Foreground: false, FCM: false, Censored: false, Registered: true, Websocket Registered: true, Proxy: false
09-01 15:35:01.585 27363 27402 D IncomingMessageObserver: Reading message...
09-01 15:35:03.969 27363 27375 I crime.securesm: Background young concurrent copying GC freed 3122277(47MB) AllocSpace objects, 0(0B) LOS objects, 66% free, 24MB/72MB, paused 1.934ms total 137.477ms
09-01 15:35:17.946 27363 27375 I crime.securesm: Background concurrent copying GC freed 3172374(48MB) AllocSpace objects, 0(0B) LOS objects, 66% free, 24MB/72MB, paused 1.050ms total 252.617ms
09-01 15:35:39.172 27363 22682 I WebSocketConnection: [normal:120503640] Sending keep alive...
09-01 15:35:39.173 27363 22682 I WebSocketConnection: [unidentified:87203251] Sending keep alive...
09-01 15:35:39.181 27363 27363 W AlarmSleepTimer: Waking up.
09-01 15:35:39.181 27363 22682 W AlarmSleepTimer: Setting alarm to wake up in 55000ms.
09-01 15:35:59.347 27363 27375 I crime.securesm: Background young concurrent copying GC freed 3144315(48MB) AllocSpace objects, 0(0B) LOS objects, 66% free, 24MB/72MB, paused 269us total 171.280ms
09-01 15:36:01.585 27363 27402 W IncomingMessageObserver: Application level read timeout...
09-01 15:36:01.587 27363 27402 D IncomingMessageObserver: Network: true, Foreground: false, FCM: false, Censored: false, Registered: true, Websocket Registered: true, Proxy: false
09-01 15:36:01.587 27363 27402 D IncomingMessageObserver: Reading message...
09-01 15:36:13.124 27363 27375 I crime.securesm: Background concurrent copying GC freed 3158624(48MB) AllocSpace objects, 0(0B) LOS objects, 66% free, 24MB/72MB, paused 126us total 254.418ms
09-01 15:36:34.182 27363 22682 I WebSocketConnection: [normal:120503640] Sending keep alive...
09-01 15:36:34.182 27363 22682 I WebSocketConnection: [unidentified:87203251] Sending keep alive...
09-01 15:36:34.187 27363 22682 W AlarmSleepTimer: Setting alarm to wake up in 55000ms.
09-01 15:37:01.588 27363 27402 W IncomingMessageObserver: Application level read timeout...
09-01 15:37:01.589 27363 27402 D IncomingMessageObserver: Network: true, Foreground: false, FCM: false, Censored: false, Registered: true, Websocket Registered: true, Proxy: false
09-01 15:37:01.589 27363 27402 D IncomingMessageObserver: Reading message...
09-01 15:37:29.187 27363 22682 I WebSocketConnection: [normal:120503640] Sending keep alive...
09-01 15:37:29.187 27363 22682 I WebSocketConnection: [unidentified:87203251] Sending keep alive...
09-01 15:37:29.198 27363 22682 W AlarmSleepTimer: Setting alarm to wake up in 55000ms.
09-01 15:37:35.908 27363 27375 I crime.securesm: Background young concurrent copying GC freed 3136558(47MB) AllocSpace objects, 0(0B) LOS objects, 66% free, 24MB/72MB, paused 279us total 135.302ms
09-01 15:37:49.904 27363 27375 I crime.securesm: Background concurrent copying GC freed 3169981(48MB) AllocSpace objects, 0(0B) LOS objects, 66% free, 24MB/72MB, paused 120us total 257.791ms
09-01 15:38:01.590 27363 27402 W IncomingMessageObserver: Application level read timeout...
09-01 15:38:01.593 27363 27402 D IncomingMessageObserver: Network: true, Foreground: false, FCM: false, Censored: false, Registered: true, Websocket Registered: true, Proxy: false
09-01 15:38:01.593 27363 27402 D IncomingMessageObserver: Reading message...
09-01 15:38:17.588 27363 27375 I crime.securesm: Background young concurrent copying GC freed 3144270(48MB) AllocSpace objects, 0(0B) LOS objects, 66% free, 24MB/72MB, paused 278us total 138.684ms
09-01 15:38:24.198 27363 22682 I WebSocketConnection: [normal:120503640] Sending keep alive...
09-01 15:38:24.199 27363 22682 I WebSocketConnection: [unidentified:87203251] Sending keep alive...
09-01 15:38:24.204 27363 22682 W AlarmSleepTimer: Setting alarm to wake up in 55000ms.
09-01 15:38:31.481 27363 27375 I crime.securesm: Background concurrent copying GC freed 3164441(48MB) AllocSpace objects, 0(0B) LOS objects, 66% free, 24MB/72MB, paused 117us total 264.345ms
09-01 15:38:59.279 27363 27375 I crime.securesm: Background young concurrent copying GC freed 3144213(48MB) AllocSpace objects, 0(0B) LOS objects, 66% free, 24MB/72MB, paused 3.010ms total 168.381ms
09-01 15:39:01.594 27363 27402 W IncomingMessageObserver: Application level read timeout...
09-01 15:39:01.596 27363 27402 D IncomingMessageObserver: Network: true, Foreground: false, FCM: false, Censored: false, Registered: true, Websocket Registered: true, Proxy: false
09-01 15:39:01.596 27363 27402 D IncomingMessageObserver: Reading message...
09-01 15:39:13.186 27363 27375 I crime.securesm: Background concurrent copying GC freed 3162070(48MB) AllocSpace objects, 0(0B) LOS objects, 66% free, 24MB/72MB, paused 222us total 270.456ms
09-01 15:39:19.206 27363 22682 I WebSocketConnection: [normal:120503640] Sending keep alive...
09-01 15:39:19.207 27363 22682 I WebSocketConnection: [unidentified:87203251] Sending keep alive...
09-01 15:39:19.211 27363 22682 W AlarmSleepTimer: Setting alarm to wake up in 55000ms.
09-01 15:39:19.214 27363 27363 W AlarmSleepTimer: Waking up.
09-01 15:40:01.598 27363 27402 W IncomingMessageObserver: Application level read timeout...
09-01 15:40:01.605 27363 27402 D IncomingMessageObserver: Network: true, Foreground: false, FCM: false, Censored: false, Registered: true, Websocket Registered: true, Proxy: false
09-01 15:40:01.605 27363 27402 D IncomingMessageObserver: Reading message...
09-01 15:40:08.488 27363 27375 I crime.securesm: Background young concurrent copying GC freed 3141499(48MB) AllocSpace objects, 0(0B) LOS objects, 66% free, 24MB/72MB, paused 260us total 138.706ms
09-01 15:40:14.211 27363 22682 I WebSocketConnection: [normal:120503640] Sending keep alive...
09-01 15:40:14.212 27363 22682 I WebSocketConnection: [unidentified:87203251] Sending keep alive...
09-01 15:40:14.216 27363 27363 W AlarmSleepTimer: Waking up.
09-01 15:40:14.224 27363 22682 W AlarmSleepTimer: Setting alarm to wake up in 55000ms.
09-01 15:40:22.357 27363 27375 I crime.securesm: Background concurrent copying GC freed 3164192(48MB) AllocSpace objects, 0(0B) LOS objects, 66% free, 24MB/72MB, paused 123us total 278.422ms
09-01 15:40:36.201 27363 27375 I crime.securesm: Background young concurrent copying GC freed 3126534(47MB) AllocSpace objects, 0(0B) LOS objects, 66% free, 24MB/72MB, paused 2.390ms total 167.414ms
09-01 15:40:50.084 27363 27375 I crime.securesm: Background concurrent copying GC freed 3166369(48MB) AllocSpace objects, 0(0B) LOS objects, 66% free, 24MB/72MB, paused 165us total 258.558ms
09-01 15:41:01.606 27363 27402 W IncomingMessageObserver: Application level read timeout...
09-01 15:41:01.608 27363 27402 D IncomingMessageObserver: Network: true, Foreground: false, FCM: false, Censored: false, Registered: true, Websocket Registered: true, Proxy: false
09-01 15:41:01.608 27363 27402 D IncomingMessageObserver: Reading message...
09-01 15:41:09.216 27363 22682 I WebSocketConnection: [normal:120503640] Sending keep alive...
09-01 15:41:09.216 27363 22682 I WebSocketConnection: [unidentified:87203251] Sending keep alive...
09-01 15:41:09.221 27363 22682 W AlarmSleepTimer: Setting alarm to wake up in 55000ms.
09-01 15:42:01.609 27363 27402 W IncomingMessageObserver: Application level read timeout...
09-01 15:42:01.611 27363 27402 D IncomingMessageObserver: Network: true, Foreground: false, FCM: false, Censored: false, Registered: true, Websocket Registered: true, Proxy: false
09-01 15:42:01.611 27363 27402 D IncomingMessageObserver: Reading message...
09-01 15:42:04.226 27363 22682 I WebSocketConnection: [normal:120503640] Sending keep alive...
09-01 15:42:04.226 27363 22682 I WebSocketConnection: [unidentified:87203251] Sending keep alive...
09-01 15:42:04.233 27363 22682 W AlarmSleepTimer: Setting alarm to wake up in 55000ms.
09-01 15:42:04.237 27363 27363 W AlarmSleepTimer: Waking up.
09-01 15:42:12.751 27363 27375 I crime.securesm: Background young concurrent copying GC freed 3133988(47MB) AllocSpace objects, 0(0B) LOS objects, 66% free, 24MB/72MB, paused 1.337ms total 151.898ms
09-01 15:42:26.588 27363 27375 I crime.securesm: Background concurrent copying GC freed 3164515(48MB) AllocSpace objects, 0(0B) LOS objects, 66% free, 24MB/72MB, paused 145us total 254.561ms
09-01 15:42:54.227 27363 27375 I crime.securesm: Background young concurrent copying GC freed 3144265(48MB) AllocSpace objects, 0(0B) LOS objects, 66% free, 24MB/72MB, paused 2.335ms total 163.527ms
09-01 15:42:59.233 27363 22682 I WebSocketConnection: [normal:120503640] Sending keep alive...
09-01 15:42:59.233 27363 22682 I WebSocketConnection: [unidentified:87203251] Sending keep alive...
09-01 15:42:59.239 27363 22682 W AlarmSleepTimer: Setting alarm to wake up in 55000ms.
09-01 15:43:01.613 27363 27402 W IncomingMessageObserver: Application level read timeout...
09-01 15:43:01.615 27363 27402 D IncomingMessageObserver: Network: true, Foreground: false, FCM: false, Censored: false, Registered: true, Websocket Registered: true, Proxy: false
09-01 15:43:01.615 27363 27402 D IncomingMessageObserver: Reading message...
09-01 15:43:08.003 27363 27375 I crime.securesm: Background concurrent copying GC freed 3152962(48MB) AllocSpace objects, 0(0B) LOS objects, 66% free, 24MB/72MB, paused 168us total 253.214ms
09-01 15:43:21.810 27363 27375 I crime.securesm: Background young concurrent copying GC freed 3125859(47MB) AllocSpace objects, 0(0B) LOS objects, 66% free, 24MB/72MB, paused 264us total 138.647ms
09-01 15:43:35.654 27363 27375 I crime.securesm: Background concurrent copying GC freed 3159111(48MB) AllocSpace objects, 0(0B) LOS objects, 66% free, 24MB/72MB, paused 935us total 203.475ms
09-01 15:43:49.457 27363 27375 I crime.securesm: Background young concurrent copying GC freed 3125756(47MB) AllocSpace objects, 0(0B) LOS objects, 66% free, 24MB/72MB, paused 1.018ms total 150.397ms
09-01 15:43:54.240 27363 22682 I WebSocketConnection: [normal:120503640] Sending keep alive...
09-01 15:43:54.240 27363 22682 I WebSocketConnection: [unidentified:87203251] Sending keep alive...
09-01 15:43:54.245 27363 22682 W AlarmSleepTimer: Setting alarm to wake up in 55000ms.
09-01 15:44:01.616 27363 27402 W IncomingMessageObserver: Application level read timeout...
09-01 15:44:01.617 27363 27402 D IncomingMessageObserver: Network: true, Foreground: false, FCM: false, Censored: false, Registered: true, Websocket Registered: true, Proxy: false
09-01 15:44:01.617 27363 27402 D IncomingMessageObserver: Reading message...
09-01 15:44:03.297 27363 27375 I crime.securesm: Background concurrent copying GC freed 3165355(48MB) AllocSpace objects, 0(0B) LOS objects, 66% free, 24MB/72MB, paused 167us total 276.166ms
09-01 15:44:17.115 27363 27375 I crime.securesm: Background young concurrent copying GC freed 3124634(47MB) AllocSpace objects, 0(0B) LOS objects, 66% free, 24MB/72MB, paused 283us total 164.807ms
09-01 15:44:31.042 27363 27375 I crime.securesm: Background concurrent copying GC freed 3170150(48MB) AllocSpace objects, 0(0B) LOS objects, 66% free, 24MB/72MB, paused 122us total 259.111ms
09-01 15:44:49.247 27363 22682 I WebSocketConnection: [normal:120503640] Sending keep alive...
09-01 15:44:49.247 27363 22682 I WebSocketConnection: [unidentified:87203251] Sending keep alive...
09-01 15:44:49.256 27363 22682 W AlarmSleepTimer: Setting alarm to wake up in 55000ms.
09-01 15:44:58.714 27363 27375 I crime.securesm: Background young concurrent copying GC freed 3135597(48MB) AllocSpace objects, 0(0B) LOS objects, 66% free, 24MB/72MB, paused 2.586ms total 159.891ms
09-01 15:45:01.619 27363 27402 W IncomingMessageObserver: Application level read timeout...
09-01 15:45:01.623 27363 27402 D IncomingMessageObserver: Network: true, Foreground: false, FCM: false, Censored: false, Registered: true, Websocket Registered: true, Proxy: false
09-01 15:45:01.623 27363 27402 D IncomingMessageObserver: Reading message...
09-01 15:45:12.581 27363 27375 I crime.securesm: Background concurrent copying GC freed 3164989(48MB) AllocSpace objects, 0(0B) LOS objects, 66% free, 24MB/72MB, paused 134us total 266.598ms
09-01 15:45:40.067 27363 27375 I crime.securesm: Background young concurrent copying GC freed 3143946(48MB) AllocSpace objects, 0(0B) LOS objects, 66% free, 24MB/72MB, paused 276us total 136.590ms
09-01 15:45:44.266 27363 22682 I WebSocketConnection: [normal:120503640] Sending keep alive...
09-01 15:45:44.266 27363 22682 I WebSocketConnection: [unidentified:87203251] Sending keep alive...
09-01 15:45:44.271 27363 22682 W AlarmSleepTimer: Setting alarm to wake up in 55000ms.
09-01 15:45:53.863 27363 27375 I crime.securesm: Background concurrent copying GC freed 3162912(48MB) AllocSpace objects, 0(0B) LOS objects, 66% free, 24MB/72MB, paused 120us total 264.168ms
09-01 15:46:01.625 27363 27402 W IncomingMessageObserver: Application level read timeout...
09-01 15:46:01.627 27363 27402 D IncomingMessageObserver: Network: true, Foreground: false, FCM: false, Censored: false, Registered: true, Websocket Registered: true, Proxy: false
09-01 15:46:01.627 27363 27402 D IncomingMessageObserver: Reading message...
09-01 15:46:21.449 27363 27375 I crime.securesm: Background young concurrent copying GC freed 3143242(48MB) AllocSpace objects, 0(0B) LOS objects, 66% free, 24MB/72MB, paused 1.790ms total 148.398ms
09-01 15:46:35.272 27363 27375 I crime.securesm: Background concurrent copying GC freed 3156683(48MB) AllocSpace objects, 0(0B) LOS objects, 66% free, 24MB/72MB, paused 119us total 212.400ms
09-01 15:46:39.278 27363 22682 I WebSocketConnection: [normal:120503640] Sending keep alive...
09-01 15:46:39.279 27363 22682 I WebSocketConnection: [unidentified:87203251] Sending keep alive...
09-01 15:46:39.288 27363 22682 W AlarmSleepTimer: Setting alarm to wake up in 55000ms.
09-01 15:46:49.009 27363 27375 I crime.securesm: Background young concurrent copying GC freed 3116686(47MB) AllocSpace objects, 0(0B) LOS objects, 66% free, 24MB/72MB, paused 263us total 146.829ms
09-01 15:47:01.628 27363 27402 W IncomingMessageObserver: Application level read timeout...
09-01 15:47:01.637 27363 27402 D IncomingMessageObserver: Network: true, Foreground: false, FCM: false, Censored: false, Registered: true, Websocket Registered: true, Proxy: false
09-01 15:47:01.637 27363 27402 D IncomingMessageObserver: Reading message...
09-01 15:47:02.825 27363 27375 I crime.securesm: Background concurrent copying GC freed 3166280(48MB) AllocSpace objects, 0(0B) LOS objects, 66% free, 24MB/72MB, paused 555us total 255.644ms
09-01 15:47:34.291 27363 22682 I WebSocketConnection: [normal:120503640] Sending keep alive...
09-01 15:47:34.291 27363 22682 I WebSocketConnection: [unidentified:87203251] Sending keep alive...
09-01 15:47:34.294 27363 22682 W AlarmSleepTimer: Setting alarm to wake up in 55000ms.
09-01 15:47:58.005 27363 27375 I crime.securesm: Background young concurrent copying GC freed 3142166(47MB) AllocSpace objects, 0(0B) LOS objects, 66% free, 24MB/72MB, paused 288us total 123.997ms
09-01 15:48:01.638 27363 27402 W IncomingMessageObserver: Application level read timeout...
09-01 15:48:01.638 27363 27402 D IncomingMessageObserver: Network: true, Foreground: false, FCM: false, Censored: false, Registered: true, Websocket Registered: true, Proxy: false
09-01 15:48:01.638 27363 27402 D IncomingMessageObserver: Reading message...
09-01 15:48:26.777 27363 27375 I crime.securesm: Background young concurrent copying GC freed 3139056(47MB) AllocSpace objects, 0(0B) LOS objects, 66% free, 24MB/72MB, paused 1.025ms total 150.438ms
09-01 15:48:29.302 27363 22682 I WebSocketConnection: [normal:120503640] Sending keep alive...
09-01 15:48:29.302 27363 22682 I WebSocketConnection: [unidentified:87203251] Sending keep alive...
09-01 15:48:29.308 27363 22682 W AlarmSleepTimer: Setting alarm to wake up in 55000ms.
09-01 15:48:31.161 27363 27363 I JobManager: onConstraintMet(ChargingConstraintObser)
09-01 15:48:41.001 27363 27375 I crime.securesm: Background concurrent copying GC freed 3150884(48MB) AllocSpace objects, 0(0B) LOS objects, 66% free, 24MB/72MB, paused 158us total 252.335ms
09-01 15:49:01.640 27363 27402 W IncomingMessageObserver: Application level read timeout...
09-01 15:49:01.644 27363 27402 D IncomingMessageObserver: Network: true, Foreground: false, FCM: false, Censored: false, Registered: true, Websocket Registered: true, Proxy: false
09-01 15:49:01.644 27363 27402 D IncomingMessageObserver: Reading message...
09-01 15:49:24.310 27363 22682 I WebSocketConnection: [normal:120503640] Sending keep alive...
09-01 15:49:24.311 27363 22682 I WebSocketConnection: [unidentified:87203251] Sending keep alive...
09-01 15:49:24.319 27363 22682 W AlarmSleepTimer: Setting alarm to wake up in 55000ms.
09-01 15:49:38.471 27363 27375 I crime.securesm: Background young concurrent copying GC freed 3135963(47MB) AllocSpace objects, 0(0B) LOS objects, 66% free, 24MB/72MB, paused 541us total 122.937ms
09-01 15:49:52.795 27363 27375 I crime.securesm: Background young concurrent copying GC freed 3132178(47MB) AllocSpace objects, 0(0B) LOS objects, 66% free, 24MB/72MB, paused 452us total 157.609ms
09-01 15:50:01.644 27363 27402 W IncomingMessageObserver: Application level read timeout...
09-01 15:50:01.646 27363 27402 D IncomingMessageObserver: Network: true, Foreground: false, FCM: false, Censored: false, Registered: true, Websocket Registered: true, Proxy: false
09-01 15:50:01.646 27363 27402 D IncomingMessageObserver: Reading message...
09-01 15:50:06.613 27363 27375 I crime.securesm: Background concurrent copying GC freed 3153749(48MB) AllocSpace objects, 0(0B) LOS objects, 66% free, 24MB/72MB, paused 141us total 219.078ms
09-01 15:50:19.320 27363 22682 I WebSocketConnection: [normal:120503640] Sending keep alive...
09-01 15:50:19.320 27363 22682 I WebSocketConnection: [unidentified:87203251] Sending keep alive...
09-01 15:50:19.327 27363 22682 W AlarmSleepTimer: Setting alarm to wake up in 55000ms.
09-01 15:50:20.410 27363 27375 I crime.securesm: Background young concurrent copying GC freed 3118110(47MB) AllocSpace objects, 0(0B) LOS objects, 66% free, 24MB/72MB, paused 1.162ms total 173.218ms
09-01 15:50:34.257 27363 27375 I crime.securesm: Background concurrent copying GC freed 3168379(48MB) AllocSpace objects, 0(0B) LOS objects, 66% free, 24MB/72MB, paused 171us total 272.824ms
09-01 15:50:48.075 27363 27375 I crime.securesm: Background young concurrent copying GC freed 3124323(47MB) AllocSpace objects, 0(0B) LOS objects, 66% free, 24MB/72MB, paused 279us total 159.340ms
09-01 15:51:01.647 27363 27402 W IncomingMessageObserver: Application level read timeout...
09-01 15:51:01.649 27363 27402 D IncomingMessageObserver: Network: true, Foreground: false, FCM: false, Censored: false, Registered: true, Websocket Registered: true, Proxy: false
09-01 15:51:01.649 27363 27402 D IncomingMessageObserver: Reading message...
09-01 15:51:01.961 27363 27375 I crime.securesm: Background concurrent copying GC freed 3170432(48MB) AllocSpace objects, 0(0B) LOS objects, 66% free, 24MB/72MB, paused 113us total 274.034ms
09-01 15:51:14.327 27363 22682 I WebSocketConnection: [normal:120503640] Sending keep alive...
09-01 15:51:14.328 27363 22682 I WebSocketConnection: [unidentified:87203251] Sending keep alive...
09-01 15:51:14.333 27363 22682 W AlarmSleepTimer: Setting alarm to wake up in 55000ms.
09-01 15:51:14.334 27363 27363 W AlarmSleepTimer: Waking up.
09-01 15:51:29.589 27363 27375 I crime.securesm: Background young concurrent copying GC freed 3142976(48MB) AllocSpace objects, 0(0B) LOS objects, 66% free, 24MB/72MB, paused 722us total 169.663ms
09-01 15:51:43.428 27363 27375 I crime.securesm: Background concurrent copying GC freed 3162216(48MB) AllocSpace objects, 0(0B) LOS objects, 66% free, 24MB/72MB, paused 386us total 258.683ms
09-01 15:52:01.650 27363 27402 W IncomingMessageObserver: Application level read timeout...
09-01 15:52:01.652 27363 27402 D IncomingMessageObserver: Network: true, Foreground: false, FCM: false, Censored: false, Registered: true, Websocket Registered: true, Proxy: false
09-01 15:52:01.652 27363 27402 D IncomingMessageObserver: Reading message...
09-01 15:52:09.337 27363 22682 I WebSocketConnection: [normal:120503640] Sending keep alive...
09-01 15:52:09.338 27363 22682 I WebSocketConnection: [unidentified:87203251] Sending keep alive...
09-01 15:52:09.343 27363 22682 W AlarmSleepTimer: Setting alarm to wake up in 55000ms.
09-01 15:52:09.346 27363 27363 W AlarmSleepTimer: Waking up.
09-01 15:52:10.951 27363 27375 I crime.securesm: Background young concurrent copying GC freed 3135035(48MB) AllocSpace objects, 0(0B) LOS objects, 66% free, 24MB/72MB, paused 281us total 146.012ms
09-01 15:52:24.748 27363 27375 I crime.securesm: Background concurrent copying GC freed 3145484(48MB) AllocSpace objects, 0(0B) LOS objects, 66% free, 24MB/72MB, paused 168us total 172.417ms
09-01 15:52:38.488 27363 27375 I crime.securesm: Background young concurrent copying GC freed 3123677(47MB) AllocSpace objects, 0(0B) LOS objects, 66% free, 24MB/72MB, paused 436us total 138.102ms
09-01 15:52:52.397 27363 27375 I crime.securesm: Background concurrent copying GC freed 3177585(48MB) AllocSpace objects, 0(0B) LOS objects, 66% free, 24MB/72MB, paused 162us total 275.128ms
09-01 15:53:01.653 27363 27402 W IncomingMessageObserver: Application level read timeout...
09-01 15:53:01.656 27363 27402 D IncomingMessageObserver: Network: true, Foreground: false, FCM: false, Censored: false, Registered: true, Websocket Registered: true, Proxy: false
09-01 15:53:01.656 27363 27402 D IncomingMessageObserver: Reading message...
09-01 15:53:04.342 27363 22682 I WebSocketConnection: [normal:120503640] Sending keep alive...
09-01 15:53:04.342 27363 22682 I WebSocketConnection: [unidentified:87203251] Sending keep alive...
09-01 15:53:04.348 27363 22682 W AlarmSleepTimer: Setting alarm to wake up in 55000ms.
09-01 15:53:04.351 27363 27363 W AlarmSleepTimer: Waking up.
09-01 15:53:06.151 27363 27375 I crime.securesm: Background young concurrent copying GC freed 3116613(47MB) AllocSpace objects, 0(0B) LOS objects, 66% free, 24MB/72MB, paused 300us total 162.213ms
09-01 15:53:19.966 27363 27375 I crime.securesm: Background concurrent copying GC freed 3168875(48MB) AllocSpace objects, 0(0B) LOS objects, 66% free, 24MB/72MB, paused 126us total 263.672ms
09-01 15:53:47.508 27363 27375 I crime.securesm: Background young concurrent copying GC freed 3143307(48MB) AllocSpace objects, 0(0B) LOS objects, 66% free, 24MB/72MB, paused 445us total 167.878ms
09-01 15:53:59.348 27363 22682 I WebSocketConnection: [normal:120503640] Sending keep alive...
09-01 15:53:59.349 27363 22682 I WebSocketConnection: [unidentified:87203251] Sending keep alive...
09-01 15:53:59.356 27363 22682 W AlarmSleepTimer: Setting alarm to wake up in 55000ms.
09-01 15:54:01.256 27363 27375 I crime.securesm: Background concurrent copying GC freed 3159632(48MB) AllocSpace objects, 0(0B) LOS objects, 66% free, 24MB/72MB, paused 155us total 274.681ms
09-01 15:54:01.657 27363 27402 W IncomingMessageObserver: Application level read timeout...
09-01 15:54:01.660 27363 27402 D IncomingMessageObserver: Network: true, Foreground: false, FCM: false, Censored: false, Registered: true, Websocket Registered: true, Proxy: false
09-01 15:54:01.660 27363 27402 D IncomingMessageObserver: Reading message...
09-01 15:54:15.009 27363 27375 I crime.securesm: Background young concurrent copying GC freed 3123071(47MB) AllocSpace objects, 0(0B) LOS objects, 66% free, 24MB/72MB, paused 270us total 146.349ms
09-01 15:54:28.884 27363 27375 I crime.securesm: Background concurrent copying GC freed 3171230(48MB) AllocSpace objects, 0(0B) LOS objects, 66% free, 24MB/72MB, paused 439us total 266.170ms
09-01 15:54:54.354 27363 22682 I WebSocketConnection: [normal:120503640] Sending keep alive...
09-01 15:54:54.355 27363 22682 I WebSocketConnection: [unidentified:87203251] Sending keep alive...
09-01 15:54:54.357 27363 22682 W AlarmSleepTimer: Setting alarm to wake up in 55000ms.
09-01 15:54:54.360 27363 27363 W AlarmSleepTimer: Waking up.
09-01 15:54:56.371 27363 27375 I crime.securesm: Background young concurrent copying GC freed 3133529(47MB) AllocSpace objects, 0(0B) LOS objects, 66% free, 24MB/72MB, paused 719us total 160.437ms
09-01 15:55:01.661 27363 27402 W IncomingMessageObserver: Application level read timeout...
09-01 15:55:01.664 27363 27402 D IncomingMessageObserver: Network: true, Foreground: false, FCM: false, Censored: false, Registered: true, Websocket Registered: true, Proxy: false
09-01 15:55:01.664 27363 27402 D IncomingMessageObserver: Reading message...
09-01 15:55:10.177 27363 27375 I crime.securesm: Background concurrent copying GC freed 3165386(48MB) AllocSpace objects, 0(0B) LOS objects, 66% free, 24MB/72MB, paused 121us total 269.723ms
09-01 15:55:23.950 27363 27375 I crime.securesm: Background young concurrent copying GC freed 3125799(47MB) AllocSpace objects, 0(0B) LOS objects, 66% free, 24MB/72MB, paused 299us total 144.555ms
09-01 15:55:37.691 27363 27375 I crime.securesm: Background concurrent copying GC freed 3151406(48MB) AllocSpace objects, 0(0B) LOS objects, 66% free, 24MB/72MB, paused 161us total 170.509ms
09-01 15:55:49.357 27363 22682 I WebSocketConnection: [normal:120503640] Sending keep alive...
09-01 15:55:49.358 27363 22682 I WebSocketConnection: [unidentified:87203251] Sending keep alive...
09-01 15:55:49.360 27363 22682 W AlarmSleepTimer: Setting alarm to wake up in 55000ms.
09-01 15:55:49.362 27363 27363 W AlarmSleepTimer: Waking up.
09-01 15:56:01.666 27363 27402 W IncomingMessageObserver: Application level read timeout...
09-01 15:56:01.668 27363 27402 D IncomingMessageObserver: Network: true, Foreground: false, FCM: false, Censored: false, Registered: true, Websocket Registered: true, Proxy: false
09-01 15:56:01.668 27363 27402 D IncomingMessageObserver: Reading message...
09-01 15:56:18.990 27363 27375 I crime.securesm: Background young concurrent copying GC freed 3142066(47MB) AllocSpace objects, 0(0B) LOS objects, 66% free, 24MB/72MB, paused 480us total 139.378ms
09-01 15:56:32.754 27363 27375 I crime.securesm: Background concurrent copying GC freed 3152125(48MB) AllocSpace objects, 0(0B) LOS objects, 66% free, 24MB/72MB, paused 159us total 191.137ms
09-01 15:56:44.364 27363 22682 I WebSocketConnection: [normal:120503640] Sending keep alive...
09-01 15:56:44.365 27363 22682 I WebSocketConnection: [unidentified:87203251] Sending keep alive...
09-01 15:56:44.373 27363 22682 W AlarmSleepTimer: Setting alarm to wake up in 55000ms.
09-01 15:56:46.449 27363 27375 I crime.securesm: Background young concurrent copying GC freed 3116968(47MB) AllocSpace objects, 0(0B) LOS objects, 66% free, 24MB/72MB, paused 387us total 140.793ms
09-01 15:57:00.188 27363 27375 I crime.securesm: Background concurrent copying GC freed 3150050(48MB) AllocSpace objects, 0(0B) LOS objects, 66% free, 24MB/72MB, paused 119us total 170.433ms
09-01 15:57:01.669 27363 27402 W IncomingMessageObserver: Application level read timeout...
09-01 15:57:01.671 27363 27402 D IncomingMessageObserver: Network: true, Foreground: false, FCM: false, Censored: false, Registered: true, Websocket Registered: true, Proxy: false
09-01 15:57:01.671 27363 27402 D IncomingMessageObserver: Reading message...
09-01 15:57:27.714 27363 27375 I crime.securesm: Background young concurrent copying GC freed 3143033(48MB) AllocSpace objects, 0(0B) LOS objects, 66% free, 24MB/72MB, paused 624us total 167.790ms
09-01 15:57:39.375 27363 22682 I WebSocketConnection: [normal:120503640] Sending keep alive...
09-01 15:57:39.376 27363 22682 I WebSocketConnection: [unidentified:87203251] Sending keep alive...
09-01 15:57:39.383 27363 22682 W AlarmSleepTimer: Setting alarm to wake up in 55000ms.
09-01 15:57:41.445 27363 27375 I crime.securesm: Background concurrent copying GC freed 3153917(48MB) AllocSpace objects, 0(0B) LOS objects, 66% free, 24MB/72MB, paused 170us total 251.596ms

@tw-hx
Copy link
Contributor

tw-hx commented Sep 6, 2021

Actually, since the recent websocket refactoring in 5.17 and 5.19:
5d6d78a
712b0c1

I've found battery drain to have improved over the day versus before. Thanks, Cody and the Signal team!

@ioctl-user
Copy link

I am running it without playservices, but with microG instead. It seems not support it's push service,

It does. But sometimes it cannot interact with the MicroG services on installation and not working with them after that. If so, try uninstall and install Signal again.

@starbrights
Copy link

starbrights commented Nov 20, 2022

I am running it without playservices, but with microG instead. It seems not support it's push service,

It does. But sometimes it cannot interact with the MicroG services on installation and not working with them after that. If so, try uninstall and install Signal again.

Maybe stupid question: Uninstall - will it delete all my data? Do I need to back it up before with this long key?

@starbrights
Copy link

The answer is yes, uninstalling deletes data. You have to backup before and recover with this huge key. But the good news, indeed it uses GCM now and that seems to be (just for a short test) a little better for battery consumption. I'll watch that.

@Mr-Bajs
Copy link

Mr-Bajs commented Feb 6, 2023

Certainly using UnifiedPush would be a nice option.

@barrahazard
Copy link

Pixel 6a, GrapheneOS 13, no GSF or Google play services, Signal 6.11.7 (121302) used 9% battery in 3 hours while idle - I haven't even opened the app.

Please prioritise this issue, I am getting close to uninstalling the app because of this issue.

@gilou
Copy link

gilou commented Mar 7, 2023

This is still a very annoying problem, I do have the same behavior on CalyxOS 4.6.1 (Android 13), running Signal 6.1.x versions, no microG notifications.

UnifiedPush would be a nice feature, but that will require code server-side… That would be welcome though ;)

Signal is litteraly emptying my battery in less than 5 hours if I let it on. What saved me was that since it's not managing SMS anymore, I can actually restrict its battery usage. But I also would like to get Signal calls and messages a bit more faster than when I think about starting the app…

@gilou
Copy link

gilou commented Mar 8, 2023

UnifiedPush probably is a great solution for the server part, using the FCM fallback… It was proposed somewhere around there:
#11154

@CommonLoon102
Copy link

My solution is a 20000mAh power bank in my backpack. Drain that, Signal!

@gilou
Copy link

gilou commented Apr 21, 2023

Well I mean, the 100 AH battery I have in my van helps working around it for sure…

@cautious-bread
Copy link

Adding my voice here (and to another logged issue) instead of creating any new ones.
Excessive battery drain since one of the recent updates. Been holding off in case the issue resolved itself.

Google Pixel 6a. Graphene OS. No Play Services - just the "background connection" web sockets notifications.
Installed using the APK from Signal's website. Currently version 6.20.5 but was also happening on the previous release.

Debug logs: https://debuglogs.org/android/6.20.5/37d0a416e8d034d2d89baf8d15996f5aae2ef0f0ec20a34cce018392b9574852

@zmetzing
Copy link

zmetzing commented Jun 2, 2023

Giving up. Moved to Molly.

@gilou
Copy link

gilou commented Jun 6, 2023

How good is Molly without Firebase for battery / notification? That might be a hint at what needs to be done …

@Bean-Beret
Copy link

With Molly, I encounter the issue as well (Fairphone, /e/ OS without gapps/microg

@Kariton
Copy link

Kariton commented Jul 17, 2023

Hello Signal team and fellow users,

I wanted to share that I also experience rapid battery drain, which I accepted as a normal occurrence until I discovered a "real" solution. While searching for other information, I came across the fascinating world of ntfy and UnifiedPush. :)

During my exploration, I stumbled upon various links, issues, and forum posts, including one discussing Molly's excessive battery drain. Fortunately, there is a recently proposed solution for this problem in the form of a PR for their fork. mollyim/mollyim-android#152

However, there is one minor inconvenience associated with this solution. Since the Signal server doesn't currently support UnifiedPush, it is necessary to run a "socket server."

To summarize the PR:

  • When UnifiedPush is enabled, Molly (android) creates a linked device without encryption keys then sends the linked device's credentials to MollySocket (*).
  • MollySocket connects to the Signal Server websocket with the linked device's credentials. Every time MollySocket receives a(n encrypted) event, it notifies Molly via UnifiedPush and Molly fetch the new messages (*).

* Modulo the configuration

Given my limited programming knowledge, I am unable to assess the quality of this pull request or determine the complexity of implementing it on the server side. However, if it were to be successfully incorporated, it would undoubtedly elevate the FOSS variant to a new level. The implementation of UnifiedPush does have the potential to enhance the functionality and user experience a lot.

I think this FCM alternative has the potential to gain significant traction and become a valuable new standard for the FOSS android community. Its ability to provide an alternative push notification solution and its integration already done in various applications, such as Element, Fedilab, FindMyDevice, and possibly even Nextcloud (which does already have an additional app to support UnifiedPush - but someone is already working on a popper integration within the "Notification" app), among others, indicates a promising future.

I hope you will consider it as an option.
It would be gorgeous if signal officially integrates UnifiedPush.

@p1gp1g
Copy link

p1gp1g commented Jul 25, 2023

If the signal team is interested in this solution : the "socket server" (named mollysocket) would not be necessary if the signal server supported WebPush (UnifiedPush is compatible with WebPush). The desktop client may be able to benefit from this WebPush support too.

@ismay
Copy link

ismay commented Oct 2, 2023

I think by now it's safe to assume that this is not a priority for the signal team. The google free sync could be implemented with universal push. Element allows it and it uses barely any battery. Whereas signal without google frameworks burns through my battery in less than a day. Without signal (and with element and ntfy btw.) my phone lasts 3 - 4 days.

@gilou
Copy link

gilou commented Nov 17, 2023

OK, I switched to molly + mollysocket, that helps a lot.

Now, if we were to try and merge that into Signal, we'd need to provide the appropriate change to hack on the Signal Server … And if the codebase on https://github.com/signalapp/Signal-Server is actually the one we should take as what they run…

@ismay
Copy link

ismay commented Dec 11, 2023

Yeah I think that without any feedback from the signal team this will be hard to address. There have been several discussions on this and similar topics in the past. Quoting from one:

the problem in this case is that moxie0 is the opinion that it is quite unnatural to use an android phone without google apps and therefore he doesn't support this situation. He accepts code for GCM-free devices, but has no interest in developing it. (from #6732 (comment))

I can imagine that this is still the core problem for signal. Maybe signal will be open to PRs, but at the very least android phones without GCM do not seem to be a priority.

See also: #7014

@CommonLoon102
Copy link

@Mr-Bajs
Copy link

Mr-Bajs commented Dec 12, 2023

Unnatural? What about this? https://www.cnbc.com/2023/12/06/apple-and-google-phone-users-spied-on-through-phone-push-notifications.html

Signals Meredith responded to this
https://mastodon.world/@Mer__edith/111563866152334347

In signals case the notification only ping signal on the phone to wake up the signals notifications so then the signal app then fetches data such as the message and from whom etc through signals encrypted serversand not through googles or apples systems. Though i dont think many apps are constructed to work like this and send alot of data through their servers, hence thats why governments wants to spy on them.

That's atlest how I have understood it works.

@gilou
Copy link

gilou commented Dec 12, 2023

Well, this does not relate directly to the issue at hand, but the problem about using Firebase/Google for notifications is not only the content and the privacy for communication. It's about letting Google know that you are using Signal, and that you are getting activity. That being tied to your terminal ID. No matter how laws and contracts can "protect" you, the data is there. And enough to be an issue for some users.

Again, that is a bit off-topic, as this has not much to do with the battery issue, though incidently, enabling UnifiedPush would get that extra privacy feature in.

@ismay
Copy link

ismay commented Dec 13, 2023

@gilou Exactly. Though in a way it kind of relates to this question. After all, signal advertises itself with:

Speak Freely [...] An unexpected focus on privacy, combined with all of the features you expect.

Both google and apple's policies are not very compatible with a private user experience. It is a hostile environment for that usecase. I do trust that signal does its best to provide the user with as much privacy and security as possible within those frameworks. But why not provide better support for an experience that depends less on google or apple?

We might get this specific issue fixed, but in the long run I think the no GCM usecase would require more attention from the signal core team and a move towards a more open, less centralized approach. Anyway, maybe that is a topic better discussed in a separate issue.

@d3nnis77
Copy link

d3nnis77 commented Dec 13, 2023

Unnatural? What about this? https://www.cnbc.com/2023/12/06/apple-and-google-phone-users-spied-on-through-phone-push-notifications.html

Signals Meredith responded to this https://mastodon.world/@Mer__edith/111563866152334347

The respones gets further and is infuriating: https://mastodon.world/@Mer__edith/111563867509198309

Apple simply doesn’t let you do it another way. And Google, well you could (and we've tried), but the cost to battery life is devastating for performance [...]

Seriously? First I would like to know, where they tried to implement another push-service and second, why they say it is not possible after the community has done it successfully (Molly-UP) without "devastating battery performance" (at least as a proof-of-concept).

It´s either a plain lie for a cheap excuse or they admit that they aren´t able to make this work. And I don´t believe it´s the second. The silence from the devs in this issue and on the forum speaks for itself.

@ismay
Copy link

ismay commented Dec 14, 2023

Seriously? First I would like to know, where they tried to implement another push-service and second, why they say it is not possible after the community has done it successfully (Molly-UP) without "devastating battery performance" (at least as a proof-of-concept).

It´s either a plain lie for a cheap excuse or they admit that they aren´t able to make this work. And I don´t believe it´s the second. The silence from the devs in this issue and on the forum speaks for itself.

Yeah the terrible battery performance seems to be mostly Signal's fault. Not just Molly, but also https://conversations.im and https://element.io are able to do quite well without GCM.

@ismay
Copy link

ismay commented Dec 14, 2023

The respones gets further and is infuriating: https://mastodon.world/@Mer__edith/111563867509198309

This is a very interesting thread actually. Lots of people there asking for unified push, mentioning that the battery impact is not that great. I also would like to see a comparison between the battery cost of a proper universal push implementation, versus the battery life saved by not having google play services installed.

@Mr-Bajs
Copy link

Mr-Bajs commented Dec 14, 2023

The respones gets further and is infuriating: https://mastodon.world/@Mer__edith/111563867509198309

This is a very interesting thread actually. Lots of people there asking for unified push, mentioning that the battery impact is not that great. I also would like to see a comparison between the battery cost of a proper universal push implementation, versus the battery life saved by not having google play services installed.

Wouldn't be rather hard to compare? That would depend on how may apps are using unifiedpush? The energy save with unified push comes when you use several apps with unified push doesn't it?

@jm355
Copy link

jm355 commented Dec 14, 2023

The energy save with unified push comes when you use several apps with unified push doesn't it?

In some part yes, but also some always-on notification listeners are more efficient than others. For example, tuta has their own independent notification listener that takes almost no battery, while signal has an independent one that's a battery hog. So I could have a bunch of apps with independent efficient ones like tuta and still use less battery than one unified-but-inefficient one that's as inefficient as signals.

A benefit of a unified one (besides only needing one listener in the first place, like you said) is it lets the best listener solution be found by a team focusing on that problem, and then everyone can instantly benefit from it

@ismay
Copy link

ismay commented Dec 14, 2023

I can imagine it would be. I don't think unified push can realistically be more energy efficient than GCM. But I can imagine that a phone with signal using universal push, without any google services, could have similar battery life to a phone with GCM and play services.

But my core point is the ethics of it all, I care less about my battery. After reading this comment by moxie:

I understand that federation and defined protocols that third parties can develop clients for are great and important ideas, but unfortunately they no longer have a place in the modern world. Even less of a place for an organization the size of ours. Everyone outside the FOSS community seems to know it, but it took actually building the service for me to come to the same understanding, so I don't expect you to believe me.
LibreSignal#37 (comment)

I think that signal's goals just don't align with mine. Anyway, I'll stop derailing this thread.

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

No branches or pull requests