Skip to content

Instantly share code, notes, and snippets.

View kouwei32's full-sized avatar
♾️

kouwei32

♾️
  • $
View GitHub Profile
@kouwei32
kouwei32 / macos-packet-spooling-fixes.md
Last active April 14, 2024 16:42
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