Blender does not enable Cuda for my graphics card

My system - OS: KDE neon, 5.11.0-41-generic, NVIDIA GeForce GTX 1050 Ti…

Sun Dec 12 17:17:19 2021       
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 495.44       Driver Version: 495.44       CUDA Version: 11.5     |
|-------------------------------+----------------------+----------------------+
| 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:02:00.0  On |                  N/A |
| 43%   30C    P8    N/A /  75W |    392MiB /  4035MiB |     10%      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------+


└─$ ./blender                 
Read prefs: /home/rivelino/.config/blender/3.0/config/userpref.blend
CUDA cuInit: Unknown CUDA error value
Saved session recovery to '/tmp/quit.blend'
Writing userprefs: '/home/rivelino/.config/blender/3.0/config/userpref.blend' ok
Info: Preferences saved

Blender quit

I’ve tested a lot, and the only thing that came out was downgrading the video driver to 460.91.03, but as it’s a relatively old driver, I’m not very comfortable using it, because I also play, and there’s already been many relevant additions to the driver in this period!
I’ve tested a lot, and the only thing that came out was downgrading the video driver to 460.91.03, but as it’s a relatively old driver, I’m not very comfortable using it, because I also play, and there’s already been many relevant additions to the driver in this period!

Does anyone have any idea what it might be?

I assume you are using Blender downloaded from the official Blender website, right?
Have you tried renaming the “3.0” folder in “/home/rivelino/.config/blender/”, for example to “3.0_bkp”?

Does the problem also occur with Blender 2.93.6?
https://download.blender.org/release/Blender2.93/

└─$ ./blender
Writing userprefs: '/home/rivelino/.config/blender/2.93/config/userpref.blend' ok
CUDA cuInit: Unknown CUDA error value
Saved session recovery to '/tmp/quit.blend'
Writing userprefs: '/home/rivelino/.config/blender/2.93/config/userpref.blend' ok

Blender quit

I tested the 2.93.6 and it also gave the same problem! I did what you said about the configuration folder, renamed it to create another one and it wasn’t either! I use Blender downloaded from the Steam store, to make it easier when updating (but I’ve already tested it with the one downloaded from the site as well). I also tested the 2.82 that ta in the system repositories, gives the same error.

I’ve already tested it with the PPA graphics drivers from nvidia, at the moment I have the driver downloaded directly from the website. I also installed Cuda-11.5.run from the nvidia site hoping to get rid of this error.

Being connected to the internet and without restarting the computer until the end of the process, you try to uninstall and clean everything related to the nvidia driver and Cuda, and then you install only the driver. From what I can see, for this you do:

From the terminal:
Uninstall CUDA Toolkit 11.5 from .run file:
sudo /usr/local/cuda-11.5/bin/cuda-uninstaller

You follow the steps indicated there in the terminal.

Clean all packages related to nvidia:
sudo apt-get purge "*nvidia*"

When the above task is finished, install only nvidia driver:
sudo apt install nvidia-driver-495 nvidia-prime

You do not install CUDA Toolkit.
Reboot the system.

Please, you try official “tar.xz” packages downloaded from Blender website (extract the archive to a new folder, and run there “blender” file)

Edit:
A question. When you installed CUDA from the .run file, you installed only the cuda toolkit and you avoided installing the driver when asked about it from the terminal, right?
If you also installed the driver from the Cuda installation process with .run file, after the step to uninstall cuda toolkit you do:
sudo /usr/bin/nvidia-uninstall

Then continue from “Clean all packages related to nvidia:” step.

1 Like

Responding: I just installed the cuda toolkit…
I’ll do the rest here and then I’ll return the result, thank you very much!

┌──(rivelino㉿rivelino-pc1)-[~/Downloads/blender-3.0.0-linux-x64]
└─$ ./blender
Writing userprefs: '/home/rivelino/.config/blender/3.0/config/userpref.blend' ok
Info: Preferences saved

