Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Location requests staying active indefinitely #2625

Open
sconim opened this issue Nov 13, 2024 · 16 comments
Open

Location requests staying active indefinitely #2625

sconim opened this issue Nov 13, 2024 · 16 comments

Comments

@sconim
Copy link

sconim commented Nov 13, 2024

Describe the bug
With the new 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

@sconim sconim added the bug label Nov 13, 2024
@ale5000-git
Copy link
Member

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

@sconim
Copy link
Author

sconim commented Nov 13, 2024

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.

@Vavun
Copy link
Contributor

Vavun commented Nov 13, 2024

Confirm
Also some people from microG community on 4pda reported same problem.

@sconim
Copy link
Author

sconim commented Nov 13, 2024

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

@mar-v-in
Copy link
Member

mar-v-in commented Nov 13, 2024

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.

@sconim
Copy link
Author

sconim commented Nov 13, 2024

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

@mar-v-in
Copy link
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.

@bschtl
Copy link

bschtl commented Nov 14, 2024

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

@Vavun
Copy link
Contributor

Vavun commented Nov 14, 2024

@mar-v-in issue solved for me as well

@Vavun
Copy link
Contributor

Vavun commented Nov 14, 2024

Somo more info about nightly build from other user

https://4pda.to/forum/index.php?showtopic=724118&view=findpost&p=133408758
Updating to nightly helped but:

Upd: disabled "Remember GPS", rebooted, but still active.

@mar-v-in
Copy link
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

@Vavun
Copy link
Contributor

Vavun commented Nov 14, 2024

Alternate commands for rooted users with no pc (e.g termux)

su -c dumpsys activity service location> /storage/emulated/0/Download/ActivityServiceLocation.txt
su -c dumpsys location > /storage/emulated/0/Download/Location.txt

ActivityServiceLocation.txt and Location.txt will be stored in downloads folder.

@sam-kzn
Copy link

sam-kzn commented Nov 14, 2024

  • 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

@mar-v-in
Copy link
Member

From your dumpsys output, assuming you did these while the location indicator is active, it looks like more a display issue. The system seems to not actually requesting network location or gps at this time.

@sconim
Copy link
Author

sconim commented Nov 14, 2024

From your dumpsys output, assuming you did these while the location indicator is active, it looks like more a display issue. The system seems to not actually requesting network location or gps at this time.

That's a very important point you just made. The dumpsys must be done while the location indicator is active. I, for one, didn't, when I sent you the two files - so those are more, or less useless. With that being said, note that the above commands intended for Android terminal emulator (i.e.Termux) cannot be used (if microG behaves as intended) since transitioning from any app requesting location to a terminal emulator will automatically cause the location to become inactive.

@sconim
Copy link
Author

sconim commented Nov 14, 2024

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

👍The nightly version appears to have solved the problem. I've tested it with default configuration (no toggling of any settings), and multiple apps, and the location indicator did go off every time I closed the app requesting location.

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

No branches or pull requests

6 participants