Extreme power consumption
- App build number: 2.2.2 (22202)
- Android version: Android 11, Kernel version: 4.19110-perf+, Oxygen OS 11.0.4.4.IN11BA
- Device: OnePlus 8 Pro
Both my wife and I use the app on our phones, Samsung s20 (latest firmware as of March 4th and build 22202 of Owntracks) and OnePlus 8 Pro and in the last few days the app has suddenly started to severely drain out batteries. In one day it has now used 46% on my phone.
We use the Move monitoring mode setting but it never behaved like this before. Something must be wrong. Please look into it as I really want to continue using the app.
What changed in the last few days?
Are you only seeing this consumption in move mode?
We both got firmware updates. I will do a test today with a different mode, like significant changes and see how it acts.
In my experience, both OnePlus and Samsung are the worst offenders when it comes to fiddling around with the android internals for whatever reason (see https://dontkillmyapp.com/ for the related problem of vendors who change android to more aggressively kill services).
I think we had one other report from someone on a Samsung device where a firmware update suddenly caused excessive battery usage for ongoing location requests in PRIORITY_HIGH_ACCURACY mode.
If you can narrow it down specifically to move mode, that would be useful. I personally only have a Pixel device for long-term testing, so am less exposed to the shenanigans of the other OEMs.
After a couple of days testing the battery consumption in Significant changes mode is so low it doesn't even register. Accuracy of the reporting of course much less accurate, but consumption issue seems to be in move mode only.
On Fri, 5 Mar 2021, 11:19 Andrew Rowson, [email protected] wrote:
In my experience, both OnePlus and Samsung are the worst offenders when it comes to fiddling around with the android internals for whatever reason (see https://dontkillmyapp.com/ for the related problem of vendors who change android to more aggressively kill services).
I think we had one other report from someone on a Samsung device where a firmware update suddenly caused excessive battery usage for ongoing location requests in PRIORITY_HIGH_ACCURACY mode.
If you can narrow it down specifically to move mode, that would be useful. I personally only have a Pixel device for long-term testing, so am less exposed to the shenanigans of the other OEMs.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/owntracks/android/issues/946#issuecomment-791323740, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFPV3ABEZM2UPPLRORPO4QTTCCV3BANCNFSM4YU3ELHA .
That's useful, thanks for collecting.
Could you now try adjusting some of the move mode parameteres / config items? If you start with the "Location Interval (move mode)" setting, raising that to something like 120 (every 2 minutes), does that make a noticable difference?
@oastolen Did you manage to make any progress?
I am new here but but before I had it configured correctly it was sucking down the juice retrying bad messages. Can check Status to see if there's a queue to be sent.
I am new here but but before I had it configured correctly it was sucking down the juice retrying bad messages. Can check Status to see if there's a queue to be sent.
I'd be surprised if the retry logic was eating battery - it attempts to back off until it's retrying every couple of minutes, but it should be sleeping in the middle. I'll take a look to see if there's anything weird going on there.
Does it retry every message in the queue each interval? I suspect it is retrying more frequently than normal updates in non moving mode. In any case once I got it configured correctly the battery consumption was no longer excessive.
No - it shouldn't. It's meant to dequeue the head of the queue and retry that until it either succeeds or the number of retries for that message type has been passed (for most messages that's 10 (?), but for locations it's 10,000).
It's an interesting data point though - I'll certainly try and test what the power consumption is like of a device in move mode and unconfigured.
I took a profile of the emulator whilst running a location "route", and with OT freshly installed, unconfigured but in move mode. On putting the app to the background, I can't say I particularly see high energy usage. There's an occasional CPU wakeup, but nothing I'd suspect causing excessive battery usage relating to the fact that it's retrying delivery periodically:

Were you seeing this usage on a real device? If so, which one?
Ulefone Armor 11 5G. Running android 10. I noticed my battery was unusually low after a few hours. I checked Accubattery and it showed Owntracks was the most thirsty app. I am sorry this was more of an observations and I didn't get better data.
I tested this on a real device as well (Pixel 2), and couldn't see any significant difference in battery usage in move mode between a configured and un-configured app.
As with many of these battery-related issues, it's often the case that the device vendor has customized / tweaked how the OS behaves, or the Google location library is doing something different on that specific device. It's difficult for us to test, and even more difficult to do anything about within the application code. Unfortunately, it's a case of just trying different configuration settings that gives you the right balance of location frequency and battery life for your device.