Skip to content

Instantly share code, notes, and snippets.

@pablopunk
Last active November 23, 2018 16:14
Show Gist options
  • Save pablopunk/2d58a9b5cb05e94d9c6bf630307b1c24 to your computer and use it in GitHub Desktop.
Save pablopunk/2d58a9b5cb05e94d9c6bf630307b1c24 to your computer and use it in GitHub Desktop.
Sign razer dkms modules with secure boot enabled

https://computerlinguist.org/make-dkms-sign-kernel-modules-for-secure-boot-on-ubuntu-1604.html

Create a file /etc/dkms/sign-kernel-objects.conf with the following content:

POST_BUILD=../../../../../../root/sign-kernel.sh

Next, create the script which actually signs the modules in /root/sign-kernel.sh:

#!/bin/bash

cd ../$kernelver/$arch/module/

for kernel_object in *ko; do
     echo "Signing kernel_object: $kernel_object"
    /usr/src/linux-headers-$kernelver/scripts/sign-file sha256 /root/MOK.priv /root/MOK.der "$kernel_object";
done

Now sign the modules you want (in this case, razer module):

sudo ln -s /etc/dkms/sign-kernel-objects.conf /etc/dkms/openrazer-driver.conf

Reboot and use polychromatic!

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