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 with no gaps(websockets) is sucking the battery dry (oneplus5 - Lineage 16) #8658

Open
razzor1984 opened this issue Mar 5, 2019 · 13 comments

Comments

@razzor1984
Copy link

@razzor1984 razzor1984 commented Mar 5, 2019

Bug description

After upgrading my onelpus 5 to lineage 16(no gaps – under power usage Soc is on the lowest setting energy saving), the Signal app is sucking my battery dry.
Under lineage 15.1 it was not really good but manageable (20 to 30% battery usage – two days were manageable) Now under the new android 9 os its like Signal is completely preventing the device to go into sleep mode(usage more than 50% and only one day of battery life). My screen time for an entire charge is less that one hour twenty. So the app isn’t used that much. Maybee it’s to the artificial battery monitoring which now didn’t touch often used apps, or the web sockets go haywire and check to often, if new messages are in the pipeline.

Steps to reproduce

Just using Signal with Lineage 16 - with no Gaps - no GCM and therefor websockets.

Actual result: Signal is sucking my battery dry

Expected result: a decent battery life

Screenshots

After the next charge it will be delivered

Device info

Device: Oneplus 5
Android version: Lineage 16 - 20190301
Signal version: 4.34.8

Link to debug log

Not needed

@0bscura
Copy link

@0bscura 0bscura commented Mar 6, 2019

Experiencing the same thing here on my daughter's Pixel XL. Phone is warm and gobbled 50% of the battery in about an hour. Battery stats in settings have Signal at the top of the list. She is getting error notifications. On my end, I'm getting hundreds of "Error handling incoming message" notifications on her conversation thread.

Starting this morning, I'm seeing a new conversation called: Note to Self and it's filled with hundreds of "Error handling incoming message" messages.
screenshot from 2019-03-06 10-18-10

@Cerberus0
Copy link

@Cerberus0 Cerberus0 commented Mar 7, 2019

This may be related to #8217.

Quoting @greyson-signal from that thread:

In general, the only good way to debug battery issues is to get something called a "bug report" from the system that can then be viewed in a tool like battery historian. However, those reports contain a full profile of all of your app usage, so I recommend against posting them on a public forum. Instead, if either of you are interested in providing a bug report to help diagnose this, you can DM me on the forum where I can give you more instructions.

And later on:

If you experience drain, at minimum please submit a debug log (Settings > Advanced > Submit a debug log) and post the link here.

@razzor1984
Copy link
Author

@razzor1984 razzor1984 commented Mar 9, 2019

I digged a little deeper into the problem and if you search through the posts you come to a user called 5_c_d - He basically describes my problem

Dmitri rebased his September#8230 on the December codebase, and so far as I know is still using a >hand-compiled version on his personal device with that 8230 patch applied… but only Dmitri has the >fix, and I’m not positive (though I strongly suspect) that @terd11 and the other dozen people that are >reporting RealtimeSleepTimer$AlarmReceiver errors on LineageOS flavours of android 7/8/9 … that >apparently suck the battery dry, the impact getting worse as the android-base-version increases. >@terd11 is still on LineageOS-variant-of-android-7.1.2 and is seeing awful battlife, but if they >jumped to LineageOSv16-variant-of-android-9 my guess is that would become ntolerable.

(link - https://community.signalusers.org/t/very-high-battery-drain-on-4-34-8-without-google-play-services/6536)

Its definitely a bug in the websokets implementation and under android 9/lineage 16 the os constantly tries to open and closes the websokets. Thats the reason why the battery is sucked dry……
If my device would not posses a 3000mah battery it would not last a day.

The current workaround is, to manually disable the app an only check messages every 3 hours and then force to close it.
If its possible, it would be nice if a polling event can be manually set – like every 1 hour the app contacts the signal servers to look for new messages.
That's a better approach

@johnb-xp
Copy link

@johnb-xp johnb-xp commented Mar 23, 2019

I'm having issues with battery drain from Signal on my BlackBerry Classic, too (BB10 / Android 4.3 runtime with no GApps).
Do you think installing MicroG would reduce the battery drain?

@razzor1984
Copy link
Author

@razzor1984 razzor1984 commented Mar 24, 2019

I'm having issues with battery drain from Signal on my BlackBerry Classic, too (BB10 / Android 4.3 runtime with no GApps).
Do you think installing MicroG would reduce the battery drain?

Technical speaking, android 4.3 is EOL? How do you manage do get security updates for your rom?
Besides this point, the microG services will definitely help you, because your websokets aren't needed any more. The other side of the coin, you will now on use the google cloud communication, which is not best idea for a privacy concerned user (Metadata)…..

@johnb-xp
Copy link

@johnb-xp johnb-xp commented Mar 24, 2019

I'm having issues with battery drain from Signal on my BlackBerry Classic, too (BB10 / Android 4.3 runtime with no GApps).
Do you think installing MicroG would reduce the battery drain?

Technical speaking, android 4.3 is EOL? How do you manage do get security updates for your rom?
Besides this point, the microG services will definitely help you, because your websokets aren't needed any more. The other side of the coin, you will now on use the google cloud communication, which is not best idea for a privacy concerned user (Metadata)…..

BlackBerry 10 is supposedly still supported, it got a patch for Krack when it was discovered. The Android 4.3 runtime runs in a secured sandbox.

I've got Signal working with MicroG, but now I'm not getting push notifications. Probably caused by issues with the Android runtime. I guess I'll have to stick to websockets for now so I actually get notifications. The "Background connection enabled" notification seems to refresh every 5 hours or so, and pops up in my notification feed. I hope this gets sorted out.

@ewired
Copy link

@ewired ewired commented Mar 30, 2019

I fixed Signal's fallback behavior for lack of Play services by having MicroG and then using App Systemizer (Terminal) in Magisk to make MicroG Services Core a system app in /system/priv-app. I recommend enabling device registration and adding a Google account, as recommended in #6895 here but I'm not sure if this is required as I tried it before systemizing MicroG (and it didn't work). Systemizing MicroG also fixed my issue with UnifiedNLP not registering. I also reinstalled and re-registered Signal for every attempt at fixing this, so that may also be required.

@five-c-d
Copy link

@five-c-d five-c-d commented Apr 3, 2019

There is a test-APK 100% unofficial and experimental so please use at your own risk, associated with the pull-request above. https://community.signalusers.org/t/very-high-battery-drain-on-4-34-8-without-google-play-services/6536/41

Can people who are experiencing battlife trouble on non-gApps devices, kick the tires please? @ewired @johnb-xp @razzor1984 @0bscura Can people also please test that this APK works fine with no unintended side-effects, on stock ROMs that have gApps + GSM + FCM + playStore installed as is typical?

Please direct commentary to the forum-thread linked immediately above, not commenting further here in this github issue. (Every github comment emails 700+ repo-watchers so best not to annoy them.)

@tifriis208
Copy link

@tifriis208 tifriis208 commented Oct 18, 2019

I also got the same issue with Oneplus 5 and Oneplus 5T with lineage 16 with microG.
Signal is draining half of my battery. Here a log file : https://debuglogs.org/537edeb1f77b8e6c4cc7c55f8d855ec358892a4a9ba23a4cec371049f3a79d26
The test apk doesn't change anything to me.

Are there any news to solve this issue ? Thanks

@marinomeneghel
Copy link

@marinomeneghel marinomeneghel commented Nov 22, 2020

Having this issue as well after upgrading my OnePlus 5 to Lineage 17.1 and dropping Play Services / MicroG. I observed a quite drastic decrease in battery life and the main offender seems to be Signal (with notifications webhook enabled) consuming around 25% over a day of usage. Is it expected to be this much?

@jcuenod
Copy link

@jcuenod jcuenod commented Jan 31, 2021

Is this the same as #6732?

@6UzoTE
Copy link

@6UzoTE 6UzoTE commented Feb 2, 2021

Having the same issue after installing Signal (apk Version from Signal.org). Mobile Xiaomi MI8 with Lineagos 17.1. NO GAPPS, no microg. Massive power consumption 25-50%

@roppppp
Copy link

@roppppp roppppp commented Feb 3, 2021

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

Successfully merging a pull request may close this issue.

None yet