Fred78290 / nct6687d

Linux kernel module for Nuvoton NCT6687-R
GNU General Public License v2.0
211 stars 40 forks source link

modprobe error on MSI MAG B660M MORTAR #94

Closed chain710 closed 5 months ago

chain710 commented 5 months ago

First of all, thank you for the great work

proxmox-ve: 8.2.0 (running kernel: 6.8.4-2-pve), chip on the board says NCT6687D-M

compile ok but modprobe return error Key was rejected by service

I'm not an expert in kernels or drivers, so I'm not sure how to fix it. I would greatly appreciate any advice on this matter.

command output:

$ make dkms/install
rm -rf /home/admin/workspace/nct6687d/dkms
mkdir -p /home/admin/workspace/nct6687d/dkms
cp /home/admin/workspace/nct6687d/dkms.conf /home/admin/workspace/nct6687d/Makefile /home/admin/workspace/nct6687d/nct6687.c /home/admin/workspace/nct6687d/dkms
sudo rm -rf /usr/src/nct6687d-1
sudo cp -rT dkms /usr/src/nct6687d-1
sudo dkms install nct6687d/1
Sign command: /lib/modules/6.8.4-2-pve/build/scripts/sign-file
Signing key: /var/lib/dkms/mok.key
Public certificate (MOK): /var/lib/dkms/mok.pub
Creating symlink /var/lib/dkms/nct6687d/1/source -> /usr/src/nct6687d-1

Building module:
Cleaning build area...
make -j12 KERNELRELEASE=6.8.4-2-pve kver=6.8.4-2-pve dkms/build...
Signing module /var/lib/dkms/nct6687d/1/build/nct6687.ko
Cleaning build area...

nct6687.ko:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/6.8.4-2-pve/updates/dkms/
depmod...
sudo modprobe nct6687
modprobe: ERROR: could not insert 'nct6687': Key was rejected by service
make: *** [Makefile:55: dkms/install] Error 1
Fred78290 commented 5 months ago

Could you active debug mode and display of grep nct6687 /var/log/syslog ?

Fred78290 commented 5 months ago

Probably need to sign the module

https://askubuntu.com/questions/1455528/modprobe-key-was-rejected-by-service-ubuntu-22-04-1-desktop-iso

chain710 commented 5 months ago

Probably need to sign the module

https://askubuntu.com/questions/1455528/modprobe-key-was-rejected-by-service-ubuntu-22-04-1-desktop-iso

Based on this thread, perhaps disabling secure boot could be a workaround for this issue? I'm not sure if it's the best practice though.

chain710 commented 5 months ago

active debug mode

Could you please explain exactly how to activate debug mode? I'm not an expert in kernels or drivers.

Fred78290 commented 5 months ago

Must compiled with flag: -DDEBUG

chain710 commented 5 months ago

Two methods have been tested to fix this issue:

  1. Disable secure boot (via BIOS).
  2. Import /var/lib/dkms/mok.pub by running sudo mokutil --import /var/lib/dkms/mok.pub and then reboot to enroll the key.

Again, thank you for the great work!