Linux Might Finally See Mainline Support For The Current Apple MacBook Keyboard/Touchpad

Written by Michael Larabel in Apple on 10 February 2019 at 08:00 AM EST. 41 Comments
APPLE
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.
Related News
About The Author
Michael Larabel

Michael Larabel is the principal author of Phoronix.com and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 20,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and OpenBenchmarking.org automated benchmarking software. He can be followed via Twitter, LinkedIn, or contacted via MichaelLarabel.com.

Popular News This Week