cuda for Blender 2.8.2 throws cuInit: Unknown error for supported gfxcard

Hi,

Blender needs a NVIDIA compute capability of 3.0 at least.

In one system (openSUSE Tumbleweed) with this gfxcard:

Tue Feb 18 20:55:37 2020       
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 440.59       Driver Version: 440.59       CUDA Version: 10.2     |
|-------------------------------+----------------------+----------------------+
| 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 650     Off  | 00000000:01:00.0 N/A |                  N/A |
| 16%   30C    P8    N/A /  N/A |     72MiB /  1998MiB |     N/A      Default |
+-------------------------------+----------------------+----------------------+
                                                                               
+-----------------------------------------------------------------------------+
| Processes:                                                       GPU Memory |
|  GPU       PID   Type   Process name                             Usage      |
|=============================================================================|
|    0                    Not Supported                                       |
+-----------------------------------------------------------------------------+

Blender 2.82 throws an error:

Read prefs: /home/user/.config/blender/2.82/config/userpref.blend
psutil available
CUDA cuInit: Unknown error
Saved session recovery to '/tmp/quit.blend'

Blender quit

Any idea, how to debug this any further?

Did you verify the CUDA install?

https://docs.nvidia.com/cuda/cuda-installation-guide-linux/index.html#recommended-post

Thanks, Robert.

After symlinking gcc-7 and g+±7 to ~/bin/{gcc,g++}, make -k compiled most of the examples, produced 177 items in bin/x86_64/linux/release, but…

./deviceQuery Starting...

 CUDA Device Query (Runtime API) version (CUDART static linking)

cudaGetDeviceCount returned 100
-> no CUDA-capable device is detected
Result = FAIL
kuno:~# lspci -vs 01:00.0
01:00.0 VGA compatible controller: NVIDIA Corporation GK107 [GeForce GTX 650] (rev a1) (prog-if 00 [VGA controller])
        Subsystem: ZOTAC International (MCO) Ltd. Device 2263
        Flags: bus master, fast devsel, latency 0, IRQ 29
        Memory at fd000000 (32-bit, non-prefetchable) 
        Memory at e0000000 (64-bit, prefetchable) 
        Memory at f0000000 (64-bit, prefetchable) 
        I/O ports at e000 
        [virtual] Expansion ROM at 000c0000 [disabled] 
        Capabilities: [60] Power Management version 3
        Capabilities: [68] MSI: Enable+ Count=1/1 Maskable- 64bit+
        Capabilities: [78] Express Endpoint, MSI 00
        Capabilities: [b4] Vendor Specific Information: Len=14 <?>
        Capabilities: [100] Virtual Channel
        Capabilities: [128] Power Budgeting <?>
        Capabilities: [600] Vendor Specific Information: ID=0001 Rev=1 Len=024 <?>
        Kernel driver in use: nvidia
        Kernel modules: nouveau, nvidia_drm, nvidia

Hmm. Any idea on this one?

Your driver install is broken. without knowing precisely how you installed the driver, possibly the complete history of your machine, as well as any logs associated with the driver install, I’m not sure I’m able to help further. Anyway that is why you are getting the blender error.

Well, since I install everything with the packet manager, I can provide detailed infos of my installations, that are completely reproducible.

These are the relevant installed packages:

cuda-command-line-tools-10-2-10.2.89-1.x86_64
cuda-compiler-10-2-10.2.89-1.x86_64
cuda-cudart-10-2-10.2.89-1.x86_64
cuda-cudart-dev-10-2-10.2.89-1.x86_64
cuda-cufft-10-2-10.2.89-1.x86_64
cuda-cufft-dev-10-2-10.2.89-1.x86_64
cuda-cuobjdump-10-2-10.2.89-1.x86_64
cuda-cupti-10-2-10.2.89-1.x86_64
cuda-curand-10-2-10.2.89-1.x86_64
cuda-curand-dev-10-2-10.2.89-1.x86_64
cuda-cusolver-10-2-10.2.89-1.x86_64
cuda-cusolver-dev-10-2-10.2.89-1.x86_64
cuda-cusparse-10-2-10.2.89-1.x86_64
cuda-cusparse-dev-10-2-10.2.89-1.x86_64
cuda-documentation-10-2-10.2.89-1.x86_64
cuda-driver-dev-10-2-10.2.89-1.x86_64
cuda-gdb-10-2-10.2.89-1.x86_64
cuda-libraries-10-2-10.2.89-1.x86_64
cuda-libraries-dev-10-2-10.2.89-1.x86_64
cuda-license-10-2-10.2.89-1.x86_64
cuda-memcheck-10-2-10.2.89-1.x86_64
cuda-misc-headers-10-2-10.2.89-1.x86_64
cuda-npp-10-2-10.2.89-1.x86_64
cuda-npp-dev-10-2-10.2.89-1.x86_64
cuda-nsight-10-2-10.2.89-1.x86_64
cuda-nsight-compute-10-2-10.2.89-1.x86_64
cuda-nsight-systems-10-2-10.2.89-1.x86_64
cuda-nvcc-10-2-10.2.89-1.x86_64
cuda-nvdisasm-10-2-10.2.89-1.x86_64
cuda-nvgraph-10-2-10.2.89-1.x86_64
cuda-nvgraph-dev-10-2-10.2.89-1.x86_64
cuda-nvjpeg-10-2-10.2.89-1.x86_64
cuda-nvjpeg-dev-10-2-10.2.89-1.x86_64
cuda-nvml-dev-10-2-10.2.89-1.x86_64
cuda-nvprof-10-2-10.2.89-1.x86_64
cuda-nvprune-10-2-10.2.89-1.x86_64
cuda-nvrtc-10-2-10.2.89-1.x86_64
cuda-nvrtc-dev-10-2-10.2.89-1.x86_64
cuda-nvtx-10-2-10.2.89-1.x86_64
cuda-nvvp-10-2-10.2.89-1.x86_64
cuda-samples-10-2-10.2.89-1.x86_64
cuda-sanitizer-api-10-2-10.2.89-1.x86_64
cuda-toolkit-10-2-10.2.89-1.x86_64
cuda-tools-10-2-10.2.89-1.x86_64
cuda-visual-tools-10-2-10.2.89-1.x86_64
nvidia-computeG05-440.59-34.1.x86_64
nvidia-gfxG05-kmp-default-440.59_k5.5.2_1-34.5.x86_64
nvidia-glG05-440.59-34.1.x86_64
x11-video-nvidiaG05-440.59-34.1.x86_64

The cuda packages are from:
http://developer.download.nvidia.com/compute/cuda/repos/opensuse15/x86_64

The installed packages are unchanged, apart from these (expected, modified from rpm post section):

kuno:~# rpm -V $(rpmg 'nvidia|cuda')
.......T.  c /etc/modprobe.d/50-nvidia-default.conf
.......T.    /usr/lib64/xorg/modules/drivers/nvidia_drv.so

This is an openSUSE Tumbleweed 20200214 (most current, Linux Kernel 5.5.2).

The installation doesn’t trigger any messages, apart from the license:

