Apple Maps location scan spikes WiFi latency every 60 seconds
twitter.com
twitter.com
Gonna try turning off all my Mac devices location services, thanks for the tip.
My partner has an older MBP, I noticed this the last time she was forced to updated her OS a major version... the thing no longer sleeps when you tell it to or when you close the lid, it will stay connected to wifi and quite happily saturate the network downloading updates.
Only way to be sure is to power off the stupid thing.
I'm glad I stopped using Apple stuff 10 years ago, their macs are gradually devolving into iDevices.
“pmset -g assertions” will show you why it thinks it’s awake, it could be a silent video playing in a web browser or something. (and of course, if you can ssh in to run that it must be awake.)
...which it only does when connected to power so I'm honestly failing to understand what the problem may be. Anyway: Settings -> Software updates -> Advanced -> Download new updates when available -> uncheck.
For everything else: Battery -> Power adaptor -> Wake for network access -> uncheck (may also take care of the above, dunno)
For example, https://news.ycombinator.com/item?id=28639952
"Do not leave XPS laptop in any sleep/hibernate/standby mode when placed in a bag" because they stay connected to wifi and may attempt to run updates etc when the user is not expecting or prepared for that, as far as cooling.
Even if I decided to use the untended upgrades package, it wouldn't do it when I sleep the computer... that would just be stupid.
If I have it sitting on power and thus likely just on the top of the table and I have auto-updates on, sure do them when I'm not around as long as they are updates that can run unattended. Note the "if auto-updates are on" part, which luckily you can still disable on MacOS.
Yes, Fedora downloads packages first and then reboots the machine to perform the actual updates and then reboots again into the updated system [1]. You can still run dnf update manually, but the recommended path is the former one. Why? Because in contrast to what many commenters say here, in-place updates of Linux systems can go wrong. Apparently, Fedora have encountered this often enough that they they have started doing 'offline updates'.
(The proper solution, which Silverblue/Fedora IoT/Fedora coreOS/NixOS/GUIX do is to make system updates atomic with roll-back.)
[1] https://fedoramagazine.org/offline-updates-and-fedora-35/
https://fedoraproject.org/wiki/Features/OfflineSystemUpdates
The system update mode is implemented by booting into a special target. The target installs the downloaded updates and then reboots back into the regular default target.
You can also see the process in the video on the end of this page:
https://www.addictivetips.com/ubuntu-linux-tips/upgrade-fedo...
You can see that after choosing to install the updates, the system reboots. Then it uses systemd functionality to switch into a special update target. Then it reboots again to boot into the updated system.
Finally, also see the article that I linked in the earlier post:
https://fedoramagazine.org/offline-updates-and-fedora-35/
The process of restarting, applying updates, and then restarting again is called Offline Updates. Your computer boots into a special save-mode, where all other systems are disabled and where network access is unavailable. It then applies the updates and restarts.
I am currently using Fedora headless. But the last time I used Fedora on the desktop (~a year ago), I am pretty sure it still did the reboot-update-reboot dance. The exception to this is Fedora Silverblue, which downloads a new system image and then boots into that in a single boot.
Is it reasonable to expect that you can just yank the chord during an upgrade? Maybe, maybe not. But users have the expectation that it is ok, there can be a power interruption after all.
This would never happen with a macOS update, which uses an immutable root file system and APFS containers to switch the root after an update. Or an OSTree system like Silverblue, Fedora IOT, or Fedore CoreOS. Traditional Linux packages fall flat on their face in such scenarios (unless you use a lot of band-aid like filesystem snapshots, set up GRUB to handle boot into the right snapshot, etc.)
I think it is uncharitable to assume that the people making macOS (or Windows) update are incompetent. They may just have a different set of requirements and constraints.
There are still things that cannot be interrupted like flashing firmware blobs, on many devices. Before apple distributed updates using FS snapshots they would reboot the machine first and block the user with a message that it cannot be interrupted.
It's also not a completely free or well implemented solution because (even as an x-apple user) I am made patently aware of just how absurdly huge their updates are, even for the smallest patch... incremental distribution and immutable FS based updates are not fundamentally incompatible, so I guess Apple simply doesn't respect user's bandwidth or assumes all of their customers have gigabit downlinks for the exclusive use of Apple devices.
Hehe, oh yes you can still have data loss on macOS. See the recent article about how macOS SSDs use write-cache enabled.
https://support.apple.com/en-au/guide/security/secd698747c9/...
SSV not only helps prevent tampering with any Apple software that’s part of the operating system, it also makes macOS software update more reliable and much safer. And because SSV uses APFS (Apple File System) snapshots, if an update can’t be performed, the old system version can be restored without re-installation.
A cursory search on the issue says Bonjour is the culprit, I'm forwarding DNS requests to my PiHole instances on my gateway and latest iOS doesn't seem to like it; I haven't faced such issue earlier and I have this setup for several years now.
[0] https://github.com/moonlight-stream/moonlight-qt/issues/159#...
I agree that it's not a good default to have an app doing this, though.
I was under the impression that this has been SOP for mobile device location forever: get rough location via WiFi and/or tower multilateration while GPS is...I don't know the proper terminology here, bootstrapping? That's why your dot tends to start somewhere nearby-ish and then quicky jump to your exact location.
It's possible that I'm way off base or my understanding is outdated, though.
There is the term "Time to first fix" Maybe "getting first fix" could be derived from that.
Wikipedia lists a set of interesting situations with what the device is actually doing that causes the delay https://en.wikipedia.org/wiki/Time_to_first_fix
netsh wlan set autoconfig enabled=no interface="Wireless Network Connection"
Caveat: you need to turn this back on if you need to re-connect or scan networks.https://bugreports.qt.io/plugins/servlet/mobile#issue/QTBUG-...
My old Mac does not have this problem. Makes no sense to me that Windows allows any random program to trigger wifi scans. It’s a performance issue and privacy issue too.
Here's hoping it works as I understand it and other chipsets start doing similar things!
The noise would be unsalvageable and you would lose packets, surely.
Also things these days often have multiple antennas.
Also for 2.4ghz I believe Bluetooth shares the same channels. I've noticed that my BT headphones reach longer in no-wifi/few wifi locations.
I'm frankly surprised that the author of these tweets encountered this at all, much less was so annoyed by it as to troubleshoot.
That's not the trigger. The trigger is location services scanning for networks in the background. So, if you have that enabled then it happens automatically while you're on a call.
On an unrelated note, in my experience Apple devices are consistently the most frustrating devices when it comes to wifi. They are insanely picky about what networks they will connect to, and they are never consistent.
No spike. It must be occuring at some corner case, not for everyone.
I did find the Last.FM app seeming to request scans though?!
There's a better solution though! Delete all your saved wifi connections. All those hotels and coffee shops you have connected to in your apple lifetime are the trigger. Reduce them down to those you actually use and the problem goes away.
I'm amazed more people haven't come across this, though from what I've seen people tend to just live with these problems as they don't know where to start in figuring it out.
https://bugreports.qt.io/plugins/servlet/mobile#issue/QTBUG-...
Edit: somebody pointed out that these scans could be for roaming purposes as well. Maybe there is another access point with a better signal and it’s time to move?
It also depends a lot on what your hardware is, whether you're doing a full scan or a partial scan, whether you have more than one NIC etc, etc.
I think you're you're talking about Radar detection?
My apartment is on the approach-path for one runway of a major airport - I regularly get reports of Radar detection on my Unifi APs when planes are landing in this direction.
I tried the various settings for avoiding it, discussed in many other comments here. The only thing that worked for me: get out a USB ethernet adapter and a long wire, don't use WiFi when doing things where it matters.
... which is ridiculous; I don't want or need location scans at all, I am sitting stationary in my home office.
Aren’t modern Wifi chips capable of holding two simultaneous connections (one for wifi, one for wifi-direct/Airdrop)?
Also, I'm assuming Maps only does this when it's open, but Apple's annoying tendency to keep an app running when you close the last window (with the exception of system preferences and a few others) makes this very hard to diagnose. While I still used Macs a lot I would always close apps with Command-Q for that reason. This behaviour would exacerbate the problem as the user isn't aware that the app is stil running.
Apple's reasoning is I believe to "not worry about open apps, the OS will handle it". But it doesn't always, I often get prompts that my memory is full and I have to close something now or else... And that is with me being rigorous closing apps. My work buys only base level machines with standard ram, unfortunately.
It's something I would expect Apple to have taken advantage of though, as they own both the hardware and the software.
This is…just how macOS works. Windows applications (generally) tie their lifecycle to the existence of a window, but Macs have a different paradigm: the program can live without any windows. Pretty much every Mac app behaves this way. It’s been this way as long as I can remember.
iOS is different; you can force close an app with the app switcher, but the OS generally encourages you to leave things “open” and the OS will periodically wake your process so it can perform various tasks. The OS is very stingy about how much work your process can do when it’s in the background in this way. This is one of the challenges when developing for iOS, for sure.
But I only used macOS since 10.2, never used classic.
I highly recommend the Karabiner app, it makes this change trivial. There's also a way to do it without additional software, described here: https://apple.stackexchange.com/questions/88897/how-do-you-m...
But yes I know it's just how macOS works. I never really got used to it except that it ingrained "Command-Q" into my muscle memory :) I agree it makes sense for some apps. For example for mail, which will continue receiving in the background and notify you. But not for Maps. This is an app that isn't useful when its window is not open.
But I mean this uniqueness to macOS is causing this to cause unintended side-effects. While working in Apple Maps, I imagine the user would not care so much about latency issues and the location tracking would be useful. By the app shouldn't do it while it's not actively being used IMO, as long as there is no way to avoid the latency.
I wonder if the same happens with Apple's own FaceTime by the way, or if they made an exception for that :)
Is this possible? Or is AP scanning perhaps always over 2.4?
Pinging the System76 box from the laptop, the latency varies from 2-250(!) ms. Pinging the laptop from the System76 box varies from 2-125ms.
I don't even know where to start debugging that but the latency is driving me crazy.
I have maps open, refresh my location etc. Nothing at all. So there must be some other factors at play. Given the authors wireless woes that I've never had trouble with, I feel like they might just be living in a bunch of farayday cages ;)
Turn off location services and disable the awdl0 interface is the only way (for me) to run lag free zoom calls over wifi with a mac.
https://support.google.com/stadia/answer/9595943?hl=en#zippy...
Moonlight project issue discussed in the thread are also recommending to disable awdl to mitigate the issue https://github.com/moonlight-stream/moonlight-qt/issues/159
I never ment to step on any toes, just wanted to raise possible solutions.
It's quite annoying, and I can't really think of why it happens.
I wonder if radio interference might be a cause.
In order to scan usefully you need to listen on more than one channel from each band. Hence, the interruptions.
I suppose in theory if you were using a 5ghz network you could scan all the 2.4ghz frequencies. In practice there is little demand for this, so the proprietary firmwares don't support it (at least some, and often all, of the scan routine happens in firmware).
I connected my iPhone to a 5 GHz-only network on channel 36, and my MacBook Pro to a 5 GHz-only network on channel 48, and I could still AirDrop between them at 300 MBit (which exceeds any real-world speed I've seen on 2.4 GHz), and both devices retained connectivity (an iperf on the MacBook dropped from 600 Mbit to 300 Mbit while the AirDrop was in progress)
After messing around with this and sending around 10 AirDrops, now the feature is completely broken no matter what I do (same network, etc) so who knows (lol)
The latency is also massively better -- I surgically implanted an "ancient" ath9k into my laptop and 5ghz wifi latencies dropped 6x compared to the "modern" broadcom chip on the laptop's motherboard. Still getting 300mbit/sec.
All it cost me was the left speaker, removed to make space for the superior wifi card with open-source firmware.
Kinda makes you go "hrm."
If you're just starting out, stick to something easier like the Sony UWA-BR100:
https://h-node.org/wifi/view/en/1283/Sony-UWA-BR100-802-11ab...
There are a bunch of these 5ghz ath9k USB sticks, all of which are basically the same ar7010/ar9280 reference design from atheros with different plastic housings around them.
One side effect of this is that in order to scan all possible wifi channels, your baseband needs to tune to different frequencies at least for a short period of time.
Theoretically this interval should be short enough to avoid any disruptions – practically that‘s apparently not always the case.
- maps don't show your location, which you would have to live with..
- I recommend F.lux instead of night shift and dark mode: you can manually configure a location in F.lux and let it enable dark mode as well.
- also manually set time zone
I've never had this problem on my iMac
Also it must be notifying userland it happened because location services is trying to gather that info.
Most WiFi clients enable background scanning when signal strength is below some threshold, so you would never notice latency spikes unless connection is already poor.
> Most WiFi clients enable background scanning when signal strength is below some threshold, so you would never notice latency spikes unless connection is already poor.
i assume s/unless/because/ ?
Did you hop into a vehicle you have paired with bluetooth? Apple Maps drops a "parked car" pin automatically when you do, I think regardless of whether it was in use at the time.
Maybe you used an app that uses an Apple Maps view?
Do you have any of the drive-time/traffic condition widgets active in the lefthand thingy, or homescreen?
Reason two is to determine location from WiFi network data. Location may not be static even if connected to a single network, since that network may cover a large area and be roam-able, or be moving (hotspot, train, etc.).
Maybe I don’t fully understand the Wi-Fi “space” but I gotta wonder why the standard hasn’t embraced a CDMA-like system where your device can just roam around without really caring which AP is the strongest… the access points would all communicate with each other to figure out which one should be responsible for a device.
It would also fix all the nonsense with picking channels for each access point. They’d all use the same spectrum.
But I’m only an armchair observer so who knows…
In theory, it could establish that you are on a bus/train/airplane... and then look up any public transport information for whereabouts of that vehicle, but I don't think anyone does that.
Also, 25 milliseconds is about a round trip across half the continental US. Not really sure that's a good tradeoff for devices that are mostly stationary.
I just can't replicate it, and another user ( leodriesch ) pointed out they may be a few versions behind. That's not something I can replicate right now.
Could just be a bug that has been fixed already.
I however, cannot setup that environment right now.
Sure, Maps may want to know your location, but it should not have the ability to constantly poll wifi.
Also, different chipsets may display different behavior. Older wifi chipsets may have more trouble with this.
It's definitely there and happening.
> To be fair anything anti-apple is a quick way to get clicks.