Add kernel 6.17-compatible apple-ibridge Touch Bar driver (PR #77 patches)#4
Merged
Merged
Conversation
Co-authored-by: LeslieKeys <66516783+LeslieKeys@users.noreply.github.com> Agent-Logs-Url: https://github.com/LeslieKeys/skills-introduction-to-github/sessions/827b9f5b-9505-46c8-a95a-de1020ba0499
Copilot
AI
changed the title
[WIP] Diagnose and resolve Touch Bar issues on 2017 MacBook Pro
Add kernel 6.17-compatible apple-ibridge Touch Bar driver (PR #77 patches)
Mar 21, 2026
LeslieKeys
approved these changes
Mar 21, 2026
LeslieKeys
approved these changes
Mar 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
apple-ibridgedriver fails to compile on Linux 6.17 due to breaking kernel API changes across HID, ACPI, IIO, SPI, and EFI subsystems. This adds the full patched driver source from roadrunner2/macbook12-spi-driver PR #77 along with an installation guide.Driver patches (kernel 6.17 compat)
apple-ibridge.c—report_fixupreturn type__u8 *→const __u8 *;appleib_removeint→void; removed.ownerfromstruct acpi_driverapple-ib-tb.c—appletb_platform_removeint→voidapple-ib-als.c—iio_device_alloc/iio_trigger_allocrequire parentstruct device *as first arg;iio_dev->id→iio_device_id(iio_dev);appleals_platform_removeint→voidapplespi.c—asm/unaligned.h→linux/unaligned.h;spi_transfer.delay_usecs→.delay.value/.delay.unit(×4);no_llseek→noop_llseek; EFI helpers rewritten fromefivar_entry_get/set_safetoefivar_get/set_variable;applespi_remove/appleacpi_removeint→void; removed.ownerfromstruct acpi_driver; addedMODULE_IMPORT_NS("EFIVAR")Example of the SPI delay API change (one of four instances in
applespi.c):Supporting files
Makefile,dkms.conf,apple-ibridge.h,applespi.h,applespi_trace.h— carried over from upstreamtouchbar-driver-hid-driverbranch unchangedINSTALL.md— end-to-end DKMS install guide covering cleanup of broken prior installs, module loading, and verification steps (lsmod,dmesg,dkms status)Original prompt
Diagnose and resolve why the Touch Bar is not working on a 2017 MacBook Pro running Ubuntu 24.04 (Linux kernel 6.17). Ensure the correct patched apple-ibridge module is installed and loaded, based on the latest code compatible with kernel 6.17 as in roadrunner2/macbook12-spi-driver PR #77. Provide clear documentation and steps for verification.
The following is the prior conversation context from the user's chat exploration (may be truncated):
User: I'm just install Ubuntu24 on my Macbook Pro2017, I need to support my drive and other things like touchbar, speaker, wifi and so on
Assistant: To get all your hardware working on a 2017 MacBook Pro running Ubuntu, the best and most comprehensive community resource is the Dunedan/mbp-2016-linux repository. This repository tracks the state of Linux on 2016 and 2017 MacBook Pros and provides step-by-step solutions for missing drivers.
Here is a breakdown of what you'll need to do for your specific components:
1. Wi-Fi
On 2017 models, the Broadcom Wi-Fi card usually requires proprietary drivers.
bcmwl-kernel-sourcepackage.sudo apt install bcmwl-kernel-source2. Touchbar
The Touchbar requires a specific driver called
macbook12-spi-driveror theappletbdriver, depending on your kernel.3. Audio / Speakers
Audio is historically the most complex part of getting Linux working perfectly on this generation of MacBooks.
4. Suspend / Wake
Suspend can sometimes be finicky on these models. The
Dunedanrepo contains specific GRUB boot parameters and fixes to ensure your laptop wakes up correctly when you open the lid.Next Steps:
I highly recommend reading through the State of Linux on the MacBook Pro 2016 & 2017 README. It includes a support matrix and links to the specific drivers you need for your exact model (either
MacBookPro14,1,MacBookPro14,2, orMacBookPro14,3).User: How should I do to use my touchbar?
Assistant: To get your Touchbar working on Ubuntu 24, you'll need to install the
macbook12-spi-drivercreated by the community (specifically by the userroadrunner2). This driver package handles the Touchbar (via the iBridge chip), as well as the internal keyboard and trackpad for 2016/2017 MacBooks.Here are the step-by-step instructions to install it using DKMS (Dynamic Kernel Module Support), which ensures the driver stays installed even when Ubuntu updates your kernel.
Open your terminal and run the following commands:
1. Add the necessary modules to initramfs
First, you need to tell Ubuntu to load the SPI and Apple drivers during boot:
sudo bash -c 'echo -e "\n# applespi\napplespi\nspi_pxa2xx_platform\nintel_lpss_pci" >> /etc/initramfs-tools/modules'2. Install DKMS and Git
Make sure you have
gitanddkmsinstalled so you can download and build the driver:3. Download and Install the Driver
Clone the repository into the
/usr/srcdirectory, then use DKMS to install it:4. Update Initramfs
After the driver is installed, update your initial ramdisk so the new modules are included on the next boot:
5. Reboot
Restart your MacBook:
How the Touchbar will work:
Once rebooted, the
apple_ibridgeandapple_ib_tbkernel modules will load automatically.Fnkey.User: I: The initramfs will attempt to resume from /dev/nvme0n1p3
I: (UUID=b09ba33e-606a-49da-9ba2-1875c24ad88b)
I: Set the RESUME variable to override this.
Errors were encountered while processing:
broadcom-sta-dkms
E: Sub-process /usr/bin/dpkg returned an error code (1)
les...
This pull request was created from Copilot chat.
⌨️ Start Copilot coding agent tasks without leaving your editor — available in VS Code, Visual Studio, JetBrains IDEs and Eclipse.