New NVIDIA driver automation

Well, mpv exits with this after install + HWAccel:

[vo/gpu] VT_GETMODE failed: Inappropriate ioctl for device
[vo/gpu/opengl] Failed to set up VT switcher. Terminal switching will be unavailable.
*** MESA_GLSL_CACHE_DISABLE is deprecated; use MESA_SHADER_CACHE_DISABLE instead ***
[vo/gpu] Failed to commit ModeSetting atomic request (-13)
[vo/gpu/opengl] Failed to set CRTC for connector 95: Permission denied
*** MESA_GLSL_CACHE_DISABLE is deprecated; use MESA_SHADER_CACHE_DISABLE instead ***
[vo/gpu-next] Can't handle VT release - signal already used
[vo/gpu-next/opengl] Failed to set up VT switcher. Terminal switching will be unavailable.
*** MESA_GLSL_CACHE_DISABLE is deprecated; use MESA_SHADER_CACHE_DISABLE instead ***
[vo/gpu-next] Failed to commit ModeSetting atomic request (-13)
[vo/gpu-next/opengl] Failed to set CRTC for connector 95: Permission denied
*** MESA_GLSL_CACHE_DISABLE is deprecated; use MESA_SHADER_CACHE_DISABLE instead ***
Error opening/initializing the selected video_out (--vo) device.
Video: no video
[1]    42545 segmentation fault (core dumped)

And blender failing to execute compilation command and missing denoising.

CUDA version 12.0 detected, build may succeed but only CUDA 10.1 to 11.4 are officially supported.
Compiling CUDA kernel ...
"/usr/local/cuda/bin/nvcc" -arch=sm_50 --cubin "/usr/share/blender/scripts/addons/cycles/source/kernel/device/cuda/kernel.cu" -o "$HOME/.cache/cycles/kernels/cycles_kernel_sm_50_1BCBBF7A721073462FF3133D38966C99.cubin" -m64 --ptxas-options="-v" --use_fast_math -DNVCC -I"/usr/share/blender/scripts/addons/cycles/source"
/usr/share/blender/scripts/addons/cycles/source/util/transform_inverse.h(15): error: identifier "ssef" is undefined

/usr/share/blender/scripts/addons/cycles/source/util/transform_inverse.h(15): error: identifier "__m128" is undefined

/usr/share/blender/scripts/addons/cycles/source/util/transform_inverse.h(16): error: identifier "ssef" is undefined
<...>

But other than that, amazing job.

Optimus, X11, native - 6.2.6 - 1290, default settings - 525.89.02


After installing 11.4 for Blender,

nvcc warning : The 'compute_35', 'compute_37', 'compute_50', 'sm_35', 'sm_37' and 'sm_50' architectures are deprecated, and may be removed in a future release (Use -Wno-deprecated-gpu-targets to suppress warning).
In file included from /usr/local/cuda/bin/../targets/x86_64-linux/include/cuda_runtime.h:83,
                 from <command-line>:
/usr/local/cuda/bin/../targets/x86_64-linux/include/crt/host_config.h:139:2: error: #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.
  139 | #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.
      |  ^~~~~
Failed to execute compilation command, see console for details.

oh well :slight_smile: some day I’ll learn


Installing Blender LTS from official site instead of swupd fixed the issue completely! Swapping kernels, drivers and gcc’s did only add problems :slight_smile:
Now renders are much faster ^~^
Outstanding job on the scripts.
:heart:

1 Like

The repo README does suggest the 520 driver is preferred for Optimus configuration. That also means installing the LTS kernel, as the 520 driver modules will not build on Linux 6.2.x. Moreover, Blender mentions CUDA 12.0 not officially supported.

Fortunately, there’s no-need to re-install the OS from scratch.

  1. Install kernel-lts2021 (sudo swupd bundle-add kernel-lts2021 kernel-lts2021-dkms).
  2. Run (bash check-kernel-dkms) in the repo folder to be sure NVIDIA (current version) kernel modules have been built for the LTS kernel.
  3. Reboot the system and select the lts2021 kernel.
  4. Uninstall the 6.2 kernel (sudo swupd bundle-remove kernel-native-current kernel-native kernel-native-dkms linux-dev).
  5. Reboot the system (add "3 " with a space) to the kernel arguments.
  6. Install the NVIDIA 520 driver (bash install-driver 520).
  7. Uninstall CUDA 12.0 (bash uninstall-cuda).
  8. Install CUDA 11.8 (bash install-cuda). That will install CUDA 11.8 for the 520 driver.

Hopefully, Blender will work with CUDA 11.8. Otherwise, you will need to download CUDA 11.4 from the web and pass the path to install-cuda.

bash uninstall-cuda
bash install-cuda ~/Downloads/cuda_11.4.4_470.82.01_linux.run

Meant to let you know, you are a huge help, and highly appreciate the amount of time you put into maintaining this for all of us.

Will try this as I am having nightmares with pytorch +TF + Cuda . Running on native X___x

@marioroy nice to see you in the forum. Just noticed, NVIDIA has released a new driver.

https://download.nvidia.com/XFree86/Linux-x86_64/530.41.03/

I have not tried it yet.

Update:
Installed it using your amazing and clever repo!!

./install-driver ~/Downloads/NVIDIA-Linux-x86_64-530.41.03.run

There were no errors during installation.


Screenshot from 2023-03-24 07-59-37

1 Like

The errors could be coming from /usr/bin/mpv, which is reported to not work.

sudo swupd bundle-remove mpv

The 3rd-party codecs-cuda bundle has working mpv for NVIDIA graphics. See the instructions in the HWAccel folder for installing the codecs-cuda bundle. The mpv command is found in /opt/3rd-party/bin/ which is in your path.