GPS stopped working

Right now the GPS on my XA2 is for all intents useless. It takes 15 minutes or more to obtain a lock on. I’m well and truly into my walk or cycle ride in that time, or if I’m driving somewhere I can’t afford to wait that long.

My Xperia X locks on within a minute or so. Unfortunately the XA2 is my daily driver and who wants to carry around two devices all the time.

I run GPSInfo on both devices and one interesting thing I’ve noticed is the X always instantly displays the number of satellites in view (usually at least 20) whereas the XA2 will display 0 and take many minutes to show any in view and much longer before it shows any in use. The X will show several in use within a minute or two. No doubt the X is using data from the last it was used to do this. It’s as if the XA2 doesn’t remember the data from the previous time.

I wish Jolla would be a bit more forthcoming with a fix. The radio silence on this issue is very disappointing. Pretty well everyone uses the GPS function on their phone, so to have it not functioning is unacceptable in my opinion.

Now some questions for @martinh. Where do I find the GPS config file? I’m not in Europe so what would I enter for the Australasian region?

Thanks

2 Likes

This behaviour indicates, that the almanach is not used on your XA2. For it to work you need

  • the almanach obviously
  • a reasonable time estimate, e.g. from an ntp server
  • a location estimate.

These informations put together the receiver will for each satellite compute the angle above horizon and will consider all satelites above a certain threshold as ‘in view’.

The almanach is usually cached on device when you have a GPS fix for a couple of time or will be automatically downloaded from an XTRA server. The time estimate is also quite robust when an NTP server is properly configured. Problem is the initial position estimate, since MLS does no longer work. But usually geoclue-master is sufficient, which caches the last known position in ~/.local/share/qtposition-geoclue. If that information isn’t too old, it will be used (and automatically discarded, if you moved too far away from the cached position).

As described in this post /etc/gps.conf is a symlink to /vendor/etc/gps.conf. The only possibly useful adaptation for your region is a different time server, as it is already documented in /etc/gps.conf.

1 Like

Same problem here with XA2.

The GPS in my Xperia X works pretty well especialy compared to my Xperia XA2. I’ve gone and compared the GPS Config files on my XA2 with my X. Now I have some questions for those on here that have much more knowledge than I do on this subject.

Rather than copy the complete GPS Config files and post them here I have posted a couple of excerpts to ask about and then if necessary post more details later.


Should these scripts be the same? For example the X lists izatcloud whereas the XA 2 list gpsonextra
Since I live in the Oceania area shouldn’t oceania.pool.ntp.org be listed also?

There are some other differences between each file but rather than make this post too cumbersome I’ve not listed them. If anyone wishes to provide me with more in depth help I can send the complete files separately.

Thanks in advance for any help provided.

I don’t think it should matter much regarding the time accuracy where the time server is located geographically, the network time protocol is designed to take latency etc into account. Any decently accurate server should allow what @martinh described as “a reasonable time estimate”. Using a server that is somewhat “local” might improve its overall availability though. And both phones seem to me to have the same default of time.izatcloud.net anyway (hosted in the cloud so who knows “where” it is served from).

I would guess there are settings way more important to positioning in the GPS config files than the NTP server.

Actually I doubt the NTP_SERVER configuration is used at all. At least I couldn’t find the place where it is picked up.

Important are the SUPL settings. And if testing with gpstest, make sure that configuration option Show empty channels is yes. Otherwise gpstest will not show the satellites in view reported by the Snapdragon SOC but only the ones with positive signal strength.

Thank you for the reply. I had wondered how important it was as to which timer server was used as I would have though they they would all provide the same information. The reply from @martinh seems to confirm your thoughts.

Thank you for your reply.

Looking at the snippet of your GPSConfig file you posted I see some variations to what is in mine.

Please forgive my ignorance of Linux commands. I’m not sure what the # before a line means but I somehow suspect that line is ignored. Hence all the NTP server lines with this and then at the end a server line for google without a #.

In my config file there are no settings for SUPL_MODE, SUPL_ES, SUPL_VER or LPP_PROFILE. These lines are in the file in what looks to be the AGPS_CONFIG_INJECT section but with a # at the start of each line and with no setting shown.

How important is the INTERMEDIATE_POS setting? Yours is set to =1 mine is =0.

Do I need to enter the missing SUPL settings? If so how? Remove the # and add the settings?

Thanks again for your help.

The # indicates a comment in many scripting languages and configuration file formats and also in this file.

With INTERMEDIATE_POS=1 the device should also report position estimates with insufficient accuracy. It’s probably not important.

I’ld give it a try. At least that’s what works for me. I don’t even know if all these options are needed or used, since access to /etc/gps.conf is distributed accross a couple of processes and libraries. Your approach to edit the file should work. Just take care not to have duplicate keys because then it’s up to the parser which value is used.

Thank you so much for your help. I’ll give it a go. I’ll probably try it first on the X to test the method.

I guess I need to change the sonyericsson SUPL_HOST to google too?

I’ll report back once I’ve had a go at the changes.

Thanks again. :slight_smile:

Here’s another one: “it works!”

Still hoping Jolla would ship a canonical upstream configuration that actually works in the next SFOS release…

2 Likes

Would you be so kind to explain how to reach the GPS config? I tried it via terminal on the phone but couldn’t get to it.

I’ve recently installed Sailfish X on a Xperia 10. Currently I am using it without a SIM card. Yet, I tried GPS with different settings and it took approximately two days until it started working correctly. Currently, it’s fine and very reliable, but I don’t know if I can count on it for the time being.

Use an app like File Browser. On my XA2 the GPS Config file path is Root/vendor/etc/gps.config, you should see a page like this

Swipe left and you then should be able to see the text of the file.

1 Like

@AlanBreen already explained how to find and read the configuration. If you want to edit it, you need to use a terminal and become root. Here it’s up to you, if you prefer preinstalled vi or emacs (openrepos).

1 Like

Anyone else here update to Kvarken yet? There’s official Location configuration recommendation now [release notes] Kvarken 4.1.0



Recommended location settings:

    Settings > System > Location > Custom settings: ON

    Settings > System > Location > Select custom settings:
        GPS positioning: ON
        Offline position lock: ON
        Online position lock: OFF

I did this, and indeed, position in ride share apps is acquired nice and quick now.

Checking /etc/gps.conf, it looks like my previous changes were bluntly overwritten, SUPL_HOST is back to supl.sonyericsson.com etc.

But even tho location is shown on app map, location tray icon keeps flashing like it’s trying to continue to acquire a lock. Should I just have it open for a while until it gets a lock, or what’s going on?

EDIT I have installed new location info package from Jolla store for my country / region. PS thanks Jolla my Finnish family for “Estonia === North-Europe” :muscle:

2 Likes

And don’t forget to download the matching location package for your region from the Jolla store (official Jolla package).

4 Likes

Will there be a US/North America location package? Either in the Jolla store or Storeman?

You probably get your current location from the new location package information and the blinking icon is just indicating the device it still in process of getting GPS lock. When it stops blinking the device has GPS lock and uses that for more accurate tracking.

Right. I had it sit on a window ledge for 5 h. Wouldn’t that be enough for anything? Still continued blinking. What next? :man_shrugging:

Well according to the posts in different topics related to this issue, it can take anything between 15mins and literal forever for the device to get GPS lock. I would assume if it doesn’t get it in 5 hours, it won’t get it at all. Depending if the phone is just being cranky or the phone sits in bad spot, you can try to either reboot the phone and hope RNGesus is on your side now or change the phone to position with better view to satellites.

If the guestimation by the offline cell tower positioning is enough for you, you don’t have to worry about not having the GPS lock, but navigation might be bit iffy.

1 Like