News for hackers. Stuff that matters.
Re:A 0.5s periodic hitch in my local screen stream turned ou... by duchanjo on Monday June 22, 2026 @06:32AM (#48628303)
I recently built a self-hosted tool that streams an iOS/Android simulator to a browser.

Since everything was running on the same LAN, I expected the stream to feel almost local. It didn't.

About twice per second, the stream would freeze briefly and then catch up. The pattern was very consistent.

Bandwidth wasn't the issue, and CPU usage was low, so "the network is slow" wasn't the cause.

To investigate, I started pinging my router from the relay Mac with a very short interval:

`ping -i 0.01 <router-ip>`

The latency pattern was interesting. Most packets were fast, but every so often there was a spike of around 90 ms. The interval between those spikes matched the stutter in the stream almost exactly.

That was it.

It turned out to be AWDL (`awdl0`), the macOS interface used for AirDrop, AirPlay, and Handoff. When AWDL is active, macOS periodically switches Wi-Fi channels for a short time. During those channel hops, packets on the normal Wi-Fi connection can be delayed. In my case, the delay was roughly 90 ms.

After disabling AWDL (`sudo ifconfig awdl0 down`) or stopping the features that activate it, the stutter disappeared.

AWDL doesn't hop channels all the time. It usually becomes active when triggered by AirDrop discovery, AirPlay, or Bluetooth-based proximity features. If those stay idle, AWDL stays quiet.

I use Ethernet for the relay machine now. That completely removes the issue because the stream traffic never touches Wi-Fi.

Repo: github.com/jo-duchan/tapflow

Re:A 0.5s periodic hitch in my local screen stream turned ou... by forsalebypwner on Tuesday June 23, 2026 @03:29PM (#48650115)
Yup, this has been a known issue forever - I recall streaming game services like Amazon Luna specifically warning about this if it detected you were on a Mac and wanted to play a game.
Re:A 0.5s periodic hitch in my local screen stream turned ou... by CaliforniaKarl on Tuesday June 23, 2026 @04:19PM (#48650767)
I didn't know about it! And I really wish I did…
Re:A 0.5s periodic hitch in my local screen stream turned ou... by duchanjo on Wednesday June 24, 2026 @10:50AM (#48660849)
Yeah, exactly. I came across some of those reports while debugging this. They were really helpful in narrowing down the cause.
Re:A 0.5s periodic hitch in my local screen stream turned ou... by ShinyLeftPad on Tuesday June 23, 2026 @03:36PM (#48650196)
The title is so wildly inaccurate clickbait doesn't do it justice...
Re:A 0.5s periodic hitch in my local screen stream turned ou... by MoonWalk on Tuesday June 23, 2026 @03:45PM (#48650316)
Yeah, I went to the page and wasted time looking for any reference to this.

Doubly douchey after not defining "AWDL."

Re:A 0.5s periodic hitch in my local screen stream turned ou... by CaliforniaKarl on Tuesday June 23, 2026 @04:19PM (#48650755)
The content of https://news.ycombinator.com/item?id=48628303 should have been posted as the item's text. Or, that text could've been put in to an Issue, and the link pointed to that.
Re:A 0.5s periodic hitch in my local screen stream turned ou... by duchanjo on Wednesday June 24, 2026 @10:59AM (#48661008)
Agreed. That's exactly what I should have done. Thanks for pointing out the proper way to handle it.
Re:A 0.5s periodic hitch in my local screen stream turned ou... by duchanjo on Wednesday June 24, 2026 @10:49AM (#48660832)
Sorry about that. I'm still pretty new to HN and didn't do a good job connecting the title to the actual content.