News for hackers. Stuff that matters.
Re:AirPlay and Touch Bar = Network Disaster by herpderperator on Saturday June 11, 2022 @02:17PM (#31706738)
I ran into this the other day and did a video about it - not the best quality video but shows it happening in realtime with analysis and commentary: https://www.dropbox.com/s/hra2uxx66kf7z0j/PXL_20220609_21480...

The cause in this case was AWDL (Apple Wireless Direct Link.) Holding the Option key while clicking the Wi-Fi icon and clicking "Enable Wi-Fi Logging" and then checking /var/log/wifi.log will show AWDL scans starting and ending randomly, and when the scan is active it causes latency spikes every 1s like clockwork. Unrelated to AWDL, but if a process is requesting a Wi-Fi network scan (different from an AWDL scan), /var/log/wifi.log will also tell you the name of the process, such as "locationd" when the Location Service needs your location. (Tangential, but the locationd process rarely causes these latency spikes for me - on a default macOS install it very rarely requests scans in my experience, backed by my analysis of the log.)

AWDL has to be used for things like AirDrop, so it's expected to have this latency increase while you have the AirDrop window open scanning for nearby devices / sending files to other devices. There are other uses of AWDL (AirPlay, Auto Unlock, Universal Clipboard at the very least)[0], but I don't know what was triggering it so actively in my case... and why it wasn't happening on my M1 Air. It also wasn't always happening in the background like this, it just started that day.

The "fix" was to disable the awdl0 interface, but that may also cause AirDrop/AirPlay and related services to not function (I did not test.) It's easy to re-enable it though.

To disable: ifconfig awdl0 down

To enable: ifconfig awdl0 up

Upon disabling, the latency spikes go away permanently.

[0] https://owlink.org/wiki/

Re:AirPlay and Touch Bar = Network Disaster by saagarjha on Saturday June 11, 2022 @02:33PM (#31706899)
There’s a ton of things on macOS that just randomly start network scans and just destroy Wi-Fi performance. I helped Martin find on in the post, but personally I dealt with another one for several months on my own computer and eventually just gave up. I just went ahead and rewired my house with MoCA and now I get the speeds I was looking for, continuously and without the hassle, whenever I’m at my desk. I’d recommend everyone else to do the same, honestly. (Unless you’re at Apple. Then you should not do this and instead send in Radars when your network performance drops.)
Re:AirPlay and Touch Bar = Network Disaster by giantrobot on Saturday June 11, 2022 @02:43PM (#31706993)
> (Unless you’re at Apple. Then you should not do this and instead send in Radars when your network performance drops.)

Which unfortunately will get moved to NMOS/Future with a P6 priority and ignored forever. At best it'll get sent back to you "for more details". If you play the game an attach logs and investigation it'll get filed make into a black hole milestone or closed as a duplicate. There's a cabal that seems to only want new features and never tackle existing bugs in the OS.

Re:AirPlay and Touch Bar = Network Disaster by exikyut on Saturday June 11, 2022 @04:18PM (#31707940)
> There's a cabal that seems to only want new features and never tackle existing bugs in the OS.

Huh. That sounds strikingly similar to the culture breakdowns I've observed be associated with Google - the whole focus on newness and landing features in the name of solving hard problems, as opposed to maintaining stuff. Apparently the feedback/peer review/bonus system is completely broken.

...Maybe this sort of scaling problem is a "$T+ market cap" thing that we've just never had to figure out before?

Re:AirPlay and Touch Bar = Network Disaster by giantrobot on Saturday June 11, 2022 @05:12PM (#31708463)
With Apple there's a pathological need to release new devices and OSes on a yearly cadence. Landing a new feature rewards middle management and the top quintile of ICs with cash/stock bonuses and reflects on their end of year review. Fixing bugs does not get those rewards so there's little incentive to fix old bugs that 1) don't prevent a new feature's implementation or 2) aren't called out in a security release.

> ...Maybe this sort of scaling problem is a "$T+ market cap" thing that we've just never had to figure out before?

I don't know in all honesty. I'm sure part of it has something to do with the fact these companies have billions of customers. It's a mind numbing number of users. Even a single percentile change in the number of customers or revenue per customer makes for huge revenue differences. So given a finite amount of developer effort, a new feature which is likely to increase revenue is incentivized over a stupid AirPlay bug that isn't likely to increase revenue.

Re:AirPlay and Touch Bar = Network Disaster by joshspankit on Sunday June 12, 2022 @09:16AM (#31714240)
The market responds to newness, and if you can sweep issues under the rug you get two very lucrative demographics:

1) Customers who barely do anything with their devices and therefore never have issues

2) Fans who experience issues, but accept them as a bump in the road towards the dream they’ve been sold

And this is at a cost-savings: less in R&D (because you can patch in-field), less in maintenance hours, and less opportunity cost for having “10x” devs do that maintenance.

There’s also a fear-based reason for companies to chase features: they worry that the market will see them as stagnant and see the competitors as exciting.

Re:AirPlay and Touch Bar = Network Disaster by throwawayFanta on Saturday June 11, 2022 @06:11PM (#31708965)
It depends on if that aligns with your management's views. In aws, ive seen teams spend some effort on keeping their backlog low (but no zero) since if it balloons out of control you know you're gonna get called out on it.

i recall a team that had all its feature releases struck down for the coming year so they would work through their backlog.

Opinions are my own, bla bla bla

Re:AirPlay and Touch Bar = Network Disaster by kitsunesoba on Saturday June 11, 2022 @03:13PM (#31707318)
Do you know if the grade/power of wireless router makes any difference for this?

I've not had too much issue with wifi performance with several Apple devices on the network, but my wireless router is also a fairly high end consumer model and probably not at all representative of the average.

I do still intend to figure out some sort of hardwiring solution (maybe MoCA, but man those boxes are expensive) but the performance of wifi in the interim has been good enough for it to not be pressing.

Re:AirPlay and Touch Bar = Network Disaster by sgtnoodle on Saturday June 11, 2022 @05:23PM (#31708563)
Intel and Qualcomm wifi chipsets have some secret sauce in them that make them better than Realtek, Ralink, etc. I haven't personally tested Broadcom, so I don't know where they fall. In low congestion environments it doesn't matter, but in high congestion environments they work better. Basically, Intel and Qualcomm chipsets are better able to receive frames successfully even when there's a collision.

Transmit power doesn't matter in that more isn't necessarily better. Same for antenna gain. They are variables you can change if you know you have a specific problem that would be solved by it. That's hardly ever the case, though.

Why not just hardwire CAT6? MoCA is nice if you already have the coax, but otherwise it seems silly to put in.

Re:AirPlay and Touch Bar = Network Disaster by kitsunesoba on Saturday June 11, 2022 @05:41PM (#31708698)
> Why not just hardwire CAT6? MoCA is nice if you already have the coax, but otherwise it seems silly to put in.

My house is already wired with unused coax. I’d prefer CAT6, but don’t know how involved doing that would be. I need to figure out if there’s wiring conduits in the walls, for example.

Re:AirPlay and Touch Bar = Network Disaster by saagarjha on Saturday June 11, 2022 @03:27PM (#31707451)
I have a pair of Google Wi-Fis that aren’t particularly powerful, for reference.
Re:AirPlay and Touch Bar = Network Disaster by jrowley on Saturday June 11, 2022 @03:07PM (#31707242)
I wasn't familiar with MoCA. Seems like a lot of the advantages of power line networking, but higher throughput / reliability I imagine. Thanks for the tip!
Re:AirPlay and Touch Bar = Network Disaster by saagarjha on Saturday June 11, 2022 @03:28PM (#31707456)
Yep, MoCA gives me a gigabit+ backbone which is definitely more than my ISP gives me :)
Re:AirPlay and Touch Bar = Network Disaster by zrail on Saturday June 11, 2022 @02:43PM (#31706994)
For anyone else reading this, the one tip I have is to reorder your network interfaces to put your wired interface first. There's a three-dot menu somewhere in the network panel to do so. macOS will use the first active interface and ignore the rest.
Re:AirPlay and Touch Bar = Network Disaster by nier on Saturday June 11, 2022 @03:48PM (#31707642)
Technically macOS will use all active services but only communicate with the topmost interface’s router address to leave the local network unless you have a VPN connection that’s set to send all traffic.
Re:AirPlay and Touch Bar = Network Disaster by aaaaaaaaaaab on Saturday June 11, 2022 @03:45PM (#31707612)
Omg! This may very well solve my ping issues in webliero!
Re:AirPlay and Touch Bar = Network Disaster by aaaaaaaaaaab on Saturday June 11, 2022 @06:04PM (#31708898)
Update: yes, after `ifconfig awdl0 down` my ping was no longer shooting up to ~200ms randomly, and I was able to play a 2-hour deathmatch with my wife without a single lag!