CUDA cuInit: Unknown CUDA error value
Saved session recovery to '/tmp/quit.blend'
Writing userprefs: '/home/rivelino/.config/blender/3.0/config/userpref.blend' ok
Info: Preferences saved

Blender quit

######################

└─$ apt search nvidia | grep instalado

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

libnvidia-cfg1-495/focal-security,focal-updates,focal,now 495.44-0ubuntu0.20.04.1 amd64 [instalado,automático]
libnvidia-common-495/focal-security,focal-security,focal-updates,focal-updates,focal,focal,now 495.44-0ubuntu0.20.04.1 all [instalado,automático]
libnvidia-compute-495/focal-security,focal-updates,focal,now 495.44-0ubuntu0.20.04.1 amd64 [instalado,automático]
libnvidia-decode-495/focal-security,focal-updates,focal,now 495.44-0ubuntu0.20.04.1 amd64 [instalado,automático]
libnvidia-encode-495/focal-security,focal-updates,focal,now 495.44-0ubuntu0.20.04.1 amd64 [instalado,automático]
libnvidia-extra-495/focal-security,focal-updates,focal,now 495.44-0ubuntu0.20.04.1 amd64 [instalado,automático]
libnvidia-fbc1-495/focal-security,focal-updates,focal,now 495.44-0ubuntu0.20.04.1 amd64 [instalado,automático]
libnvidia-gl-495/focal-security,focal-updates,focal,now 495.44-0ubuntu0.20.04.1 amd64 [instalado,automático]
nvidia-compute-utils-495/focal-security,focal-updates,focal,now 495.44-0ubuntu0.20.04.1 amd64 [instalado,automático]
nvidia-dkms-495/focal-security,focal-updates,focal,now 495.44-0ubuntu0.20.04.1 amd64 [instalado,automático]
nvidia-driver-495/focal-security,focal-updates,focal,now 495.44-0ubuntu0.20.04.1 amd64 [instalado]
nvidia-kernel-common-495/focal-security,focal-updates,focal,now 495.44-0ubuntu0.20.04.1 amd64 [instalado,automático]
nvidia-kernel-source-495/focal-security,focal-updates,focal,now 495.44-0ubuntu0.20.04.1 amd64 [instalado,automático]
nvidia-prime/focal-updates,focal-updates,now 0.8.16~0.20.04.1 all [instalado]
nvidia-settings/focal-updates,focal,now 470.57.01-0ubuntu0.20.04.2 amd64 [instalado,automático]
nvidia-utils-495/focal-security,focal-updates,focal,now 495.44-0ubuntu0.20.04.1 amd64 [instalado,automático]
screen-resolution-extra/focal,focal,now 0.18build1 all [instalado,automático]
xserver-xorg-video-nvidia-495/focal-security,focal-updates,focal,now 495.44-0ubuntu0.20.04.1 amd64 [instalado,automático]

It still doesn’t work, even after all the steps! It still doesn’t work, even after all the steps!
Very strange

Do you remember if you manually edited a file related to nvidia while you were trying to fix the problem? If so, you try to revert the changes.
You try with 470 driver which is more stable, just in case it is a 495 driver problem with your card:

Clean all packages related to nvidia:
sudo apt-get purge "*nvidia*"

When the above task is finished, install 470 nvidia driver:
sudo apt install nvidia-driver-470 nvidia-prime

Reboot the system.

Remember to only do tests with the official Blender downloaded from the official Blender web site until you get it to work. (Edit: You try with Blender 2.93.6 first)
If this works with the 470 driver, then you will have to report the problem to nvidia.

Edit:
Remember that if you use official Blender, it includes precompiled CUDA kernels so you don’t need to install CUDA toolkit, only the correctly installed driver is necessary. I guess the same goes for the Steam version, but I’m not sure. That is why I ask you to first try Blender downloaded from the Blender website.

Stay the same.

Unfortunately, even in the 470.86 driver the problem persists in both Blender versions 2.93.6 and 3.0…

Mon Dec 13 00:16:13 2021       
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 470.86       Driver Version: 470.86       CUDA Version: 11.4     |
|-------------------------------+----------------------+----------------------+
| 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:02:00.0  On |                  N/A |
| 41%   27C    P8    N/A /  75W |    360MiB /  4035MiB |     13%      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------+
##################
┌──(rivelino㉿rivelino-pc1)-[~/Downloads/blender-2.93.6-linux-x64]
└─$ ./blender
Read prefs: /home/rivelino/.config/blender/2.93/config/userpref.blend
CUDA cuInit: Unknown CUDA error value
Saved session recovery to '/tmp/quit.blend'
Writing userprefs: '/home/rivelino/.config/blender/2.93/config/userpref.blend' ok

Blender quit
######################
┌──(rivelino㉿rivelino-pc1)-[~/Downloads/blender-3.0.0-linux-x64]
└─$ ./blender                                           
Read prefs: /home/rivelino/.config/blender/3.0/config/userpref.blend
CUDA cuInit: Unknown CUDA error value
Saved session recovery to '/tmp/quit.blend'
Writing userprefs: '/home/rivelino/.config/blender/3.0/config/userpref.blend' ok
Info: Preferences saved

Blender quit

the latest driver that works here for me is 460.91.03. I had seen some forum discussions with this problem, but none of the possible solutions applied in my case! I thought it was something in the driver, I created a post on a Nvidia forum, but they claimed it would be a bug in Blender… It’s complicated!

My question on an nvidia forum:

If you now purge everything related to the nvidia driver again and reinstall the 460 driver, do you have CUDA available in Blender 2.8 or 2.9?
If you do not have CUDA available again even with 460 drivers, perhaps it is a misconfiguration of the driver that has remained since some driver installation, and you may have to try a clean Linux installation to rule out that the problem is about it.

It’s weird, using KDE Neon stable here. I have no problem with any driver on GTX 960 4GB.

I have the same graphics card, and with the 470driver no problem in linux mint.

I do not install cuda toolkit, because there are problems with the toolkit and 470 driver.

So remove toolkit and take the 470 drivers, reboot

Well, this is strange… I remember that a few months ago I was doing some projects in Blender 2.82 and everything was normal, I even used 2.83 in some projects then when I upgraded to 3.0 and I went to test it, I was no longer recognizing it, then I saw it like the older ones I was… I’m going to do some tests with the 460 driver, and I’ll talk to you guys again… thank you

Mon Dec 13 12:37:15 2021       
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 460.91.03    Driver Version: 460.91.03    CUDA Version: 11.2     |
|-------------------------------+----------------------+----------------------+
| 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  GeForce GTX 105...  Off  | 00000000:02:00.0  On |                  N/A |
| 43%   28C    P8    N/A /  75W |    127MiB /  4035MiB |      3%      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------+

#########################

┌──(rivelino㉿rivelino-pc1)-[~/Downloads/blender-2.93.6-linux-x64]
└─$ ./blender
Read prefs: /home/rivelino/.config/blender/2.93/config/userpref.blend
Saved session recovery to '/tmp/quit.blend'
Writing userprefs: '/home/rivelino/.config/blender/2.93/config/userpref.blend' ok

Blender quit

#########################

┌──(rivelino㉿rivelino-pc1)-[~/Downloads/blender-3.0.0-linux-x64]
└─$ ./blender
Read prefs: /home/rivelino/.config/blender/3.0/config/userpref.blend
Saved session recovery to '/tmp/quit.blend'
Writing userprefs: '/home/rivelino/.config/blender/3.0/config/userpref.blend' ok
Info: Preferences saved

Blender quit

it works full in Blender 2.93 cuda and optix, in version 3.0 only cuda works since optix needs the driver >=470

You open a new Blender report explaining all this (CUDA is available with the 460 driver, but not with later versions). Open Blender, Help Menu and Report a Bug (that will collect data from your system to share with developers)

Also you open a thread in the nvidia forum, but in the Linux section, not in the CUDA section:

thanks YAFU :pray: