CUDA problem after driver update

Good evening, yesterday my graphics card drivers were updated (RTX 2080), and since then I have not been able to use the CUDA cores to edit/encode video with Handbrake or do streaming with OBS because the NVENC codec option is not available, but when I run the nvidia-smi command I see that the CUDA drivers are installed.

I use Fedora 38 Workstation and I installed the Nvidia and CUDA drivers using:

sudo dnf install akmod-nvidia

sudo dnf install xorg-x11-drv-nvidia-cuda

Thanks for your help.

rpmfusion

CUDA

The driver support CUDA when installing the xorg-x11-drv-nvidia-cuda subpackage. Please have a look on the dedicated CUDA Howto

But, interesting:)

maybe?

Hardware codecs with NVIDIA

The Nvidia proprieatary driver doesn’t support VAAPI, but there is a wrapper that can bridge NVDEC/NVENC with VAAPI

sudo dnf install nvidia-vaapi-driver


Please show us the output of dnf list installed '*nvidia*'

Also please (as much as possible) post items from your screen as copy & paste of the text using the preformatted text tags </> on the toolbar, or use triple back quotes ``` on the line preceding and following the pasted text so we can see and read exactly what you see and formatted as you see it.

The forum is not friendly to images for searching and quoting so it is more difficult to use images than text, and not friendly to those who may search later.
```
your text pasted here
another line of text
```
looks like this when using this method

your text pasted here
   another line of text

Hello @computersavvy, this is the result:

Installed Packages
akmod-nvidia.x86_64                                 3:535.54.03-1.fc38             @rpmfusion-nonfree-nvidia-driver
kmod-nvidia-6.3.6-200.fc38.x86_64.x86_64            3:530.41.03-1.fc38             @@commandline                   
kmod-nvidia-6.3.7-200.fc38.x86_64.x86_64            3:530.41.03-1.fc38             @@commandline                   
kmod-nvidia-6.3.8-200.fc38.x86_64.x86_64            3:535.54.03-1.fc38             @@commandline                   
nvidia-gpu-firmware.noarch                          20230515-150.fc38              @updates                        
nvidia-persistenced.x86_64                          3:535.54.03-1.fc38             @rpmfusion-nonfree-nvidia-driver
nvidia-settings.x86_64                              3:535.54.03-1.fc38             @rpmfusion-nonfree-nvidia-driver
nvidia-vaapi-driver.x86_64                          0.0.9-1.fc38                   @rpmfusion-nonfree              
xorg-x11-drv-nvidia.x86_64                          3:535.54.03-2.fc38             @rpmfusion-nonfree-nvidia-driver
xorg-x11-drv-nvidia-cuda.x86_64                     3:535.54.03-2.fc38             @rpmfusion-nonfree-nvidia-driver
xorg-x11-drv-nvidia-cuda-libs.i686                  3:535.54.03-2.fc38             @rpmfusion-nonfree-nvidia-driver
xorg-x11-drv-nvidia-cuda-libs.x86_64                3:535.54.03-2.fc38             @rpmfusion-nonfree-nvidia-driver
xorg-x11-drv-nvidia-kmodsrc.x86_64                  3:535.54.03-2.fc38             @rpmfusion-nonfree-nvidia-driver
xorg-x11-drv-nvidia-libs.i686                       3:535.54.03-2.fc38             @rpmfusion-nonfree-nvidia-driver
xorg-x11-drv-nvidia-libs.x86_64                     3:535.54.03-2.fc38             @rpmfusion-nonfree-nvidia-driver
xorg-x11-drv-nvidia-power.x86_64                    3:535.54.03-2.fc38             @rpmfusion-nonfree-nvidia-driver

Interesting.
You have exactly the same as I do for the nvidia drivers, but I am not using the nvidia-vaapi-driver package and cuda works perfectly for my needs.

I am running apps 24x7 that run cuda with my gpu and have never had an issue with any cuda app.

I note that you used the nvcc app. That does not seem to come from rpmfusion so there may be issues with that. Especially since it seems to be for a much older version of cuda.
image

I would suggest that you consider removing whatever provides nvcc and any thing else cuda related that may have been installed with it. Those may be interfering since the older version of cuda and whatever it installed might conflict with the newer cuda from rpmfusion.

Also consider removing the vaapi driver which seems not needed on my system. From the website that provides the code for vaapi I see

This is an VA-API implementation that uses NVDEC as a backend. This implementation is 
specifically designed to be used by Firefox for accelerated decode of web content, and may 
not operate correctly in other applications.

I am not sure that is even required for later versions of firefox since the nvidia driver directly handles the harware acceleration with the gpu.

Hi @computersavvy, I don’t have anything related to nvcc installed on my computer, I think you are confused with the user @idanka. Regarding VAAPI, I have already uninstalled it but my problem persists. This all originated a couple of days ago when my GPU drivers were updated. Upon reboot the computer was for several minutes on black screen with a flashing script, and I forced another reboot. Is that the cause of the problem? If so, should I uninstall and reinstall the drivers? Thanks.

Possibly the cause. It sometimes takes several minutes for the drivers to be compiled and installed properly and if that process is interrupted it can be an issue.

A full reinstall is not usually required. I liken that to using a sledge hammer to drive a tack. Major overkill.

If cuda is the only thing not properly functioning then simply remove then reinstall the xorg-x11-drv-nvidia-cuda package. If there is also a problem with the drivers that can be usually solved by

  1. dnf remove kmod-nvidia-6.3.X\* using the proper kernel version which has the problem
    followed by
  2. sudo akmods --force to recompile and reinstall the drivers.

In both cases allow adequate time after the command completes for the drivers to be properly built and installed and do not force an interruption – then reboot. Usually 5 to 10 minutes seems adequate depending on the speed of ones computer.

I tried the two methods you suggested and the problem continues. I don’t know what other method to use other than having to completely reinstall the drivers.

The method mentioned above is not good (Howto/CUDA - RPM Fusion) because it works?

CUDA

The driver support CUDA when installing the xorg-x11-drv-nvidia-cuda subpackage. Please have a look on the dedicated CUDA Howto

That seems out of date since rpmfusion provides the xorg-x11-drv-nvidia-cuda package but that link references installing directly from the nvidia repos and does not even mention the xorg package. I know that those instructions were preferred in the past, but seem to recall that was deprecated after rpmfusion started to offer the xorg package. I may be misunderstanding.

I believe that in most related posts recently the users have had issues with installing from both sources at the same time.

it’s a little outdated but I never had a problem with it. Currently, Cuda 11.8 can be installed this way.

I have tried @computersavvy’s suggestions and even completely reinstalling the nvidia and CUDA drivers and still can’t fix the problem. I don’t know what else to do. I can think of reinstalling the whole system but I feel it will be the same.

Hi guys.

I finally solved the problem. Apparently it is due to a bug in Flatpak that is not letting me update or install applications. I tried reinstalling Handbrake from Gnome Software and it threw an error, so I proceeded to do it from the terminal. There I noticed that along with Handbrake this dependency is installed: org.freedesktop.Platform.GL.nvidia-535-54-03 and with that it was solved and I can use the CUDA cores. Of course, at the moment (?) to install/update applications from flatpak in the terminal you must use “sudo”, otherwise it won’t work.

Thanks!

I never anticipated that would be the cause. Yes, the nvidia driver installs that runtime package, and if it failed to install properly should have given some indication.

I guess I would never see that error in gnome-software since 99.9% of my installations are done at the command line in a terminal.

Glad that has been worked out now. :+1: