Skip to content

Instantly share code, notes, and snippets.

@kouwei32
Last active August 18, 2026 18:21
Show Gist options
  • Select an option

  • Save kouwei32/c101be682fc2e433e153ea131798caec to your computer and use it in GitHub Desktop.

Select an option

Save kouwei32/c101be682fc2e433e153ea131798caec to your computer and use it in GitHub Desktop.
Fixes for Low-Latency Desktop Streaming stuttering on macOS (applies to Moonlight, Parsec, Stadia, Geforce Now, etc.)

macOS Yosemite and above utilize AWDL (Apple Wireless Direct Link) to handle data transfers to other AWDL-enabled devices (Macs, Macbooks, iPhones, etc.) over the Wifi Radio, without the need for a common underlying Access Point.

However, whenever AWDL is active (Bonjour discovery and any Airdrop, Airplay, and GameKit links and transfers), it will lock the Wifi radio for small intervals. For Bonjour discovery specifically, this comes to an effective packet spooling time of about 50-100ms, once per second (active transfers will be higher).

Obviously, this will create unacceptable latency spikes for low-latency desktop streaming apps. To disable the AWDL interface, use the following command in Applications > Utilities > Terminal (this requires you to be logged in as an Administrator and enter your password):

sudo ifconfig awdl0 down


sudo - run as root
     ifconfig - configure network interface parameters
              awdl0 - the virtual interface device used for AWDL
                    down - disable the interface

Note that this will prevent all users on the system from using Airplay, Airdrop, GameKit, etc. To reverse, use sudo ifconfig awdl0 up.

macOS may reenable the interface upon a restart. If you want to keep it off automatically, you can write an Automator application to execute that command, then put it into your Login Items (though it will ask for your password every time). To execute it as root automatically, you may have to write a launchd daemon property XML.

Additional reading:

https://stackoverflow.com/questions/19587701/what-is-awdl-apple-wireless-direct-link-and-how-does-it-work

https://arxiv.org/abs/1808.03156

man 8 ifconfig


To a lesser extent, the Location Service Wifi scan will also lock the Wifi radio, albeit no more than around once every 5 minutes. To disable it as well:

Settings > Security & Privacy > Privacy > Location Services > Uncheck

Note that this turns off geolocation completely, including for Find My Mac.

@artemkoloskov

Copy link
Copy Markdown

Great toggle approach from @Kaylebor. The gap I kept hitting even with a manual one: macOS brings AWDL (Apple Wireless Direct Link) back on its own - time-based after ~10-15 min, and immediately when AirDrop/Handoff fire - so mid-session the stutter quietly returns and I had to remember to flip it again.

I attempted to that by making it automatic: a small root LaunchDaemon that re-asserts every 10 seconds. It forces awdl0 down while a flag file exists and lets it back up when the flag is gone - still a toggle that keeps AirDrop/Handoff when you're not streaming, but now I don't have to babysit:

touch /tmp/awdl-down   # suppress AWDL before a session
rm /tmp/awdl-down      # restore it

No deps (plain ifconfig + a flag check). Full script + plist + install: https://gist.github.com/artemkoloskov/453ec338cd5f31eaed29285a6a5c0cf8

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment