677 points · by ivank · 4y ago · 172 comments
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.
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.
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.
I'm glad I stopped using Apple stuff 10 years ago, their macs are gradually devolving into iDevices.
[0] https://github.com/moonlight-stream/moonlight-qt/issues/159#...
Gonna try turning off all my Mac devices location services, thanks for the tip.
I agree that it's not a good default to have an app doing this, though.
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.
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.
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
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-...
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.
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?
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.
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 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 :)
But I only used macOS since 10.2, never used classic.
It's something I would expect Apple to have taken advantage of though, as they own both the hardware and the software.
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.
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.
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).
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/ ?
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.
Could just be a bug that has been fixed already.
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.
I however, cannot setup that environment right now.
> To be fair anything anti-apple is a quick way to get clicks.
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.