With the latest bunch of updates to the Nvidia and Multimedia repositories, I’ve added the ability to switch to the two implementations of the kernel modules currently available in the Nvidia driver for Linux.
Since almost a year, the Nvidia driver ships with two different implementations of the kernel modules, one proprietary and one open source. The open source one as of drivers 545.x is now considered beta quality also for the workstations, so it seems a good moment to start shipping it.
The open source one is supposed to be the only one that will be kept in the future, but at the moment both are available and both differ in terms of functionality. You can read about the main differences in terms of functionality and what chips they support in the official documentation.
I did not want to introduce another variation of the kernel modules beside akmods
, kABI
and DKMS
, this would have created even more confusion and lots of dependencies in the SPEC files for the variations. The new akmod and DKMS packages ship both sources (MIT/GPL and proprietary kernel modules) and allow you to switch between one or the other through a configuration file.
Considering that in the long run only the open source variant will remain, I wanted to make this as transparent as possible for the users. Basically, if you don’t care and just want something that works, nothing has changed for you.
The two sources get referenced as they are referenced inside the Nvidia run file, namely “kernel
” for the original proprietary kernel modules and “kernel-open
” for the new open source variation.
The following instructions show you how to switch between one implementation or the other.
Table of Contents
DKMS
Check which version you have installed:
# modinfo -l nvidia
NVIDIA
Change the type of modules you want to use and trigger a rebuild and a reinstall:
# sed -i -e 's/kernel$/kernel-open/g' /etc/nvidia/kernel.conf
# dkms build -m nvidia/545.29.02 --force
# dkms install -m nvidia/545.29.02 --force
Now check again the license and you should see that it has changed to MIT/GPL:
# modinfo -l nvidia
Dual MIT/GPL
# reboot
To switch back, change the configuration again and then trigger the same process for rebuilding installing:
# sed -i -e 's/kernel-open$/kernel/g' /etc/nvidia/kernel.conf
# dkms build -m nvidia/545.29.02 --force
# dkms install -m nvidia/545.29.02 --force
# reboot
akmods
Check which version you have installed:
# modinfo -l nvidia
NVIDIA
Change the type of modules you want to use and trigger a rebuild and a reinstall:
# sed -i -e 's/kernel$/kernel-open/g' /etc/nvidia/kernel.conf
# akmods --rebuild
Now check again the license and you should see that it has changed to MIT/GPL:
# modinfo -l nvidia
Dual MIT/GPL
# reboot
To switch back, change the configuration again and then trigger the same process for rebuilding installing:
# sed -i -e 's/kernel-open$/kernel/g' /etc/nvidia/kernel.conf
# akmods --rebuild
# reboot
I’m just leaving it here for the same problem as it was for me upgraded system and looks like got new driver version 560.
And no NVIDIA driver loaded no modules or anything.
$ sudo lshw -C display
shows UNCLAIMED beside mine GP108M [GeForce MX150]
I’ve googled and found that lot of people got the same problem.
One man removed all nvidia packages blacklisted module leftovers installed rpmfusion and got it working I suspect he has this repo.
Then I found comments here about NVIDIA way of new driver and checked output yes I got
modinfo -l nvidia
Dual MIT/GPL
so then I’ve executed
sed -i -e ‘s/kernel-open$/kernel/g’ /etc/nvidia/kernel.conf
akmods –rebuild
reboot
and got everything working back again
So as I understood my card simply is not supported by new open driver. As result such installation brokes working system
imho there should be some post install script with check if user card falls into new nvidia open list if not then switch to prop version and do not force open one instead… because really nowadays in linux more and more unskilled users and such cases usually pushing them back to some shitty windows…
This was described in November 2023: https://negativo17.org/nvidia-proprietary-and-open-source-kernel-modules/
There is no way for me to know which GPU you have in advance before installing the drivers. And Nvidia switched to using the open kernel module for their driver (run file, CUDA repository) from 560.
Okay, the update to Fedora 39 went well. But I do see a potential package conflict looming with Fedora’s ROCm packages. In particular:
dnf provides /usr/include/thrust/
cuda-cccl-devel-1:12.3.101-1.fc39.x86_64 : CXX Core Compute Libraries development files
Repo : fedora-nvidia
Matched from:
Other : /usr/include/thrust/
rocthrust-devel-5.6.0-2.fc39.noarch : The rocThrust development package
Repo : fedora
Matched from:
Other : /usr/include/thrust/
At present I’m happy with CUDA, but looking to the future anyone wishing to install both Radeon with ROCm, and Nvidia with CUDA, and use thrust with both, might find conflict. Would it be possible for fedora-nvidia to move its /usr/include/thrust e.g. to /usr/include/cuda/thrust, or elsewise distinguish it?
Thanks for reporting, will take a look.
At Tom Rix’ request, I’ve opened a bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2259056
Thanks for this, Slaanesh! I personally have many self-inflicted CUDA dependencies for ongoing projects, so will not be experimenting with this until at least Fedora 39. ( know, but will give it another month for the dust to settle.) Very heartening to see you out ahead on this. Best!