App not reading phone battery charge level correctly

Message boards : Android : App not reading phone battery charge level correctly
Message board moderation

To post messages, you must log in.

AuthorMessage
justakiwibird

Send message
Joined: 28 May 16
Posts: 18
New Zealand
Message 89554 - Posted: 12 Jan 2019, 0:03:37 UTC

I downloaded and installed the Android app yesterday and have allowed it to run while on battery. I set the battery level threshold to 50% in preferences but the app keeps suspending itself well before the battery level gets to 50%. I have looked in the events log and am seeing “suspending network activity - battery level low” and “(battery charge level 0.0% <threshold 50.0%)”

My phone is only a few months old so I am pretty sure the phone itself is correctly reading and reflecting the battery charge level. Which means it’s the app that isn’t. The phone is showing 64% charge right now but the app started suspending itself over an hour ago.

Is this a known issue and if so, is there a fix coming as this is not ideal.
ID: 89554 · Report as offensive
Profile Dave

Send message
Joined: 28 Jun 10
Posts: 419
United Kingdom
Message 89558 - Posted: 12 Jan 2019, 7:33:04 UTC - in response to Message 89554.  

The phone is showing 64% charge right now but the app started suspending itself over an hour ago.


Random thought: It couldn't be suspending due to temperature could it? does the app say that it is due to battery it is suspending?
ID: 89558 · Report as offensive
justakiwibird

Send message
Joined: 28 May 16
Posts: 18
New Zealand
Message 89565 - Posted: 13 Jan 2019, 3:43:39 UTC
Last modified: 13 Jan 2019, 3:43:54 UTC

I was going to post a screenshot of the event log but there doesn’t seem to be any way to upload one. The message I’m seeing makes no sense - “computing will resume when battery charge reaches 50% (currently 58%)”

The phone shows 58% charge, so the app is actually reading the level correctly but it isn’t managing the suspensions correctly. In the example above, the message itself is just incorrect.

Really frustrating and will probably be a deal breaker for me, which is a shame as I no longer have a computer to crunch on (only an iPad Pro) so I was happy to be able to crunch again on my phone.

And no, it doesn’t appear to be temperature related and the phone isn’t running overly hot.
ID: 89565 · Report as offensive
JLDun

Send message
Joined: 19 Feb 16
Posts: 31
United States
Message 89580 - Posted: 14 Jan 2019, 1:55:40 UTC - in response to Message 89565.  

I was going to post a screenshot of the event log but there doesn’t seem to be any way to upload one.

Upload isn't usually implemented, but you can use the IMG bbcode to link to screenshot uploaded elsewhere...

The message I’m seeing makes no sense - “computing will resume when battery charge reaches 50% (currently 58%)”

The phone shows 58% charge, so the app is actually reading the level correctly but it isn’t managing the suspensions correctly. In the example above, the message itself is just incorrect.


Just double-checking here...
1.) Which version of the App? (i.e. 7.4.53, 7.14.1,...)
2.) What settings are you using? (Just in case linking the screenshot doesn't work)
3.) Which phone model, or OS version? (Just in case it's something that the phone in particular is doing oddly that BOINC isn't handling well... It could happen.)
ID: 89580 · Report as offensive
justakiwibird

Send message
Joined: 28 May 16
Posts: 18
New Zealand
Message 89581 - Posted: 14 Jan 2019, 3:16:07 UTC - in response to Message 89580.  

I have nowhere to upload a screenshot to link to here.

Latest version of the app 7.4.53.

OPPO R15 phone with latest updates. Android version 8.1.0.

Settings:

I have run on battery enabled with a minimum battery level of 50% and temp 40C.
4 CPU cores used (phone has 8 cores and 6GB RAM)
CPU limit set to 90%
Pause at CPU usage above 50%

I only crunch when I’m not using my phone. Don’t have it set to auto start - start manually.

The fact that the message I’m getting has it backwards - telling me computing is suspended at 56% charge, but will resume when it reaches 50% - would tend to indicate a bug of some sort don’t you think? 😉

I was going to post a screenshot of the event log but there doesn’t seem to be any way to upload one.

Upload isn't usually implemented, but you can use the IMG bbcode to link to screenshot uploaded elsewhere.

Just double-checking here...
1.) Which version of the App? (i.e. 7.4.53, 7.14.1,...)
2.) What settings are you using? (Just in case linking the screenshot doesn't work)
3.) Which phone model, or OS version? (Just in case it's something that the phone in particular is doing oddly that BOINC isn't handling well... It could happen.)
ID: 89581 · Report as offensive
Les Bayliss

Send message
Joined: 25 Nov 05
Posts: 1171
Australia
Message 89582 - Posted: 14 Jan 2019, 5:31:40 UTC - in response to Message 89581.  


Settings:

I have run on battery enabled with a minimum battery level of 50% and temp 40C.
4 CPU cores used (phone has 8 cores and 6GB RAM)
CPU limit set to 90%
Pause at CPU usage above 50%



4 cores out of 8 cores is 50%
How do you get CPU limit set to 90%?
ID: 89582 · Report as offensive
justakiwibird

Send message
Joined: 28 May 16
Posts: 18
New Zealand
Message 89583 - Posted: 14 Jan 2019, 9:36:45 UTC - in response to Message 89582.  

These were both the default settings when I installed the app. I just left them as they were as I wasn’t 100% sure what the CPU limit actually meant ie: does it mean 50% of available cores (as you are suggesting) or does it mean only use up to 90% of the CPU processing power for those 4 cores?

Plus, now that I think about it, I didn’t tell the app how many of the 8 cores to use - there is nowhere to select that. So the app decided this without my input.

I am puzzled by the way the app works (or appears to be working). Too many things are not making logical sense.

Do the BOINC developers ever respond to questions here?



Settings:

I have run on battery enabled with a minimum battery level of 50% and temp 40C.
4 CPU cores used (phone has 8 cores and 6GB RAM)
CPU limit set to 90%
Pause at CPU usage above 50%



4 cores out of 8 cores is 50%
How do you get CPU limit set to 90%?
ID: 89583 · Report as offensive
Profile Dave

Send message
Joined: 28 Jun 10
Posts: 419
United Kingdom
Message 89585 - Posted: 14 Jan 2019, 11:24:01 UTC - in response to Message 89583.  

Plus, now that I think about it, I didn’t tell the app how many of the 8 cores to use - there is nowhere to select that. So the app decided this without my input.


Under preferences, there is an option to select how many cores to use, at least on 7.14.1 and whatever version I was using prior to that. I tend to keep mine to just the one core as I have a phone that gets hot if I run all four, not to mention the batter getting hammered.
ID: 89585 · Report as offensive
Profile Jord
Volunteer moderator
Project administrator
Avatar

Send message
Joined: 29 Aug 05
Posts: 13330
Netherlands
Message 89590 - Posted: 14 Jan 2019, 14:48:28 UTC
Last modified: 14 Jan 2019, 19:52:06 UTC

What you can try is test BOINC 7.14.1 to see if it still does that.
The thing with Android 8 and above is that it tracks battery intensive applications and will stop these if they seem to take too much battery, even when the telephone is on the charger.
You should add BOINC as a power-intensive app in the whitelist on the phone. It depends on the phone and its GUI where that is.

To get 7.14.1, go to the BOINC website in the Google Play Store, and check the option to receive beta versions.
Exit the Store and reload it to find 7.14.1, install that. It's a more up-to-date version for Android versions 7 and above. It won't fix this problem out of the box, though.

You can also read through github issue #2467 for others with likewise problems. The volunteer developers read github more than they do the forums.
If you have 7.14.1 and added your phone as power-intensive and still have the problem, first up you may want to try to set BOINC to auto-start and leave it running even when it's not charging. As long as you didn't set in BOINC preferences that it can run while on battery, it won't use the battery much during the time it's off the charger.

Personally I have set minimum battery level to 10% and don't have any problems with that.
On an octo core it is good to run on 4 cores only, as the other 4 cores aren't used by BOINC anyway. Octo cores have 4 so called LITTLE cores which the programs can use and 4 BIG cores that only the OS can use. If you set BOINC to use 8 cores here, you run two tasks per core, slowing calculations down enormously.
Temperatures may not feel hot, but when you install an app that can read the SoC temperatures, you'll find that it easily runs in the 50s Celsius. More if you set BOINC to run 'on all cores'.
ID: 89590 · Report as offensive
justakiwibird

