Battery life in LineageOS

Yesterday I checked the battery may became weak but when I switch to flight mode I lost only 0.9%/h.

Well, you won’t see too much interesting stuff while using you phone as the display will override every other consumer. Especially wakelocks are irrelevant while using the phone. Still, the worst drainer besides display is the mobile reception. It’s red, so the phone desperately tried to stay connected…
Wakelocks are only relevant when the phone is sleeping

2 Likes

as slight off topic question, who triggers the wakelock is it the app itselft or Android service what invokes apps in scheduled pattern?
I’m asking since I don’t understand how setting permission such as background data, mobile data usage influences an app.
Is the call in the app even blocked or does it wake up the phone notices that I can’t use the mobile data (Wi-Fi or Celluar) and allows the phone go back into deep sleep?

When I put in mobile data only battery last longer than being only on Wi-Fi.
I will upload some screenshots as soon as I have some being worth to be published.

In this regard, is there any app what switched on WiFi in a certain pattern when I deactivate Keep Wi-Fi on during sleep so that I can switch of mobile data or in case I roam.

Both questions…
A wakelocks serves the purpose of keeping the phone awake when it otherwise is supposed to sleep. I.e. some app needs work to do when screen is off and won’t be stopped by energy management. Often, a wakelick in itself need not be bad and use battery (lots of in depth threads on xda…). I did learn that wifi might be easier on battery than mobile, and sometimes not… But you can’t decide with an active phone (see idle dump on bbs threads). It might help to switch to fixed ip from dhcp, if you can.
Second question: I’m using taker with location based profiles for controlling wifi and mobile data. Maybe this might be the way to go?

1 Like

thx Klaus for the explanation but what triggers the wakelock is it the app itself or an Android System Service.
I wondering how data usage can be blocked the privacy guard & app settings.

If I forbid an app to run in background will it be killed or freezed when isn’t active, means displayed, anymore?
If I forbid (cellular) data usage of an app, will it still wake up and tries to connect to a server or whatever?

I got tasker on my phone but haven’t got the chance to set up some profiles, because if I do it, I want tasker to login in the mainly used wifi automatically (including entering credentials into login page)

It depends on what the app wants to achieve. So either the app holds the wackelock, or some service initiated by a request from the app in the framework or the system holds the wakelock.
If you forbid the app to run in the background, the the app will be suspended, and, depending on memory available, might be killed. If you forbid data transfer, the “app doesn’t know” and will try to connect, so in this case it will run.

Back to wakelocks, you won’t be able to do anything about msm_ehci_host, besides airplane mode, this is a kernel issue. You might try to make an bbs idle dump and post it in the xda thread. There a people who can explain it very well

1 Like

thx for the reply I will try my best on XDA, is there any specific thread, a first google up came up wit that one [GUIDE] 0% [0.0%/h] Idle Battery Drain on Stock ROM (XPosed & Amplify Required!)
Besided this I did two more test. Phone was ony on Wi-Fi at the beginning without any restriction and made the Wi-Fi a metered one. The result is a drop from 2.2%/h to 0.9%/h, you can even see how the battery trend flattened.
So it seem app/network status related.


I’d use this:. https://forum.xda-developers.com/showthread.php?t=1179809
This is “pure” bbs, the other also handles topics achievable with xposed and the likes

I encountered three things since I flashed Lineage (and replaced the old with the new camera modules)

  1. Battery life is about 1.5 day’s with nearly no usage - WiFi on and mobile data off - only one sim - mobile network has three of four bars and LTE)
  2. As soon as I enable something using the proximity sensor (waveup, gravity screen, …) the battery drains in high speed
  3. There is absolute no difference between flight mode and just not using the device and leaving it in standby (with wlan and data on all time …)

That brings three questions to the community:

  1. Is this a normal uptime compared to your experience
  2. is there any chance to get the calibration tool for the sensor on Lineage? As it clearly seems the new module needs calibration
  3. What keeps the battery draining when every network should be off and the display is off (the monitor always shows wifi as the thing that consumes most - but that should be off in flight mode ?!)

Thanks

it makes quiet a difference for me when I’m not roaming. When I roam but being connected to (weak) Wi-Fi, oddly enough, it doesn’t makes the difference.

