Page MenuHome

Debian Linux Blender can't see CUDA devices, says "CUEW initialization failed"
Closed, ResolvedPublic


System Information
Operating system: Debian GNU/Linux 10 (buster)
Graphics card: Nvidia GeForce GTX 1070

Blender Version
Broken: 2.83.7, 2.90.1, 2.91.0
Worked: unsure
Short description of error

Blender is unable to use my Nvidia GPU for Cycles rendering. I have Nvidia drivers working, and I noticed that Eevee renders use the Nvidia GPU properly, as I can see 99% GPU utilization during Eevee renders using the nvidia-smi command.

Under Edit -> Preferences -> System -> CUDA, an error message says "No compatible GPUs found for path tracing Cycles will render on the CPU".

If I run blender with Cycles debugging on (blender --debug-cycles), I see an error related to opening a CUDA library:
I0117 08:45:47.952724 1230 device_cuda.cpp:56] CUEW initialization failed: Error opening the library

Exact steps for others to reproduce the error

  1. Download the newest Blender (2.91.0).
  2. Extract the tar.bz2 file to a directory somewhere.
  3. From within the new directory, run blender --debug-cycles & to start blender in the background with Cycles debugging on
  4. Navigate to Edit -> Preferences -> System and then choose CUDA under Cycles Render Devices
  5. You should see a message that no compatible GPUs are available.
  6. The debug logs in the terminal should show the CUEW initialization failed: Error opening the library error.
  • Output of nvidia-smi command **

Below is the output of nvidia-smi, which shows driver versions, etc. in case that helps. Just as an example of Eevee using the GPU successfully, this output of nvidia-smi shows 99% utilization during a computationally intensive Eevee render:

| NVIDIA-SMI 418.152.00   Driver Version: 418.152.00   CUDA Version: N/A      |
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|   0  GeForce GTX 1070    On   | 00000000:02:00.0  On |                  N/A |
|  0%   55C    P0   101W / 200W |   2578MiB /  8119MiB |     99%      Default |
| Processes:                                                       GPU Memory |
|  GPU       PID   Type   Process name                             Usage      |
|    0      1099      G   blender                                     1917MiB |
|    0      1387      G   /usr/lib/xorg/Xorg                            26MiB |
|    0      1567      G   /usr/bin/gnome-shell                          25MiB |
|    0      1849      G   /usr/lib/xorg/Xorg                           275MiB |
|    0      1926      G   /usr/bin/gnome-shell                         276MiB |
|    0      4967      G   .../share/spotify/debug.log --shared-files    54MiB |

Event Timeline

What version of the Linux Kernel are you running? You can find out which version you're using with uname -r in the terminal/shell/etc.

I ask this as with Kernel version 5.9 and higher, CUDA no longer works on Nvidia GPUs unless you are running driver version 455.45 or higher.

Another thing you need to do is ensure you have CUDA libraries installed. This can be done by running the command sudo apt install libcuda1

Robert Guetzkow (rjg) changed the task status from Needs Triage to Needs Information from User.Jan 18 2021, 11:30 AM

As @Alaska (Alaska) said, please install the latest Nvidia driver for your GPU.

@Alaska (Alaska) @Robert Guetzkow (rjg) thank you both. The issue was the Nvidia driver version as you said. Debian only has up to version 418 available in the normal repos, so I had to install the driver directly from Nvidia's website. This was a risk since it's not vetted by the Debian maintainers yet, but it worked, and my issue is resolved.

For the record, my kernel version is 4.19.0-13-amd64.

Just in case this helps someone else in the future, here is the Nvidia driver version I have now (upgraded from 418.152.00):

| NVIDIA-SMI 460.32.03    Driver Version: 460.32.03    CUDA Version: 11.2     |

I appreciate your help!

Alaska (Alaska) closed this task as Resolved.Jan 19 2021, 9:49 AM
Alaska (Alaska) claimed this task.

Note for @Brenden (bxbrenden) . You can install more recent drivers officially verified by the Debian team using the instructions found here:

I will write up my own instructions here:

  1. Open the terminal and run the command sudo nano /etc/apt/sources.list
  2. A text editor should open up. Add this line somewhere: deb buster-backports main contrib non-free and save the file with Ctrl + X
  3. Run the command sudo apt update to update your sources list.
  4. Run the command sudo apt -t buster-backports install nvidia-driver libcuda1 libnvoptix1 nvidia-settings to install the updated drivers and other useful libraries.

There's a few things to note:
I have no idea how this will work with you installing the drivers straight from Nvidia's website.
In most cases this is NOT the most recent Nvidia driver, but it is usually within a month or so of the most recent.