NVIDIA kernel modules not being automatically loaded in OpenSUSE Tumbleweed

Hi, I’m grateful OpenSUSE has a thorough approach to installing the NVIDIA driver, and was the first distribution I tried which actually signed the NVIDIA kernel modules successfully into the UEFI keystore. I’ve used the nvidia-driver-G06-kmp-default package, and my GPU is a NVIDIA GeForce RTX 3060 Mobile version.

The trouble I have now is that the kernel modules are not automatically loaded at boot, and need to use modprobe nvidia nvidia_drm, so I can at least use my external display on Wayland.

I wonder if it’s possible for Blender 3.5 to use CUDA and OpenGL with my dedicated GPU as well?
Looking forward to trying out OpenSUSE more over.

Try adding it in kernel lines. You can do it in yast2-boot loader.

With regards to CUDA it will work if you install cuda in tumbleweed if you are using the blender rpm package.
If you use the blender .tar.xz installer it is built with cuda and optix and you can use cuda and optix after you install it.

The extra command line options didn’t affect loading the NVIDIA kernel modules, and even with manually loading them with modprobe, Blender cannot detect CUDA devices.

I managed to get Blender working with cycles rendering on NixOS, on Wayland, although I’m not sure what tweaks they made to their packages or the kernel config.

I needed to install the CUDA package from Nvdia to get it run.

Seems you are missing something
I am using nvidia rtx 3050 and my driver is installed using the .run installer from nvidia and blender is working and can use cuda and optix. I am using the blender .tar.xz blender installer.
See image below:

I can confirm CUDA works now with the NVIDIA driver from the .run installer, cheers. I can now perform offloading for Vulkan and GLX with: these env vars set, for example with glmark2:

Next I would like to ensure GNOME on Wayland uses the NVIDIA GPU by default, if gdm can be configured to allow it.

@bgc install switcherooctl and enable it’s dbus service for GNOME to use…

switcherooctl list
Device: 0
  Name:        NVIDIA Corporation TU117GLM [Quadro T400 Mobile]
  Default:     yes

Device: 1
  Name:        NVIDIA Corporation GP104GL [Tesla P4]
  Default:     no

Screenshot from 2023-07-27 19-39-12

I would just use Prime Render Offload…

Importantly, I discovered this, “09-nvidia-modprobe-bbswitch-G04.conf”, which had blacklisted nvidia’s modules. I commented out those for nvidia, nvidia_drm and nvidia_uvm, and renamed 50-nvidia-default.conf.rpmsave to 50-nvidia-default.conf, which contains:

# NVreg_PreserveVideoMemoryAllocations needed for GNOME Wayland
options nvidia NVreg_DeviceFileUID=0 NVreg_DeviceFileGID=484 NVreg_DeviceFileMode=0660 NVreg_PreserveVideoMemoryAllocations=1
options nvidia-drm modeset=1
install nvidia PATH=$PATH:/bin:/usr/bin; if /sbin/modprobe --ignore-install nvidia; then   if /sbin/modprobe nvidia_uvm; then     if [ ! -c /dev/nvidia-uvm ]; then       mknod -m 660 /dev/nvidia-uvm c $(cat /proc/devices | while read major device; do if [ "$device" = "nvidia-uvm" ]; then echo $major; break; fi ; done) 0;        chown :video /dev/nvidia-uvm;     fi;     if [ ! -c /dev/nvidia-uvm-tools ]; then       mknod -m 660 /dev/nvidia-uvm-tools c $(cat /proc/devices | while read major device; do if [ "$device" = "nvidia-uvm" ]; then echo $major; break; fi ; done) 1;       chown :video /dev/nvidia-uvm-tools;     fi;   fi;   if [ ! -c /dev/nvidiactl ]; then     mknod -m 660 /dev/nvidiactl c 195 255;     chown :video /dev/nvidiactl;   fi;   devid=-1;   for dev in $(ls -d /sys/bus/pci/devices/*); do      vendorid=$(cat $dev/vendor);     if [ "$vendorid" = "0x10de" ]; then       class=$(cat $dev/class);       classid=${class%%00};       if [ "$classid" = "0x0300" -o "$classid" = "0x0302" ]; then          devid=$((devid+1));         if [ ! -c /dev/nvidia${devid} ]; then            mknod -m 660 /dev/nvidia${devid} c 195 ${devid};            chown :video /dev/nvidia${devid};         fi;       fi;     fi;   done;   /sbin/modprobe nvidia_drm;   if [ ! -c /dev/nvidia-modeset ]; then     mknod -m 660 /dev/nvidia-modeset c 195 254;     chown :video /dev/nvidia-modeset;   fi; fi

I’m going to try the NVIDIA drivers from OpenSUSE’s official packages, see how well it goes.

Confirming that all the NVIDIA drivers are loading normally, and that the drivers were installed from the official OpenSUSE packages.