As always, very helpfull community! With your help I made it working, thank you!
If anyone have similar question, here are the steps that I had to do. Yesterday I was able to install latest drivers from nvidia page, but it worked partially: GPU was visible in nvidia settings, nvidia-smi
was also detecting it, but monitors was not detected and I was not able to change resolution. After removing drivers and installing open-ones from rpmfusion-nonfree-tainted
it still did not worked, cause I had error message in dmesg
that there is mismatch between client and kernel driver version. Because I had fresh install I did not wanted to waste more time, so I did another reinstall, and after below steps everything started working.
So, assuming that you have fresh install or properly removed previous nvidia drivers, here are the steps to make it work:
- Make sure your system is up to date
- Add rpmfusion-nonfree-tainted repo
sudo dnf config-manager addrepo --from-repofile=https://raw.githubusercontent.com/rpmfusion/rpmfusion-nonfree-release/refs/heads/master/rpmfusion-nonfree-tainted.repo
- I had to install also akmod-nvidia
sudo dnf install akmod-nvidia
- Install drivers
sudo dnf install akmod-nvidia-open xorg-x11-drv-nvidia-cuda
- Enable open drivers
sudo sh -c 'echo "%_with_kmod_nvidia_open 1" > /etc/rpm/macros.nvidia-kmod'
- Rebuild akmods
sudo akmods --kernels $(uname -r) --rebuild
- Reboot
Hopefully it will survive future kernel/driver updates.
EDIT:
If you want to have SecureBoot enabled there is need to sign modules and import key into MOK.
After last step (reebot is must) there should be keys created in /etc/pki/akmods
, I used them for signing.
I imported them to MOK by command sudo mokutil --import /etc/pki/akmods/certs/public_key.der
Then I found where nvidia module is on the disk by command modinfo nvidia | grep file
After than as a super user (sudo su
) i entered directory /lib/modules/6.13.4-200.fc41.x86_64/extra/nvidia
And signed the module, on my machine it was compressed (.xz) so i had to decompress and compress it again using unxz
.
unxz nvidia.ko.xz
- decompression
/usr/src/kernels/$(uname -r)/scripts/sign-file sha256 /etc/pki/akmods/private/private_key.priv /etc/pki/akmods/certs/public_key.der nvidia.ko
- signing
xz -f nvidia.ko
- compressing again
I did the same above three commands also for nvidia-open directory (../nvidia-open
).
I had to rebuild modules once again by command sudo akmods --kernels $(uname -r) --rebuild
and after reboot driver started working with secure boot enabled.
I know there is a way to somehow configure auto-signing, but my knowledge is too little. Also using keys not generated by yourself may be not the best idea, but I though I’ll share it anyway. Signing probably will be required after next kernel update, so I’m posting it also for future myself