2020-02-19 14:53:54|command|root@kuno|'zypper' '-v' 'in' 'cuda-command-line-tools-10-2-10.2.89-1.x86_64' 'cuda-compiler-10-2-10.2.89-1.x86_64' 'cuda-cudart-10-2-10.2.89-1.x86_64' 'cuda-cudart-dev-10-2-10.2.89-1.x86_64' 'cuda-cufft-10-2-10.2.89-1.x86_64' 'cuda-cufft-dev-10-2-10.2.89-1.x86_64' 'cuda-cuobjdump-10-2-10.2.89-1.x86_64' 'cuda-cupti-10-2-10.2.89-1.x86_64' 'cuda-curand-10-2-10.2.89-1.x86_64' 'cuda-curand-dev-10-2-10.2.89-1.x86_64' 'cuda-cusolver-10-2-10.2.89-1.x86_64' 'cuda-cusolver-dev-10-2-10.2.89-1.x86_64' 'cuda-cusparse-10-2-10.2.89-1.x86_64' 'cuda-cusparse-dev-10-2-10.2.89-1.x86_64' 'cuda-documentation-10-2-10.2.89-1.x86_64' 'cuda-driver-dev-10-2-10.2.89-1.x86_64' 'cuda-gdb-10-2-10.2.89-1.x86_64' 'cuda-libraries-10-2-10.2.89-1.x86_64' 'cuda-libraries-dev-10-2-10.2.89-1.x86_64' 'cuda-license-10-2-10.2.89-1.x86_64' 'cuda-memcheck-10-2-10.2.89-1.x86_64' 'cuda-misc-headers-10-2-10.2.89-1.x86_64' 'cuda-npp-10-2-10.2.89-1.x86_64' 'cuda-npp-dev-10-2-10.2.89-1.x86_64' 'cuda-nsight-10-2-10.2.89-1.x86_64' 'cuda-nsight-compute-10-2-10.2.89-1.x86_64' 'cuda-nsight-systems-10-2-10.2.89-1.x86_64' 'cuda-nvcc-10-2-10.2.89-1.x86_64' 'cuda-nvdisasm-10-2-10.2.89-1.x86_64' 'cuda-nvgraph-10-2-10.2.89-1.x86_64' 'cuda-nvgraph-dev-10-2-10.2.89-1.x86_64' 'cuda-nvjpeg-10-2-10.2.89-1.x86_64' 'cuda-nvjpeg-dev-10-2-10.2.89-1.x86_64' 'cuda-nvml-dev-10-2-10.2.89-1.x86_64' 'cuda-nvprof-10-2-10.2.89-1.x86_64' 'cuda-nvprune-10-2-10.2.89-1.x86_64' 'cuda-nvrtc-10-2-10.2.89-1.x86_64' 'cuda-nvrtc-dev-10-2-10.2.89-1.x86_64' 'cuda-nvtx-10-2-10.2.89-1.x86_64' 'cuda-nvvp-10-2-10.2.89-1.x86_64' 'cuda-samples-10-2-10.2.89-1.x86_64' 'cuda-sanitizer-api-10-2-10.2.89-1.x86_64' 'cuda-toolkit-10-2-10.2.89-1.x86_64' 'cuda-tools-10-2-10.2.89-1.x86_64' 'cuda-visual-tools-10-2-10.2.89-1.x86_64'|
# 2020-02-19 14:53:54 cuda-license-10-2-10.2.89-1.x86_64.rpm installed ok
# Additional rpm output:
# *** LICENSE AGREEMENT ***
# By using this software you agree to fully comply with the terms and
# conditions of the EULA (End User License Agreement). The EULA is located
# at /usr/local/cuda-10.2/doc/EULA.txt. The EULA can also be found at
# http://docs.nvidia.com/cuda/eula/index.html. If you do not agree to the
# terms and conditions of the EULA, do not use the software.
#
2020-02-19 14:53:54|install|cuda-license-10-2|10.2.89-1|x86_64|root@kuno|cuda|60fc7a57037076d5d9efa995cdb2d9e82153a154|
2020-02-19 14:53:56|install|libcublas10|10.2.2.89-1|x86_64||cuda|780d19fe9ac8f218f85e66c23e95b7322fdfc73c|
2020-02-19 14:53:56|install|cuda-sanitizer-api-10-2|10.2.89-1|x86_64|root@kuno|cuda|c623779fe51fe72c40252678914062a0093db3cd|
2020-02-19 14:53:57|install|cuda-nvtx-10-2|10.2.89-1|x86_64|root@kuno|cuda|af5004f7c6f8c73233369908ad9f70454151259b|
2020-02-19 14:53:57|install|cuda-nvrtc-10-2|10.2.89-1|x86_64|root@kuno|cuda|050989b32ad89f8980546257853949bc106ff544|
2020-02-19 14:53:57|install|cuda-nvprune-10-2|10.2.89-1|x86_64|root@kuno|cuda|0c874fb8b41b7445abf7244381f77c61e58c96bb|
2020-02-19 14:53:58|install|cuda-nvprof-10-2|10.2.89-1|x86_64|root@kuno|cuda|a867b7a3274c1fd8229ecfb8cff5fae7070593f1|
2020-02-19 14:53:58|install|cuda-nvml-dev-10-2|10.2.89-1|x86_64|root@kuno|cuda|3c09d167335e2a3b27c09e92ae95842e41548b5e|
2020-02-19 14:53:58|install|cuda-nvjpeg-10-2|10.2.89-1|x86_64|root@kuno|cuda|f1ad04391d9a02fe86ed19dae9f297c49c1e4285|
2020-02-19 14:54:02|install|cuda-nvgraph-10-2|10.2.89-1|x86_64|root@kuno|cuda|b0209acf16859903c229c74c1d1cd5f171cf4c61|
2020-02-19 14:54:02|install|cuda-nvdisasm-10-2|10.2.89-1|x86_64|root@kuno|cuda|0afddb72ea10f87ae76f2a2d6e261d0214b530ec|
2020-02-19 14:54:02|install|cuda-nsight-systems-10-2|10.2.89-1|x86_64|root@kuno|cuda|31e0db44252e014eef1cc7f6787579b0d0903e37|
2020-02-19 14:54:02|install|cuda-nsight-compute-10-2|10.2.89-1|x86_64|root@kuno|cuda|aea85f847edaa6374829e908e739aae54ae12d96|
2020-02-19 14:54:09|install|cuda-nsight-10-2|10.2.89-1|x86_64|root@kuno|cuda|740ad85471ecb3e7cb247559d759751ef95c024a|
2020-02-19 14:54:13|install|cuda-npp-10-2|10.2.89-1|x86_64|root@kuno|cuda|6516e66974e6527580299744a65c57023192918e|
2020-02-19 14:54:14|install|cuda-misc-headers-10-2|10.2.89-1|x86_64|root@kuno|cuda|59e977f093762bf0996a38b129f5443f7677ee8b|
2020-02-19 14:54:14|install|cuda-memcheck-10-2|10.2.89-1|x86_64|root@kuno|cuda|6ee7ec8d258d5bc492f4924bd5057753a99cf8cf|
2020-02-19 14:54:14|install|cuda-driver-dev-10-2|10.2.89-1|x86_64|root@kuno|cuda|6628c946ab0bd019aa1ebe5ac84a2d6e19a76ca7|
2020-02-19 14:54:17|install|cuda-cusparse-10-2|10.2.89-1|x86_64|root@kuno|cuda|1f24640c7973722f3232a1117405106ccb02e93e|
2020-02-19 14:54:23|install|cuda-cusolver-10-2|10.2.89-1|x86_64|root@kuno|cuda|5a05d3276a15130b17d00c65ff63894fe72747be|
2020-02-19 14:54:25|install|cuda-curand-10-2|10.2.89-1|x86_64|root@kuno|cuda|79272df299e24b309adaa6abf56885bc042963be|
2020-02-19 14:54:25|install|cuda-cuobjdump-10-2|10.2.89-1|x86_64|root@kuno|cuda|2cd999a75e371ab12f5174f52e584ddac25687fa|
2020-02-19 14:54:28|install|cuda-cufft-10-2|10.2.89-1|x86_64|root@kuno|cuda|1fbac8f8e83aeea13857c631ff95d2ac29988bc3|
2020-02-19 14:54:29|install|cuda-cudart-10-2|10.2.89-1|x86_64|root@kuno|cuda|666e856e97845121411a0fef87ab5597a9aa1edf|
2020-02-19 14:54:31|install|libcublas-devel|10.2.2.89-1|x86_64||cuda|e6d42d87b5f6829770f8a170c7b4c821f30eda3d|
2020-02-19 14:54:31|install|cuda-nvrtc-dev-10-2|10.2.89-1|x86_64|root@kuno|cuda|11164ed0e08f64a71e131288b8a01f5169c2f270|
2020-02-19 14:54:31|install|cuda-nvjpeg-dev-10-2|10.2.89-1|x86_64|root@kuno|cuda|7509be87f4eef6481044c66a01a69871593df75a|
2020-02-19 14:54:34|install|cuda-nvgraph-dev-10-2|10.2.89-1|x86_64|root@kuno|cuda|873cc260fd8d65a73b50afd8010ce7efc0a6391a|
2020-02-19 14:54:38|install|cuda-nvvp-10-2|10.2.89-1|x86_64|root@kuno|cuda|ccb19a7e72560f3130af99d2f939a6249686d291|
2020-02-19 14:54:41|install|cuda-npp-dev-10-2|10.2.89-1|x86_64|root@kuno|cuda|4b45fac887ffa6d965127f6c5110e086de08c001|
2020-02-19 14:54:44|install|cuda-nvcc-10-2|10.2.89-1|x86_64|root@kuno|cuda|2de563561c9e73404e68eee4eb2e43d90d541d2d|
2020-02-19 14:54:51|install|cuda-cusparse-dev-10-2|10.2.89-1|x86_64|root@kuno|cuda|97e400b183a97d59ceddf1e1d11b303fc4b32faf|
2020-02-19 14:54:53|install|cuda-cusolver-dev-10-2|10.2.89-1|x86_64|root@kuno|cuda|c70d619e1420ebfbd36834ed52cd0afcb93eee92|
2020-02-19 14:54:54|install|cuda-curand-dev-10-2|10.2.89-1|x86_64|root@kuno|cuda|b0338c26424697432201dc4859c5370408c0d34f|
2020-02-19 14:54:54|install|cuda-gdb-10-2|10.2.89-1|x86_64|root@kuno|cuda|5d2cb0632d164d1f3ad8ed5b0f97585a7e57c817|
2020-02-19 14:55:01|install|cuda-cufft-dev-10-2|10.2.89-1|x86_64|root@kuno|cuda|099c1d9615b0c7e624d20625f2b2084fcf65281d|
2020-02-19 14:55:01|install|cuda-libraries-10-2|10.2.89-1|x86_64|root@kuno|cuda|af3022da8f442ebadf9b087a300c2991d05383cd|
2020-02-19 14:55:02|install|cuda-cudart-dev-10-2|10.2.89-1|x86_64|root@kuno|cuda|28bea224effeda2318e6ee66142288276f80afbf|
2020-02-19 14:55:02|install|cuda-compiler-10-2|10.2.89-1|x86_64|root@kuno|cuda|8cf8663848470a7f8bde24bea0fe593a69b5e4f9|
2020-02-19 14:55:02|install|cuda-visual-tools-10-2|10.2.89-1|x86_64|root@kuno|cuda|cd24b4d1e8d839b32d4bde8e0bc06787ca5eaa05|
2020-02-19 14:55:07|install|cuda-samples-10-2|10.2.89-1|x86_64|root@kuno|cuda|a884ad29f016bae2221ffaf918385aa504238ef7|
2020-02-19 14:55:07|install|cuda-libraries-dev-10-2|10.2.89-1|x86_64|root@kuno|cuda|48bb3729b03c912c90a98a6f24893260bb5eb275|
2020-02-19 14:55:08|install|cuda-cupti-10-2|10.2.89-1|x86_64|root@kuno|cuda|364f70bdca3f58067ab7c8156517cb6a64f8791d|
2020-02-19 14:55:15|install|cuda-documentation-10-2|10.2.89-1|x86_64|root@kuno|cuda|5c5f895ac4fc4ee9d24976c291e9f90f47bb1e20|
2020-02-19 14:55:15|install|cuda-command-line-tools-10-2|10.2.89-1|x86_64|root@kuno|cuda|dc045471e5ae6c8eafbb937f397ed2d3c3fbeb6b|
2020-02-19 14:55:15|install|cuda-tools-10-2|10.2.89-1|x86_64|root@kuno|cuda|99e459d95c7560d8fc101a141ea85e5ba035f41f|
2020-02-19 14:55:15|install|cuda-toolkit-10-2|10.2.89-1|x86_64|root@kuno|cuda|71b7e2188dbdd781c872dc8e81d9ef95de4fc357|

Let me know, what other details you’re interested in.

We are not interested in CUDA at this point. We are interested in the driver install.

None of that info shows me how you installed the driver, or where your driver packages came from. The driver packages you do show did not come from the repo you indicate - you can easily check that yourself.

OpenSuse tumbleweed is not an officially supported distro for CUDA. My suggestion would be to follow the linux install guide carefully:

https://docs.nvidia.com/cuda/cuda-installation-guide-linux/index.html

get your installers from https://www.nvidia.com/getcuda

Finally fixed it. For some reason, an old/stray /etc/modprobe.d/nvidia.conf file failed to initialize /dev/nvidia-uvm correctly.

Sorry for the churn.

Will know, where to look the next time…