Closed Bug 1711854 Opened 3 years ago Closed 1 year ago

Geolocation causes ping spikes in LAN until Firefox is closed

Categories

(Core :: DOM: Geolocation, enhancement, P3)

Firefox 88
enhancement

Tracking

()

RESOLVED DUPLICATE of bug 1810421

People

(Reporter: chronos1970, Unassigned, NeedInfo)

References

Details

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Firefox/78.0

Steps to reproduce:

Platform: Windows 10, 20H2
Internet connected through WIFI
Tried on a clean Firefox profile

  1. Start ping monitoring in terminal (ping 192.168.1.1 -t)
  2. Visit maps.google.com (or any other site using location)
  3. Allow access to location

Actual results:

Ping starts spiking intermittently (from 1 ms up to 3000 ms) until all Firefox processes are closed (even if the Google Maps tab is closed)

Expected results:

Ping should not have been affected this much, and shouldn't persist even if location is no longer needed.

I assume this due to a continuous WIFI scanning of nearby networks.

Component: Untriaged → DOM: Geolocation
Product: Firefox → Core

PS: Tested Microsoft Edge (Chromium), and it doesn't have any issues.
I've noticed that this bug has been reported here and around the internet several times:

I hope this gets resolved soon, and thanks for your time.

Severity: -- → N/A
Type: defect → enhancement
Priority: -- → P3
See Also: → 1658449

I'm also encountering this issue as well: Windows 10, 91.0.2 (64-bit). It can almost always be immediately triggered by visiting Google Maps. Ping will spike from 10ms to about 25000ms almost exactly every 10 seconds until Firefox has been closed. Upon reopening everything is fine and dandy.

Also having this issue for a while on my laptop. Only now found that this is related to geolocation but requesting geolocation indeed reproduces it.

For me it makes 2-3 pings be 200-300ms instead of normal 10-20ms. Very frustrating issue but I guess I would try to avoid geolocation requests or reload firefox instantly after doing one.

I have had this problem for years but have just found the cause to be geolocation service recently.

Closing the tabs that use geolocation (or closing all tabs) does not solve the symptom but restarting firefox helps. However, if I use any website that uses geolocation again after restarting, the symptom keeps coming back.

I am on a PC using an on-board WIFI.
Edition Windows 10 Pro
Version 21H2

I have tried using FF dev edition, using both clean profile and my original FF profile and I encountered the same problem.

Found this bug as well.

OS: Windows 10 Education, Version 1909, 18363.2274
Firefox version 100.0 (64-bit)
WLAN adapter: Realtek 8812BU Wireless LAN 802.11ac

The ping spikes are extremely regular.

This bug is now affecting me without even geolocating, all I have to do is open Firefox, instant and endless lag spikes 10s+. If this isn't going to be addressed then time to switch to Chrome.

I've had this bug for years and only now found the link to location request. Like many here, I would find that sometimes my ping would randomly spike up at intervals (e.g. a few seconds every 10 seconds), and that closing Firefox would make the issue go away. But now I know that this is 100% because of location requests. If I open some sites and don't grant location permission, everything is fine. As soon as I grant location permission, within a few seconds the ping would go up and the issue wouldn't go away until restarting Firefox.

Windows 10 22H2
Firefox 107
TP-Link Archer T2U Plus Wifi Adapter

(In reply to fennecbutt from comment #6)

This bug is now affecting me without even geolocating, all I have to do is open Firefox, instant and endless lag spikes 10s+. If this isn't going to be addressed then time to switch to Chrome.

It could be an extension or a home page trying to use geolocation. In my case it was Nextcloud's home page. It's unfortunate that this bug hasn't yet received any developer attention. The main problem is how hard it's to diagnose. I just turn off geolocation on all Firefox instances now.

As of Firefox 107.0.1, I would like to inform that this bug magically disappeared, at least for me and on this particular PC. Same machine, same OS, same windows user, same Firefox user profile and plug-ins.

Either Firefox dev team did something or some windows update fix this for me.

Anyway, I no longer need to open Chrome to use Google Map anymore.

(In reply to nattee from comment #9)

As of Firefox 107.0.1, I would like to inform that this bug magically disappeared, at least for me and on this particular PC. Same machine, same OS, same windows user, same Firefox user profile and plug-ins.

Either Firefox dev team did something or some windows update fix this for me.

Anyway, I no longer need to open Chrome to use Google Map anymore.

Sorry, I think I made a mistake. The problem is still there. It is just that google map does not really use the geolocation as often as I think. If I force google map to use the geolocation (in a way that Firefox asks for my permission), the problem suddenly appears.

can confirm this happens to me too
never had this problem until I let google maps use firefox's location
problem still persists despite setting geo.enabled = false in about:config
the only way to resolve this is to restart the browser
any attempts in using geolocation will results in ping spikes again

I think I have found the culprit. I believe the problem is my Wi-Fi which is Realtek 8822BE. I bought a new Wi-Fi PCI-e card using Intel AX210. When I connect the Wi-Fi using AX210, there is no problem even I use the geolocation.

I have both Wi-Fi card enabled but the ping spike problem only happen when I use geolocation while connecting with Realtek 8822BE. If I switch my connection between Intel AX210 and Realtek 8822BE back and forth , the problem happens only with 8822BE. Of course, closing Firefox still stops the problem.

So, I will stick with my AX210 for now.

Can anyone with the problem confirm the connecting network card when the problem happen please?

(In reply to nattee from comment #12)

I think I have found the culprit. I believe the problem is my Wi-Fi which is Realtek 8822BE. I bought a new Wi-Fi PCI-e card using Intel AX210. When I connect the Wi-Fi using AX210, there is no problem even I use the geolocation.

I have both Wi-Fi card enabled but the ping spike problem only happen when I use geolocation while connecting with Realtek 8822BE. If I switch my connection between Intel AX210 and Realtek 8822BE back and forth , the problem happens only with 8822BE. Of course, closing Firefox still stops the problem.

So, I will stick with my AX210 for now.

Can anyone with the problem confirm the connecting network card when the problem happen please?

I can reproduce the problem with the rtl8814au chipset. Moreover, the issue doesn't appear on chromium browsers.

I have similar problem with Realtek RTL8852BE WiFi 6 802.11ax PCIe Adapter. And the problem occurs only when I am connected over WiFi, over wired connection everything is alright.
I have assumption about nature of the problem:

  1. Geolocation in Windows causes ping spikes. For example, when you open Maps application and try to detect your current location, ping spike can occur. Similar with Edge and https://www.google.com/maps
  2. Firefox for some reason starts to use geolocation every 5-10 seconds, which lead to periodical ping spikes due to 1).

Hello everyone, and thank you for your reports. There has been some progress recently on a probably duplicate bug 1810421, see here and there. While we'll be working on fixing this, it would help us a lot if you can confirm the following:

  • Do you have Location Services set to Off in Windows?
  • Do you have geo.enabled set to true if you navigate to about:config in Firefox?
  • Does setting geo.enabled to false and restarting the browser fix the issue?
  • Same question with setting geo.enabled to true, but geo.provider.network.scan to false, and restarting?
  • (Open question) Do you expect that geo location should continue to work in Firefox when Location Services are Off in Windows, by using Firefox's own geo location services as a fallback?

Our current hypothesis is that:

  • You are using location services in Firefox but the Microsoft provider is unavailable because Location Services are Off in Windows.
  • So Firefox falls back to using its own location services, which includes periodic scans of nearby Wi-Fi APs, currently every 5 seconds.
  • Some network cards are unable to service regular network activity during scans.

Aside from fixing this, we wonder whether we should propagate the user's choice in Windows configuration to Firefox when they disable Location Services, and not use a fallback in that case.

(Edit: more context and questions)

Flags: needinfo?(chronos1970)
See Also: → 1810421

Hello! In my case the answers are:

  1. Status of Location Services in Widows 11 doesn't matter. Firefox somehow is able to update my location with Location Services Off
  2. I have geo.enabled set to true
  3. Yes, setting geo.enabled to false helps. However, geo location stops working

My algorithm to reproduce the problem is as follows.
Prerequisites:

  1. Be connected over WiFi
  2. Have geo.enabled set to true (other geo parameters seems to be at their default as well)
  3. Have cmd with ping -t <router IP> running in the background for lag spikes detection

Actions:

  1. Open tab with https://www.google.com/maps
  2. Forcefully update you current location. It can be done by hovering mouse cursor over a location icon in the left-bottom of the page and pressing Update in a pop-up that appears.
  3. Lag spikes start to appear in cmd every 5-10 seconds. The tab with Google Maps can be closed, it doesn't matter at this point. The lag spikes continue even after closing the tab and they persist until Firefox is restarted.

Setting geo.provider.network.scan to false as was recommended in 1810421 helps as well.

(In reply to NoneDark from comment #16)

  1. Status of Location Services in Widows 11 doesn't matter. Firefox somehow is able to update my location with Location Services Off
    It seems I made a mistake. The problem only appears with Location Services turned off.

geo.enabled to false solve the problem but the location service is not available. Please see my detailed update at https://bugzilla.mozilla.org/show_bug.cgi?id=1810421#c43

Thanks, I updated comment 15 with more context and questions based on your answers.

In case there is still any question, I can reproduce this and can confirm that the value mentioned in bug 1810421 comment 41 ( kDefaultWifiScanInterval ) controls this failure. Changing it from 5 seconds to 60 results in hanging every 60 seconds, for the same amount of time (2 - 3 seconds).

Status: UNCONFIRMED → RESOLVED
Closed: 1 year ago
Duplicate of bug: 1810421
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.