[HN Gopher] Apple Maps location scan spikes WiFi latency every 6...
___________________________________________________________________
Apple Maps location scan spikes WiFi latency every 60 seconds
Author : ivank
Score : 640 points
Date : 2022-05-12 16:56 UTC (1 days ago)
(HTM) web link (twitter.com)
(TXT) w3m dump (twitter.com)
| whazor wrote:
| Best is to disable location services, which results into multiple
| disadvantages:
|
| - 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
| pabs3 wrote:
| Why do network scans spike latency? Seems like a WiFi firmware
| bug to me. I wonder if it happens with open source WiFi firmware
| like ath9k_htc.fw
|
| https://github.com/qca/open-ath9k-htc-firmware
| op00to wrote:
| Wifi chipsets can't scan networks and do regular wifi-y stuff
| at the same time.
| kalleboo wrote:
| That seems odd, when they can connect to 2 networks at the
| same time
| octoberfranklin wrote:
| Only if either (a) both networks use the same channel or
| (b) the networks use different bands (i.e. one is 5ghz and
| the other is 2.4ghz).
|
| 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).
| kalleboo wrote:
| This is really interesting so I did an experiment.
|
| 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)
| octoberfranklin wrote:
| It does not.
|
| 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."
| pabs3 wrote:
| Which ath9k card did you get?
| octoberfranklin wrote:
| A very obscure module used inside of smart TVs, for a
| number of reasons -- one of them being the fact that it has
| exposed serial console pins.
|
| 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.
| alaricus wrote:
| That can't be good for the battery life.
| nojito wrote:
| The default battery claims have location services turned on.
| ComputerGuru wrote:
| I don't think this does anything if maps isn't running?
| urbandw311er wrote:
| Interestingly, when I went to Security Preferences there
| was an icon to show that Apple Maps had used my location in
| the last 24 hours. This is in spite of almost _never_ using
| Apple Maps on my MacBook, and certainly not in the last
| month. So this smells like some sort of background daemon
| or similar.
| KennyBlanken wrote:
| Hmm.
|
| 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?
| ComputerGuru wrote:
| While some platforms go through the Maps app to get the
| location, under macOS/iOS there's the locationd daemon
| that provides the location independently of any app.
| There, Maps is just a locationd consumer just like any
| other app requesting a location so Maps _shouldn 't_ be
| invoked in the background by non-Maps stuff. But perhaps
| Maps has a timed trigger to background update your cached
| location (so it can open up to the correct startup
| location instead of locating you after startup) or
| something similar.
| defen wrote:
| Is this the "weird WiFi latency on Mac OS" thread? I've got a
| WiFi network with a MacBook Pro (running 11.6 because I hate
| upgrading) and a System76 linux box (as well as lots of other
| devices). Both of the machines can ping a google dot com server
| (which is approximately 150 miles away, going by the hostname)
| consistently in the 8-12 ms range.
|
| 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.
| bemmu wrote:
| I see system_profiler doing a scan when I gather the logs. Is
| that just the logger itself doing something, and if not is there
| a way to find what it invoking system_profiler?
| phineyes wrote:
| It's not just Apple Maps either! Even with location services
| disabled, try opening AirDrop (even on another device you own)
| while running a ping and you'll see your en0 device's latency
| spike, while Apple tries to divide traffic between awdl0 and en0.
| rootusrootus wrote:
| I cannot replicate this on my M1 MBP running 12.3.1.
| can16358p wrote:
| Same. Have been trying for minutes with the same software
| running and on Wi-Fi. All pings around 4ms with no spikes at
| all.
| acchow wrote:
| Same. Not able to replicate on M1 MBA
|
| Aren't modern Wifi chips capable of holding two simultaneous
| connections (one for wifi, one for wifi-direct/Airdrop)?
| fragmede wrote:
| This happens on my M1 Macbook Air running 12.0.1 and is
| extremely evident when playing games on Stadia, unless location
| services is disabled.
| diebeforei485 wrote:
| Why are you still running 12.0.1?
| tda wrote:
| I noticed this too when I used steam to stream a game to my
| laptop over good wifi. Every minute it would stutter for a
| second. I set up iperf3 tests and noticed the wifi lag increasing
| every minute between my macbook and my server and between my
| windows desktop pc and my server (when connected over wifi). Of
| course no lag when using cables, so I reasoned it was wifi
| related, and had noting to do with my setup (I used different
| clients, and different AP's). I then took my macbook (only
| portable computer I had) it too a nearby coffee shop with good
| wifi and I could still measure lag spikes every minute. So then I
| was really puzzled, was there some rogue device interfering with
| wifi all over the neighborhood? Finally I found a suggestion to
| turn off location services (or whatever it is called), and the
| spikes disappeared. And I learnt that even when it is not used
| (not sure it the lid was closed) a macbook can cause significant
| interference to the wifi for all other nearby devices.
| 867-5309 wrote:
| if you have the wherewithal to use iperf then why not wireshark
| too? it's probably actively sniffing surrounding wifi frames to
| feed back to its proprietary version of WiGLE.net under the
| guise of super helpful "location based services"
| tomxor wrote:
| > And I learnt that even when it is not used (not sure it the
| lid was closed) a macbook can cause significant interference to
| the wifi for all other nearby devices.
|
| 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.
| Abishek_Muthian wrote:
| Yesterday my home DNS weren't resolving and noticed on PiHole
| that there were >30,000 requests of *.in-addr.arpa (Reverse
| DNS Lookup) from the iPhone+iPad of the guest to whom I gave
| the WiFi access and was saturating the Pi's CPU. I re-enabled
| rate limiting on PiHole and blocked the request with a
| filter.
|
| 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.
| code_duck wrote:
| My understanding is this is an issue with new features of all
| sorts of laptop/desktop devices.
|
| 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.
| tomxor wrote:
| I own an XPS, it runs Debian, it only installs updates when
| I tell it to.
|
| 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.
| alimov wrote:
| Yeah it might be unwanted behavior for your particular
| setup. Personally, on macOS and windows, I would prefer
| not to be at the computer when an update occurs - I also
| dont want to have to go do something else while I wait
| for the update. Just feels like a waste of time in my
| opinion. However, if I had reason to care about an update
| or the changes it was introducing I too would not want
| background updates running when I put my machine to
| sleep. I guess for an average user updating when the
| machine is not in use is a feature, while for the tech
| crowd that kind of behavior can mess with your preferred
| setup.
| beowulfey wrote:
| Running updates are only a problem on Mac or Windows.
| Updates on the different linux flavors I've used take
| fractions of the time, are unobtrusive (I can continue to
| do work), and as a bonus, never fail to make my aging
| self feel like a technoir hacker with all that rapidly
| scrolling text. It's all whole different ball game.
| danieldk wrote:
| Different user groups, different priorities. I had a
| colleague who was a seasoned C hacker and long-time Linux
| user (but not someone who'd be very interested in how a
| Linux distribution or package manager works). Their
| Ubuntu system indicated that there were updates. So, they
| started the update. However, it was taking too much time
| and they wanted to go home, so they shut down the machine
| during the update. Unfortunately, it left the system in a
| bad, (IIRC) unbootable state and the local sysadmin had
| to spend an hour to get the system in a consistent state
| again.
|
| 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.
| beowulfey wrote:
| That's a good story. I thought apt can usually recover
| from incomplete updates, but maybe it was in the middle
| of a kernel or bootloader update or something when power
| got killed.
| tomxor wrote:
| > 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.
|
| 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.
| tharkun__ wrote:
| I always assumed it was smart enough though _not_ to do
| it when it 's on battery as it is very likely that the
| device is also in a confined space, such as a laptop
| backpack waiting for the trip to the office next morning.
|
| 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.
| alimov wrote:
| I think macOS has a minimum battery charge requirement
| that has to be met before an update occurs in the
| unplugged scenario.
| emkoemko wrote:
| people on linux wait for updates? i thought that was a
| thing only for mac and windows... never noticed or seen a
| update screen on linux unlike the Windows nightmare where
| it would even kick you out of your work to do a damn
| update
| alimov wrote:
| Don't know what people on Linux do, I only referenced
| macOS and windows.
| danieldk wrote:
| _people on linux wait for updates?_
|
| 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/
| emkoemko wrote:
| just checked how Fedora does it... it just downloads the
| updates and when you shutdown it installs them for you
| before it finally shuts down, doesn't seem as bad and not
| how you said it was.
| Schroedingersat wrote:
| Or do. Then get refund when it cooks itself and buy a
| computer you own.
| zitterbewegung wrote:
| Dunno if the new MacBook Pro M1 Pro / Max are more
| thermally efficient or that they don't start back up in a
| bag but I've left mine in sleep in a sealed bag and it
| wasn't warm to the touch at all.
| pegasus wrote:
| Did you have auto-update on?
| zitterbewegung wrote:
| Yes
| pegasus wrote:
| There probably were just no updates available at the
| time.
| zitterbewegung wrote:
| Considering I'm on the beta channel because I have dev
| account I don't think that's true.
| edb_123 wrote:
| I have had this issue with Thinkpads as well. The solution
| was to make sure to unplug the AC power adapter _before_
| putting it to sleep and putting it in my bag. Else it would
| go to sleep thinking that it 's still on AC power, and
| happily wake itself up to install updates while in my bag.
| If power was disconnected _after_ putting it to sleep, it
| would not be able to know it was on battery power.
| astrange wrote:
| https://support.apple.com/guide/mac-help/turn-power-nap-
| on-o...
| tomxor wrote:
| Tried it, didn't work, I also dug out the old pmset command
| but it seems to have been neutered.
|
| I'm glad I stopped using Apple stuff 10 years ago, their
| macs are gradually devolving into iDevices.
| astrange wrote:
| Sleep isn't any different than it used to be.
|
| "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.)
| IAmEveryone wrote:
| they already mentioned why it was awake: downloading
| updates.
|
| ...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)
| hoten wrote:
| Wow, I guess this is also why my local steam streaming (well, I
| use Moonlight but same difference) started lagging out of
| nowhere. I first noticed it 2 days ago, but before that I
| clocked 30 hours no problem, so I guess this is a brand new
| problem.
|
| Gonna try turning off all my Mac devices location services,
| thanks for the tip.
| [deleted]
| tda wrote:
| This was a few years ago on a 2015 MBP running Catalina or
| whatever came before that. My guess is the adaptive bandwidth
| algorithm acutely switches to a lower bandwidth due to the
| lag spike, and then slowly recovers in the ten seconds after.
| And then 50 seconds later it starts over again. I suspect if
| I could have manually set the streaming quality to a fixed
| value the lag spike would hardly not be noticable at all, but
| the constant switching of the stream quality is what actually
| caused chopiness. Same might be the case with the OP's zoom
| calls
| draebek wrote:
| People doing game streaming might be interested in this bug in
| the moonlight-qt repo that discusses people having this same
| problem, including various fixes: https://github.com/moonlight-
| stream/moonlight-qt/issues/159
| trafficante wrote:
| Can confirm that the scripts posted itt by vJan00 [0] solved
| the stuttering problems that were plaguing me 4-5 months ago.
| Didn't bother setting up a cronjob; I just toggle it on/off
| as needed.
|
| [0] https://github.com/moonlight-stream/moonlight-
| qt/issues/159#...
| ncann wrote:
| On Windows, there was an infamous Qt bug that also caused regular
| ping spike, so check it out if you have the issue and you also
| happen to be using a Qt program:
|
| https://bugreports.qt.io/plugins/servlet/mobile#issue/QTBUG-...
| brohoolio wrote:
| I've seen this sporadically. A reboot clears it for me. I
| probably spent a good hour trying to figure out if it was my ISP
| or router. Improve your QA Apple
| jokoon wrote:
| Other anecdote: I have a thinkpad L450, and randomly during the
| day, the wifi firmware just "crashes" and disable itself, and
| needs to be reset via the "troubleshoot" dialog in windows 10.
|
| It's quite annoying, and I can't really think of why it happens.
|
| I wonder if radio interference might be a cause.
| Angostura wrote:
| Silly question - but does this problem occur only when Maps is
| running? Or is there a background daemon doing this stuff?
|
| I've never had this problem on my iMac
| boesboes wrote:
| So I've tried this and cannot reproduce anything like it. Yes,
| when I tell Macos to scan for network, there is a short latency
| spike, as can be expected. But _only_ when I open up the networks
| menu.
|
| 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 ;)
| goodoldneon wrote:
| Location services in general seem to cause latency spikes for me.
| I just disabled the feature altogether
| gernb wrote:
| Is this why Airplay no longer works? As of MacOS 12.3 when I
| AirPlay from M1 to AppleTV every ~2 minutes it drops to ~1fps for
| ~30 seconds.
| wintermutestwin wrote:
| Look into issues with Dolby Atmos on AppleTV and your soundbar.
| robbomacrae wrote:
| As a means to keeping this feature on when out in public, but not
| have it cause latency spikes at home, is it possible to configure
| the router to block these requests from location services? Or do
| we need to setup each device to automatically disable location
| services when on the house wifi?
| lxgr wrote:
| Wifi positioning does not actively talk to the network you're
| connected to, but rather does a beacon frame sweep and then
| matches BSSIDs seen with some database.
|
| 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.
| a-dub wrote:
| lol. i wonder if it's quietly popping the nic out of the
| associated state, quickly scanning for aps and then jumping back
| where it left off without telling userland or the remote ap that
| anything happened...
| qwertywert_ wrote:
| Background scanning is a normal WiFi feature, you don't break
| association state when doing this. It is required for regular
| and fast roaming.
|
| 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.
| a-dub wrote:
| interesting. so they just switch it on even when the signal
| is strong.
|
| > 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/ ?
| dpcx wrote:
| I just tried this myself and can't replicate on a 2019 i7 running
| Big Sur. I wonder if it's related to the number of Wifi networks
| in range (mine is the only one)... Also, the Apple Maps thing
| didn't seem to change anything for me, either.
| foobarian wrote:
| Environment can have huge impact on this. With a larger number
| of devices, there could be more collisions, increasing traffic
| more than linearly, and then in case of scanning traffic, the
| modulation used would likely be the lowest available which
| means the packets take up a lot of wall clock time. So a
| broadcast storm with collisions, retries, at the lowest bitrate
| = brief outage.
| altairprime wrote:
| How many saved wireless networks do you have?
| londons_explore wrote:
| It's 2022. Apple should just have a separate WiFi radio for
| location scans.
| Nextgrid wrote:
| I wonder why they keep rescanning the wifi environment even
| though the fact that it remains connected to the same BSSID and
| the RSSI doesn't fluctuate too much should suggest that it's very
| unlikely the device moved far enough to warrant another scan.
| tedunangst wrote:
| locationd probably wasn't tracking that state. Maybe now it is.
| judge2020 wrote:
| I imagine they have to handle the scenario where you're
| connected to a mobile access point and can't assume that 0
| movement means you're in the same physical location. Watching
| other APs is going to provide a better picture.
| TSiege wrote:
| portable wifi? edge case, but its possible this was the fix for
| it
| IAmEveryone wrote:
| What's the newest Wifi standard? ax? Anyway: it's quite...
| something? My standard router runs four different networks on
| two different IDs and if I understand it correctly, the fasted
| frequencies are subject to occasional use by... my local
| Patriot air defense system(?) which it needs to occasionally
| check for.
| paranoidrobot wrote:
| > the fasted frequencies are subject to occasional use by...
| my local Patriot air defense system(?)
|
| 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.
| Bud wrote:
| You're forgetting how sensitive this location detection is,
| these days. Let's say you are moving in a direction roughly
| parallel to the circle carved out by a given signal strength.
| You could move quite a long ways without RSSI fluctuating much.
| Zelizz wrote:
| My anecdotal experience (partially informed by working on the
| Windows Wi-Fi team) is that iOS/macOS are more aggressive about
| switching APs. It's a tradeoff - on one hand, you can have
| disruptive scans like this, but on the other, if it results in
| switching to a better network during a long period when the
| user is stationary, it can result in a better experience.
|
| 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.
| not2b wrote:
| "better experience" only if you aren't doing something
| latency-sensitive, like a video call.
| Gigachad wrote:
| Video calls aren't hyper latency sensitive, there is
| already a lot of latency in encoding and processing
| effects. I'd imagine this could be most disruptive to video
| games but this isn't a market Apple has done much to work
| with.
| gsich wrote:
| 1% packetloss is audible.
| [deleted]
| spookthesunset wrote:
| Maybe it wasn't a problem worth fixing at the time? Maybe
| they'll do exactly this in future versions of the location
| finder stack.
|
| 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?
| GekkePrutser wrote:
| Ok that sucks. If they do a scan, at least use the radio that's
| not in use so it doesn't affect the one communicating (e.g. use
| 2.4 Ghz when you're connected on 5).. That would be a good way to
| avoid this latency hit.
|
| 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.
| judge2020 wrote:
| > Ok that sucks. If they do a scan, at least use the radio
| that's not in use so it doesn't affect the one communicating
| (e.g. use 2.4 Ghz when you're connected on 5).. That would be a
| good way to avoid this latency hit.
|
| Is this possible? Or is AP scanning perhaps always over 2.4?
| JoeAltmaier wrote:
| Often the antenna is shared - its a relatively large physical
| thing. And it can't really be shared except time-shared I
| believe.
| GekkePrutser wrote:
| The frequencies are different enough for it to be possible
| technically. The same way mobile phones can be active on
| multiple bands at the same time. But indeed the used chipset
| may not support it.
|
| It's something I would expect Apple to have taken advantage
| of though, as they own both the hardware and the software.
| cmckn wrote:
| > Apple's annoying tendency to keep an app running when you
| close the last window
|
| 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.
| daveidol wrote:
| Yeah, I think OP is right that this behavior is confusing
| _for Windows users_ , but as a longtime macOS user I don't
| find it confusing or problematic at all.
| GekkePrutser wrote:
| I'm more a unix user than a Windows user. I use pretty much
| all current OSes (including Mac and Windows) on a daily
| basis but FreeBSD is my daily driver. I think macOS is
| pretty unique in this regard (as well as being the only
| that use Meta-C / Meta-V for copy/paste, something that
| still bites me every day as I switch between OSes :) ).
|
| But I only used macOS since 10.2, never used classic.
| saltminer wrote:
| Classic was the same. On older systems, I think it was a
| good idea, given the speed of hard drives back then. With
| SSDs, the performance gains from keeping unused programs
| alive are far lower, but at the same time, RAM is far
| more plentiful, so it comes at a much lower cost.
| Ruphin wrote:
| I had the same issue with copy/paste on MacOS, until I
| couldn't stand it anymore and used software to remap the
| keys. I swapped the builtin Fn, Ctrl, and Meta keys
| around so they are positioned like you'd expect on a
| normal keyboard (and a normal OS), and it instantly fixed
| my issues without any other negative side effects aside
| from having to learn another key combo for Ctrl-C in
| terminals.
|
| 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...
| GekkePrutser wrote:
| Thanks, I'll give that a try!
| rswail wrote:
| Considering Apple added the Command [?] key in _1984_ and
| the original cut /copy/paste as being command-x/c/v, it's
| more like the others didn't follow convention at the
| time.
| GekkePrutser wrote:
| Not just Windows though. *nix also.
|
| 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 :)
| hamter wrote:
| it's location services, not apple maps.
| hotfixguru wrote:
| This have happened since 12.3.1 at the office for me (not at home
| though). Hope this resolves it.
| kylecordes wrote:
| I noticed this when using a meeting/streaming tool that detected
| these bits of latency and went in to a degraded mode, even with
| abundant bandwidth available.
|
| 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.
| daneel_w wrote:
| A bit of a clickbait-y tweet. Exact same thing happens with any
| OS and Wi-Fi device when briefly scanning for surrounding access
| points. In the case of my setup (2017 MacBook Air running
| 10.15/Catalina) the penalty seems forgettable - avg. ping jumps
| from 2 ms to 25 ms during 1.5 seconds, on 802.11n/5GHz with about
| 20 other 2.4GHz/5GHz access points in my vicinity. My Asus
| ZenBook running Linux Mint and equipped with Intel Centrino Wi-Fi
| suffers a lot more from the same procedure.
| causi wrote:
| Why would someone program an OS to do this when it's already
| connected to an access point? This is like me eating a sandwich
| and stopping mid-chew every minute to check the fridge.
| amarshall wrote:
| Reason one is that one doesn't generally connect to an access
| point (BSSID), but rather to a an SSID. That SSID may have
| many access points, as the device may roam. Periodic scans
| check to see if another access point for the same SSID is now
| a better choice, and switch accordingly. On Linux,
| configuring the connection to a specific BSSID generally
| disables periodic scans.
|
| 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.).
| necovek wrote:
| A moving wifi AP wouldn't really help with establishing a
| location, since it's, well, non-stationary :)
|
| 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.
| spookthesunset wrote:
| > Reason one is that one doesn't generally connect to an
| access point (BSSID), but rather to a an SSID. That SSID
| may have many access points, as the device may roam.
| Periodic scans check to see if another access point for the
| same SSID is now a better choice, and switch accordingly.
|
| 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...
| sleepybrett wrote:
| Because on devices with only WIFI the only way to give you
| 'GPS' like data is to scan for nearby wifi access points.
| There are several big databases in the sky that know about a
| great many Access Points and when your laptop says 'i see
| these 10 APs with this amount of signal' it can figure out
| where you are.
| outworlder wrote:
| It's not really forgettable if any app can request a scan at
| any time - collect wireless logs, then start the Maps app, you
| will see repeated scans. Locationd doing this ever so often
| might be acceptable, but not when any app can do this,
| repeatedly.
|
| 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.
| daneel_w wrote:
| A 750-1000 ms increase would be disturbing, but a 20 ms round
| trip increase for a brief two seconds is entirely
| forgettable. It's nothing. It (and more) happens all the time
| between you and practically any destination out on the
| Internet as part of normal traffic/congestion patterns.
| lscpike wrote:
| I discovered this exact problem over lock down 2020. My Teams
| calls would freeze every 60s.
|
| 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.
| [deleted]
| herpderperator wrote:
| This is normal across all wifi clients; they can't scan for
| networks and transfer data simultaneously so there will always be
| increased latency during that event. You can test this yourself
| by doing a low-interval ping and clicking the wifi icon to show
| you nearby networks - you'll notice a brief latency spike.
|
| I agree that it's not a good default to have an app doing this,
| though.
| motrm wrote:
| This may not always be the case, fortunately! I recall the
| Broadcom Wi-Fi 7 chipset announcement[0] in April mentioned a
| dedicated scan core which may well offload the network searches
| to a separate part of the chip, freeing the AP connectivity
| core(s) from having to do other tasks for a second or two each
| minute.
|
| Here's hoping it works as I understand it and other chipsets
| start doing similar things!
|
| [0] https://news.ycombinator.com/item?id=31060452
| userbinator wrote:
| To do passive scanning you need to "be quiet" for
| sufficiently long to pick up beacons from other stations, so
| that is unlikely to help.
| cmeacham98 wrote:
| Because wifi is shared via time slicing don't you have to
| be quiet part of the time anyways?
| dijit wrote:
| Surely you can't use the same antennae for two different
| operations at the same time...
|
| The noise would be unsalvageable and you would lose packets,
| surely.
| carlhjerpe wrote:
| I mean background scanning only has to be a read operation,
| shouldn't that make it simpler?
|
| 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.
| GekkePrutser wrote:
| On different bands you can with basic filters. On the same
| band it would admittedly be tough (unless the band is super
| wide like the 6E band). It is done by radio repeaters for
| example but they do need big bulky filters, that kind of
| thing would not work on a laptop. But it is possible to
| transmit and receive on the same antenna at the same time,
| it's not a technical limitation. You just need a good
| enough filter.
| rasz wrote:
| Supporting 802.11g means scans are send at 1Mbit. 802.11a
| bumps it to 6Mb/s, so not much better. This means that every
| time you want to send a beacon you have a pause equal to the
| duration it takes to send a packed at 1-6Mbit, not to mention
| scanning all the channels.
| mmwelt wrote:
| What helped me was not using a hidden SSID. Apparently, with
| hidden networks, the computer has to actively probe for the
| network, but passive probes don't affect latency as much.
| gsich wrote:
| Passive scans would be possible.
| RicoElectrico wrote:
| Solution for Windows (replace interface name as needed):
| 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.
| causi wrote:
| Is there a way to configure Windows to only scan for networks
| when it isn't connected to one?
| wnevets wrote:
| or change how often it scans
| MauranKilom wrote:
| Still have two .bat scripts (on/off) on my desktop from a
| time when I only had wifi. And it still baffles me that such
| measures can be necessary.
| ncann wrote:
| I used to have constant ping spike at regular interval and
| had to do that bat script thing, which fixed it but it was
| really annoying. Eventually I figured out it was because of
| a Qt bug in the Qt lib that an application running in the
| background is using, and there is a system property to
| disable that behavior.
|
| https://bugreports.qt.io/plugins/servlet/mobile#issue/QTBUG
| -...
| r1ch wrote:
| If you have an Intel WiFi card, there's a driver setting
| "Global BG Scan Blocking" to never scan if you already have a
| good signal. Works great
| xen2xen1 wrote:
| I always try to have Intel nics of all kinds, so thanks.
| not2b wrote:
| But if the laptop is currently connected to a WiFi network with
| a known location, what's the point of scanning for networks to
| locate it? You already know that you're within range of a known
| spot.
| saltminer wrote:
| Roaming. Although a desktop might not usually be moving while
| it's on, a laptop user might move around the house,
| conference room, or lecture hall, and switching APs could
| result in a stronger signal. It's better to switch before
| your signal gets weak/drops to minimize disruptions during
| BSS transitions.
|
| 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.
| bschne wrote:
| ,,Within range of one network" doesn't give you as much
| information as ,,all these networks are visible and here's
| how strong they look from where you are"
| bonestamp2 wrote:
| True, but is that precision worth the hit to latency...
| especially if you're trying to do a voice and/or video
| call? I doubt it's worth the tradeoff most of the time.
| lelandfe wrote:
| How often are folks in meetings, connected to WiFi, and
| opening up the WiFi connections list to hunt for other
| networks?
|
| I'm frankly surprised that the author of these tweets
| encountered this at all, much less was so annoyed by it
| as to troubleshoot.
| bonestamp2 wrote:
| > opening up the WiFi connections list to hunt for other
| networks?
|
| 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.
| gsich wrote:
| All the time.
| not2b wrote:
| Not just within range, connected to. Meaning you're close
| enough to have a strong signal. If it isn't a strong signal
| this can be detected and the system could scan in that
| case, looking for a better one.
| theptip wrote:
| It's good to know. I suppose the unintuitive part is that
| "location" means "Wi-Fi scan". Makes sense for a laptop when
| you think about it but I wouldn't have thought of this as the
| first thing to check.
| 13of40 wrote:
| It's kind of a weird situation we're in with this. Facebook
| and Google track your location by default and you can go back
| and look where you've been on a map. I used it to figure out
| the details of an automated traffic ticket I got on a trip to
| Europe a couple of years back, so it's not totally useless
| from a consumer perspective, but it's still creepy. So you
| opt out, but "location services" keeps tracking you and
| sending your location data (as represented by the SSIDs and
| signal strength around you) but not telling you you're being
| tracked. So you opt out of that, and all the sudden you're
| subject to a bunch of dark patterns insisting you need to
| enable it again, even though it's perfectly capable of just
| using the GPS and keeping everything on the client. I'm glad
| my life isn't interesting enough for it to matter, I guess.
| culturestate wrote:
| _> the unintuitive part is that "location" means "Wi-Fi
| scan"_
|
| 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.
| Gigachad wrote:
| > I don't know the proper terminology here, bootstrapping?
|
| 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
| carlhjerpe wrote:
| I'm thinking that my devices could have an offline list of
| known WiFi mac-addresses from when it's checked GPS before
| and return those for very accurate results without scanning
| anything.
| [deleted]
| captainredbeard wrote:
| Kids, this is why you should randomize when clients check in if
| your model allows it.
| urda wrote:
| I cannot replicate this, I believe the twitter use got hooked on
| a red herring here. To be fair anything anti-apple is a quick way
| to get clicks.
| mhh__ wrote:
| Anything apple (both ways) is a good way to get clicks on
| hackernews at least.
| pessimizer wrote:
| It's a lot better than it used to be, when every Daring
| Fireball entry stayed on the front page for days.
| urda wrote:
| This is also true!
|
| 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.
| leodriesch wrote:
| The screenshots are from a version before the Big Sur visual
| refresh, so at least 2 major versions behind the current
| release.
|
| Could just be a bug that has been fixed already.
| outworlder wrote:
| I saw infrequent scans from locationd, every few minutes.
| Until I opened the Maps app, that is. Then it started
| triggering frequent scans.
|
| 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.
| urda wrote:
| I did not realize this / check this. I had made the
| assumption of latest macOS and-what-have-you.
|
| I however, cannot setup that environment right now.
| urda wrote:
| Downvotes because another user disagreed with a tweet after
| they made a fair attempt to reproduce the issue? That's not the
| spirit of HN.
| Dylan16807 wrote:
| You got downvotes for being wrong about the issue being real.
| You get credit for attempting a test but your personal test
| failed. Oh well. A few downvotes in that case are normal and
| fine.
| cmeacham98 wrote:
| Don't play dumb, you're receiving downvotes because you
| implied OP was lying:
|
| > To be fair anything anti-apple is a quick way to get
| clicks.
| ActionHank wrote:
| I've seen this myself, turning off location services solved the
| issue for me.
|
| It's definitely there and happening.
| chomp wrote:
| Seconded, this is definitely a thing.
| op00to wrote:
| Thirded, my game streaming got way better when I turned off
| location services.
| daverstam wrote:
| This has been an issue for at least over a year.
|
| 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...
| alophawen wrote:
| Please read the article you are commenting on. In it, they
| identify the cause and lay out a solution. The solution is not
| to botch your macbook by disabling core components as AWDL
| (disabling it will break airplay, handoff and other).
| daverstam wrote:
| Not sure why you assumed I did not read the article. Anyway I
| just wanted to point out that this has been and still is an
| issue recognized by Google Stadia and others.
|
| 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.
| can16358p wrote:
| I'm on Wi-Fi on my MacBook (Pro 16" 2021). I opened Maps.app
| (which gets my location correctly), started pinging my router,
| it's been a few minutes...
|
| No spike. It must be occuring at _some_ corner case, not for
| everyone.
| rob_c wrote:
| Great hardware with some crazy choices on top... at least the old
| intels use 3x antennas
| tonymet wrote:
| i became obsessed with mtr. your ping latency and variance is a
| better indicator of vc quality
| tedunangst wrote:
| I like that the first reply is to switch from zoom to google
| meet. Very helpful.
| jedisct1 wrote:
| But no one said "you should rewrite it in Rust" yet.
| carlhjerpe wrote:
| I reckon that'd be because it isn't relevant to the topic at
| all. I'd say most things that advertise written in Rust is
| because it's a valid upside, not all but definitely most.
| nvr219 wrote:
| I set up automation to prompt me to turn off WiFi when I leave
| the house.
___________________________________________________________________
(page generated 2022-05-13 23:02 UTC)