Input driver for the SPI keyboard / trackpad found on 12" MacBooks (2015 and later) and newer MacBook Pros (late 2016 through mid-2018), as well as a simple Touch Bar and ambient-light-sensor driver for late 2016 MacBook Pros and later.
The keyboard / trackpad driver here is now included in the kernel as of v5.3.
I own a MacBookPro14,3 (15" 2017 with Touch Bar) and created this fork to update the iBridge / Touch Bar drivers for Linux 6.15+ compatibility.
Recent kernels introduced official upstream drivers for the Touch Bar (keyboard vs display modes, DRM, HID splits). Unfortunately, this broke the original out-of-tree modules: the keyboard worked but the Touch Bar display/touch did not.
This fork:
- Adds a Touch Bar mode coordinator (
tb_mode=auto|keyboard|display) so one driver owns both configs. - Provides a minimal multi-touch shim for Touch Bar input on 6.15–6.16 (upstream HID covers this in 6.17+).
- Preserves all existing features (FN-mode toggling, idle/dim timeouts, ALS).
- Stays compatible with older kernels (<6.15) using legacy config logic.
- Avoids conflicts with upstream
hid-appletb-kbd,hid-appletb-bl, andappletbdrm.
The touchbar driver was refactored in late 2018; if you're upgrading from the appletb driver, please see the Upgrading section.
If you're running a kernel before 4.16 then please check out the legacy branch instead.
On MacBook / MacBook Pros (except MacBook8,1 2015):
- Kernels <4.11: boot with
intremap=nosid(do not usenoapic). - MacBook8,1 (2015): recompile with
CONFIG_X86_INTEL_LPSS=nif <4.14. - Ensure SPI + LPSS modules are present (
spi_pxa2xx_platform,spi_pxa2xx_pciorintel_lpss_pcidepending on model).
Initramfs tip: put applespi, spi_pxa2xx_platform, and intel_lpss_pci in your initramfs so the keyboard works at disk password prompt.
Three modules are provided:
apple_ibridge— iBridge MFD coordinator.apple_ib_tb— Touch Bar driver.apple_ib_als— Ambient light sensor.
-
Basic mode switching (escape, fn keys, special keys).
-
Idle/dim/off based on timeouts (
idle_timeout,dim_timeoutparams). -
New in this fork:
tb_modeparam:auto|keyboard|display(defaultauto).- Multi-touch reporting in display mode on 6.15–6.16.
prefer_apple_ibparam to let this fork override upstream drivers.
Exposes the ambient light sensor; works automatically with iio-sensor-proxy.
sudo pacman -S dkms linux-headers # Arch
# or: sudo apt install dkms build-essential linux-headers-$(uname -r)
git clone https://github.com/F13-Kr1pt0n/macbook-pro-touchbar-driver.git
cd macbook12-spi-driver
sudo mkdir -p /usr/src/appleibridge-0.1
sudo cp -r . /usr/src/appleibridge-0.1
sudo dkms add -m appleibridge -v 0.1
sudo dkms build -m appleibridge -v 0.1
sudo dkms install -m appleibridge -v 0.1Rebuild initramfs if not done automatically:
sudo mkinitcpio -P # Arch
# or
sudo dracut -f # Fedora/othersLoad:
sudo modprobe apple-ibridge
sudo modprobe apple-ib-tb
sudo modprobe apple-ib-alsEnable the Touch Bar reset service:
sudo cp touchbar-reset.service /etc/systemd/system/
sudo systemctl enable --now touchbar-reset.service- ISO layout autodetection.
- Resume quirks on MacBook8,1 (unchanged).
Older appletb driver has been split into apple_ibridge, apple_ib_tb, apple_ib_als.
Remove any appletb.ko before installing this fork.
Trace Touch Bar events:
echo 1 | sudo tee /sys/kernel/debug/tracing/events/applespi/applespi_keyboard_data/enableALS / Touchpad logging available under /sys/kernel/debug/applespi/.
This project has been maintained and extended by several people over the years:
cb22 — started the original macbook12-spi-driver project to support Apple SPI keyboard and trackpad on early MacBooks.
roadrunner2 (Ronald Tschalär) — significantly expanded the driver, refactored Touch Bar/ALS support into proper iBridge subdrivers, and upstreamed the SPI keyboard driver (merged in Linux 5.3).
marc-git — maintained the repo afterwards, provided DKMS packaging, and kept the driver usable for later kernels.
F13-Kr1pt0n — forked the project as an MBP14,3 owner, updating the iBridge and Touch Bar stack for Linux 6.15+ compatibility (mode coordinator, HID MT shim, blacklist handling) while preserving backward compatibility with older kernels.
This project is licensed under the GPL-2.0 license.
This fork (MBP14,3 compatibility updates) was created and is maintained by David Rodriguez, specifically to restore Touch Bar and keyboard functionality on modern Linux kernels.
See the file headers (// SPDX-License-Identifier: GPL-2.0) for details.