roadrunner2 / 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.
GNU General Public License v2.0
251 stars 49 forks source link

Driver not working on kernel 6.10.6-200.fc40.x86_64 #71

Open Bandito11 opened 2 weeks ago

Bandito11 commented 2 weeks ago

DKMS make.log for applespi-0.1 for kernel 6.10.6-200.fc40.x86_64 (x86_64) Wed Aug 28 02:38:45 AM EDT 2024 make -C /lib/modules/6.10.6-200.fc40.x86_64/build M=/var/lib/dkms/applespi/0.1/build modules make[1]: Entering directory '/usr/src/kernels/6.10.6-200.fc40.x86_64' CC [M] /var/lib/dkms/applespi/0.1/build/apple-ibridge.o CC [M] /var/lib/dkms/applespi/0.1/build/apple-ib-tb.o CC [M] /var/lib/dkms/applespi/0.1/build/apple-ib-als.o /var/lib/dkms/applespi/0.1/build/apple-ib-tb.c: In function ‘appletb_fill_report_info’: /var/lib/dkms/applespi/0.1/build/apple-ib-tb.c:949:9: warning: enumeration value ‘HID_REPORT_TYPES’ not handled in switch [-Wswitch] 949 | switch (field->report->type) { | ^~ /var/lib/dkms/applespi/0.1/build/apple-ibridge.c:192:6: warning: no previous prototype for ‘appleib_detach_and_free_hid_driver’ [-Wmissing-prototypes] 192 | void appleib_detach_and_free_hid_driver(struct appleib_device ib_dev, | ^~~~~~~~~~ /var/lib/dkms/applespi/0.1/build/apple-ibridge.c:901:10: error: ‘struct acpi_driver’ has no member named ‘owner’ 901 | .owner = THIS_MODULE, | ^~~~~ In file included from ./arch/x86/include/asm/mem_encrypt.h:15, from ./include/linux/mem_encrypt.h:17, from ./arch/x86/include/asm/processor-flags.h:6, from ./arch/x86/include/asm/irqflags.h:5, from ./include/linux/irqflags.h:18, from ./include/linux/spinlock.h:59, from ./include/linux/mmzone.h:8, from ./include/linux/gfp.h:7, from ./include/linux/slab.h:16, from ./include/linux/resource_ext.h:11, from ./include/linux/acpi.h:13, from /var/lib/dkms/applespi/0.1/build/apple-ibridge.c:45: ./include/linux/init.h:180:21: error: initialization of ‘const struct acpi_device_id ’ from incompatible pointer type ‘struct module *’ [-Wincompatible-pointer-types] 180 | #define THIS_MODULE (&__this_module) | ^ /var/lib/dkms/applespi/0.1/build/apple-ibridge.c:901:27: note: in expansion of macro ‘THIS_MODULE’ 901 | .owner = THIS_MODULE, | ^~~ ./include/linux/init.h:180:21: note: (near initialization for ‘appleib_driver.ids’) 180 | #define THIS_MODULE (&this_module) | ^ /var/lib/dkms/applespi/0.1/build/apple-ibridge.c:901:27: note: in expansion of macro ‘THIS_MODULE’ 901 | .owner = THIS_MODULE, | ^~~ make[3]: [scripts/Makefile.build:244: /var/lib/dkms/applespi/0.1/build/apple-ibridge.o] Error 1 make[3]: Waiting for unfinished jobs.... make[2]: [/usr/src/kernels/6.10.6-200.fc40.x86_64/Makefile:1946: /var/lib/dkms/applespi/0.1/build] Error 2 make[1]: [Makefile:252: sub-make] Error 2 make[1]: Leaving directory '/usr/src/kernels/6.10.6-200.fc40.x86_64' make: *** [Makefile:22: all] Error 2

Here is the log file. Please help :(

Thanks!

Edit:

I tried almas, ecos-hj and BrianValente branches but neither of their fixes worked for me.

RamtinKosari commented 2 weeks ago

i have same problem this driver is not working on kernel 6 version

Ethelnol commented 1 week ago

i downloaded and used the almas version for linux kernel 6.1.0-25 and was able to get it to compile after changing 2 lines of code that errored i solved apple-ib-tb.c:949 by adding default: break; on line 956-957 after case HID_FEATURE_REPORT: report_info->report_type = 3; break; on 954-955 i was only given one other error apple-ibridge.c:905 which i fixed by changing void in static void appleib_remove(struct acpi_device *acpi) on 846 to int and return; on 852 to return 1;

after compilation and reboot, i needed to run sudo echo '1-3' > /sys/bus/usb/drivers/usb/unbind && sudo echo '1-3' > /sys/bus/usb/drivers/usb/bind to get the touchbar to work as recommended here https://github.com/roadrunner2/macbook12-spi-driver/issues/42#issuecomment-602160740