AquaMail Forum

English - Android => General Discussion => Topic started by: thejman81 on February 27, 2015, 05:11:22 am

Title: Massively high battery usage
Post by: thejman81 on February 27, 2015, 05:11:22 am
Hi there

Recently my HTC One M7 is getting to 20% battery after maybe 5-6 hours moderate use, previously I would get 12-15 hours. I'm not sure how long it's been happening but it seems to have gotten worse in the last 2 weeks. I was running 1.5.1.13 from Play when I noticed this. I installed 1.5.1.16.15 from the Development thread to try and fix it but there's no difference.

Looks like AquaMail is using a massive amount of battery. For the past day the two services using the most are:
- AquaMail (20% All Time, 36% Screen Off, 10% Screen On)
- Google Play services (19% All Time, 39% Screen Off, 17% Screen On)

No other app is using more than 2% Screen Off. I haven't taken much notice of battery percentages in the past, but I'm sure I haven't seen AquaMail using that much battery before.

I have 1x Exchange account, 1x Google Apps account (converted to the recently added connection method), and 2x IMAP accounts. 1x IMAP account syncs every hour, the others sync every 15 minutes. I changed those from every 10 minutes this week to save battery, but it doesn't seem to have made much difference.

Any suggestions on how to troubleshoot this? Since it's mainly Screen Off causing the problem I assume it's because of the scheduled syncs, but I need to sync at least every 15 minutes so can't disable them completely.

Thanks
Josh
Title: Re: Massively high battery usage
Post by: thejman81 on February 27, 2015, 05:22:23 am
Not sure if these Screen Off stats over the same period help to suggest where the problem could be?
CPU total - 5m 5s
CPU foreground - 3s
Keep awake - 8m 32s
Mobile data received - 309KB
Mobile data sent - 57.92
Wi-Fi data received - 4.02MB
Wi-Fi data sent - 648KB

Thanks
Josh
Title: Re: Massively high battery usage
Post by: Kostya Vasilyev on March 01, 2015, 01:45:42 am
If those are stats for Aqua:

Quote
CPU total - 5m 5s
CPU foreground - 3s
Keep awake - 8m 32s

I'd say it's not bad -- 8.5 minutes of "keep awake" time over what, 5-6 hours? Just two minutes an hour, or about 30 seconds per each mail check (every 15 minutes, even if that's not all of your accounts).

And definitely 8-9 minutes of "keep awake" should not be getting your phone from 100% charge to 20% in 5-6 hours.

Don't know what "screen off" vs "screen on" refer to -- must be something specific to your device's system software -- but I assume it's the app's battery use further broken down to when the screen is off vs. on. It's natural that the "screen off" portion would be larger.

What are the detailed stats for Google Play Services? What about other apps listed on that battery screen?

On my LG G3, before it got 5.0, I would get about 30% battery use by "Android OS" and "Android System", IIRC (and nothing like that on other phones wht 4.2-4.4)...

Sorry I didn't just go "aha, it's that checkbox over there, turn it off", but... the "keep awake" really does look quite reasonable.
Title: Re: Massively high battery usage
Post by: freeman1975 on March 03, 2015, 09:22:57 pm
Hi everyone and greetings to the developer of such an amazing email client :-)
First post here.

I'd like to confirm the same behavior of Aquamail on my phone (Moto g 2013, Lollipop 5.0.2). In my case, the high battery drain happens *only* when I'm using my mobile data, and not on wifi. The statistics in the "battery" section, after a couple of hours in H+, read:

 - Keep Awake 7m 18s
 - Mobile radio active 52m 35s <---- This looks strange to me

I'm pretty sure that the "mobile data" is the  problem. Maybe it's not directly Aquamail to blame, but Lollipop, or some strange interaction between them.
For the moment, I disabled the "Check for connection" checkbox in the "Network" settings of Aquamail. Will report if this helps.

Thank you in advance.

