Skip to content

Touchbar on 14,3 not working #210

Description

@schaecsn

Hi all

I run Debian Trixie (kernel 6.12) on my 14,3 Macbook Pro:

[    0.000000] DMI: Apple Inc. MacBookPro14,3/Mac-551B86E5744E2388, BIOS 529.140.2.0.0 06/23/2024

The apple-ibridge and apple-touchbar drivers don't work for me. There are quite a few forks of macbook12-spi-driver and I tried them all :) Right now I experiment with https://github.com/t2linux/apple-ib-drv (mbp15 branch)

initial bootup logs

[    5.750380] input: Apple Inc. iBridge as /devices/pci0000:00/0000:00:14.0/usb1/1-3/1-3:1.2/0003:05AC:8600.0001/input/input6
[    5.902236] hid-generic 0003:05AC:8600.0001: input,hidraw0: USB HID v1.01 Keyboard [Apple Inc. iBridge] on usb-0000:00:14.0-3/input2
[    5.903769] hid-generic 0003:05AC:8600.0002: hiddev0,hidraw1: USB HID v1.01 Device [Apple Inc. iBridge] on usb-0000:00:14.0-3/input3
[    5.912602] hid-sensor-hub 0003:05AC:8600.0002: hiddev0,hidraw1: USB HID v1.01 Device [Apple Inc. iBridge] on usb-0000:00:14.0-3/input3
root@macbookpro:~# modprobe apple-ibridge

Jun 21 11:47:58 macbookpro kernel: apple-ibridge-hid 0003:05AC:8600.0001: : USB HID v1.01 Keyboard [Apple Inc. iBridge] on usb-0000:00:14.0-3/input2
root@macbookpro:~# modprobe apple-touchbar
<nothing furthe gets logged>

I don't see any touchbar functionality. Anyone has an idea what is going one? There are two drivers and both cause issues:

apple-ibridge.ko

apple-ibridge.c: appleib_hid_probe() -> appleib_add_device() -> hid_add_device() for "Bridge Virtual HID 0003:05AC:8600.0001/1d6b:0301" returns error code -ENODEV and the successive cleanup in hid_destroy_device() is stuck forever.

Next, I decided to ignore the apple-ibridge.ko driver and use the apple-touchbar.ko driver directly:

apple-touchbar.ko

For it to trigger, I added the ibridge device id. Normally, the apple-touchbar.ko driver would trigger on the new virtual id created by the apple-ibridge.ko driver, only:

static const struct hid_device_id appletb_hid_ids[] = {
+       /* MacBook Pro's 2016, 2017, with T1 chip */
+       { HID_USB_DEVICE(USB_VENDOR_ID_APPLE,
+                        USB_DEVICE_ID_APPLE_IBRIDGE),
+         .driver_data = APPLETB_FEATURE_IS_T1 },

Now the probe function appletb_probe() is triggered and which calls appletb_test_and_mark_active(). This function is a kind of prerequisite for the driver to work.

	if (tb_dev->mode_iface.hdev && tb_dev->disp_iface.hdev &&
	    !tb_dev->active) {
		tb_dev->active = true;
		activated = true;
	}

tb_dev->mode_iface.hdev was previously created (true) while tb_dev->disp_iface.hdev was not (false) making this function to return false. When I force this function to return true the touchbar works!

Removing the driver crashes the kernel in applespi.ko. For now, I don't rmmod this driver. I would like to have a less hacky driver.

I wonder why am I the only one running into this problem? I see others getting this drivers to work ... but probably on other kernel versions.

Anyone knows how to proceed?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions