How to install NVIDIA proprietary driver on Leap?

I am trying to install NVIDIA driver by following the SUSE Manual installation. I did the following,

# inxi -Ga
Device-2: NVIDIA TU116M [GeForce GTX 1660 Ti Mobile] vendor: Gigabyte
    driver: N/A alternate: nouveau, nvidia_drm, nvidia non-free: 520.xx+

So my driver shall be G06, so…

zypper install openSUSE-repos-NVIDIA
zypper addrepo --refresh 'https://download.nvidia.com/opensuse/leap/$releasever' NVIDIA
zypper in nvidia-video-G06
zypper in nvidia-gl-G06

But I learned that nvidia-video-G06, nvidia-gl-G06 are already install and hence nothing changed. I did not install any NVIDIA driver, but how it got installed I have no idea. Then I found the following in the YaST software repository,


The problem is inxi -Ga still showing driver: N/A. Is there anything wrong? Thank you for the attention and time.

Thanks for the link. My primary purpose is Prime Render Offload, which I forgot to mention.

Uninstalled the NVIDIA driver following SDB:NVIDIA drivers - openSUSE Wiki and reinstalled using SDB:NVIDIA drivers - openSUSE Wiki but still driver being shown as N/A as the output of inxi -G. Then I noticed nouveau is still being loaded (if I am not wrong). It seems really difficult to install and make NVIDIA work on openSUSE.

$ sudo lsinitrd | grep nouveau
drwxr-xr-x   1 root     root            0 Nov 13 19:51 lib/modules/5.14.21-150500.55.44-default/kernel/drivers/gpu/drm/nouveau
-rw-r--r--   1 root     root      1070421 Nov 13 19:51 lib/modules/5.14.21-150500.55.44-default/kernel/drivers/gpu/drm/nouveau/nouveau.ko.zst

I also tried by creating the /etc/modprobe.d/blacklist-nouveau.conf file and add the following information to the file.

blacklist nouveau
options nouveau modeset=0

But couldn’t figure out how to update initrd.

In Leap, you can use

mkinitrd

Run that as root.

Thank you for the reply.

Unfortunately, it says

sudo: mkinitrd: command not found

It is at “/sbin/mkinitrd” on my Leap 15.5 system.

As an alternative, you can use:

dracut -f --regenerate-all

Not working at all, maybe the hard way will work…

$ sudo mokutil --import /var/lib/nvidia-pubkeys/MOK-nvidia-driver-G06-545_29_06-5_14_21.der --root-pw
Failed to get file status, /var/lib/nvidia-pubkeys/MOK-nvidia-driver-G06-545_29_06-5_14_21.der