UBports Robot Logo UBports Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login
    1. Home
    2. slowcyclist
    S
    Offline
    • Profile
    • Following 0
    • Followers 0
    • Topics 4
    • Posts 29
    • Groups 0

    slowcyclist

    @slowcyclist

    5
    Reputation
    8
    Profile views
    29
    Posts
    0
    Followers
    0
    Following
    Joined
    Last Online

    slowcyclist Unfollow Follow

    Best posts made by slowcyclist

    • RE: sdcard not visible through mtp

      I still don't know how to make the sdcard appear directly on my desktop computer when I connect my phone, but I have a workaround : symlink the sdcard mount point in the /home/phablet directory ( = "internal storage" on the desktop computer).

      This is easily done using the terminal (or adb shell). Find the exact mount point of the sdcard using the command mount; it is something like /media/phablet/XXXX-YYYY. Then enter ln -s /media/phablet/XXXX-YYYY ~/sdcard

      posted in Fairphone 5
      S
      slowcyclist
    • RE: USB-tethering doesn't work on my Onelpus 3.

      Since it was working in android, there must be a way to have it working in UBports. I had more or less the same issue in the Xperia X port and could make it work (see here). Turns out that the proper device to use was usb0 and not rnids0 (but editing some files was still required to have usb0 being available). If you are comfortable with linux command line and modifying bash scripts, you should try things along what I did.

      posted in Support
      S
      slowcyclist
    • RE: USB tethering working?

      @gpatel-fr thanks for digging into this. So, right, it's supposed to use ncm and not rndis, but usb-moded should handle tethering with that .
      The file you tried to cat is restricted to root access, but even with sudo, it's not accessible, and that probably explains why the configuration script fails, falling back to charging only.
      Maybe the fp5 is missing the corresponding kernel module now, while it had it back in August?
      I created a ticket.

      posted in Fairphone 5
      S
      slowcyclist
    • RE: GPS positioning stops working after a random duration

      I finally nailed it! After a simple change and recompiling a package, I could have gps working continuously for over 3 hours, which had never happened previously on my FP5.

      The problem was indeed in ubuntu_application_gps_hidl_for_hybris.cpp part of the package libubuntu-platform-hardware-api3 whose repo is at https://gitlab.com/ubports/development/core/platform-api, and lomiri-location-services calls this library to access the android drivers (through hybris). The problem was that the code continued to use a chunk of memory that had been supposedly freed (use-after-free) and the memory corruption only became visible when the allocator reused that freed memory chunk for a new allocation. At that point two pieces of code competed for the same memory, leading to crashing. The issue is more likely to happen quickly when many applications are running, explaining the somewhat random duration before the crash.

      On my Xperia X, a different piece of code was used (ubuntu_application_gps_for_hybris.cpp, not ubuntu_application_gps_hidl_for_hybris.cpp) which explains why it never had this problem.

      That gps_hidl piece of code has not been touched since 2020 and I believe UBports uses it in all phones running running Android 10+ vendor blobs, meaning that the problem should not be specific to the FP5. Yet, I find it really strange that no one reported the issue previously and that only @WillemHexspoor confirmed it here. Does that mean that UBports users either never use their gps for extended periods (e.g. routing with PureMaps or uNav) or that they only do so under waydroid, or that other phones access the gps through a different scheme (another library)?

      I have filed a merge request to that package.

      EDIT: I take back all what I said yesterday, it eventually crashed all the same after (except after a very long time (~10h), and then this morning again after only 3h... So the root cause is not yet found... I'm digging further.

      posted in Support
      S
      slowcyclist
    • RE: GPS positioning stops working after a random duration

      Sorry for the previous noise... I continued working on that issue and I believe I now have a truly working fix : Gps positions continuously obtained for over 24h, twice. For that, I had to patch two repos, touching both the android side (hybris) and the linux side. While examining the code I realized I also could upgrade it so that the fp5 can now use more than than 32 (gps-only) satellites and provides more data (notably altitude uncertainty which was blank in sensor status so far). When the weather is clear my phone sees ~80 sats outdoors, but the android-side code clips at 64, and I'm not going to fight that... With the 64 sats clip the fp5 now still gets fixes indoors at my place while before it would stop when getting inside.
      I'll post the corresponding merge requests in the two repos in the next days.

      posted in Support
      S
      slowcyclist

    Latest posts made by slowcyclist

    • RE: GPS positioning stops working after a random duration

      @gpatel-fr No, I haven't. The UBPorts code definitely has some stuff related with that (dating from the ubuntu era...), but I have not spent time looking into it. I looked into geoclue2 as reported in this other thread, and realized that what is described there only uses wifi or cell; Geoclue2 does not switch to gps afterwards because it connects to gps chips through modemmanager while UBPorts manages the modem with ofono instead... I believe it would be easy to make a geoclue2 plugin for lomitri-location-service to first get a quick inaccurate location from local networks through geoclue2, with lomitri-location-service later automatically switching to gps when a fix becomes available. Of course, a working native AGPS lomiry-location-service implementation would be cleaner and preferable (geoclue2 is essentially duplicating the functionality of lomiry-location-service).
      What I'd also like is to have gps apps continuing to receive fixes when the screen is off. I would very much like activitytracker to be able to record tracks, or PureMaps continuing to give routing voice indications while cycling, without the present unnecessary screen-on battery drain.

      posted in Support
      S
      slowcyclist
    • RE: GPS positioning stops working after a random duration

      Sorry for the previous noise... I continued working on that issue and I believe I now have a truly working fix : Gps positions continuously obtained for over 24h, twice. For that, I had to patch two repos, touching both the android side (hybris) and the linux side. While examining the code I realized I also could upgrade it so that the fp5 can now use more than than 32 (gps-only) satellites and provides more data (notably altitude uncertainty which was blank in sensor status so far). When the weather is clear my phone sees ~80 sats outdoors, but the android-side code clips at 64, and I'm not going to fight that... With the 64 sats clip the fp5 now still gets fixes indoors at my place while before it would stop when getting inside.
      I'll post the corresponding merge requests in the two repos in the next days.

      posted in Support
      S
      slowcyclist
    • RE: USB tethering working?

      A related fix was merged yesterday, So, it should land on our phones sometime when we update the OS.

      posted in Fairphone 5
      S
      slowcyclist
    • RE: 20.04 Focal: uNav freezes with GPS enabled

      Just as @applee, I suspect that this thread possibly discusses several different bugs. Notably, I believe the problem described in reply #3, and maybe by @kristatos are the same as the one I described in this other topic. The issue in that other topic is related to how UBports interfaces with the android gps drivers and it affects all apps using gps on all ported android phones released since around 2020, but possibly with app-dependent symptoms : freezing, crashing, or just going on with a frozen location.

      The good news is that the other topic's bug has a working fix which should hopefully land in an upcoming OTA.

      posted in App Development
      S
      slowcyclist
    • RE: GPS positioning stops working after a random duration

      I finally nailed it! After a simple change and recompiling a package, I could have gps working continuously for over 3 hours, which had never happened previously on my FP5.

      The problem was indeed in ubuntu_application_gps_hidl_for_hybris.cpp part of the package libubuntu-platform-hardware-api3 whose repo is at https://gitlab.com/ubports/development/core/platform-api, and lomiri-location-services calls this library to access the android drivers (through hybris). The problem was that the code continued to use a chunk of memory that had been supposedly freed (use-after-free) and the memory corruption only became visible when the allocator reused that freed memory chunk for a new allocation. At that point two pieces of code competed for the same memory, leading to crashing. The issue is more likely to happen quickly when many applications are running, explaining the somewhat random duration before the crash.

      On my Xperia X, a different piece of code was used (ubuntu_application_gps_for_hybris.cpp, not ubuntu_application_gps_hidl_for_hybris.cpp) which explains why it never had this problem.

      That gps_hidl piece of code has not been touched since 2020 and I believe UBports uses it in all phones running running Android 10+ vendor blobs, meaning that the problem should not be specific to the FP5. Yet, I find it really strange that no one reported the issue previously and that only @WillemHexspoor confirmed it here. Does that mean that UBports users either never use their gps for extended periods (e.g. routing with PureMaps or uNav) or that they only do so under waydroid, or that other phones access the gps through a different scheme (another library)?

      I have filed a merge request to that package.

      EDIT: I take back all what I said yesterday, it eventually crashed all the same after (except after a very long time (~10h), and then this morning again after only 3h... So the root cause is not yet found... I'm digging further.

      posted in Support
      S
      slowcyclist
    • RE: GPS positioning stops working after a random duration

      @gpatel-fr Hey, you were right! By merely restarting the service, positioning becomes available again (no need to reboot!), and adding Restart=on-failure in the service file does the job automatically.
      Alas, it's not really a fix for the problem : all the applications that were using the gps at the time of the service failure/restart quit as soon as you try to get back to them. Restarting PureMaps is much faster than rebooting, but you still need to acquire a new gps fix...

      I've seen other errors than segfaults in the same piece of code :

      Mar 03 15:01:50 ubuntu-phablet lomiri-location-serviced-wrapper[6592]: malloc(): unaligned fastbin chunk detected
      Mar 03 15:01:50 ubuntu-phablet systemd[1]: lomiri-location-service.service: Main process exited, code=killed, status=6/ABRT
      Mar 03 15:01:50 ubuntu-phablet systemd[1]: lomiri-location-service.service: Failed with result 'signal'.
      
      Mar 03 15:08:19 ubuntu-phablet lomiri-location-serviced-wrapper[7546]: malloc_consolidate(): unaligned fastbin chunk detected
      Mar 03 15:08:19 ubuntu-phablet systemd[1]: lomiri-location-service.service: Main process exited, code=killed, status=6/ABRT
      Mar 03 15:08:19 ubuntu-phablet systemd[1]: lomiri-location-service.service: Failed with result 'signal'.
      

      It seems this daemon's code did not evolve much lately. It was working well on my Xperia X which was armhf while now I have random alignment errors or segfaults on the FP5 which is arm64. But if the architecture is the reason, it should likely affect all arm64 phones running UBports, unless compilations options/checks are set differently on the FP5...

      I guess I'll try to rebuild this piece of code with debug symbols, but then guidance for running it with gdb would be welcome.

      posted in Support
      S
      slowcyclist
    • RE: GPS positioning stops working after a random duration

      @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.

      posted in Support
      S
      slowcyclist
    • RE: USB tethering working?

      @gpatel-fr @FlavioMala, indeed the newer Bluetooth stack had the side effect of breaking usb_tethering.
      I could fix it by applying a small patch and recompiling the kernel. The patch is attached to the issue.

      posted in Fairphone 5
      S
      slowcyclist
    • RE: Synchronize appointments with caldav and radicale

      @gpatel-fr I also have a Radicale server and UBPorts agenda syncs well with it (both ways) as long as I do not reboot the phone after connecting to the caldav server (i.e. creating the remote caldav account). On subsequent boots, calendars no longer sync; I need to delete the remote caldav account on the phone and recreate it for syncing to work again. It could just be a problem with storing the password (I find it somewhat surprising that once it's created, it's not possible to change the remote account password, AFAICT), but I have not investigated it more than that. And, yes, it's a pain...

      posted in Support
      S
      slowcyclist
    • GPS positioning stops working after a random duration

      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?

      posted in Support
      S
      slowcyclist