I encountered another thing - battery life is good if I’m either on mobile data or on WiFi only - as soon as both are active the battery is draining very fast - it seems they constantly try to take over from each other …
There is a feature in iOS that mobile data can be used to compensate a weak WiFi signal to improve streaming and downloads - is there something similar in Lineage? And if yes where can it be deactivated

When I’m at home or at work I’m constantly connected to WiFi and mobile network simultaneously, and I never experience any noticeable battery drain.
Furthermore I have WiFi always on in standby, which could perhaps drain the battery but in my case doesn’t.

I just deactivated the notification about available public WiFi networks because I mostly don’t connect to them anyway. I don’t think that does something important apart from the notifications, because in the WiFi settings I can see all those WiFi networks around me anyway, so scanning for them doesn’t stop.

There are some advanced WiFi settings in the developer settings, perhaps you could try whether they have any effect at all … changing the setting for handover from WiFi to mobile network or for mobile network constantly activated could be worth a test run.
If that doesn’t do anything, I don’t think this is an OS thing.

Im going to try the dev settings -will report …

Another random observation (and I’m not nearly as techy as other contributors here). My FP2 battery seems to have been draining very fast, and in particular had drained overnight. I read the advice on the forums: (Battery problem at night, which is for FP1 but seemed relevant).

So I decided to try draining it right down. At 3pm today it was on battery saver, saying it had 1% and 4 mns left, but then didn’t move for 30 mns. It’s now 6.55pm and I’ve been listening to Spotify on my phone since then, and it’s still going strong. It sees that battery life may be fine but the battery indicator is faulty and has been giving false alarms.

Can I reset it?

One approach to recalibrate may be to drain it completely and recharge completely afterwards. It might be necessary to repeat this procedure up to three times. Your mileage may vary.

1 Like

Thanks, StephanK. That’s kinda what I’ve been doing. It’s just finishing draining down for the 3rd time :frowning:

Update:
I kept Spotify running on my phone yesterday evening to see how long it took until the battery ran right down. Most of that time it was on wifi, but for a short time I was out and it was on 3G. It indicated 1% and 4 mns left for over 9 hours, and finally buzzed that the power was going off at quarter past midnight.

This morning, I’ve updated it and installed an update, and the battery use graph shows that it was at 100% from shortly before 11am to about 12.40 pm, so for about 90 minutes, and then it fell to 1% within about 10 minutes, with 6 secs left. I’ve not been using it during this time, it’s just been on standby, on the wifi. It lasted about 5 minutes, and has now gone into a reboot loop on the black and white screen.

Since then, I managed to recharge up to 100%, and it lasted about 1.5 hours on that charge before running down again.

All very mysterious. Any other thoughts welcome. It’s got a new battery (ordered from Fairphone), that I put in three days ago as I thought that these battery problems might be because it needed a new battery.

I think I may have to read up about how to take it apart and see if some of the connections need cleaning or something.

1 Like

I updated to the latest 16.10 build of LO and I notice huge improvements on the battery side. The phone lost hardly any charge yesterday and the indicator is predicting 6d (yes, six days) battery capacity. Good Work :slight_smile:

3 Likes

a little update from side besides that most people are of the opinion that battery life depends heavily on mobile network signal strength.
I’ve made some contradictorily experience in this regard.

Although the signal quality is mainly good predicted battery life is shorter as when signal quality is mainly bad.


shorlty aftwards the signal quality was mixed but battery lasted a way longer

After I had done the last screenshot I used the phone a bit but put it aside a couple of minutes later. That triggered something what caused the battery to drain as shown in the screenshots above but I cannot explain what it is.
Any troubleshooting with BBB and the support of the guys moderating [APP][2.1+][7 jan. - V2.2.2] BetterBatteryStats on XDA didn’t help either.

Unfortunately I don’t have an app what shows me app etc activity history (not as a summery as in BBB), so I could narrow down the trouble maker.
Does anyone know a proper app?

My hope lies know in Xposed and Amplify, what can know be installed on LineageOS run FP2

3 Likes

Well, in the first two pictures, bbs wants to tell you that the phone didn’t sleep for a noticeable time. Whether this matters depends on the specific wake locks or other events it’s reporting.
Also, in my experience, i have a high variance of battery drain while sleeping, ranging from .1℅/h to 2%/h… I couldn’t nail this variance…

2 Likes