UBports Robot Logo UBports Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    GPS positioning stops working after a random duration

    Scheduled Pinned Locked Moved Unsolved Support
    5 Posts 3 Posters 316 Views 2 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
      Reply
      • Reply as topic
      Log in to reply
      This topic has been deleted. Only users with topic management privileges can see it.
      • S Online
        slowcyclist
        last edited by slowcyclist

        When an app actively uses gps (e.g. PureMaps, SensorStatus ...), I find that the location is no longer updated after a random duration ranging from a couple of minutes to well over one hour.

        When that happens
        -the app no longer receives position updates, as if you were not moving anymore (the app itself is fine, it's not frozen),
        -the white location icon is no longer visible in the top toolbar, and if you open the positioning setting panel, positioning is "on" but no longer green and you can't toggle it.
        -SensorStatus reports "AccessError"

        The only way to recover gps positioning is to reboot the phone. Needless to say this bug is particularly annoying when you are depending on your phone for routing while driving. It's also quite frustrating since PureMaps would route me for hours without any problem on my previous phone (Xperia X under 20.04).

        When the loss of positioning occurs, the journal shows :
        Mar 01 17:02:39 ubuntu-phablet systemd[1]: lomiri-location-service.service: Main process exited, code=killed, status=11/SEGV
        Mar 01 17:02:39 ubuntu-phablet systemd[1]: lomiri-location-service.service: Failed with result 'signal'.
        Mar 01 17:02:39 ubuntu-phablet systemd[1]: lomiri-location-service.service: Consumed 1.165s CPU time.

        and the service invokes ExecStart=/usr/bin/lomiri-location-serviced --bus system --provider gps::Provider --provider remote::Provider

        so it's lomiri-location-serviced which segfaults after a random duration, requiring reboot.

        I did not worry too much about the issue earlier because I do not use the GPS heavily, but I believe this issues was already present when got my FP5 back in October. I'm presently on daily channel, running 24.04-1.x (2026-02-13/2), and lomiri-location-service is 3.3.0+0~20250628184827.14+ubports~dev~1.gbp8c98a8

        Am I the only one having this issue?

        KenedaK G 2 Replies Last reply Reply Quote 0
        • KenedaK Keneda moved this topic from Fairphone 5
        • KenedaK Offline
          Keneda @slowcyclist
          last edited by

          @slowcyclist
          I moved thread so it gets more views, because it may not be device specific.

          2015-2023 : Meizu MX4 ☠️⚰️✝️
          2023-2024 : Nexus 5 ☠️⚰️✝️
          2024-***** : FPOS Fairphone 5
          🇲🇫🇬🇧

          1 Reply Last reply Reply Quote 0
          • KenedaK Keneda marked this topic as a question
          • G Offline
            gpatel-fr @slowcyclist
            last edited by gpatel-fr

            @slowcyclist

            I don't see anything of the sort in my logs of the preceding month, however I am not really using the feature, I have posted that the behaviour was too unreliable (hit and miss, sometimes it works very well, sometimes not at all.

            I tested it a bit at some time to see if AGPS could be made to work, without success so far, however in the process I had found this command:

            sudo lomiri-location-serviced-cli --bus system --test
            

            that allows to follow the activity of the satellite detection in the Halium container; IIRC this command was terminating regularly if left to run continuously, maybe this is related ? it could be linked to a restart of the container or something.

            Looking at the service (systemctl cat lomiri-location-service), I see that no automatic restart has been configured like there is for services such as ofono, for example.
            Maybe you could add an overlay to the service to see if it brings some more reliability ? Beware that an overlay already exists, you would have to take care of that somehow by naming the overlay file such as it comes after the existing one.

            S 1 Reply Last reply Reply Quote 0
            • S Online
              slowcyclist @gpatel-fr
              last edited by slowcyclist

              @gpatel-fr Except for the bug I report here, I find that GPS on the FP5 works reliably outdoors, although it may take up to a few minutes to get the first fix ( hence maybe the hit-or-miss impression if one is not patient enough). The problem I report here is that, once you get a fix, you can't use the GPS for an arbitrarily long period: at some point (it can be after 5 minutes, 20 minutes or 2 hours) you'll hit this bug and you'll need to reboot to recover usage of the gps (the phone still works well besides that).

              I've also been monitoring what goes on on the android side when the bug occurs:
              LocSvc_GnssAPIClient tries to deliver an NMEA sentence via gnssNmeaCb callback to the UBports hybris layer
              The binder call fails with DEAD_OBJECT because the ubuntu_application_gps_hidl_for_hybris process on the UBports side has died
              LocSvc_GnssInterface detects serviceDied and calls cleanup
              It sends QMI_LOC_STOP_REQ_V02 to the modem — actively stopping GPS at the hardware level
              Then QMI_LOC_SET_ENGINE_LOCK_REQ_V02 — locking the engine
              From this point isGpsEnabled:0 — the session is permanently dead until reboot

              It seems rather clear that the root cause is the UBports process ubuntu_application_gps_hidl_for_hybris that bridges the Android GNSS HAL to the Linux side dying, at which point the Android HAL correctly detects the dead binder and shuts everything down. The GPS hardware itself is fine — it's the UBports bridge process that's crashing due to the segfault.

              If the termination of the lomiri-location-serviced-cli that you observed was due to the same issue, then GPS would seem disabled afterwards, until reboot. And AFAIU having the service auto-restarting would not resucitate the GPS, but I'll give it a try.

              G 1 Reply Last reply Reply Quote 0
              • G Offline
                gpatel-fr @slowcyclist
                last edited by

                @slowcyclist

                I never used GPS a lot , but now that you are speaking of it, I'm beginning to vaguely remember that there could be one or 2 times when GPS stopped mysteriously indeed.

                I'd say that with a process calling back into another, the first process locking everything just because one time it did not get a reply from the client layer would be a fragile design, maybe Google has done this but this does not look like something people designing a system for billions of users would do.
                If there is some retry mechanism, restarting the UT service could be of help.

                1 Reply Last reply Reply Quote 0

                Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                With your input, this post could be even better 💗

                Register Login
                • First post
                  Last post