Upgrading CUDA after a distro-upgrade to fedora 35

After upgrading my fedora33 which had a working NVIDIA driver and cuda-11.4 to fedora 35 I found that I had not upgraded my cuda. So I consulted the latest rpm fusion how-to and the NVIDIA CUDA Toolkit 12.1 Update 1 Downloads | NVIDIA Developer site. The NVIDIA site has a fedora-35 repo now and the current cuda is 11.6.
I tried:

dnf config-manager --add-repo https://developer.download.nvidia.com/compute/cuda/repos/fedora35/x86_64/cuda-fedora35.repo (worked)
dnf clean all
167 files removed
dnf module disable nvidia-driver
Dependencies resolved.
Nothing to do.
(from the nvidia instructions)
dnf -y module install nvidia-driver:latest-dkms
Problem 1: conflicting requests

  • package nvidia-driver-cuda-3:470.42.01-2.fc33.x86_64 conflicts with xorg-x11-drv-nvidia-cuda provided by xorg-x11-drv-nvidia-cuda-3:495.46-1.fc35.x86_64
  • package nvidia-driver-cuda-3:470.57.02-2.fc33.x86_64 conflicts with xorg-x11-drv-nvidia-cuda provided by xorg-x11-drv-nvidia-cuda-3:495.46-1.fc35.x86_64
  • package nvidia-driver-cuda-3:470.82.01-1.fc33.x86_64 conflicts with xorg-x11
    …more lines
    Problem 2: package kmod-nvidia-5.15.16-200.fc35.x86_64-3:495.46-1.fc35.x86_64 requires nvidia-kmod-common >= 3:495.46, but none of the providers can be installed
  • package nvidia-driver-3:470.82.01-1.fc33.x86_64 conflicts with xorg-x11-drv-nvidia provided by xorg-x11-drv-nvidia-3:495.46-1.fc35.x86_64

and then

dnf -y --allowerasing install cuda
Package cuda-11.4.0-1.x86_64 is already installed.
Dependencies resolved.
Problem: package cuda-11-6-11.6.0-1.x86_64 requires cuda-runtime-11-6 >= 11.6.0, but none of the providers can be installed

  • package cuda-11.6.0-1.x86_64 requires cuda-11-6 >= 11.6.0, but none of the providers can be installed
  • package cuda-runtime-11-6-11.6.0-1.x86_64 requires cuda-drivers >= 510.39.01, but none of the providers can be installed
  • cannot install the best candidate for the job
  • package cuda-drivers-510.39.01-1.x86_64 is filtered out by modular filtering

Have I gotten ahead of rpm fusion. or how should I proceed?

I think if you previous installation comes from RPMFussion, we should only install the upgrade from RPMFsussion too. But if it from Nvidia directly, we should also only install the upgrade from them too.

I believe both of them have different method on how they make the packaging and different method on how to install even though it came from same resources.

May be if you want to use packages directly from Nvidia, you need to remove completely the Nvidia packages from RPMFussion and start over with driver directly from Nvidia (I’m still thinking that RPMFussin still the best choice except if you need special feature that not present in RPMFussion Nvidia packages).

Thanks Syaifur. You are correct that I have to stick to rpmfusion instructions to upgrade. I did that by disabling the cuda-fedora35-x86_64 repo and enabling cuda-fedora34-x86_64. The result is
dnf -y install cuda
Last metadata expiration check: 0:00:24 ago on Sun 30 Jan 2022 10:13:29 AM PST.
Package cuda-11.4.0-1.x86_64 is already installed.
Dependencies resolved.
Nothing to do.

However, following this with dnf upgrade installs the cuda 11.5 code. I’ll check the howto site to see when 11.6 is ready.

If you were installing the nvidia driver from rpmfusion, the cuda driver would be installed by also installing the xorg-x11-drv-nvidia-cuda package and then both the nvidia driver and cuda would be kept up to date with the standard dnf upgrade command.
That does not use the cuda-fedora-x86_64 repo and the one from rpmfusion is integrated with the nvidia driver already.

Hi JV, I don’t follow this. The rpmfusion HowTo for fed34 up starts with
sudo dnf config-manager --add-repo https://developer.download.nvidia.com/compute/cuda/repos/fedora34/x86_64/cuda-fedora34.repo

so basically the NVDIA repo is always used. The difference is whether to use the 34 or 35 version.

I was only peripherally aware that repo exists because cuda worked for me when I followed this reference to install the driver for and enable cuda on my system from rpmfusion and have never had any trouble. There is a link on that reference that leads to the one below.

This reference seems to indicate that the part installed from the cuda-fedora-x86_64 repo requires disabling the nvidia-driver module as seen here.

CUDA Toolkit
Please use the Official link: https://developer.nvidia.com/cuda-downloads

Fedora 34 and later (if using a compatible compiler, see also

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

I saw no reason to install the toolkit for my needs so basically ignored the instructions from the second link. I did need the cuda driver on nvidia for apps that I run.