This note extracts just the Touch Bar piece from a longer guide and adds that I also confirmed it works on MacBookPro14,2 (13-inch, 2017)—not only on 14,3. Everything below is in English as requested.
-
Touch Bar (including Esc/Function layer) working on Ubuntu 22.04 LTS (and after upgrading to 24.04 LTS) on:
- MacBookPro14,3 (15-inch, 2017) — original testbed
- MacBookPro14,2 (13-inch, 2017) — additionally verified to light up and function after the same steps
Note: Touch ID is not covered here and remains unsupported.
-
Become superuser
sudo su
-
Tell initramfs to preload the required modules
cat <<EOF | tee -a /etc/initramfs-tools/modules # drivers for keyboard+touchpad applespi apple_ib_tb intel_lpss_pci spi_pxa2xx_platform EOF
-
Build and install the SPI + Touch Bar drivers via DKMS
apt install dkms cd {your preferred source download folder} git clone https://github.com/almas/macbook12-spi-driver cd macbook12-spi-driver git checkout touchbar-driver-hid-driver ln -s `pwd` /usr/src/applespi-0.1 dkms install applespi/0.1 --force
-
Load modules to test
modprobe intel_lpss_pci spi_pxa2xx_platform applespi apple_ib_tb
- An empty output indicates success.
- Reboot once here.
-
If the Touch Bar is still dark, kick the USB device (workaround)
echo '1-3' | sudo tee /sys/bus/usb/drivers/usb/unbind echo '1-3' | sudo tee /sys/bus/usb/drivers/usb/bind
This immediately brought the Touch Bar to life on both MBP14,3 and MBP14,2.
-
Persist the workaround with a systemd unit
sudo su cat <<EOF | tee /etc/systemd/system/macbook-quirks.service [Unit] Description=Re-enable MacBook 14,3 TouchBar Before=display-manager.service [Service] Type=oneshot ExecStartPre=/bin/sleep 2 ExecStart=/bin/sh -c "echo '1-3' > /sys/bus/usb/drivers/usb/unbind" ExecStart=/bin/sh -c "echo '1-3' > /sys/bus/usb/drivers/usb/bind" RemainAfterExit=yes TimeoutSec=0 [Install] WantedBy=multi-user.target EOF systemctl enable macbook-quirks.service reboot
After this, the Touch Bar initializes automatically on boot.
If you prefer the Function keys to appear by default (instead of brightness/volume):
-
Add module options
sudo su cat <<EOF | tee /etc/modprobe.d/apple_ib_tb.conf options apple_ib_tb fnmode=2 # Default to Function Keys, Fn toggles to "special" options apple_ib_tb idle_timeout=60 # Turn off Touch Bar after 60 seconds EOF
-
Reload the module
sudo modprobe -r apple_ib_tb sudo modprobe apple_ib_tb
- The USB unbind/rebind trick is a workaround for a kernel/usbmuxd quirk discussed upstream. If the underlying issue gets fixed, you may eventually remove the systemd unit.
- Verified working on MacBookPro14,3 and explicitly confirmed on MacBookPro14,2 using the exact same steps above.
- After following the steps and enabling the unit, my MBP now boots up with the Touch Bar working—on both the original 15-inch (14,3) and the 13-inch (14,2) model.