CheariX / silverblue-akmods-keys

Fedora Silverblue with SecureBoot enabled and working akmods such as akmod-nvidia or akmod-VirtualBox.
70 stars 3 forks source link

Document open kernel support with %_with_kmod_nvidia_open 1 #14

Open MateusRodCosta opened 1 week ago

MateusRodCosta commented 1 week ago

There are two options for the kernel driver right now: Proprietary (same as before) and open source (if you device supports the GSP and its firmware).

If you are installing from RPMFusion, using akmod-nvidia will get you the proprietary driver by default unless you set %_with_kmod_nvidia_open 1, which will bring the open kernel driver version Nvidia ships pre-compiled on their installer. There's the option of akmod-nvidia-open instead of akmod-nvidia, however last time I tried it still resulted in the proprietary driver being installed (apparently it also brought akmod-nvidia as dependency somehow)

See https://rpmfusion.org/Howto/NVIDIA#Kernel_Open for reference

According to https://discussion.fedoraproject.org/t/nvidia-how-to-switch-to-the-open-source-kernel-module/126362/13 it's possible to use silverblue-akmods-keys to set the required macro (echo "%_with_kmod_nvidia_open 1" >> macros.kmodtool) to have the open kernel driver on Silverblue systems.

I tested it on my system and it seems to be working properly:

$ cat /etc/rpm/macros.kmodtool 
%_kmodtool_signmodules_pubkey /etc/pki/akmods-keys/certs/public_key.der
%_kmodtool_signmodules_privkey /etc/pki/akmods-keys/private/private_key.priv
%_with_kmod_nvidia_open 1
$ modinfo -l nvidia
Dual MIT/GPL