This object is in archive! 

Locus never sleeps

myneur shared this problem 11 years ago
Solved

Hi, I don`t know if this is a problem of ICS or Locus, but after upgrading Sony Xperia to ICS, Android don`t sleep when screen-off while Locus running even though the settings are to fall asleep.


The cause is msm-i2c wake lock which prevents ICS from sleep, when Locus application is active.


That means: if I use Locus on ICS: phone will never sleep and battery drains quickly.


Thanks for any solution if you know it.

Replies (18)

photo
1

Just for info: On SGSI, SGSII and SGSIII with ICS Locus lets Android sleep.

photo
1

on my atrix 2, stock AT&T upgrade ICS 4.0.4, the processor never sleeps when Locus is running in the background, even when i am not recording a track.


when locus is running (in the background) but doing nothing, it should let the processor sleep.


when i force-quit locus, the processor sleeps. so it`s definitely a locus issue. i also tracked it to locus using a wake-lock.

photo
1

Which wake lock?


In case the wake lock is really used by Locus it should help to find the cause of the problem.

photo
0

i am using the app "Wakelock" to check who is keeping my CPU from sleeping.


https://play.google.com/store/apps/de...


in the section "CPU wakelock", it indicates "Locus Free" (menion.android.locus) as the main app preventing the CPU from sleeping.


I think it has to do with "GPS Connection".


Locus is in the background, and i am not tracking.


It is NOT set to disable GPS when screen off, because i may need GPS for other apps. however, my device has no problem sleeping when GPS is on (when Locus is not running).

photo
1

Not 100% sure but at least worth a try:


Is button 7 active?


http://docs.locusmap.eu/doku.php/manu...


Disable GPS in Locus doesn`t mean that it will disable GPS in Android system -> other apps can use GPS even if Locus is set to disable GPS.

photo
0

so what does exactly mean "disable GPS"?

photo
1

button 7 is active when locus is in the foreground. and i want that.


i have no way to see if button 7 is active is active when locus is in the background, and i definitely do not need this button (not any button!) to be active when locus is in the background!

photo
0

why would Locus not let my processor sleep if i am not tracking?


there does not seem to be a good reason for it to keep my CPU awake in that case, is there? since basically, locus should be doing nothing... app that do nothing should leave the CPU sleep.


of course, if i was recording a track, then i would understand why it could leave the CPU awake, at least if i record with very short time interval. if i record with a time interval of 1 minute, then i would expect the CPU to sleep and wake up a little once every minute.


PS: i am a software engineer, so i understand those technicalities :)

photo
0

Come on tristan, actually I already told you.


http://docs.locusmap.eu/doku.php/manu...


Tick "Disable location when hidden" and the problem will be gone.


It`s the way Locus works, it doesn`t disable GPS though you only record a point per minute because then this point would be quite inaccurate because the GPS needs some time to recover from sleep.

photo
2

> t`s the way Locus works, it doesn`t disable GPS though you only record a point per minute because then this point would be quite inaccurate because the GPS needs some time to recover from sleep.


yes, you are correct in case i am doing track recording.


but i still don`t really see the point of keeping GPS "active" (in Locus) when locus is in the background and NOT recording any track.


btw, when i keep GPS on in Settings > GPS and Location Services, the GPS keeps tracking satellites, so any app can get the position instantly whenever they need it.


so, yes, Ticking "Disable location when hidden" does allow the CPU to sleep, but i fail to see why this is not the default, i.e. i fail to see what you gain by NOT checking "Disable location when hidden".


are you suggesting that if i tick "Disable location when hidden" , my track recording would be less accurate (i.e. not the normal GPS accuracy) if i record while in the background (and with GPS enabled in system settings > GPS and location services) ?

photo
0

i think it would be really cool to display a pop-up indicating that when you un-tick that box, this will prevent the CPU from sleeping. that`s a pretty important thing, since it reduces battery life quite noticeably (even when not using ant tracking, just with locus in the background).


i am really curious to know what is the gain or benefit you get by no checking this box...

photo
0

hmmm... yes, i can see that "button 7" gives a very bad location when i wake-up the device, until the satellite icon goes green.


so, does this affect tracking?


i.e. is there a way to track using GPS, e.g. with one point per minute, or one point every 10 minutes, with GPS accuracy, but at the same time with the CPU sleeping between the point recording?


or will checking this box prevent any sleeping if i do track recording in the background (even with one GPS point every 10 minutes)?

photo
0

> it doesn`t disable GPS though you only record a point per minute because then this point would be quite inaccurate because the GPS needs some time to recover from sleep.


it seem to take about 10-20 sec (on my device) to get full GPS accuracy when starting with GPS inactive (sleeping, but on at system settings). so if i was to record my track with one point every 10 minutes, the CPU could sleep at least 90-95% of the times, and still wake-up (every 10 minutes), get the good GPS accuracy and record my points.


i don`t know if that`s what it is going (the only way would be to test it on the field, i think).


if it does not do that, there is definitely room for improvement there.

photo
1

Hi guys,

photo
0

ok, thanks, i`ll try using the "GPS auto-off" feature and see if this allows the CPU to sleep. i`ll post here my observation :)


> Usage of this feature (if ticked) is in cases, you don`t want to wait 20 sec and more till you get full accuracy fix


yeah, i didn`t realize that there is a difference between "GPS enabled" at the system settings level, and "GPS enabled" at the app level. at the system level, this seems to just turn on the GPS radio hardware, but the satellites are not tracked unless an app enables GPS at the app level, right? and continuously tracking the satellites keeps the CPU awake.


what i don`t understand is why the GPS hardware (radio) does not turn OFF automatically if no app is tracking GPS satellites... it would seem that as soon as an app wants to track satellites, it would be easy for the system to turn the GPS radio ON, and if no app tracks satellites, having the GPS radio turning itself OFF would save some battery. would you agree?

photo
1

I think that the system`s GPS on just enables any app to use the GPS. But it does not turn on any hardware and so this setting does not by itself cause extra power consumption.


When you start a GPS requiring app and the system`s GPS is set ON, then the GPS chip starts running and eating power.


Just my uneducated guess?

photo
1

@stebu


you might be right.

photo
1

very precise

Replies have been locked on this page!