E.
Title: Re: Massively high battery usage
Post by: freeman1975 on March 04, 2015, 03:28:06 pm
With you configuration, if you can stand 7-8 hours without needing to charge your battery, that's correct. Don't expect better autonomy...

Could you please elaborate a bit on this? What do you mean by "my configuration"? Please note that I didn't face the problem before upgrading to LP.
Title: Re: Massively high battery usage
Post by: Kostya Vasilyev on March 04, 2015, 11:24:45 pm
This "mobile radio" thing is new in 5.0, and can happen with pretty much any app that uses networking.

http://www.reddit.com/r/Android/comments/2mz5aa/lollipop_battery_drain_is_caused_by_mobile_radio

"Lollipop battery drain is caused by mobile radio active on every app you use."

http://www.reddit.com/r/Nexus5/comments/2usuyn/mobile_radio_active/

"this is just beyond frustrating"

https://productforums.google.com/forum/#!topic/nexus/jD1xCGegQg8%5B1-25%5D

more of the same

Title: Re: Massively high battery usage
Post by: freeman1975 on March 05, 2015, 01:30:01 am

Your configuration = (Moto g 2013, Lollipop 5.0.2, H+). If you get 7-8 hours of autonomy, that's good. What do you expect from a 2 years old battery, a smartphone not necesseraly optimised to Lollipop, having to connect to a mobile radio network?

Wrong. I can do almost 2 days with a single charge.
Title: Re: Massively high battery usage
Post by: freeman1975 on March 05, 2015, 01:32:14 am
This "mobile radio" thing is new in 5.0, and can happen with pretty much any app that uses networking.

http://www.reddit.com/r/Android/comments/2mz5aa/lollipop_battery_drain_is_caused_by_mobile_radio

"Lollipop battery drain is caused by mobile radio active on every app you use."

http://www.reddit.com/r/Nexus5/comments/2usuyn/mobile_radio_active/

"this is just beyond frustrating"

https://productforums.google.com/forum/#!topic/nexus/jD1xCGegQg8%5B1-25%5D

more of the same

Well, as I said in may post, it could also be a Lollipop bug.. From an user's point of view, I can only judge from the program listed under the "Battery" menu. That's why I'm here.
I
Title: Re: Massively high battery usage
Post by: Kostya Vasilyev on March 05, 2015, 09:05:59 pm
I am quite sure it is a Lollipop bug, that's why I posted those links, where the discussions mention all kinds of other apps...

I believe (from Android news sites) that Google is aware of it, but so far, it looks like there is no fix -- e.g. the latest Lollipop build for Nexus 5 is 5.0.1, and it's quite old.

Maybe it's something in Qualcomm's mobile drivers, or how Android and those drivers interact, whatever...

As far I'm concerned -- I'm not aware of any workaround unless you want Aqua to stop doing anything with mobile data, and then you might as well turn off mobile data in the device's system settings. Not very useful.

Something more constructive would have to come out of Google.
Title: Re: Massively high battery usage
Post by: freeman1975 on March 06, 2015, 12:05:25 am
I am quite sure it is a Lollipop bug, that's why I posted those links, where the discussions mention all kinds of other apps...

I believe (from Android news sites) that Google is aware of it, but so far, it looks like there is no fix -- e.g. the latest Lollipop build for Nexus 5 is 5.0.1, and it's quite old.

Maybe it's something in Qualcomm's mobile drivers, or how Android and those drivers interact, whatever...

As far I'm concerned -- I'm not aware of any workaround unless you want Aqua to stop doing anything with mobile data, and then you might as well turn off mobile data in the device's system settings. Not very useful.

Something more constructive would have to come out of Google.

I don't know what is causing the problem. For sure, the "bug" doesn't show up on KK. So it's likely due to LP upgrade
For the moment, I tried to deny AM the "Keep awake" permission, by means of "App Ops". Will see if things get better. In the meanwhile I'll continue to enjoy this amazing email client ;-)

Thank you for the feedback.

E.
Title: Re: Massively high battery usage
Post by: Kostya Vasilyev on March 06, 2015, 12:44:26 am
Yes, as I wrote above, the "mobile data" battery metric is all new in LP, did not exist in KK.

And the bug is new too.

As far as wake locks go -- Aqua always keeps a wake lock when it's doing something (working with the network) -- and I've seen a "battery use" screenshot where for AquaMail, "mobile data" was in the hours and "keep awake" was in the minutes.

So there is a large disconnect in numbers right there. Because Aqua keeps a wake lock when it's working with the network, the "keep awake" cannot be higher than "mobile data". And yet it was.

I *think* that LP tries to put the modem into some sort of low-power state, and it gets "stuck" in some sense.

Oh, and I would try rebooting the phone too, maybe that will reset things.

Meanwhile, I'm keeping my fingers crossed for Android 5.1, supposedly to come fairly soon.
Title: Re: Massively high battery usage
Post by: Kostya Vasilyev on March 06, 2015, 12:56:05 am
http://www.loadthegame.com/2015/01/22/moto-g-2014-bugs-caused-android-lollipop-will-continue-issue-longer/

Quote
The Moto G 2014 and a whole bunch of other devices have been suffering from various issues ever since [...] Android 5.0 Lollipop. Among these problems, we find the already infamous memory leak bug and battery drain issues, which only became more widespread and complemented by other issues with the release on Android 5.0.1 Lollipop.

Many users were hoping that Android 5.0.2 Lollipop would be able to fix this problem, but as it turns out, the update only includes some minor fixes for internal alarms and storage management. Google seems to be aware of these issues and is said to be working on a new update as we speak
Title: Re: Massively high battery usage
Post by: mikeone on March 11, 2015, 12:15:08 am
...
Meanwhile, I'm keeping my fingers crossed for Android 5.1, supposedly to come fairly soon.

http://officialandroid.blogspot.de/2015/03/android-51-unwrapping-new-lollipop.html?m=1

Quote

Monday, March 9, 2015
Android 5.1: Unwrapping a new Lollipop update

Today we are rolling out Android 5.1 - an update to Lollipop that improves stability and performance and offers a few new features...
[Unquote]
Title: Re: Massively high battery usage
Post by: Kostya Vasilyev on March 12, 2015, 09:08:36 pm
Yep, installed 5.1 to my Nexus 5 and Nexus 7 (2012) last night.

Had to fix two things in action bar appearance (broken all of a sudden), and the Nexus 7 is back to being as fast as molasses on a  winter day, but...

...there is a new radio ("modem") software in the 5.1 image, maybe the "mobile data" thing is finally fixed?

Keeping my fingers crossed :)
Title: Re: Massively high battery usage
Post by: Kostya Vasilyev on March 16, 2015, 10:33:39 pm
More food for thought:

https://groups.google.com/d/msg/k-9-mail/23W3TEdG7qE/Ui8T0Ct0TdMJ

Same pattern: "mobile data" time greatly exceeding "wake lock" time.

Oh, and I'm sure it's not specific to mail apps, I just happened to be browsing K9 Mail's mailing list.
Title: Re: Massively high battery usage
Post by: Kostya Vasilyev on April 02, 2015, 06:33:33 pm
And more food for thought.

Sony Xperia Z3 Compact, updated to Android 5.0.2 a day or two ago.

Hangouts and Google Play Services both have high battery use under this "mobile radio active" thing (5:28 and 8:45 hours) and yet very low "wake lock" times (in the minutes range).

Same pattern: the radio gets "stuck" in a high power state, apparently, after the respective apps are done with it.

This device never had AquaMail installed.

Hangouts wasn't used at all.

Hello Mountain View, you have a problem.
Title: Re: Massively high battery usage
Post by: Kostya Vasilyev on April 02, 2015, 06:40:01 pm
Same screenshots in English.
Title: Re: Massively high battery usage
Post by: The_Chemist on April 03, 2015, 10:20:09 pm
I just upgraded my AT&T Samsung Galaxy Note 4 to Lollipop 5.01 earlier this week. Now Aquamail is at the top of the battery usage list. The Battery usage shows Aquamail using 26% battery, while the operating system and other apps are only using 1%. I have Aquamail set to manually check for mail every 15 minutes. I have push disabled. The Note 4 is stock AT&T, not rooted.

The interesting thing is that I also have an AT&T LG G3 on Lollipop 5.01. On that device Aquamail is at the bottom of the battery usage list around 1% usage. The G3 is stock AT&T, not rooted.

I wiped the cache on the Note 4, but it did not help. Aquamail is still the main user of battery at the number 1 position. Before upgrading to Lillipop, when the Note 4 was still on KitKat, I had no problems whatsoever with battery usage from Aquamail.

Hopefully someone can figure out what is causing this, since both my G3 and Note 4 are on Lollipop and the issue only exists with the Note 4. I don't get it.

I love Aquamail. It's the best email client I have ever used.
Title: Re: Massively high battery usage
Post by: The_Chemist on April 03, 2015, 11:51:45 pm
How many accounts/folders are synchronized on Note 4? Do you have the same number on G3?

Exact Same 5 accounts on each. 2 Yahoo's, 1 verizon POP3, 1 Outlook and one work "Bizland" POP3.
Title: Re: Massively high battery usage
Post by: Kostya Vasilyev on April 04, 2015, 12:40:32 am
@The_Chemist

Please click into AquaMail details, and check if it's same scenario:

If it is -- low wake lock time, high "mobile radio active" -- then there is nothing wrong with Aqua, it's this issue in Android 5.* itself, as proven by the discussions and the links and the screenshots above.

If not -- high wake lock time -- then that's something for me to look into.
Title: Re: Massively high battery usage
Post by: Kostya Vasilyev on April 04, 2015, 12:48:01 am
Long discussion about this (not AquaMail, about Android 5 battery drain) on Google's own product forums.

https://productforums.google.com/forum/#!topic/nexus/jD1xCGegQg8%5B1-25%5D
Title: Re: Massively high battery usage
Post by: The_Chemist on April 04, 2015, 02:03:42 am
@The_Chemist

Please click into AquaMail details, and check if it's same scenario:

If it is -- low wake lock time, high "mobile radio active" -- then there is nothing wrong with Aqua, it's this issue in Android 5.* itself, as proven by the discussions and the links and the screenshots above.

If not -- high wake lock time -- then that's something for me to look into.

Here are the stats from the two phones.

Note 4 (High Battery Usage):  Aquamail Battery Usage 10%,  CPU Total: 6m 18s, CPU Foreground: 37 sec, Stay Awake 33m 10s, Mobile Data Received: 14190, Mobile Data Sent: 12840, Total Connection Time: 8h 55m 39s.

G3 (Low Battery Usage):  Aquamail Battery Usage 3%,  CPU Total: 8m 9s, CPU Foreground: 26s, Keep Awake: 1h 3m 33s.

The Note 4 is actually doing much better today than yesterday.  Yesterday the Note 4 listed Aquamail as using 26% battery.  Today is is only 10%. 

The G3 gives much less information on Aquamail usage than the Note 4.
Title: Re: Massively high battery usage
Post by: Fcasoli on April 04, 2015, 01:37:04 pm
I have two Note 4, kitkat and lollipop, Aquamail is not more expensive in battery than stock email client. I have two Gmail and one imap accounts in push. The best client for me, Aqua now.


Galaxy Note 4 + Gear 2
Title: Re: Massively high battery usage
Post by: Kostya Vasilyev on April 04, 2015, 04:28:18 pm
@The_Chemist --

I don't question what you're seeing in Aqua.

But my point is, this is something that can happen with Android 5.0 (5.0.1, 5.0.2) and 5.1 to pretty much any app, at random, and that is a strong hint that this is an OS level issue.

Aqua always holds a wake lock when it talks to the network. The "mobile radio" times being much much higher than "keep awake" time is another.

---

The worst part is -- a bunch of manufacturers released 5.0 (5.0.1, 5.0.2) updates to their last year's models, and it's I'm very doubtful that they're going to put the effort into another round of updates (esp. since the issue is still present in 5.1).

Title: Re: Massively high battery usage
Post by: Kostya Vasilyev on April 04, 2015, 04:30:22 pm
And three more. I saw a screenshot of same type of stats in Gmail last night, but can't seem to find it today.

---

Google's best recommendation (on their Product Support Forums, and coming from a Google employee) is "power down the phone, power back up, and charge to full battery". I'm skeptical.
Title: Re: Massively high battery usage
Post by: The_Chemist on April 04, 2015, 05:09:18 pm
@The_Chemist --

I don't question what you're seeing in Aqua.

But my point is, this is something that can happen with Android 5.0 (5.0.1, 5.0.2) and 5.1 to pretty much any app, at random, and that is a strong hint that this is an OS level issue.

Aqua always holds a wake lock when it talks to the network. The "mobile radio" times being much much higher than "keep awake" time is another.

---

The worst part is -- a bunch of manufacturers released 5.0 (5.0.1, 5.0.2) updates to their last year's models, and it's I'm very doubtful that they're going to put the effort into another round of updates (esp. since the issue is still present in 5.1).

I really don't think the issue is with Aquamail, as I have 2 devices and the issue is only on one of them. I really feel this issue is caused by Lollipop and all the variations of the Android overlay that each manufacturer places on top of stock Android.

It took so long for Samsung to send out the Lollipop update this year, that as you said, I can't imaging a bug fix will come along any time soon. Looks like we all will just have to live with this until the next version of the operating system comes along.

There is no way I would give up on Aquamail. Each version just keeps getting better and better. It's a shame that Google allows each device manufacturer to put such a wide variety of overlays on top of stock Android.

My Samsung Galaxy Tab S just updated last evening to Lollipop 5.02. It will be interesting to see what bugs crop up here.
Title: Re: Massively high battery usage
Post by: crashdamage on April 04, 2015, 06:18:11 pm
For the record, I've had no problems with AquaMail and power drain.  We have 2 phones and 2 tablets all with multiple Gmail and IMAP accounts in AquaMail and all is good.  In fact, Lollipop has been trouble-free on everything.

Google is working hard on the memory leak/power drain problems. A 5.1.1 version has been spotted and rumor is it's mainly a memory bug update.  But who knows when - or if - it will be released.  It could just as well go straight to 5.2.

It's too bad Google gets blamed so often for slow updates and allowing this or that with Android.  Google doesn't 'allow' UI overlays such as Touchwiz (aka Touchjizz) and Sense (aka Senseless).  The Android OS is open source and Google can't stop Samsung, HTC, Cyanogenmod or anyone else from doing what they want.  Google can threaten to withhold access to Google Services for leverage, but not much more.

If you want faster updates and less bloat buy Nexus devices, one of the Pure Series phones or at least something like a Moto X that runs very lightly modified Android.

This is too off-topic for an AquaMail forum...sorry.

And thank you Kostya, for an absolutely kick-butt email client!

Android since v1.0.  Linux user since 2001.

Title: Re: Massively high battery usage
Post by: mikeone on April 04, 2015, 06:23:31 pm
@crashdamage:
What about these issues also on "their own" Nexus products? I guess that these devices are not running with TouchWiz or Sense?

https://productforums.google.com/forum/#!topic/nexus/jD1xCGegQg8%5B1-25%5D
Title: Re: Massively high battery usage
Post by: crashdamage on April 04, 2015, 08:14:38 pm
@mikeone...I'm not quite sure what point you're making.  I made no claim that Lollipop was perfect on any devices.  Obviously it is not.  I just said that I have not had any problems.  And, in a nutshell, that users wanting faster updates and less bloat would probably be happier with devices running vanilla or nearly vanilla versions of Android.

