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://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.
macOS Ventura has changed the behaviour of the AWDL virtual interface. Applications that request connections over AWDL will now automatically reenable the
awdl0
device if it is disabled. Theifconfig
command will still work, but if you have AirDrop etc. enabled locally, AWDL will be immediately reenabled. Bonjour discovery will also reenable AWDL once every few minutes.It has been reported that disabling Bluetooth and setting AirDrop to "No One" can prevent proximity Bonjour discovery, but this may not be acceptable for users that use Bluetooth devices. No direct workarounds are known at the moment.
If you are using Monterey or lower, and heavily rely on low latency streaming for your tasks, it is highly recommended to not upgrade to Ventura yet. If you have already upgraded, as a last resort you can downgrade macOS by reinstalling from an older version in Recovery Mode.
See also AskDifferent: https://apple.stackexchange.com/questions/451646/