HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
roadrunner2
macbook12-spi-driver
C2018–2021
roadrunner2 / macbook12-spi-driver

macbook12-spi-driver

Input driver for the SPI touchpad / keyboard found in the 12" MacBook (MacBook8,1 + MacBook9,1) and 2016 through 2018 Macbook Pro's (MacBookPro13,* and 14,*); a Touch Bar driver is also available.

3Distinct people
4Mentions
0Explicit recommenders
289GitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

Input driver for the SPI touchpad / keyboard found in the 12" MacBook (MacBook8,1 + MacBook9,1) and 2016 through 2018 Macbook Pro's (MacBookPro13,* and 14,*); a Touch Bar driver is also available.

GitHub

Where it is used

No documented product use has been verified yet.

What people are saying

No recommendation phrase was found in the indexed comments.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

No other repository is repeatedly linked in the same discussions.

This week on Hacker News

Nov 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 3:56:07 PM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by year4 dated mentions

Observed mentions: 2018-01-04 19:31:02 UTC to 2021-04-27 13:43:46 UTC.

0122018-01-01 00:00:00 UTC to 2019-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments20182019-01-01 00:00:00 UTC to 2020-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments20192020-01-01 00:00:00 UTC to 2021-01-01 00:00:00 UTC (exclusive): 2 mentions; 0 submissions, 2 comments2021-01-01 00:00:00 UTC to 2022-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2021

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
20182018-01-01 00:00:00 UTC2019-01-01 00:00:00 UTC101
20192019-01-01 00:00:00 UTC2020-01-01 00:00:00 UTC000
20202020-01-01 00:00:00 UTC2021-01-01 00:00:00 UTC202
20212021-01-01 00:00:00 UTC2022-01-01 00:00:00 UTC101

What Hacker News says

4 sources
I don't think this works with 2019 or later Intel Macbooks, but as far as I know the most recent relevant information and drivers are here: https://github.com/roadrunner2/macbook12-spi-driver. In my own experience, it's the trackpad, keyboard, and built-in speakers that don't work, but everything else seemed to be fine (2015 macbook). Edit: this driver got the keyboard and trackpad to work, but the microphone, speakers, and webcam did not work. I also needed to downgrade to an older kernel (4.14) to get storage to work. All external things worked fine even through a hub, and the headphone jack also worked fine.
In Merge tag 'arm-Apple-M1-5.13' of Linux
> I envy your knowledge and ambition. What you've done is beyond my capabilities. I mostly did just coordination and verification. The only code I contributed are very small workarounds for the NVMe controller and webcam. Nothing noteworthy. The serious work of reverse engineering and implementing custom drivers was done by others which are to be applauded much more! There is one person I want to point out in particular and that's roadrunner2 [1] who took the existing input driver for the 12" Retina MacBook and not just made it work with the MacBook Pro's, but also implemented support for the TouchBar and ambient light sensor. As this driver is based solely on reverse-engineered workings of the input system and Apple does very unique stuff there this was so much effort. Including very subtle, but surprising bugs (e.g. [2]) which could've
Read the rest
easily avoided if documentation would've been available. roadrunner2 is also the one to applaud for bringing the support for keyboard and touchpad to mainline Linux. As that not just required an input driver, but also touched other subsystems and required serious refactorings that was quite an achievement as well and is the reason keyboard and touchpad even work out of the box after booting a Linux distribution nowadays (although it's still not perfect as some distributions don't enable the applespi driver yet). [1]: https://github.com/roadrunner2/macbook12-spi-driver [2]: https://github.com/cb22/macbook12-spi-driver/issues/53
In Install Ubuntu 20.04 LTS on MacBookPro14,1
For people who want to install Ubuntu on MBP14,2 or 14,3 (the new MBPs with four thunderbolt 3 ports) — this[0] might help. (It'll be probably trivial to update the article for Ubuntu 20.04 - just ignore the upgrading the kernel parts.) It mentions adding the touchbar, keyboard drivers[1] and fixes for the non-working wifi[2], all without an external keyboard or anything. You can just boot up your Ubuntu virtual machine, execute some commands in the chroot environment & make an bootable ISO. This gist[3] and this GitHub repo[4] might also be worth to check out - although it looks like a bit lagging in information (the wifi fix, added last November isn't reflected yet). This is my command checklist (tweaked from this[0] to match my prefs), might be helpful for someone? ### check if pwd is ~/Download # ask password beforehand s
Read the rest
udo -v # mounting iso and copying to current file sudo mkdir -p /mnt/iso sudo mount ubuntu-20.04-desktop-amd64.iso /mnt/iso mkdir customiso rsync -a --exclude=casper/filesystem.squashfs /mnt/iso/ customiso/ sudo unsquashfs /mnt/iso/casper/filesystem.squashfs sudo umount /mnt/iso # chrooting sudo mount --bind /dev squashfs-root/dev/ sudo chroot squashfs-root/ PS1="(chroot) $PS1" LC_ALL=C HOME=/root export PS1 HOME LC_ALL mount -t proc none /proc mount -t sysfs none /sys mount -t devpts none /dev/pts # updating mv /etc/resolv.conf /etc/resolv.conf.bak echo 'nameserver 1.1.1.1' | tee /etc/resolv.conf ### change apt mirror list apt update apt upgrade apt dist-upgrade apt autoremove apt -f install # installing driver apt install git dkms echo -e "\n# macbook12-spi-drivers\napplespi\nappletb\nspi_pxa2xx_platform\nintel_lpss_pci" >> /etc/initramfs-tools/modules git clone https://github.com/roadrunner2/macbook12-spi-driver.git /usr/src/applespi-0.1 dkms install -m applespi -v 0.1 cat > /etc/udev/hwdb.d/61-evdev-local.hwdb << 'EOF' # MacBook8,1 (2015), MacBook9,1 (2016), MacBook10,1 (2017) evdev:name:Apple SPI Touchpad:dmi:*:svnAppleInc.:pnMacBook8,1:* evdev:name:Apple SPI Touchpad:dmi:*:svnAppleInc.:pnMacBook9,1:* evdev:name:Apple SPI Touchpad:dmi:*:svnAppleInc.:pnMacBook10,1:* EVDEV_ABS_00=::95 EVDEV_ABS_01=::90 EVDEV_ABS_35=::95 EVDEV_ABS_36=::90 # MacBookPro13,* (Late 2016), MacBookPro14,* (Mid 2017) evdev:name:Apple SPI Touchpad:dmi:*:svnAppleInc.:pnMacBookPro13,1:* evdev:name:Apple SPI Touchpad:dmi:*:svnAppleInc.:pnMacBookPro13,2:* evdev:name:Apple SPI Touchpad:dmi:*:svnAppleInc.:pnMacBookPro14,1:* evdev:name:Apple SPI Touchpad:dmi:*:svnAppleInc.:pnMacBookPro14,2:* EVDEV_ABS_00=::96 EVDEV_ABS_01=::94 EVDEV_ABS_35=::96 EVDEV_ABS_36=::94 evdev:name:Apple SPI Touchpad:dmi:*:svnAppleInc.:pnMacBookPro13,3:* evdev:name:Apple SPI Touchpad:dmi:*:svnAppleInc.:pnMacBookPro14,3:* EVDEV_ABS_00=::96 EVDEV_ABS_01=::95 EVDEV_ABS_35=::96 EVDEV_ABS_36=::95 EOF cat > /etc/udev/hwdb.d/61-libinput-local.hwdb << 'EOF' libinput:name:*Apple SPI Touchpad*:dmi:* LIBINPUT_MODEL_APPLE_TOUCHPAD=1 LIBINPUT_ATTR_KEYBOARD_INTEGRATION=internal LIBINPUT_ATTR_TOUCH_SIZE_RANGE=200:150 LIBINPUT_ATTR_PALM_SIZE_THRESHOLD=1200 EOF ### edit wifi driver(https://bugzilla.kernel.org/show_bug.cgi?id=193121#c52) # exiting chroot mv /etc/resolv.conf.bak /etc/resolv.conf umount /dev/pts umount /sys umount /proc exit sudo umount squashfs-root/dev/ sudo rm customiso/casper/filesystem.squashfs sudo mksquashfs squashfs-root customiso/casper/filesystem.squashfs cd customiso sudo rm md5sum.txt sudo find -type f -print0 | xargs -0 sudo md5sum | grep -Ev "./md5sum.txt|./isolinux/" | sudo tee md5sum.txt cd .. sudo xorriso -as mkisofs -r -V "ubuntu-for-mac" -R -l -o ubuntu-for-mac.iso -c isolinux/boot.cat -b isolinux/isolinux.bin -no-emul-boot -boot-load-size 4 -boot-info-table -isohybrid-mbr /usr/lib/ISOLINUX/isohdpfx.bin -eltorito-alt-boot -e boot/grub/efi.img -no-emul-boot -isohybrid-gpt-basdat customiso/ [0]: https://nixaid.com/linux-on-macbookpro/ [1]: https://github.com/roadrunner2/macbook12-spi-driver [2]: https://bugzilla.kernel.org/show_bug.cgi?id=193121 [3]: https://gist.github.com/roadrunner2/1289542a748d9a104e7baec6... [4]: https://github.com/Dunedan/mbp-2016-linux
In Install Ubuntu 20.04 LTS on MacBookPro14,1
When using macOS the ambient light sensor is afaik only used for the brightness of the keyboard backlight. The brightness of the TouchBar isn't related to ambient light and just depends on the usage of the MacBook Pro. In use it's simply on with full brightness, after 1 minute of inactivity it dims to a certain level, before shutting off the TouchBar completely 15 seconds later. While macOS doesn't allow to customize these timeouts, the experimental Linux driver [1] does. [1]: https://github.com/roadrunner2/macbook12-spi-driver
In iMac Pro's T2 chip

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.