MacOS Kernel Extensions Still Deprecated

And still causing problems. A broader look into why kernel extensions will be removed from macOS.

It was like something from the bad old days. Try to install a driver, installation fails, need to reinstall operating system. That’s what happened when I wanted to use my j5create USB3 gigabit ethernet dongle with a new MacBook Air.

If it was running macOS 11, I wouldn’t be too surprised. From j5create’s downloads page:

To avoid loss of functionality with the j5create USB™ Display and USB™ Ethernet adapters, we advise all Mac® users to delay updating to macOS® Big Sur 11.

It was running macOS 10.15. So what happened?

j5create’s (or really ASIX electronics’) drivers come in the form of macOS kernel extensions using the deprecated IONetworkingFamily interface. Kernel extensions were deprecated in favour of system extensions. These run in user space instead of interacting directly with the kernel.

Why did Apple make this move? From a Hacker News commenter:

They’re just doing the typical Apple thing of enforcing a “one proprietary port, one licensed plug” policy.

This is too simple of an analysis. The whole story becomes clearer when looking at another strictly open source operating system.

Unusable USB ethernet dongles are par-for-the-course for OpenBSD users. An OpenBSD user will not search the web for “j5create usb ethernet openbsd driver”. Few tend to bother writing drivers for relatively obscure operating systems. But most importantly OpenBSD removed its loadable kernel module interface - lkm(4) - almost 6 years ago in release 5.7. In a sense, Apple may have been late to the party.

So why did both Apple and the OpenBSD developers remove this interface to the kernel? It is, at least in part, in the interest of system safety and stability. Removal of the interface prevents a whole class of errors like the one I encountered installing a USB dongle driver, which ended up in me reinstalling the whole operating system.

The j5create dongle is in the bin. You may think that I would have gone to the Apple Store and bought Apple’s USB-C ethernet dongle. But you’d be wrong. I didn’t think twice before plugging in a $10 dongle I bought from eBay years ago. MacOS recognised it instantly without any driver installation required. How could I be so confident it was going to just work? Apple Magic (tm)? The dongle chipset is on the list of supported chipsets in the OpenBSD manual.