Issues with CUDA Installation on Fedora 41 and GNOME Conflicts

Hello Fedora community,

I am currently using Fedora 41 and I am trying to install CUDA on my system. Here are the details of my setup:

LSB Version:	:core-5.0-amd64:core-5.0-noarch
Distributor ID:	Fedora
Description:	Fedora release 41 (Forty One)
Release:	41
Codename:	FortyOne

I have already installed the NVIDIA drivers using RPM Fusion because I read that these packages are modified for Fedora and automatically receive updates without needing to start the system in tty mode. Following the documentation on RPM Fusion’s CUDA Howto page, I ran the following commands:

sudo dnf config-manager --add-repo https://developer.download.nvidia.com/compute/cuda/repos/fedora39/x86_64/cuda-fedora39.repo
sudo dnf clean all
sudo dnf module disable nvidia-driver
sudo dnf -y install cuda

However, I encountered an issue: there is no module named nvidia-driver. This resulted in conflicts when running dnf update, which led to my GNOME desktop environment breaking. Specifically, Brave browser windows were not being assigned to the correct workspaces, and overall workspace management was messed up.

My questions are:

  1. How can I resolve these conflicts and restore GNOME to its proper state?
  2. Is it better to use Nouveau or NVIDIA driver for better performance and a stable desktop experience on Fedora?
  3. What is the correct method to install CUDA on Fedora 41 without causing conflicts with the NVIDIA drivers already installed via RPM Fusion?

I appreciate any guidance on how to make this setup work smoothly.

Thank you!

Very simple for most users.

Use only the software from rpmfusion and never use nvidia software from negativo17 or the cuda-fedoraXX repos. You seem to have enabled cuda-fedora39.repo which it seems always causes conflicts with the rpmfusion software.

Instructions for installing both the nvidia drivers and cuda from rpmfusion is given here.
https://rpmfusion.org/Howto/NVIDIA
The command for installing cuda is one single line
sudo dnf install xorg-x11-drv-nvidia-cuda

yeah the process was straight forward for nvidia drivers. But right now I want to install cuda toolkit. Which is not available on the rpm fusion, for that we need to add the additional repo according to the docs on rpm fusion( Howto/CUDA - RPM Fusion). But when I add this repo there’s conflict in packages because there’s two providers of nvidia drivers, rpm fusion and cuda repo.

The solution to your need seems to indicate that you need to use the cuda-fedora repo. To avoid conflicts you should use software from one repo only so that seems to indicate you should remove the software from rpmfusion and install it from cuda-fedora.

The drivers may or may not work properly with the newer kernels of fedora and drivers issues with those from cuda-fedora are likely not within the expertise of most on this forum.

There also is a newer cuda-fedora repo. If you follow this link (from the link you posted) you can find the cuda-fedora41 repo (or merely replace the 39s with 41s in that link used to enable the repo).
https://developer.download.nvidia.com/compute/cuda/repos/

I would like to avoid the cuda-fedora and use rpmfusion if possible, But unfortunately rpmfusion doesn’t have cuda-toolkit. What I want to do is have nvidia-driver from rpmfusion and cuda-toolkit from cuda-fedora. But to do that I guess I will have to disable a module which is not possible becuase there’s no nvidia-driver module available. At the end ideally I would want to have nvidia driver from rpm fusion and cuda-toolkit(including nvcc) from cuda-fedora without any conflicts.

I am not an expert, though I have worked with nvidia issues for some time.
It is my understanding that if you require the cuda-toolkit that you must also install the nvidia driver from nvidia.

There seem to always be conflicts between the nvidia driver installed from rpmfusion and cuda from the cuda-fedoraXX repos.

Most users are not doing cuda development and thus the cuda package from nvidia serves the full function needed by most.

What is always seen as conflicts when switching from the cuda-fedoraXX software to the rpmfusion software is that cuda-fedoraXX installs a modular nvidia-driver module that must be disabled before installing akmod-nvidia from rpmfusion.