Nvidia Cuda is not shown in Blender

Blender Cuda not working. Cycle render devices Cuda is not shown device list in preferences.
blender-cuda-not-shown

Blender is fedora package, Nvidia install driver is rpmfusion.
Nvidia driver load successfully as bellow command.

lsmod | grep nvidia

nvidia_drm             73728  9
nvidia_modeset       1212416  13 nvidia_drm
nvidia_uvm           2904064  2
nvidia              56176640  770 nvidia_uvm,nvidia_modeset
video                  65536  1 nvidia_modeset

Cuda information as bellow.

rpm -ql xorg-x11-drv-nvidia-cuda-libs |grep \.so
/usr/lib64/libcuda.so
/usr/lib64/libcuda.so.1
/usr/lib64/libcuda.so.525.60.11
/usr/lib64/libcudadebugger.so.1
/usr/lib64/libcudadebugger.so.525.60.11
/usr/lib64/libnvcuvid.so.1
/usr/lib64/libnvcuvid.so.525.60.11
/usr/lib64/libnvidia-compiler.so.525.60.11
/usr/lib64/libnvidia-encode.so.1
/usr/lib64/libnvidia-encode.so.525.60.11
/usr/lib64/libnvidia-ml.so
/usr/lib64/libnvidia-ml.so.1
/usr/lib64/libnvidia-ml.so.525.60.11
/usr/lib64/libnvidia-nvvm.so
/usr/lib64/libnvidia-nvvm.so.4
/usr/lib64/libnvidia-nvvm.so.525.60.11
/usr/lib64/libnvidia-opencl.so.1
/usr/lib64/libnvidia-opencl.so.525.60.11
/usr/lib64/libnvidia-opticalflow.so.1
/usr/lib64/libnvidia-opticalflow.so.525.60.11
/usr/lib64/libnvidia-ptxjitcompiler.so.1
/usr/lib64/libnvidia-ptxjitcompiler.so.525.60.11
/usr/lib/libcuda.so
/usr/lib/libcuda.so.1
/usr/lib/libcuda.so.525.60.11
/usr/lib/libnvcuvid.so.1
/usr/lib/libnvcuvid.so.525.60.11
/usr/lib/libnvidia-compiler.so.525.60.11
/usr/lib/libnvidia-encode.so.1
/usr/lib/libnvidia-encode.so.525.60.11
/usr/lib/libnvidia-ml.so
/usr/lib/libnvidia-ml.so.1
/usr/lib/libnvidia-ml.so.525.60.11
/usr/lib/libnvidia-nvvm.so
/usr/lib/libnvidia-nvvm.so.4
/usr/lib/libnvidia-nvvm.so.525.60.11
/usr/lib/libnvidia-opencl.so.1
/usr/lib/libnvidia-opencl.so.525.60.11
/usr/lib/libnvidia-opticalflow.so.1
/usr/lib/libnvidia-opticalflow.so.525.60.11
/usr/lib/libnvidia-ptxjitcompiler.so.1
/usr/lib/libnvidia-ptxjitcompiler.so.525.60.11

Flatpak version show with Cuda Nvidia list in preferences and rendering work fine .
My System is Fedora 37 up-to-date, Blender version is 3.4.1 and graphic card is NVIDIA GeForce GTX 750Ti.

Edit:
I want to use Fedora package version with Cuda.
Blender official Linux binary rpmfusoin Cuda work fine and NVIDIA CUDA tool kit nvcc command also work fine.

What is the output of dnf list installed *cuda*?
What is the output of nvidia-smi?

Jeff V, thanks for advice.

dnf list installed *cuda*

texlive-barracuda.noarch              9:svn53683-59.fc37   @fedora                   
xorg-x11-drv-nvidia-cuda.x86_64       3:525.60.11-1.fc37   @rpmfusion-nonfree-updates
xorg-x11-drv-nvidia-cuda-libs.i686    3:525.60.11-1.fc37   @rpmfusion-nonfree-updates
xorg-x11-drv-nvidia-cuda-libs.x86_64 

and

sudo nvidia-smi

Sat Jan 14 15:04:24 2023       
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 525.60.11    Driver Version: 525.60.11    CUDA Version: 12.0     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|                               |                      |               MIG M. |
|===============================+======================+======================|
|   0  NVIDIA GeForce ...  Off  | 00000000:01:00.0  On |                  N/A |
| 40%   19C    P8     1W /  38W |    892MiB /  2048MiB |      0%      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------+
                                                                               
+-----------------------------------------------------------------------------+
| Processes:                                                                  |
|  GPU   GI   CI        PID   Type   Process name                  GPU Memory |
|        ID   ID                                                   Usage      |
|=============================================================================|
|    0   N/A  N/A      1844      G   /usr/libexec/Xorg                 173MiB |
|    0   N/A  N/A      2238    C+G   ...ome-remote-desktop-daemon       28MiB |
|    0   N/A  N/A      2301      G   /usr/bin/gnome-shell              127MiB |
|    0   N/A  N/A      2639      G   /usr/bin/gnome-software            27MiB |
|    0   N/A  N/A     20750      G   /usr/lib64/firefox/firefox        328MiB |
|    0   N/A  N/A     23587    C+G   blender                           192MiB |
+-----------------------------------------------------------------------------+

blender command output in gnome-terminal

BLT_lang_init: 'locale' data path for translations not found, continuing
Read prefs: /home/f37/.config/blender/3.4/config/userpref.blend
which: no nvcc in ( (/home/f37/.local/bin:/home/f37/bin:/usr/lib/qtchooser:/usr/lib64/qt-3.3/bin:/usr/share/Modules/bin:/usr/lib64/ccache:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin)

Fedora clean install also same error.
Blender search nvcc command. nvcc command is involuved in NVIDIA CUDA Tool kit.
Install these, work fine.

Other information,
Blender official Linux binary with rpmfusion Cuda work fine.

You might try removing /home/f37/.config/blender and all its content then restart blender.
It may be that something in that config is corrupt and giving an invalid config at the time blender starts.

It seems strange that launching blender from the command line gives me the same error you see about the unsupported GPU and opencl, but launching it from the desktop icon works fine.

I do not have an nvcc binary though I do have these

# find / -name *nvcc* 2>/dev/null
/usr/include/boost/config/compiler/nvcc.hpp
/usr/include/boost/predef/compiler/nvcc.h
/usr/share/cmake/Modules/FindCUDA/run_nvcc.cmake

I remove it, but don’t resolve.

Because Blender Official Linux binary work fine, i think support my graphics card.

find / -name *nvcc* 2>/dev/null

/home/f37/.local/share/flatpak/runtime/org.freedesktop.Sdk/x86_64/21.08/a439c06472701e00aead26fc20f474b187604a7803d942c56908743ef54e9c61/files/share/cmake-3.25/Modules/FindCUDA/run_nvcc.cmake
/home/f37/.local/share/flatpak/runtime/org.freedesktop.Sdk/x86_64/22.08/cdc95dc9148db662c5495236a7284e0a86bd7cebea8a3bb660fc8f19ebecc8e0/files/share/cmake-3.25/Modules/FindCUDA/run_nvcc.cmake
/home/f37/.local/share/flatpak/runtime/org.gnome.Sdk/x86_64/43/6acc512e49b652ed4f2fc2b2ff2f3c8c8e6b8ef4c6f856e439493945e08bff1b/files/share/cmake-3.25/Modules/FindCUDA/run_nvcc.cmake
/usr/include/boost/config/compiler/nvcc.hpp
/usr/include/boost/predef/compiler/nvcc.h
/usr/share/cmake/Modules/FindCUDA/run_nvcc.cmake
/var/lib/flatpak/runtime/org.gnome.Sdk/x86_64/master/64ce285f0c87705902529488459c1cbb5dd64304827ce572528745418fe526f5/files/share/cmake-3.25/Modules/FindCUDA/run_nvcc.cmake

However have many Flatpak file, there are cuda file with rpmfusion. ( not clean install system)

For thie one week, I investigate Blender with CUDA.
I successfully install both rpmfusion cuda and NVIDIA CUDA.
These steps clean install in both Fedora 37 and Fedora 36.

HOWTO install

Nvidia rpmfusion driver see as below,

sudo dnf upgrade
sudo dnf -y install https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm https://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm
sudo dnf install akmod-nvidia
sudo dnf install xorg-x11-drv-nvidia-cuda
sudo grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg

then, reboot.
These command is rpmfusion cuda installation complete.

Next, NVIDIA CUDA Installation, as below.

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

These command is complete installation NVIDIA CUDA with rpmfusion nvidia driver.

Check rpm fusion as below

lsmod | grep -e "nvidia|nouveau"

nvidia_drm             73728  8
nvidia_modeset       1220608  11 nvidia_drm
nvidia_uvm           2904064  2
nvidia              56393728  667 nvidia_uvm,nvidia_modeset
video                  65536  1 nvidia_modeset

Further, edit /etc/default/grub, because can’t boot kernel with black screen.

GRUB_CMDLINE_LINUX="rd.driver.blacklist=nouveau modprobe.blacklist=nouveau  resume=UUID=XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXX rd.driver.blacklist=nouveau modprobe.blacklist=nouveau "

UUID=XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXX value is each environment. Remove nvidia-drm.modeset=1 and initcall_blacklist=simpledrm_platform_driver_init as above.

Then sudo grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg, reboot.

These steps are complete rpmfusion driver and cuda and NVIDIA CUDA.

Jeff V said *nvcc* file

I want to ask Jeff about Fedora package Blender.
I guess that these file don’t need .

Top two file is boost-devel package, /usr/share/cmake/Modules/FindCUDA/run_nvcc.cmake is cmake-data. I think that Blender can’t show cuda list with installing two package. It don’t related to rendering.

Have you installed flatpak blender? I think that click the desktop icon is Flatpak blender. Do your Blender Cuda list show in /usr/bin/blender? Blender Flatpak command is flatpak run org.blender.Blender. Because, as below output /usr/bin/blender`.

which: no nvcc in ( (/home/f37/.local/bin:/home/f37/bin:/usr/lib/qtchooser:/usr/lib64/qt-3.3/bin:/usr/share/Modules/bin:/usr/lib64/ccache:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin)

I think need nvcc command. Blender flatpak run command, not output “no nvcc”.
I install NVIDIA CUDA, Fedora package can list without “no nccc error message”.
Can select many languages preferences on Flatpak, only english on Fedora package.

conclusion

Easy step to use blender cuda rendering, after install nvidia rpmfusion driver and cuda rpmfusion version, install and use blender flatpak.

thanks.