quo / ithc-linux

Linux driver for Intel Touch Host Controller
37 stars 7 forks source link

Issues running on Fedora 36 #6

Closed Pairman closed 2 years ago

Pairman commented 2 years ago

System: Fedora Workstation Edition 36 Device: Surface Pro 7+

Is there a guide for building ithc-linux on Fedora 36? I tried to build but got these error messages:

[pairman@fedora ithc-linux]$ sudo make && sudo make install
[sudo] password for pairman: 
mkdir -p build
find build/ -type l -exec rm {} +
ln -sr src/* build/
make -C /lib/modules/`uname -r`/build M=/home/pairman/Downloads/ithc-linux/build
make[1]: Entering directory '/usr/src/kernels/5.17.9-2.surface.fc36.x86_64'
/bin/sh: -c: line 1: syntax error near unexpected token `('
/bin/sh: -c: line 1: `if [ "gcc (GCC) 12.1.1 20220507 (Red Hat 12.1.1-1)" != ""gcc (GCC) 12.1.1 20220507 (Red Hat 12.1.1-1)"" ]; then \'
make[1]: *** [Makefile:1727: prepare] Error 2
make[1]: Leaving directory '/usr/src/kernels/5.17.9-2.surface.fc36.x86_64'
make: *** [Makefile:8: default] Error 2
[pairman@fedora ithc-linux]$ 

Thanks in advance.

quo commented 2 years ago

This was an issue with the Fedora Surface kernel. It's been fixed now, so it should work once a kernel update is published at: https://github.com/linux-surface/linux-surface/releases

You could also use the normal non-Surface kernel to test ithc.

Pairman commented 2 years ago

I cloned again and build failed with the same output.

[pairman@fedora ithc-linux]$ sudo make && sudo make install
mkdir -p build
find build/ -type l -exec rm {} +
ln -sr src/* build/
make -C /lib/modules/`uname -r`/build M=/home/pairman/Downloads/ithc-linux/build
make[1]: Entering directory '/usr/src/kernels/5.17.9-2.surface.fc36.x86_64'
/bin/sh: -c: line 1: syntax error near unexpected token `('
/bin/sh: -c: line 1: `if [ "gcc (GCC) 12.1.1 20220507 (Red Hat 12.1.1-1)" != ""gcc (GCC) 12.1.1 20220507 (Red Hat 12.1.1-1)"" ]; then \'
make[1]: *** [Makefile:1727: prepare] Error 2
make[1]: Leaving directory '/usr/src/kernels/5.17.9-2.surface.fc36.x86_64'
make: *** [Makefile:8: default] Error 2
[pairman@fedora ithc-linux]$ 

I'm using the latest build artifact of kernel-surface in github actions of https://github.com/linux-surface/linux-surface. I think it has changed according to the issue you mentioned. But still failed.

Pairman commented 2 years ago

Build succeeded on official linux kernel. But it seems the driver isn't working after rebooting even if I added the intremap=nosid parameter. I'm using Surface Pro 7+.

Output of sudo modprobe ithc :

[pairman@fedora iptsd]$ sudo modprobe ithc
modprobe: ERROR: could not insert 'ithc': Key was rejected by service

Grub configs:

[pairman@fedora iptsd]$ sudo grubby --info ALL
index=0
kernel="/boot/vmlinuz-5.17.11-300.fc36.x86_64"
args="ro rootflags=subvol=root rd.luks.uuid=luks-0a7c4fcf-c720-462f-8d34-7c0f5f3a6668 rhgb quiet intremap=nosid"
root="UUID=adf805e1-e953-40d2-a82b-aa31876ccc46"
initrd="/boot/initramfs-5.17.11-300.fc36.x86_64.img"
title="Fedora Linux (5.17.11-300.fc36.x86_64) 36 (Workstation Edition)"
id="b1e35c0fd0b64f3fa26c67ff6a5f94f0-5.17.11-300.fc36.x86_64"
index=1
kernel="/boot/vmlinuz-5.17.9-2.surface.fc36.x86_64"
args="ro rootflags=subvol=root rd.luks.uuid=luks-0a7c4fcf-c720-462f-8d34-7c0f5f3a6668 rhgb quiet intremap=nosid"
root="UUID=adf805e1-e953-40d2-a82b-aa31876ccc46"
initrd="/boot/initramfs-5.17.9-2.surface.fc36.x86_64.img"
title="Fedora Linux (5.17.9-2.surface.fc36.x86_64) 36 (Workstation Edition)"
id="b1e35c0fd0b64f3fa26c67ff6a5f94f0-5.17.9-2.surface.fc36.x86_64"
index=2
kernel="/boot/vmlinuz-5.17.6-300.fc36.x86_64"
args="ro rootflags=subvol=root rd.luks.uuid=luks-0a7c4fcf-c720-462f-8d34-7c0f5f3a6668 rhgb quiet intremap=nosid"
root="UUID=adf805e1-e953-40d2-a82b-aa31876ccc46"
initrd="/boot/initramfs-5.17.6-300.fc36.x86_64.img"
title="Fedora Linux (5.17.6-300.fc36.x86_64) 36 (Workstation Edition)"
id="b1e35c0fd0b64f3fa26c67ff6a5f94f0-5.17.6-300.fc36.x86_64"
index=3
kernel="/boot/vmlinuz-5.17.5-300.fc36.x86_64"
args="ro rootflags=subvol=root rd.luks.uuid=luks-0a7c4fcf-c720-462f-8d34-7c0f5f3a6668 rhgb quiet intremap=nosid"
root="UUID=adf805e1-e953-40d2-a82b-aa31876ccc46"
initrd="/boot/initramfs-5.17.5-300.fc36.x86_64.img"
title="Fedora Linux (5.17.5-300.fc36.x86_64) 36 (Workstation Edition)"
id="b1e35c0fd0b64f3fa26c67ff6a5f94f0-5.17.5-300.fc36.x86_64"
index=4
kernel="/boot/vmlinuz-0-rescue-b1e35c0fd0b64f3fa26c67ff6a5f94f0"
args="ro rootflags=subvol=root rd.luks.uuid=luks-0a7c4fcf-c720-462f-8d34-7c0f5f3a6668 rhgb quiet intremap=nosid"
root="UUID=adf805e1-e953-40d2-a82b-aa31876ccc46"
initrd="/boot/initramfs-0-rescue-b1e35c0fd0b64f3fa26c67ff6a5f94f0.img"
title="Fedora Linux (0-rescue-b1e35c0fd0b64f3fa26c67ff6a5f94f0) 36 (Workstation Edition Prerelease)"
id="b1e35c0fd0b64f3fa26c67ff6a5f94f0-0-rescue"

Output of '''sudo dmesg | grep -Ei 'ithc|linux version|dmi:|class 0x0901'''' :

[pairman@fedora iptsd]$ sudo sudo dmesg | grep -Ei 'ithc|linux version|dmi:|class 0x0901'
[    0.000000] Linux version 5.17.11-300.fc36.x86_64 (mockbuild@bkernel01.iad2.fedoraproject.org) (gcc (GCC) 12.1.1 20220507 (Red Hat 12.1.1-1), GNU ld version 2.37-27.fc36) #1 SMP PREEMPT Wed May 25 15:04:05 UTC 2022
[    0.000000] DMI: Microsoft Corporation Surface Pro 7+/Surface Pro 7+, BIOS 18.102.143 03/07/2022
[    0.252304] pci 0000:00:10.6: [8086:a0d0] type 00 class 0x090100
[pairman@fedora iptsd]$ 
NP-chaonay commented 2 years ago

does secure boot enabled? maybe that is related to the problem

quo commented 2 years ago

Key was rejected by service

Yeah, that looks like a Secure Boot problem. Please remove the module (sudo rm /lib/modules/*/extra/ithc.ko; sudo depmod -a) and try the DKMS installation instead. You can also try to disable Secure Boot. Otherwise, you may have better luck asking on the Fedora support forums.

Pairman commented 2 years ago

Key was rejected by service

Yeah, that looks like a Secure Boot problem. Please remove the module (sudo rm /lib/modules/*/extra/ithc.ko; sudo depmod -a) and try the DKMS installation instead. You can also try to disable Secure Boot. Otherwise, you may have better luck asking on the Fedora support forums.

Thanks for help. I tried dkms method and still get the same output. I can use this module with secureboot disabled. I'm now asking on the fedora forum.

Pairman commented 2 years ago

Update: This kernel module is successfully signed and loaded using the method in these two articles.

https://www.janhendrikpeters.de/2021/05/11/obs-virtual-camera-secure-boot/

https://docs.fedoraproject.org/en-US/fedora/rawhide/system-administrators-guide/kernel-module-driver-configuration/Working_with_Kernel_Modules/#sect-signing-kernel-modules-for-secure-boot

Now all issues related to this is solved. Thanks again for you guys' help.