t2linux / kernel

Linux Kernel with T2-based devices support.
29 stars 3 forks source link

Touch bar broken on T1 macs since Linux 6.3 #12

Open stefand opened 5 months ago

stefand commented 5 months ago

I was using the apple-ib-drv driver for the touch bar on my MacBookPro14,3 (pre-T2) successfully up to kernel 6.1. Recently my distro switched to Linux 6.6. This introduced two problems:

One was a trivial to fix build error acpi_driver.ops.remove changed the return type from int to void.

The other issue is that most of the time the touch bar stays blank. It is detected by the driver but does not show anything or respond to input. I ran a git bisect over the kernel code and found this kernel patch as the patch that broke the touch bar:

e04955db6a7c3fc4a1e6978649b61a6f5f8028e3 is the first bad commit
commit e04955db6a7c3fc4a1e6978649b61a6f5f8028e3
Author: Ronald Tschalär <ronald@innovation.ch>
Date:   Wed Jan 11 10:07:36 2023 +0000

    HID: Recognize sensors with application collections

Reverting this patch on Linux 6.6 fixes the problem.

Sadly I am not familiar with the inner workings of the USB code, so I can't debug this further. I am filing this bug in the hope that someone who understands what this patch does notices it.

Some more details can be found at https://github.com/Dunedan/mbp-2016-linux/issues/189 .

stefand commented 5 months ago

dmesg-bad.txt dmesg-revert.txt

I tested Linux 6.7, but it doesn't change the behavior.

I am attaching two dmesg outputs (6.7 from Gentoo plus AUFS patches). dmesg-bad.txt is a boot where the touch remained black. dmesg-revert.txt is with the same kernel and commit e04955db reverted. The touch bar was functional in the dmesg-revert.txt case.

marc-git commented 1 month ago

This is also affecting my 14,3 MBP. I would appreciate very much this being looked into. The code was forked from the t1 base and is now being put into the kernel for t2 macs but compatibility with the T1 systems is not being considered. I can assist in testing on my pc if it helps.