Thanx for these instructions. I’ll give it a try on the weekend and report here.
As promised, here is my report:
Mounting the partition anew, just like you described, worked well. So I was able to replace gps.conf with your version. The good thing: everything is still working. I’m still able to get a GPS signal. The bad thing is, that the gps.conf file of you doesn’t change anything regarding speed. It still takes sometime up to 20 minutes to get a fix - under clear sky. So the google AGPS Server is obviously not used. It doesn’t matter what is written in the gps.conf.
Anyway thanx for your try. I still can’t understand, why there is no proper solution there from Jolla.
My phone has lost one of it’s key features and I think I won’t get it back. Waiting for GPS for two or three minutes isn’t a problem for me. But waiting for ages IS.
Cheers for the report. Sorry it didn’t help out. I knew I was biased. Btw did you try version 2 from the same gist called pro1_gps_v2.conf. Worth a try. And sorry for the inconvenience.
Nothing to be sorry about! There is no inconvenience. At least none that you are responsible for.
I’ll give it a try the next days. I keep you updated.
Thanx for your efforts.
OK I tested version 2 as well. Same result. If it is a clear sky and there are no clouds, time to get a fix takes nearly 3 minutes. Which would be OK, if I got this under a cloudy sky and some higher buildings around, but under these conditions. It still takes over 10 minutes often up to 20 minutes. This means that AGPS is not used, because I always had a very good internet connection when I tested. I have the feeling, that the gps.conf file is simply ignored.
Thanx anyway. I think on the long time I just have two options. Buy another phone without keyboard (the Xperia 10 II of my girlfrind is MUCH better on getting a GPS fix) or to leave Sailfish after more than 10 Years. Both options are bad!
Bad options indeed. I hope you do stick around for an inevitable fix. You are correct in regards to agps.
I too left SFOS awhile back as a daily driver, but eventually came back to the Xperia 10 III after my phone died. I am reworking some of my old uncompleted projects for the pro1 and SFOS in general. I really hope you do remain within the community in an active role. I’ve been seeing multiple threads to the effect of finding an alternative to SFOS which is a shame.
Have you tried switching the SUPL PORT to 7276? Maybe TLS connection is already disabled in the FX Po like on the Xperia10iii. For 4G supl support also SUPL_VER has to be changed to 0x20000.
The GPS is unable to get lock, or excessively slow, when the signal is weak. Not very weak, just somewhat weak. Side-by-side the Android 10iii is far better.
The SFOS 10iii, has no trouble finding sats (GPSInfo), and does so as fast or faster than Android. But it is then unable or slow to turn that into position lock.
My XA2 was completely useless. This is not better, but inadequate as it is still unable to get lock at all, in places that Android phones (both Quallcomm and Mediatek) can lock within 30secs.
To me, this seems to be the same issue that the XA2 had (and not an X10iii specific one): There are enough “green” sats, but it takes a long time to lock or fails to lock.
It also appears that compared to Android, it may not cache the ephemeris/almanac, so it has to get them everytime it starts acquire. I have not noticed the issue that the XA2 had, of occaisionally starting up reporting a position that was a few weeks old.
My tests that I have posted were a bit varied:
first try and second try and third try
Note that the SUPL/MLS/AGPS suggestions are quite irrelevant to me. I require that phone to work in the bush where there is absolutely no cell coverage.
I’m also not convinced that they will make any difference, as the phone should know exactly where it was when the GPS last had lock (i.e. here at home) but this does not help it find lock next time I test 5 mins later, in the exact same place. The starting position, almanac and ephemeris should all still be valid.
edit: @vige requested the Android GPS app I used: HamGPS (play store)
Caveat: I now use LineageOS for microG. But this gps.conf has worked wonders on my XA2 H4113. It does not use SUPL.
I get a fix in 5 seconds when outside and usually within 30 seconds when indoors.
I tried this gps.conf on my XA2 Dual but in my case, the XA2 was not able to see any satellite.
Have you tried clearing the AGPS data and rebooting and of course location turned on (duh!)? I have had repeated problems with the gps on my XA2 while using SFOS, though the suplpatcher hack somewhat alleviated it. When I changed to LineageOS, I also had some problems with delays in getting fixes though not as bad as on SFOS. After I started using this gps.conf, the gps now works the way I always hoped it would. If this isn’t the case for you or others in the same situation, then to me that suggests a problem with SFOS.
Just tried your gps.conf-config on my XperiaX that was affected by the same issue: no GPS satellites at all in view for weeks/months. At first, I simply replaced the file and it did not change anything. I rebooted once and changed Sailfsih GPS settings from the “customized” setting to “high precision” setting and then, within some few minutes satellites started appearing again! I set back to using “customized” and it still works. Thanks for sharing!
Thanks. No, I haven’t. How can I achieve this?
Where is this gps.conf ?
I can only find one in /vendor/etc/gps.conf .
On Xperia 10 / SFOS 4.5.0.19 it has 139 lines.
The one from Github has 400 lines.
On Volla / SFOS 4.4.0.72 this file is not present on this path.
On Volla there is a symlink in /etc/gps.conf that points to /system/etc/gps.conf and is reported as defect.
In /system/etc/ there is in fact no such file present, but a gps_debug.conf is. It has 52 lines.
Despite all this, GPS works on the Volla. Any ideas?
The location of gps.conf depends of the device. On X10, only in /vendor/etc/gps.conf. On XA2, in /etc/gps.conf but it is a symlink to /vendor/etc/gps.conf.
According to my tests, I don’t think that any change to gps.conf makes a difference.
On my X10III 4.5.0.19, without any gps.conf and with settings “without network connection”, I got a fix in 66s from cold start (after reboot) inside a building (but close to the window).
I do it with GPS Test, but on SFOS it is GPSInfo. I don’t remember if it can do it. And I’m not even sure it matters so much. I just mentioned it as something to try. Maybe try to do as @ssj2micvm did and see if it doesn’t help. I’d be very interested in feedback, because I’d like to come back to SFOS at some point and it would be nice to know if this gps.conf solves the gps problems that are particularly prevalent on the XA2 running SFOS. Also, the very first time, it may take 1-2 minutes to get a fix. The 5 seconds I mentioned is after that.
It seems to make a difference if the device needs this file. E.g; On Xa2, using the file linked above leads to inoperative GPS.
I think the gps.conf
content are, and must be, adapted to the gps chip.
The above linked file seems made for a Xiaomi device. (line 305).
I guess trying to exchange these files between machines is like mounting a Mazda carburettor into a Peugeot without engine modifications. It will hardly work.
The XA2 gps.conf
contains 22 useful lines, once comments are removed (note the use of google services):
XTRA_SERVER_QUERY=0
XTRA_SERVER_1=http://xtrapath1.izatcloud.net/xtra2.bin
XTRA_SERVER_2=http://xtrapath2.izatcloud.net/xtra2.bin
XTRA_SERVER_3=http://xtrapath3.izatcloud.net/xtra2.bin
ERR_ESTIMATE=0
NTP_SERVER = time.google.com
DEBUG_LEVEL = 2
INTERMEDIATE_POS=0
CAPABILITIES=0x37
SUPL_HOST=supl.sonyericsson.com
SUPL_PORT=7275
NMEA_PROVIDER=0
SGLTE_TARGET=0
LPPE_CP_TECHNOLOGY = 0
LPPE_UP_TECHNOLOGY = 0
AGPS_CONFIG_INJECT = 1
AP_TIMESTAMP_UNCERTAINTY = 10
DR_SYNC_ENABLED = 0
PPS_DEVICENAME = /dev/pps0
AP_CLOCK_PPM = 100
MISSING_PULSE_TIME_DELTA = 900
PROPAGATION_TIME_UNCERTAINTY = 1
The above linked one has 60:
ERR_ESTIMATE=0
NTP_SERVER=time.xtracloud.net
NTP_SERVER_2=asia.pool.ntp.org
NTP_SERVER_3=0.cn.pool.ntp.org
XTRA_CA_PATH=/usr/lib/ssl-1.1/certs
DEBUG_LEVEL = 3
INTERMEDIATE_POS=0
SUPL_VER=0x20000
SUPL_ES=0
USE_EMERGENCY_PDN_FOR_EMERGENCY_SUPL=0
SUPL_MODE=3
CAPABILITIES=0x17
ACCURACY_THRES=70
LPP_PROFILE = 3
DATUM_TYPE = 0
NMEA_PROVIDER=0
NMEA_TAG_BLOCK_GROUPING_ENABLED = 0
CUSTOM_NMEA_GGA_FIX_QUALITY_ENABLED = 0
NMEA_REPORT_RATE=NHZ
SGLTE_TARGET=0
A_GLONASS_POS_PROTOCOL_SELECT = 0xf
LPPE_CP_TECHNOLOGY = 0x2
LPPE_UP_TECHNOLOGY = 0x2
AGPS_CONFIG_INJECT = 1
AP_TIMESTAMP_UNCERTAINTY = 10
DR_SYNC_ENABLED = 0
PPS_DEVICENAME = /dev/pps0
IGNORE_PPS_PULSE_COUNT = 1
GNSS_OUTAGE_DURATION = 10
AP_CLOCK_PPM = 100
MISSING_PULSE_TIME_DELTA = 900
PROPAGATION_TIME_UNCERTAINTY = 1
MODEM_TYPE = 1
CP_MTLR_ES=0
LOG_BUFFER_ENABLED = 0
E_LEVEL_TIME_DEPTH = 600
E_LEVEL_MAX_CAPACITY = 50
W_LEVEL_TIME_DEPTH = 500
W_LEVEL_MAX_CAPACITY = 100
I_LEVEL_TIME_DEPTH = 400
I_LEVEL_MAX_CAPACITY = 200
D_LEVEL_TIME_DEPTH = 30
D_LEVEL_MAX_CAPACITY = 300
V_LEVEL_TIME_DEPTH = 200
V_LEVEL_MAX_CAPACITY = 400
XTRA_TEST_ENABLED = 1
XTRA_THROTTLE_ENABLED = 0
XTRA_SYSTEM_TIME_INJECT = 1
XTRA_SOCK_KEEPALIVE=1
BUFFER_DIAG_LOGGING = 1
RF_LOSS_GPS = 0
RF_LOSS_GPS_L5 = 0
RF_LOSS_GLO_LEFT = 0
RF_LOSS_GLO_CENTER = 0
RF_LOSS_GLO_RIGHT = 0
RF_LOSS_BDS = 0
RF_LOSS_BDS_B2A = 0
RF_LOSS_GAL = 0
RF_LOSS_GAL_E5 = 0
RF_LOSS_NAVIC = 0
Now, the one who will have time to make researches in order to understand the function of each line will be able to try modifications and be the king with some successful results.
A must read IMHO:
There is a long but very interesting thread about GPS and configurations files here (search there for gps.conf
):
https://forum.sailfishos.org/t/gps-stopped-working/1181/
In my case with a Xperia 10 II, the GPS was able to see about 25 satellites but not able to use anyone. This is because I received Android 12 pre-installed while Android 11 is required even if the Sailfish OS installation guide does not warn about it.
To fix the problem, I had to install Android 11 using Emma the flashing tool from Sony
After, the installation of Sailfish did not present the GPS issue. I hope this helps.
I could solve the problem on Xperia 10 / SFOS 4.5.0.24 by tweaking this file:
/vendor/etc/gps.conf
I commented this out:
# XTRA_SERVER_1=http://xtrapath1.izatcloud.net/xtra2.bin
# XTRA_SERVER_2=http://xtrapath2.izatcloud.net/xtra2.bin
# XTRA_SERVER_3=http://xtrapath3.izatcloud.net/xtra2.bin
izatcloud is a Qualcomm server. edit: this is only for my paranoia , I don’t think that it has to do with the ‘time to posFix’ issue. -
Change NTP_SERVER except you prefer Google:
NTP_SERVER = ptbtime1.ptb.de
(This is Physikalisch Technische Bundesanstalt)
This is less essential:
# Intermediate position report, 1=enable, 0=disable
INTERMEDIATE_POS=1
This is essential:
# NMEA provider (1=Modem Processor, 0=Application Processor)
NMEA_PROVIDER=1
The rest: no changes.
After this tweak, SFOS GPS positioning works as good as every other GPS device, of course without any A-GPS or internet connection. Time to position fix 5 sec - 1 min, depending on satellite reception conditions and how long GPS was turned off since last position fix.
On my 10III, this seems to result in no gps (i.e. it sees no satellites) (in GPSInfo).
Anyone else tried it?