nvidia and dkms(NVidia M4000M)

Hi.
I want to install nvidia driver for M4000M on my laptop. I heard that if I install driver using dkms, after upgrading kernel there will be no issue with nvidia driver.
But I don’t know about dkms. I’ve done some searches about dkms and nvidia,but most of guides are related to ubuntu.
Would someone please help me how I can do this and give me some informations about how dkms exactly works.(Any link, or book or etc…)

Thank you

Any dkms package is a package that auto compiles the associated driver when the kernel changes.

NOTE:
If this also has a Intel GPU on the CPU chip then it is likely a Optimus based note book and you MUST take special steps

First off DO NOT install the regular NVIDIA driver it will break things

use Bumblebee

https://en.opensuse.org/SDB:NVIDIA_Bumblebee

What that means specifically is that any DKMS kernel module package will be registered by the installed DKMS facility you [the OP] already have on your system. During new kernel installation the package manager will call DKMS to check which kernel modules need to be recompiled and then those will be recompiled. Those are typically, but not always, kernel modules from third-party vendors like Broadcom or nVidia.

The reason most of the guides related to Ubuntu is that it used to be more of a Debian/Ubuntu thing, initially. On Fedora, for instance, many third-party kernel modules could be installed as pre-compiled, ‘kernel-ready’ packages, compatible with a specific kernel version :).

Thank you for your information. But how I can install nvidia driver with dkms? Is there any guide on opensuse whicb really works?

From what I can tell you have a Optimus based notebook using perhaps the latest skylake Intel CPU. If so DO NOT INSTALL the NVIDIA driver use bumblebee. If you install the normal NVIDIA driver it will break the system and the video will not work right !!!

dkms will get installed if you install from the location I gave you above.