Solved: Apple fixed this issue on Apple Silicon Macs (M1-M4) in Mac OS 14.6 (Sonoma), which Apple released in July 2024. Ensure you have the latest Mac OS & Google Chrome version to solve this issue. Be sure to also not open Airdrop, Airplay, Handoff, etc... on your Macbook while using Stim, or it will re-enable AWDL and cause stuttering in Stim.
If you open any of those applications, you will notice a stream stutter from AWDL. This can typically be solved by closing the Mac OS Airplay app and waiting 15 seconds. You may also need to refresh the stim.io page for MacOS to notice a "game"/"stream" is running, so it temporarily disables AWDL again.
AWDL causes major recurring stuttering for Apple Silicon Macbooks when using 5Ghz Wifi if their router is not set to channel 149 (which is very common). The cause of this stutter is that Apple hijacks your Wi-Fi every few seconds and changes it to channel 149 to check if any other Apple devices are around. This Apple protocol is known as AWDL. It is used for Airplay, Airdrop, Handoff, Find My, and more to discover nearby Apple devices.
In other apple devices (including iPad and iPhone), AWDL uses a dedicated network interface. In Apple Silicon Macs, AWDL shares and hijacks your main wifi card to change channels to 149 and look for Apple devices every other second. Thankfully, in later Mac OS versions (after Sonoma), Apple temporarily disables AWDL when it detects a video conference or game running; this includes Stim.
If you continue to have this issue even after updating MacOS, I recommend opening Terminal on your Mac and running the command:
sudo ifconfig awdl0 down
This will fully disable airplay etc... until you reboot your Mac at which point it will all be enabled again.
What is AWDL?
Apple Wireless Direct Link (AWDL) is a protocol which is used for many Apple services and features such as AirDrop, AirPlay, GameKit, Sidecar, and Handoff.
How Can You Fix It?
- If you can, change Your Router to Channel 149 for 5Ghz. This will cause your device to not have to switch between channels to look for Apple Devices. It can remain on the same 5Ghz Wifi channel to both look for other Apple devices, and access the internet at the same time.
- If you can’t switch your Wifi routers channel, the only other option until Apple fixes this issue is to disable AWDL (temporarily) on your Apple Device. This can be done two different ways:
- Disabling all 3 services which use it (Location Services, Airdrop, and Handoff) in iOS or MacOS settings. Please Note: Apple is constantly adding new services which use AWDL.
- You can also disable AWDL by running the following command in a terminal if on MacOS:
- sudo ifconfig awdl0 down
- Note: You will need to do this each time you restart your device
- To enable AWDL again run: sudo ifconfig awdl0 up in terminal.
- sudo ifconfig awdl0 down
Currently the only solution we know of from our end is to have a native MacOS / iPad OS app but Stim is not able to do this as a website without a Native app.
We hope Apple will patch the issue for ultra low latency Web Apps, or move to a more general standard instead of trying to create their own protocol (breaking 5Ghz Wifi for ultra-low-latency streaming in the process).
Sources:
https://discussions.apple.com/thread/254594055?sortBy=best
https://www.reddit.com/r/Stadia/comments/jqv6sy/apple_wireless_direct_link_causes_stutter_on_mac/
https://github.com/moonlight-stream/moonlight-ios/issues/607
https://github.com/moonlight-stream/moonlight-ios/issues/607