6

Somewhere around macOS Ventura or Monterey, Apple changed the built-in Wi-Fi kernel driver so that the virtual device for AWDL represented in ifconfig now passes the activation state of AWDL data transfer calls through to the interface state directly. This means that disabling AWDL via ifconfig awdl0 down no longer works; any services using AWDL will immediately reenable it in less than a second. Previously, disabling the AWDL interface disables it for a long time, usually until the Mac wakes from sleep.

Allowing AWDL discovery when it is unneeded causes significant jitter and overall degraded network performance on Wi-Fi if there are many Bonjour-discoverable devices in the proximity, especially noticeable on latency-sensitive protocols such as remote access (ssh) or remote desktop, and the only known workaround is now broken too.

Is there a way to temporarily (or even permanently) disable the awdl0 virtual interface in Ventura?

Possible ideas:

  • Unload the awdl0 interface
    • Both ifconfig awdl0 delete and ifconfig awdl0 unplumb fails with SIOCIFDESTROY: Invalid argument
    • Interface is loaded by the Airport driver (AirportBrcm*) alongside normal Wi-Fi driver functionality, unloading the driver will remove internet access
  • Disable or modify frameworks that applications use to make kernel calls for AWDL functionality
    • Requires changes inside the system image, bad for security as this requires bypassing signing
  • Disable the interface whenever it goes up by watching ifconfig
    • Doesn't solve lag spikes

Edit: Latency graph demonstrating AWDL's new behaviour on Ventura and impact on wireless performance, plotted with gping at 20 pings per second to another host. Notice that it is not a flat latency increase, but adds incredibly high amounts of jitter.

gping graph

It isn't just AirDrop that can spontaneously enable AWDL; simple Bonjour discovery or even Apple TVs can activate it too.

6
  • Related mjtsai.com/blog/2022/12/19/…
    – nohillside
    Dec 20, 2022 at 6:13
  • What tool are you using to measure the latency spikes? And, have you submitted a radar report to Apple? (I have been having the same issues for a while, even on MacOS 13.1)
    – Josh P
    Dec 21, 2022 at 21:26
  • I have reported this with radar ID FB11890071, if this is helpful information for anyone reading.
    – Josh P
    Dec 21, 2022 at 21:39
  • @JoshP The utility is gping, as mentioned in the description.
    – kouwei32
    Dec 22, 2022 at 23:46
  • My link works great on 5 GHz with an OpenWRT router: min/avg/max/stddev = 2.224/5.422/10.252/3.172 ms. Same with gping. MBP 2019 16" on Monterey. AirDrop and AirPlay work fine, I never touched awdl0. Could this be your router not playing nice or interference with the neighbours? Mar 29, 2023 at 12:40

5 Answers 5

4

This might not solve root cause, but I am trying to implement a "bandaid solution" as suggested by OP's 3rd solution: watching awdl0 and make it down the moment it goes up. Obviously, watching for ifconfig would be quite a waste of resource and the ping spikes will still happen in the short window between polls, so I am taking the API approach to implement this.

The link to the app is here: https://github.com/jamestut/awdlkiller

This app monitors awdl0 via AF_ROUTE. macOS will notify this app the very instant awdl0 goes up, and this app will then use ioctl to put awdl0 back down again. Practically zero ping spikes in my case.

Even consecutive ifconfig invocations are no match for the cheetah-like response of this app!

$ sudo ifconfig awdl0 up; ifconfig awdl0
awdl0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> mtu 1500
    options=6463<RXCSUM,TXCSUM,TSO4,TSO6,CHANNEL_IO,PARTIAL_CSUM,ZEROINVERT_CSUM>
    ether <redacted>
    inet6 <redacted>%awdl0 prefixlen 64 scopeid 0xf
    nd6 options=201<PERFORMNUD,DAD>
    media: autoselect (<unknown type>)
    status: inactive

Please let me know how it goes for you all.

1
  • Thank you for writing this utility! It's the only solution that worked for me (Apple M2, MacOS 13.3.1). Before, I had this annoying bug where the neighbors Apple TV would randomly appear in my sound output menu. That's solved now. Apr 18, 2023 at 5:45
3

Try upgrading to MacOS Ventura 13.1 and disabling Bluetooth and Airdrop, and then re-enabling them.

I did that (as suggested in the link shared by nohillside) and the issue seems to have gone away for me..

Edit: after further observation, the issue seems to be back intermittently, albeit with a lower frequency than before. So this is not a permanent fix, but does seem to improve things somewhat.

Immediately prior to posting this answer, I reported the bug at Apple, ID FB11890071.

1
  • This is completely irrelevant to the question; the wireless driver patch in 13.1 fixes a disconnection problem on M1 Macs only. Intel-based Macs are completely unaffected, and this is still a major problem on our end even after updating to 13.1.
    – kouwei32
    Dec 22, 2022 at 23:42
3

https://wlanprofessionals.com/an-overview-of-apple-wireless-direct/

It appears that AWDL prefers channel 6 on 2.4Ghz and channels 44, 149 on 5Ghz. Channel 149 seems to be preferred over other channels. Switching the Wi-Fi network to channel 149 seems to avoid the delay for the radio to hop channels.

This doesn't fix the issue but it may be a good workaround.

2

Hey I've been struggling with this issue for several years like you. I kept trying to disable AWDL on Ventura like you said but I noticed it wasn't having any effect. Then I saw a suggestion online to disable Universal Control through System Settings and that seems to mostly fix the issue. I still get the occasional lag spike every 2 minutes in PS Remote Play but it seems to have fixed my issue. Perhaps Universal Control (a relatively new feature) uses some sort of backdoor approach to look for new iPads and MacBooks to communicate with constantly and is what reenables AWDL. But if you toggle the Allow your pointer and keyboard to move between any nearby Mac or iPad setting and ALSO disable AWDL it seems to fix the issue. Hope this helps!

1

I've been struggling with this issue only for the past few months. I noticed it soon after an update I had applied around September and it's had a noticeable negative impact on my virtual meetings over Zoom and Teams (especially the latter for some reason) and file transfers (like Time Machine backups to my NAS).

I apparently don't have enough rep to reply to other's comments, but wanted to draw attention to and say thanks very much to AdriftAtlas (sorry, not sure how to link to your name) for his comment here, post MacRumors, and posts in a couple of Reddit threads. I had researched this issue a few times over the past months and only yesterday did I find his posts -- they've been amazingly helpful to me in understanding why this is happening and how I might work around it.

I'd like to flag for those in Europe or, like me, the UK: you likely can't switch your wifi to channel 149 as suggested by AdriftAtlas. But it seems awdl knows not to use channel 149 in Europe/UK either. I can and have switched to using channel 44 instead and it's working a charm on this issue.

So if you're in Europe or UK and can't switch to 149, or can but find switching to 149 doesn't help, try channel 44 instead.

(My quickest way to test is to use the 'sudo ifconfig awdl10 down' command to stop it, run a ping, then open a finder window and click onto Airdrop; when my router isn't set to channel 44, I'll quickly see my pings go high; after switching it to channel 44 and repeating, I see no significant change in pings.)

I found this post here because I'm still wanting to find out how to feed this back to Apple. Surely they need to resolve this somehow! (Everyone switching routers to channel 44 is surely not going to be good for interference...)

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .