Linux Might Finally See Mainline Support For The Current Apple MacBook Keyboard/Touchpad
The Apple MacBook / MacBook Pro laptops of the past few years have been notoriously bad on Linux at least as far as the mainline / out-of-the-box support is concerned. The current MacBook's keyboard and touchpad don't even work out-of-the-box on Linux. There has been an out-of-tree driver available for changing that while coming soon it might finally be merged to the mainline kernel.
The MacBook / MacBook Pro keyboard and trackpad of the past two~three years has relied upon an SPI controller rather than being the traditionally USB-based input devices. Apple hasn't publicly documented the protocol even for properly supporting the keyboard/trackpad on non-macOS/Windows platforms. But thankfully the open-source Linux developer community has been able to largely reverse-engineer this support.
There still are some unknowns about the protocol, but this Apple SPI Linux driver has worked out well for around two years and continues working with the latest MacBook/MacBookPro hardware. Given this driver's maturity, there is now work on mainlining this driver so there would finally be out-of-the-box keyboard/touchpad support if wanting to run Linux on the newer Apple laptops.
The Apple SPI driver will be toggled via the KEYBOARD_APPLESPI Kconfig switch and the new driver amounts to just under two thousand lines of code. The review is still ongoing on the kernel mailing list so at this stage it's not clear if it will be deemed acceptable for getting into the upcoming Linux 5.1 cycle or have to wait longer.
For those wanting to use the Apple SPI keyboard/touchpad on Linux today, via this GitHub repository is the current driver code that can be used as a DKMS module for pairing with existing kernels.
The MacBook / MacBook Pro keyboard and trackpad of the past two~three years has relied upon an SPI controller rather than being the traditionally USB-based input devices. Apple hasn't publicly documented the protocol even for properly supporting the keyboard/trackpad on non-macOS/Windows platforms. But thankfully the open-source Linux developer community has been able to largely reverse-engineer this support.
There still are some unknowns about the protocol, but this Apple SPI Linux driver has worked out well for around two years and continues working with the latest MacBook/MacBookPro hardware. Given this driver's maturity, there is now work on mainlining this driver so there would finally be out-of-the-box keyboard/touchpad support if wanting to run Linux on the newer Apple laptops.
The Apple SPI driver will be toggled via the KEYBOARD_APPLESPI Kconfig switch and the new driver amounts to just under two thousand lines of code. The review is still ongoing on the kernel mailing list so at this stage it's not clear if it will be deemed acceptable for getting into the upcoming Linux 5.1 cycle or have to wait longer.
For those wanting to use the Apple SPI keyboard/touchpad on Linux today, via this GitHub repository is the current driver code that can be used as a DKMS module for pairing with existing kernels.
41 Comments