OK, I did some other tests and I found that basically the package geoclue is the problem. In Firefox there’s this setting in about:config called geo.provider.use_geoclue. In its default state is set to true but if I set it to false Firefox is able to pinpoint my correct location without problem. Set it to true again and the issue returns.
As it seems, neither Chromium nor Brave use geoclue to get the geolocation value, because as mentioned before, both give me a correct or almost correct location without issues. Interestingly, Vivaldi cannot detect the location at all and it give me an error that says “Geolocation error: Did not provide a good position fix.”.
Now, the thing is why Firefox in the Fedora 37 Live USB did gave me a correct location value? I fired up again the Live USB and checked the geo.provider.use_geoclue setting and surely it’s present and set to true. Then I tried to check the geoclue status and surprise, it is not installed in the live environment by default (I don’t know if it’s present once you install the OS).
So it seems that geoclue is calculating wrongly my location, and if the geo.provider.use_geoclue setting is enabled Firefox will pick that wrong value. I tried to remove the geoclue package to check if the issue persisted but it says that is a dependency for xdg-desktop-portal so I decided to not continue.
My doubt now is why geoclue is giving me a wrong location value, both in my laptop and my desktop (and it seems that it is related in some way to the Wi-Fi, because if I connect using an Ethernet cable it shows me an almost accurate value), but I think that is a topic for another thread. So I’ll mark this as solved for now but I think I’m going to try to research why this happens and if it has a solution or not (and because I also use redshift and right now it’s useless if I don’t configure manually the lat/lon coordinates).
Thank you for all for your replies ![]()
Edit: Small addition: If I set geo.provider.use_geoclue to false and configure geo.provider.network.url to use the Mozilla Location Services (URL=https://location.services.mozilla.com/v1/geolocate?key=%MOZILLA_API_KEY%) Firefox again gives me an incorrect location. It seems that MLS is at fault, because according to the documentation at https://wiki.mozilla.org/CloudServices/Location/Software, geoclue uses it to get its geodata. Interesting
.