Files
blender/SUSE-NVIDIA-GPU-rendering.txt
Hans-Peter Jansen 41f4bfb3b4 Accepting request 989514 from home:frispete:blender
- Update to 3.2.1:
  + Anchored mode not working for sculpt smear brush. T98745
  + Assets dropped upside down when looking through camera. T96776
  + Avoid console warnings when no Sculpt brush selected. T98904
  + Avoid unnecessary mesh copy. T98796
  + Baking to active color attribute uses wrong layer. T98960
  + Boolean modifier creates invalid material indices. T99191
  + Broken vertex paint mode operators. T98975
  + Color attribute fill API didn't support editmode. T98673
  + Console warning using search (F3) in grease pencil draw mode.
    T99178
  + Crash after running view_all operator in VSE. T99110
  + Crash deleting file output node with color management override.
    T99028
  + Crash drag-dropping collection from outliner to ID property.
    T98715
  + Crash in Volume to Mesh with 0 voxels. T94969
  + Crash on startup - OpenGL4.2 without conservative depth. T98708
  + Crash removing some builtin attributes. T98956
  + Crash when dragging file to VSE from file browser. T99266
  + Crash when moving grease pencil object has any invisible….
    T98853
  + Crash when recursively nesting NLA meta strips. T98700
  + Crash with GPU subdivision in edit mode and instanced geometry.
    T98813
  + Crash: Curve to Mesh node crashes blender if there is a single
    vertice curve. T98917
  + Crash: GPU subdivision crash in edit mode with loose geometry.
    T98866
  + Crash: Grease Pencil: Fix crash when using time offset

OBS-URL: https://build.opensuse.org/request/show/989514
OBS-URL: https://build.opensuse.org/package/show/graphics/blender?expand=0&rev=437
2022-07-16 13:29:08 +00:00

163 lines
5.5 KiB
Plaintext

NVIDIA GPU rendering on openSUSE
Prerequisites
A CUDA-enabled GPU
If you are designated for this task, determine your exact GPU model with:
$ sudo hwinfo --gfxcard
Look up the model of your card (the part in square brackets of the Model: line
at https://developer.nvidia.com/cuda-gpus.
If the "Compute Capability" level for your GPU is 3.0 at least, you're set.
Install the x11-video-nvidiaG0x driver.
Please follow https://en.opensuse.org/SDB:NVIDIA_drivers and come back, when
you're ready.
Next, you need to install the cuda libraries from NVIDIA. This is documented
here: https://docs.nvidia.com/cuda/cuda-installation-guide-linux/
Short version (at the time of this writing):
$ sudo zypper addrepo http://developer.download.nvidia.com/compute/cuda/repos/opensuse15/x86_64/cuda-opensuse15.repo
$ sudo zypper refresh
$ sudo zypper install cuda-toolkit-10-2
Be careful, other cuda packages may want to deinstall the NVIDIA driver, which
would be better avoided at this point.
Please add any user, that want to use NVIDIA GPU rendering, to the video group:
$ sudo usermod -a -G video <userid>
Now set up CUDA environment, e.g. in ~/.bashrc or in /etc/profile.local:
export PATH=/usr/local/cuda-10.2/bin:/usr/local/cuda-10.2/NsightCompute-2019.1${PATH:+:${PATH}}
export LD_LIBRARY_PATH=/usr/local/cuda-10.2/lib64:${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Relogin or reboot to activate these changes.
Optional: verify the installation
As a prepared user (see above), run:
Check, if the correct driver if installed:
$ cat /proc/driver/nvidia/version
Check, if the nvidia compiler is installed correctly:
$ nvcc -V
Install the sample source code in <dir>
$ cuda-install-samples-10.2.sh <dir>
At the time of this writing, gcc9 or later is not supported from CUDA 10.2.
For Tumbleweed, you may want to create compatibility symlinks:
$ ln -s /usr/bin/gcc-7 ~/bin/gcc
$ ln -s /usr/bin/g++-7 ~/bin/g++
Compile the sample code:
$ cd <dir>/NVIDIA_CUDA-10.2_Samples
$ make -k
We run make with the keep going option, because it is expected to fail to
compile a few modules, e.g.:
In file included from cudaNvSci.cpp:12:0:
cudaNvSci.h:14:10: fatal error: nvscibuf.h: No such file or directory
#include <nvscibuf.h>
Don't bother.
Check the device from CUDA POV:
$ ./bin/x86_64/linux/release/deviceQuery
./bin/x86_64/linux/release/deviceQuery Starting...
CUDA Device Query (Runtime API) version (CUDART static linking)
Detected 1 CUDA Capable device(s)
Device 0: "GeForce GTX 650"
[...]
You're set. Run blender, check Edit -> Preferences -> System -> CUDA
Enable devices to your liking.
Troubleshooting
Check, that user is member of the video group:
$ id
Check driver:
$ cat /proc/driver/nvidia/version
NVRM version: NVIDIA UNIX x86_64 Kernel Module 440.59 Thu Jan 30 01:00:41 UTC 2020
GCC version: gcc version 9.2.1 20200128 [revision 83f65674e78d97d27537361de1a9d74067ff228d] (SUSE Linux)
$ nvidia-smi
Sun Feb 23 16:54:48 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% 29C P8 N/A / N/A | 207MiB / 1991MiB | N/A Default |
+-------------------------------+----------------------+----------------------+
+-----------------------------------------------------------------------------+
| Processes: GPU Memory |
| GPU PID Type Process name Usage |
|=============================================================================|
| 0 Not Supported |
+-----------------------------------------------------------------------------+
Check devices and permissions:
$ ls -la /dev/nvidia*
crw-rw----+ 1 root video 195, 0 21. Feb 13:51 /dev/nvidia0
crw-rw----+ 1 root video 195, 255 21. Feb 13:51 /dev/nvidiactl
crw-rw----+ 1 root video 195, 254 21. Feb 13:51 /dev/nvidia-modeset
crw-rw----+ 1 root video 240, 0 21. Feb 13:51 /dev/nvidia-uvm
$ chacl -l /dev/nvidia*
/dev/nvidia0 [u::rw-,u:<userid>:rw-,g::rw-,m::rw-,o::---]
/dev/nvidiactl [u::rw-,u:<userid>:rw-,g::rw-,m::rw-,o::---]
/dev/nvidia-modeset [u::rw-,u:<userid>:rw-,g::rw-,m::rw-,o::---]
/dev/nvidia-uvm [u::rw-,u:<userid>:rw-,g::rw-,m::rw-,o::---]
Problem: gcc 12 unsupported
If blender shows an error during initial compilation of the cuda kernel similar to:
#error -- unsupported GNU version! gcc versions later than 11 are not supported!
The nvcc flag '-allow-unsupported-compiler' can be used to override this version check;
however, using an unsupported host compiler may cause compilation failure or incorrect
run time execution. Use at your own risk.
Solution:
$ zypper in gcc11{,-c++}
$ cd /usr/local/cuda/bin/
$ ln -s ../../../bin/gcc-11 gcc
$ ln -s ../../../bin/g++-11 g++
At this point, the CUDA kernel should build properly, and CUDA devices should be
available.
Remember: Blender needs a CUDA "Compute Capability" of 3.0 at least.
As a final resort, create a bug report at https://bugzilla.opensuse.org.
Enjoy!