Skip to content

Location requests staying active indefinitely (roaming still not addressed) #2625

Description

@sconim

Describe the bug
With the new 0.3.4 installed, any location request results in microG staying active indefinitely.

To Reproduce
Steps to reproduce the behavior:

  1. Start any app which require (network) location.
  2. Send the app in the background.
  3. The location icon in the status bar remains on indefinitely, although no application is currently asking for location
  4. Long press quick button location. The last request is always microG. The fact that microG consistently shows last location request being made 0 minutes ago is an indication that microG (network) location remains active indefinitely.

Expected behavior
Any/all location requests should be momentary, especially when all location-requesting apps are in the background.

Screenshots
See attached screenshot

System
Android Version: 13
Custom ROM: Samsung S20 (original firmware, debloated)

Additional context
Add any other context about the problem here.
Screenshot_20241113_081651_Settings

Activity

  1. ale5000-git commented on Nov 13, 2024

    @ale5000-git
    Member

    Your screenshot show Déjà Vu Location Service, this means you are not using the latest version of microG (v0.3.4.240913)

  2. sconim commented on Nov 13, 2024

    @sconim
    Author

    I understand where you're coming from however, things are not what they seem. DejaVu was, indeed, one of the unified location nlp backends used with the older microG versions. I installed as a system app (through Magisk) and upon upgrading, the newer versions of microG did NOT remove it. Now it's just sitting there doing nothing, and in fact I could simply just disable it.
    I am on the latest 3.4 version and I wasn't reporting this just for fun. Can we get real now and try to figure out what's really causing the location in the 3.4 to remain on indefinitely?
    I'm the first one reporting it, however I'm positive that more similar reports will soon pop up.

  3. sconim commented on Nov 13, 2024

    @sconim
    Author

    Here you have the proof.

    1. I AM on 3.4,
    2. I no longer have any active unified NLP (disabled)
    3. The microG location still stays on indefinitely.

    Note: reverting back to any previous version simply just doesn't work. A simple reinstallation will result in microG continuously crashing. Probably wiping data might solve the crashing problem however, doing so will also delete all previously stored cloud messaging push notifications - which means that all previously registered apps will have to be uninstalled & reinstalled to re register. I have 68 registered apps. Go figure!

    As we stand, we went from bad (no network location) to worse (always location). This FU must be addressed with the utmost urgency.

    Screenshot_20241113_094843_Settings
    Screenshot_20241113_094431_My Location
    Screenshot_20241113_093718_microG Services

  4. mar-v-in commented on Nov 13, 2024

    @mar-v-in
    Member

    Can you post the output of adb shell dumpsys activity service location and adb shell dumpsys location?

    My guess is that there is not actually a (network) location request ongoing, but instead the passive GPS listener in microG (that doesn't activate GPS but will make sure GPS locations are fused if any other app activates GPS) is displayed as "active" request.

  5. sconim commented on Nov 13, 2024

    @sconim
    Author

    Can you post the output of adb shell dumpsys activity service location and adb shell dumpsys location?

    My guess is that there is not actually a (network) location request ongoing, but instead the passive GPS listener in microG (that doesn't activate GPS but will make sure GPS locations are fused if any other app activates GPS) is displayed as "active" request.

    Please see attached (text file containing both requests).
    Dumpsys location.txt

  6. mar-v-in commented on Nov 14, 2024

    @mar-v-in
    Member

    @sconim can you test with the version from https://microg.org/dl/core-nightly.apk? I can't reproduce the issue on any of my devices, so it's hard to guess what causes this.

  7. bschtl commented on Nov 14, 2024

    @bschtl

    @mar-v-in This version solves the issue for me at a first glance.
    Edit: With both 'Remember from GPS' turned on, microG doesn't appear anymore in the list of apps having requested location, don't know if this is intended, just fyi.

    @sconim As a workaround you can disable both 'Remember from GPS' settings in Location and force close microG and restart, that solved the issue of constant GPS lock in background for me.

  8. mar-v-in commented on Nov 14, 2024

    @mar-v-in
    Member

    "Remember from GPS" should work independently, there hasn't been any changes on that functionality recently either. I suspect that this is caused by the new fused system location provider support.

    As I understand, the issue seems to be fixed for some,but not all users. Can anyone that still has the issue report:

    • which apps show up as requesting location, both in microG location settings and system settings, since updating to the nightly or last reboot
    • their Android version as well as if it is AOSP based or modified OEM
    • output of adb shell dumpsys activity service location and adb shell dumpsys location

    Thanks

  9. sam-kzn commented on Nov 14, 2024

    @sam-kzn
    • which apps show up as requesting location, both in microG location settings and system settings, since updating to the nightly or last reboot

    After reboot I've started "Transparent Clock and Weather" app to initiate Location request. After closing the app location request by "MicroG" still alive.

    • their Android version as well as if it is AOSP based or modified OEM

    Android 13 / MIUI 14 (China stable) ROM

    Screenshot_2024-11-14-17-25-09-678_com google android gms
    Screenshot_2024-11-14-17-25-25-202_com android systemui
    Screenshot_2024-11-14-17-25-42-254_com android settings

  10. 9 remaining items

  11. sconim commented on Nov 17, 2024

    @sconim
    Author

    microG acts as a provider of fused location, so apps requesting it will always use microG.

    The passive listener is for apps directly requesting GPS location, so that microG learns the GPS location and if another app requests the last fused location, microG can include this information.

    Thank you for clarifying. So, what's the difference between fused and GPS location requests? Does fused include both, GPS and network location requests?

    On the other hand, I remember having the passive location requests, which was definitely just a display issue, with Lineage. There was even a setting allowing to hide the intermittent location symbol popping up on the top-right corner of Samsung phones. Anyways, I no longer use Lineage, now I use a heavily debloated version of Samsung's original firmware and I don't have these passive location requests display issues.

  12. mar-v-in commented on Nov 17, 2024

    @mar-v-in
    Member

    Fused location is meant to process information from all possible sources, including GPS, network (WiFi, cell towers, Bluetooth) and additional sensors (like compass, accelerometers, motion sensors, situation, connected car speed and steering, ...).

    Most apps should nowadays only use fused location, but previous versions of Android did not support it properly (or only by using play services or microG), so some apps still request GPS or network location (or both) directly.

  13. sconim commented on Nov 17, 2024

    @sconim
    Author

    Fused location is meant to process information from all possible sources, including GPS, network (WiFi, cell towers, Bluetooth) and additional sensors (like compass, accelerometers, motion sensors, situation, connected car speed and steering, ...).

    Most apps should nowadays only use fused location, but previous versions of Android did not support it properly (or only by using play services or microG), so some apps still request GPS or network location (or both) directly.

    Understood! Appreciate the details.

  14. sconim commented on Nov 17, 2024

    @sconim
    Author

    I think this issue is discussing two separate issues:

    1. Location requests to the new "fused" system location provider staying active infinitely. These may actually cause location requests (scanning for networks or using GPS). This one should be fixed in the nightly.
    
    2. Passive location requests being displayed as "active location requests" and triggering the location indicator on some systems. These do not actually mean location being requested, but rather microG listening if other apps request locations. There is no way to fix this, as microG can't decide what is considered an active location request by the system. I'll add a switch to settings to disable passive listening so affected users can get rid of the location indicator, but this is going to degrade location quality.
    

    I've tested the nightly linked here, and I would agree that problem 1 (listed above) has indeed, been addressed.

    As for problem 2, given the similar experience I've had with Lineage, and assuming this is purely a display issue, could you maybe try addressing just the display issue by adding a switch that would turn off the passive listener's indicator, rather than disabling the passive listener altogether?
    I cannot speak for other phones and/or Android versions but on Samsung Lineage 18 and 19, this indicator would be different and independent from the main location indicator in status bar, and it would keep on popping up on the right-top corner, in green color, whenever the passive listener would make a request.

    This way the location would not be affected.

  15. mar-v-in commented on Nov 17, 2024

    @mar-v-in
    Member

    microG can't influence when the system decides to add the indicator. If the system says "microG listening passively for location updates" is a signal to add the indicator, then the only way for microG to not trigger the indicator is to not passively listen for location updates.

  16. ale5000-git commented on Nov 17, 2024

    @ale5000-git
    Member

    I haven't checked but I think it is not impossible to disable the passive location inidicator with a static overlay but it is outside the scope of microG and it require changing the system partition.

  17. sconim commented on Nov 17, 2024

    @sconim
    Author

    microG can't influence when the system decides to add the indicator.
    If the system says "microG listening passively for location updates" is a signal to add the indicator, then the only way for microG to not trigger the indicator is to not passively listen for location updates.

    I understand, I was thinking trigger but don't show however, I see your point.
    If anything, such a restriction would definitely be outside the scope of work of microG. That would be more of an UI tweak and it would be different for each device and/or Android version.

  18. sam-kzn commented on Nov 18, 2024

    @sam-kzn

    microG can't influence when the system decides to add the indicator. If the system says "microG listening passively for location updates" is a signal to add the indicator, then the only way for microG to not trigger the indicator is to not passively listen for location updates.

    Thank You for explanations and for Your Great work!
    Now, I can confirm that the nightly version solves the problem with location request issue (problem # 1 as You described).

  19. mar-v-in commented on Nov 19, 2024

    @mar-v-in
    Member

    I updated the nightly at https://microg.org/dl/core-nightly.apk. Can those that still had location indicators staying active confirm they don't see that anymore after updating?

  20. sam-kzn commented on Nov 19, 2024

    @sam-kzn

    I updated the nightly at https://microg.org/dl/core-nightly.apk. Can those that still had location indicators staying active confirm they don't see that anymore after updating?

    Finally, the second issue was solved too.
    Now location indicator active only while apps getting location requests.
    Thank You!

  21. sconim commented on Dec 28, 2024

    @sconim
    Author

    The location turns on and stays on indefinitely when roaming.
    The location automatically turns off only when reconnected to the local network.

    I'm on the last version (3.6.244735)

  22. changed the title [-]Location requests staying active indefinitely[/-] [+]Location requests staying active indefinitely (under roaming still not addressed)[/+] on Dec 28, 2024
  23. changed the title [-]Location requests staying active indefinitely (under roaming still not addressed)[/-] [+]Location requests staying active indefinitely (roaming still not addressed)[/+] on Dec 28, 2024
  24. garbb commented on Nov 4, 2025

    @garbb

    I have this same issue where the location icon remains in the status bar for a long period of time after using an app that uses location like google maps.
    I am using a pixel 5 with android 11 and I have installed microG to the /system partition using noogle v2.1 and then upgraded to microG v0.3.10.250932 by just doing adb install for both com.android.vending-84022620.apk and com.google.android.gms-250932020.apk.
    The issue appears when the phone is using wifi for data and also when using mobile data on the home network.

    I have found from experimenting that the icon will behave normally (it will appear when using the maps app and disappear when closing the maps app) if I disable the LocationManagerService with the following command adb shell su -c 'pm disable com.google.android.gms/org.microg.gms.location.manager.LocationManagerService'.
    Of course I have no idea what disabling this might break and so I do not recommend that anyone do it. I just thought I would mention it in case it helps someone with diagnosing the problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions