Debian Linux Blender can't see CUDA devices, says "CUEW initialization failed" #84802

Closed
opened 2021-01-17 17:51:55 +01:00 by Brenden · 12 comments

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 |
+-----------------------------------------------------------------------------+
**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 | +-----------------------------------------------------------------------------+ ```
Author

Added subscriber: @brendenahyde

Added subscriber: @brendenahyde
Member

Added subscriber: @Alaska

Added subscriber: @Alaska
Member

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.

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.
Member

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

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`

Added subscriber: @rjg

Added subscriber: @rjg

Changed status from 'Needs Triage' to: 'Needs User Info'

Changed status from 'Needs Triage' to: 'Needs User Info'

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

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

@Alaska @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 @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!
Member

Changed status from 'Needs User Info' to: 'Resolved'

Changed status from 'Needs User Info' to: 'Resolved'
Alaska self-assigned this 2021-01-19 09:49:06 +01:00
Member

Note for @brendenahyde . You can install more recent drivers officially verified by the Debian team using the instructions found here: https://backports.debian.org/Instructions/

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 http://deb.debian.org/debian 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.

Note for @brendenahyde . You can install more recent drivers officially verified by the Debian team using the instructions found here: https://backports.debian.org/Instructions/ 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 http://deb.debian.org/debian 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.

Added subscriber: @woland.tel

Added subscriber: @woland.tel
Hope this should be helpful: https://devtalk.blender.org/t/nvidia-prime-is-here-but-cuda-not-found/15226/27?u=woland
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
4 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#84802
No description provided.