Anyone who prefers one of the UI overlays is certainly free to buy and use it.  To each his own, Android is all about choice.  But to me such stuff is just unnecessary complication and increased opportunity for problems.

Anyway, this really is kinda off-topic for this forum...

Android since v1.0.  Linux user since 2001.

Title: Re: Massively high battery usage
Post by: mikeone on April 04, 2015, 09:03:07 pm
I just wanted to reply on your following statement:

...
It's too bad Google gets blamed so often for slow updates and allowing this or that with Android.  Google doesn't 'allow' UI overlays such as Touchwiz (aka Touchjizz) and Sense (aka Senseless).  The Android OS is open source and Google can't stop Samsung, HTC, Cyanogenmod or anyone else from doing what they want.  Google can threaten to withhold access to Google Services for leverage, but not much more.
...

Furthermore i only wanted to point out that  even nexus devices running with "pure" Android version 5.0.x obviously have issues.

Title: Re: Massively high battery usage
Post by: Kostya Vasilyev on April 04, 2015, 10:15:44 pm
Up above, I posted two screenshots from an Xperia Z3 Compact (a very recent phone model, too) --

-- which *never* had AquaMail installed, and yet suffers from same "mobile radio active" battery drain, which started once it got the official update to 5.0.2.

This is a device I have here on my desk.

---

I watched a "Project Volta" video from Google I/O last night... nothing.

The biggest thing is new APIs for letting apps and the system try to use mobile radio and WiFi and wakeups at the same time (to reduce the per-app overhead).

But this thing we're discussing here is something else -- it seems that the system puts the mobile radio into high power mode (when *an* app needs it to transmit data) and then it just stays that way, "stuck" for hours on end.
Title: Re: Massively high battery usage
Post by: The_Chemist on April 05, 2015, 03:43:49 am
This issue appears to be randomly all across the board due to Lollipop. My Samsung Galaxy Tab S updated to Lollipop 5.02 last evening. It has been running ever since for almost 24 hours now, and Aquamail does not even show up on the battery usage list.

I have the same exact accounts and I have Aqua check for mail every 15 minutes. The battery usage from Aqua is so negligible that it is not even showing up on the battery usage list.



Title: Re: Massively high battery usage
Post by: Kostya Vasilyev on April 05, 2015, 06:53:34 pm
>> Galaxy Tab S updated to Lollipop 5.02 last evening

Wow, I have one of those (SM-T705) and it's easily my favorite tablet.

Didn't know it had Lollipop coming, that's great (knowing Samsung, might take a month or more to reach Russia, but still...)
Title: Re: Massively high battery usage
Post by: The_Chemist on April 06, 2015, 05:40:39 am
>> Galaxy Tab S updated to Lollipop 5.02 last evening

Wow, I have one of those (SM-T705) and it's easily my favorite tablet.

Didn't know it had Lollipop coming, that's great (knowing Samsung, might take a month or more to reach Russia, but still...)

Mine is the SM-T800. A 32 GB version in Bronze. The Lollipop update is working really well so far. The device is much snappier. Hope you get the update in Russia soon! 
Title: Re: Massively high battery usage
Post by: Kostya Vasilyev on April 26, 2015, 11:54:47 pm
A few more from a Samsung device I have on my desk.

Again, note the large disconnect between "wake lock" time and "mobile radio active" time (which Samsung renamed to "total connection time").

Gmail spent only three minutes "really doing stuff" and supposedly kept the radio active for 1.5 hours.

K9 Mail, 13 minutes "doing stuff" and the radio is at 2 hours.

Google Services, under 10 minutes "doing stuff" and radio is at almost 3 hours.

https://code.google.com/p/android/issues/detail?id=165558