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!