Lock the screen but leave the GPS module running?

Search This thread

Shaamaan

Senior Member
Apr 30, 2010
188
4
I don't know if this is really just a "screen lock with disabled bits" or if this is some full-blown idle mode, but I was wondering...

I don't have any car-accessories, but I'd still like to use TomTom. Now, TT offers some nice voice guidance, which is more than enough for just getting around (if I ever get really lost, I can pull over and pick the thing out of my pocket).

However, leaving TT running in my pocket means that the screen is on, the display changes and thus battery will be drained considerably faster than if the thing would be locked... not to mention an accidental press of a button (it's in my pocket, after all).

However, locking the phone turns the GPS off, so even if I leave TT running in the background it does me no good.

Is there anything I could try out in such a case?
 

ephestione

Senior Member
Mar 23, 2008
2,074
63
Rome
www.ephestione.it
Nothing specially made for that has been released that I know of.
But from info I could gather around, RunGPS has the capability to be set to turn off the display leaving the GPS running.
So you could just install rungps as well, set it to turn off the display with GPS on, and at the same time also run your fav GPS app, tomtom in this case.
What should happen is that the screen will go off with the GPS still working (thanks to rungps) and tomtom will run in background being now able to access the gps device (still thanks to rungps).

Still worse for battery than having only the useful app running (as rungps will take some cpu cycles for itself and will cause more load on the device) but should still be better than leaving the display on at all times.

Let us know your results.

hey what do you know, 900th post :p
 

ephestione

Senior Member
Mar 23, 2008
2,074
63
Rome
www.ephestione.it
Hmmm... strange... Last I've noticed my GPS kept runnung while the device was locked. I used NaviComputer to track a walk I did with a friend and had my HD2 locked in my pocket most of the time.

uhm, don't let that fool you.
First times I used navicomputer just for fun, I thought gps was running in background, but only later I realized that the GPS signal was restored right after turning on the display, and navicomputer was showing a straight line going from my latest positiotn before turning off the display, to the first positiotn it got after wakeup... and I'm sure of that since I double checked several times
In case you check and you DO have your GPS on at all times with device in standby using navicomputer, please let me know the list of installed programs you have :D (I doubt it tho)
 

Bib_x

Senior Member
Oct 10, 2007
962
38
Change this with your registery
[HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Power\State\Resuming]
"gps0:"=dword:00000001
"gpd0:"=dword:00000001

[HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Power\State\Unattended]
"gps0:"=dword:00000001
"gpd0:"=dword:00000001

[HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Power\State\Suspend]
"gps0:"=dword:00000001
"gpd0:"=dword:00000001

Normaly the numbers are on "4" - put this on "1" and gps should stay awake even when you put the phone in standby.
It will stay on until a program stops using the gps.

[HKEY_LOCAL_MACHINE\System\CurrentControlSet\Contro l\Power\State\Unattended]
"gps0:"=dword:00000001

This was already "0". I changed it to "1", too.

Try this. It works on my HD2. I use Run.GPS to log my tracks while jogging or mountain biking.


Other way to keep gps-fix while screen is off - you have to do only a "screen off", not "standby". I did it with AEButtons+ (e.g. screen off on long-press green call-button) - but with this reg-changes it works better for me.
Or you can only lock your phone and let it go to standby on its own. Then gps-fix will still keep alive. GPS-fix only gets lost if you press hardware-power-button (red end call button) - and registry not changed like above.
 
Last edited:

Shaamaan

Senior Member
Apr 30, 2010
188
4
Try this. It works on my HD2. I use Run.GPS to log my tracks while jogging or mountain biking.


Other way to keep gps-fix while screen is off - you have to do only a "screen off", not "standby". I did it with AEButtons+ (e.g. screen off on long-press green call-button) - but with this reg-changes it works better for me.
Or you can only lock your phone and let it go to standby on its own. Then gps-fix will still keep alive. GPS-fix only gets lost if you press hardware-power-button (red end call button) - and registry not changed like above.

Awesome, thanks! :D

I'll try it out tomorrow. A bit too late to go for a walk now. :)
 

ephestione

Senior Member
Mar 23, 2008
2,074
63
Rome
www.ephestione.it
Try this. It works on my HD2. I use Run.GPS to log my tracks while jogging or mountain biking.


Other way to keep gps-fix while screen is off - you have to do only a "screen off", not "standby". I did it with AEButtons+ (e.g. screen off on long-press green call-button) - but with this reg-changes it works better for me.
Or you can only lock your phone and let it go to standby on its own. Then gps-fix will still keep alive. GPS-fix only gets lost if you press hardware-power-button (red end call button) - and registry not changed like above.

as far as I know rungps is able to use the gps during screenoff as a feature.
I tried locking the device without pressing endbutton, but navicomputer loses the fix no matter what.
I also noticed thos reg patchesin some other thread but I also read there that other users tried them with no avail; did you test those registry fixes with software other than rungps by any chance?
 

Bib_x

Senior Member
Oct 10, 2007
962
38
Without these reg-changes i tested RunGPS and when i press hardware-power-button - GPS-fix was getting lost.
If i only did a screen off - then GPS-fix was still there.

Now with these reg-changes i can press hardware-power-button during running RunGPS and GPS-fix is still there.


I did only test with RunGPS because that is the only GPS-app i want to use while screen is off/device in standby.

If i use a navigation software (iGo8), then i want to have screen always on- so i didn´t test this scenario.
 

ephestione

Senior Member
Mar 23, 2008
2,074
63
Rome
www.ephestione.it
I did only test with RunGPS because that is the only GPS-app i want to use while screen is off/device in standby.

If i use a navigation software (iGo8), then i want to have screen always on- so i didn´t test this scenario.

I see, thank you, let's wait for the OP to test this himself.
Since I already knew rungps has a feature to turn off screen without losing gps signal, I don't think it's the reg settings, but rather it's rungps itself that allows you to do that; since you couldn't test different apps we don't even have a verification :)
I may try to get at it tomorrow, no guarantee I'll have the time tho ;)
 

Bib_x

Senior Member
Oct 10, 2007
962
38
I´ve installed sportypal, too. Maybe i can make some tests this weekend.
 

Shaamaan

Senior Member
Apr 30, 2010
188
4
All right! I'm back with some results. Now, a quick note: I switched to MapaMap, a Polish map application, as it has a lot better maps for Poland.

I performed two tests: firstly, I started a route around the street and used the softftware lock to lock the screen. Result? MM application kept running and kept talking to me. Nice. :) However, this is still vulnerable to the physical button being pressed and locking the phone; when that happens, MM looses GPS and, in fact, I think the system somehow pauses this applicaiton altogether (more on that in the next bit).

So, since the physical button is still possibly a problem (after all, during driving the phone is in my pocket, and it's not really difficult for that button to be pressed), I tweaked the registry as Bib_x suggested. However, it seems that even IF the GPS module was still running, the MM application enters this weird suspended state, and whenever I resumed it, it would always greet me with a "searching for GPS signal" message. Granted, it would find the signal very quickly, but it still didn't work while the screen was off.

The odd thing is that mode the application went into. Normally, when it's minimised, I can pick it from the task-switcher and bingo! It's instantly back up. But when I press the hardware lock button and then unlock the phone, I get the Windows "please wait, I'm working" wheel in the centre for a while, before the app is restored.

I can check with TT again to see if the problem is restricted to only MM, but something tells me it's not an isolated case. So now I'd need to figure out a way to keep MM working when the phone is locked; kind of like the music player.

EDIT: TomTom resumes a lot faster, but it still looses GPS; right after resuming it says "no GPS device", and that's with the registry changes applied and after restarting the phone.
 
Last edited:

ephestione

Senior Member
Mar 23, 2008
2,074
63
Rome
www.ephestione.it
EDIT: TomTom resumes a lot faster, but it still looses GPS; right after resuming it says "no GPS device", and that's with the registry changes applied and after restarting the phone.

exactly my experience with any other gps software.
Didn't even try the reg tweaks as I didn't trust them that much.
Just try installing rungps as per my suggestion and using that at the same time with your fav navigation software, maybe the fact that rungps keeps the gps subsystem working while screen is off makes also the other app do its job.
 

Shaamaan

Senior Member
Apr 30, 2010
188
4
After some more fooling around, I've made it, albeit I fear this method might be limited to MapaMap only.

When installing MM there are two options: either installing onto the HD2 or directly onto the MicroSD card. The former option will always install something called "wake up plugin" (might be worded differently in English) which doesn't show up in the "remove applications" menu, so it's more of an integral part of MM and probably can't be removed in this case. In the latter option, this plugin won't be installed, and in fact, is unavailable.

Initially, I've installed the app directly onto the phone, so that plugin was included automatically. My guess is that THIS was the bit responsible for putting the app into some sort of "sleep" state. However, when I installed the app onto the SD card without the plugin, I could lock the phone using the end-call button and the app wouldn't shut itself down like that; it even kept talking to me during the ride, so everything worked. Once more, I can confirm: THE SYSTEM KEPT ON WORKING DESPITE BEING LOCKED - I drove quite a distance and took some different turns, and the phone kept nicely informing me of the new distance and of upcoming turns.

This was all done using the registry settings suggested in this thread! Without them, the app will loose GPS data when the phone is locked, and if I set it to record my movements, it'll create a straight line between the start and end point, with a "no GPS signal" in the middle

EDIT: Do the registry values 1 and 4 mean "always on" and "always off"? What about values 2 and 3? I'm assuming there's no way to make the GPS module "smart", so that it's turned on only when needed? Or is it possible to add a manual switch for the GPS module to the Comm Manager?
 
Last edited:

Bib_x

Senior Member
Oct 10, 2007
962
38
GPS will only be on if a program sends this comand. And if you end the program, then this program sends a kill-comand to gps.
 

pckshd

Senior Member
Dec 30, 2008
415
39
Have you tried with Pocketshield screen lock?
There is a setting at Locking > "Except when...", there you add exceptions to applications which will be allowed to continue running with the screen turned off.
 

kilrah

Senior Member
Sep 16, 2005
1,755
22
The reg edits work for me with GPS Tuner and google maps, not with iGO8. I had actually tried that myself, but only the ones in "unattended" and set to 0 instead of 1 (as that's the fix that's used to keep music playing in Coreplayer and that works), but apparently it wasn't enough for the GPS. Good news :)
 
Last edited: