NVIDIA: How to switch to the Open Source Kernel Module

as Nvidia released driver 555.58.02 with fully support for open Source Kernel module, i would like to know to how install them on Fedora Silverblue

i did already

rpm-ostree remove akmod-nvidia
rpm-ostree install akmod-nvidia-open

but modinfo still shows the old kernel-module:

~$ modinfo nvidia | grep license
license:        NVIDIA
~$ 

i think i have to trigger akmod-build somehow, but i don’t know how to accomplish this.

1 Like

I thought that it was the r560 nvidia release that has the open kernel code. There is matching close-source firmware required by the kernel driver.

I am not sure if anyone has packaged that code for Fedora yet.

hi @barryascott

thanks for your reply. Packaging is not an issue, it is provided by rpmfusion:

Name         : akmod-nvidia-open
Epoch        : 3
Version      : 550.76
Release      : 1.fc40
Architektur  : x86_64
Größe        : 13 M
Quelle       : nvidia-open-kmod-550.76-1.fc40.src.rpm
Paketquelle  : rpmfusion-nonfree-updates
Zusammenfass : Akmod package for nvidia-open kernel module(s)
URL          : https://github.com/NVIDIA/open-gpu-kernel-modules
Lizenz       : GPLv2 and MIT
Beschreibung : This package provides the akmod package for the nvidia-open kernel modules.

I’m sure, i’m missing a step… or two.

akmods --rebuild --force failed because it couldn’t find dnf/yum as I’m on the atomic desktop (silverblue). I’m sure there’s an “ostree way” to do akmods rebuild, but I haven’t found it yet.

The Open kernel module has been available for some time now. I know how to doi it on Worstation, but Silverblue is different because of how it handles some directories. But you can try. . .

  1. Check the license: modinfo -l nvidia

  2. Make the changes:

  • sed -i -e 's/kernel$/kernel-open/g' /etc/nvidia/kernel.conf
  1. Trigger the rebuild: akmods --rebuild

  2. Bob’s your uncle :exclamation: modinfo -l nvidia

  3. reboot

This is how it would work on Workstation. . .

that file doesn’t exist, so nothing to be replaced.

akmods --rebuild doesn’t work, as mentioned in my previous post. That’s because of silverblue: there is no dnf/yum.

But I also tested it on workstation and the /etc/nvidia/kernel.conf file doesn’t exist. Maybe you used a source other than rpmfusion for the driver?

~$ tail /var/cache/akmods/nvidia-open/550.76-1-for-6.9.9-200.fc40.x86_64.failed.log
2024/07/20 18:54:40 akmodsbuild: + rm -rf /tmp/akmodsbuild.Gs04uoIv//BUILD/nvidia-open-kmod-550.76-SPECPARTS
2024/07/20 18:54:40 akmodsbuild: + rm -rf nvidia-open-kmod-550.76 nvidia-open-kmod-550.76.gemspec
2024/07/20 18:54:40 akmodsbuild: + RPM_EC=0
2024/07/20 18:54:40 akmodsbuild: ++ jobs -p
2024/07/20 18:54:40 akmodsbuild: + exit 0
2024/07/20 18:54:40 akmods: Installing newly built rpms
2024/07/20 18:54:40 akmods: DNF not found, using YUM instead.
/usr/sbin/akmods: line 326: yum: command not found.
2024/07/20 18:54:40 akmods: Could not install newly built RPMs. You can find them and the logfile in:
2024/07/20 18:54:40 akmods: /var/cache/akmods/nvidia-open/550.76-1-for-6.9.9-200.fc40.x86_64.failed.log

That’s interesting, :thinking: because over the course of a month I did this on 6 machines. I am excluding my machine because I use DKMS and have a different boot manager.

Maybe @leigh123linux Can chime in on the steps to do this since they are close to the project.

If there is an RPM created then you can do the atomic-thing-to-install-an-rpm with it?

rpm-ostree install /path/to/package.rpm
1 Like

Added howto-candidate

I have succesfully switched to the open kernel drivers by using the following command:

sudo rpm-ostree update --uninstall akmod-nvidia --install akmod-nvidia-open

Can’t tell about distro’s nvidia drivers, I use my script. I switch open>closed live. :laughing:

doesn’t work for me. Tried that on two devices: Lenovo X1 Extreme 4th gen (NVRTX3050ti) and 5th gen (NVRTX3080ti)

modinfo -l nvidia still shows “NVIDIA”

Edit: Tried this as well in VMs, works like a charm in Workstation but not in Silverblue.

finally, i did it.

as i’m using secure boot, i follow the “hack” on GitHub - CheariX/silverblue-akmods-keys: Fedora Silverblue with SecureBoot enabled and working akmods such as akmod-nvidia or akmod-VirtualBox. for signing the binary blob with my own certificate.

i injected
echo "%_with_kmod_nvidia_open 1" >> macros.kmodtool
just before running the provied setup script. There is no need to install akmod-nvidia-open-Package.

Cheers.