Most recent app update destroying my battery life

Hello, I was wondering if anyone else has noticed a dramatic hit on battery life with the most recent update? I haven’t changed any settings, all of my accounts are IMAP and set to 15 minute polling, and I also disabled the persistent notification for K-9, but still I am seeing a 20-30% battery loss per hour. The batter usage chart shows K-9 at the top of the list, consuming more battery than my phone’s actual screen.

Is it just me?

3 Likes

I’m not seeing this issue on any of my devices (which are all running 5.8 and beta 5.7x before that), which include two phones on cell data and two other devices on wifi. Most of them have IDLE enabled and those that don’t are doing polling at 15min intervals.

Have you looked at the per-app battery usage - generally available under the “battery” option under [system] settings?

Hey, thanks for the reply. Yes, that was the battery usage I was referring to in my post, K-9 has been at the top of the full device usage since the update. I have 5 or 6 accounts so I have been putting off reinstalling it, but I am at the point where I am willing to try given the persistence of the issue. This is the 4th time I’ve charged my phone today (Android 10, LineageOS 17.1)

Ok I figured it out. After a clean install of the app and redoing all of my accounts, I found that the “push” notifications weren’t automatically enabled as they were after doing the update initially. Enabling push on my accounts dropped 40% off my battery overnight (less than it was previously dropping, but still a lot). Turning off push notifications seems to stop the battery drain.

Hello,

I have same problem on my three Sony devices. Android 9 and Android 11.:sob:

Hey, try disabling push notifications under the notification settings for each account. Alternatively you can click on the notification in your notification panel and it should take you to a global setting to disable push notifications.

1 Like

I have this too, App info currently showing 36% battery use since last charge. Android 8 phone with push. I have battery optimisation off, as I think that was recommended for push to work.

Notifications indicate app is connecting every few minutes, plus every time the app is closed. I have just turned push off and will see how that goes with half-hour polling.

Changelog says “Changed periodic background sync and push implementations to work much more reliably”.

Same here. After update to version 5.800 it drains 50% of battery overnight by just waiting for new email (Samsung Galaxy S9 @ android 10).
Push notifications are currently enabled, I didn’t do any change to the corresponding settings; I don’t know if the update changed something automatically.
According the changelog, the sync and push implementation was changed, so I assume that has something to do with that.

Android seems to think that this application is running in the foreground all the time.

Yep, that’s because of the persistent notification that push notifications use to fetch the email for you as soon as the account receives it. It’s a highly reliable method of getting email quickly due to the notification keeping the app open and constantly fetching but is way too power consumptive.

Foreground services (persistent notifications) do NOT cause unexpectedly high power consumption, they simply make it easier for a badly behaving application to do so, since it prevents such application from being killed by the system. In fact, one application I wrote that uses a foreground service and maintains a persistent connection to an SSE (server sent event, i.e. push messaging) endpoint, and uses so little power that it doesn’t even register.

So it sounds like something is going WRONG with the k9mail push messaging, and therefore it would be most helpful to examine system logs in order to get a better idea what is actually going on (i.e., could be a bug, could be a config error).

Thanks for the clarification. I’m not a developer, but what you say makes sense; the persistent notification is simply the enabler. Hopefully they can figure out what’s going on here, because it seems like a pretty useful feature for expeditious email delivery.

Just to report that I’ve got push notifications on & K9-mail has been responsible for 2% of the battery drain over the last 17 hours.

So, for me at least, push notifications are working perfectly - I’m getting immediate mail deliverty with negligible battery usage.

1 Like

Turned push back on and battery usage back to normal. Looks like the settings just needed reset.

I upgraded to Android 11 ten days ago. Since then my K9-Mail battery usage is up from 15-18% to 58-76% per battery cycle. The less I use the phone, the higher the percentage.

There was a bug in the Push implementation that has been fixed. If you’re using K-9 Mail 5.803 or newer and are still experiencing problems, please report it as a bug. See LoggingErrors · k9mail/k-9 Wiki · GitHub

1 Like

Awesome, thank you for the fix! Love K-9!

Since updating to .804 on a pixel 5/android 12-beta with IDLE enabled I seem to be seeing high battery usage that I wasn’t seeing with .803 (or previous releases).

Please record a debug log and create an issue in our bug tracker. See LoggingErrors · k9mail/k-9 Wiki · GitHub

I think it might have been a bad cell data day as I haven’t seen the issue of late.

1 Like