Send message
Joined: 28 May 16
Posts: 18
New Zealand
Message 89597 - Posted: 14 Jan 2019, 22:29:36 UTC - in response to Message 89585.  

So there is. My bad. 4 cores must be the default as I didn’t set that. It’s probably ok for my phone so will leave it at that for now. Thanks.
ID: 89597 · Report as offensive
justakiwibird

Send message
Joined: 28 May 16
Posts: 18
New Zealand
Message 89598 - Posted: 14 Jan 2019, 22:40:25 UTC - in response to Message 89590.  

Thanks for all the help. My phone has an “energy saver” setting where I have disabled energy saving for BOINC (no background freeze, no stopping the app when abnormal background activity detected, and no pausing app when screen is off). Strangely, in spite of this I still get earning pup ups, and the app seems to suspend when the screen goes to sleep.

I might give the beta version a try. Will it pick up current work units from this version or should I finish them first (and not fetch any more in the meantime)?

One other thing - I don’t have anything in the “GUI messages” in the event log. Only client messages. Is that normal?


You should add BOINC as a power-intensive app in the whitelist on the phone. It depends on the phone and its GUI where that is.

To get 7.14.1, go to the BOINC website in the Google Play Store, and check the option to receive beta versions.
Exit the Store and reload it to find 7.14.1, install that. It's a more up-to-date version for Android versions 7 and above. It won't fix this problem out of the box, though.

You can also read through github issue #2467 for others with likewise problems. The volunteer developers read github more than they do the forums.
If you have 7.14.1 and added your phone as power-intensive and still have the problem, first up you may want to try to set BOINC to auto-start and leave it running even when it's not charging. As long as you didn't set in BOINC preferences that it can run while on battery, it won't use the battery much during the time it's off the charger.
ID: 89598 · Report as offensive
Profile Jord
Volunteer moderator
Project administrator
Avatar

Send message
Joined: 29 Aug 05
Posts: 13330
Netherlands
Message 89599 - Posted: 14 Jan 2019, 22:58:35 UTC - in response to Message 89598.  

and the app seems to suspend when the screen goes to sleep.
I remember I had to set things in something like three different places for BOINC to work through all this, but I always forget what they were and where they are.

Let me see...
Battery->Launch->slide "manage all automatically" for BOINC to off
Battery->Battery Usage->BOINC->slide the Power-intensive prompt to the right (on).
Battery->Battery Usage->BOINC->Launch->Auto-launch on, Secondary launch on, Run in background on

I might give the beta version a try. Will it pick up current work units from this version or should I finish them first (and not fetch any more in the meantime)?
You can update BOINC without losing work. It's like that on all platforms.

One other thing - I don’t have anything in the “GUI messages” in the event log. Only client messages. Is that normal?
These are -as far as I know- debug messages that show there, for the developers. You can set the level of debug messages via preferences->GUI Log Level.
ID: 89599 · Report as offensive
justakiwibird

Send message
Joined: 28 May 16
Posts: 18
New Zealand
Message 89601 - Posted: 15 Jan 2019, 0:54:08 UTC

I’ve updated to the beta version so will see if it runs any differently/better.

Thanks for all your help everyone 🙂
ID: 89601 · Report as offensive
justakiwibird

Send message
Joined: 28 May 16
Posts: 18
New Zealand
Message 89602 - Posted: 15 Jan 2019, 1:25:09 UTC

Beta version is still mis-reading battery charge level. Event log states “Suspending computation. Battery charge level 0.0% <threshold 30%) but the battery level is currently sitting at 70 AND the app is actually running. So go figure.
ID: 89602 · Report as offensive
Profile Jord
Volunteer moderator
Project administrator
Avatar

Send message
Joined: 29 Aug 05
Posts: 13330
Netherlands
Message 89608 - Posted: 15 Jan 2019, 7:39:35 UTC - in response to Message 89602.  

Do know that Google changes their code around a lot between Android updates and that the manufacturer of your phone can also move that around to better fit in their version.

What worked before in most versions may no longer work in any next. We already know BOINC may have severe problems getting to run on Pie (A9). So as always, YMMV.
Please do not private message me for tech support. Use the forums for that. Tech PMs will be ignored!
ID: 89608 · Report as offensive

Message boards : Android : App not reading phone battery charge level correctly

Copyright © 2019 University of California. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation.