Another question about Nvidia

I would like to install Tumbleweed on my PC. Now I have it on a VM.
My problem is it with nvidia driver. I want to install it “the hard way”.
Now I have Fedora and I install nvidia without problems:
My question is: if I install nvidia “the hard way”, is it necessary whenever I update the kernel, 1. to remove nvidia and install it again 2. to install nvidia again or 3. I can install dkms (like in the link above)?
Thank you very much.
P.S. Sorry for my English

You don’t need to uninstall but you do reinstall the hard way on any kernel or X stack update

Thank you for the answer.
So, the “dkms” procedure do not apply to opensuse.
And, if I use “the hard way”, I think there will not be problems like the ones I read on forum with the Tumbleweed nvidia repository.

Sure you can use dkms to automatically recompile the kernel module on openSUSE as well.

Actually I think you’d just need to install (and enable) it before installing the nvidia driver, and the installer should detect it and register the module.

It’s not included in the distribution, but is available from Packman e.g.

Without it, you do need to reinstall the driver (or at least recompile the kernel module) manually after every kernel update as mentioned.

And, if I use “the hard way”, I think there will not be problems like the ones I read on forum with the Tumbleweed nvidia repository.

Problems specific to the rpm packages are rather rare though.

OTOH, if the nvidia driver doesn’t work with the latest kernel e.g. (which easily can happen in Tumbleweed), it won’t work either if you install it “the hard way”.
In that case you’d need to patch it manually, while a patch may be added to the rpm packages for you by the maintainers…

And if the driver itself is “broken”, the way it is installed doesn’t matter either. It’s the same binary blob after all.

dkms works for easy way Not sure that it can be setup reliably for hardway

If I understand correctly, in this case, there is no reason to install nvidia “the hard way”. Both ways, if the driver is broken, I will have problems. So, I will install from repository.
Thank you for the answers.

It’s exactly the other way round.
dkms doesn’t work for the easy way because the rpm packages take care of that. And therefore there’s absolutely no need to use dkms in the first place anyway.

And as I wrote, AFAIK the nvidia (.run) installer should detect dkms and configure auto-compiling the kernel module.
How reliable that is I cannot tell though, as I never used dkms (nor the nvidia installer) at all.

Thank you for your help.
Tumbleweed works like a charm. :slight_smile:

I have always had dkms installed, but never once I have updated the kernel with the Nvidia Drivers hard way that has recompiled the same … it does not work.
With Tumbleweed there are repositories that work well enough, and rarely do they go.
I have blacklisted the nouveau, and even when the Nvidia Proprietary Drivers fail the system starts in graphics reduced by IceWm I uninstall the drivers from the Repo and install from (hard way) always keeping two drivers in stock my / home

Good idea. Thank you.

Well, you may have to pass an option to the installer, or you may have to configure dkms manually to rebuild the nvidia modules.
I don’t know really, but I see no reason why it should not work in openSUSE if it works on other distributions…
(unless there’s a bug somewhere)

Although it doesn’t magically fix the kernel module to work with the latest kernel either anyway (if there are problems with that), of course.

Btw, I just noticed that dkms is in fact included in Tumbleweed meanwhile (in the standard repos), though it probably isn’t installed by default.

I am limited to installing dkms, and activate it from Yast> Service manager
Maybe you need something else?

Sure. DKMS must be told which kernel modules to rebuild, and how to build them.
As I wrote, I don’t have any experience with dkms myself though.

But as I understand it, you’d need a dkms.conf file in the module source directory, and run “dkms add” to "activate it…

At least, the dkms-nvidia package from the Bumblebee repo does this when you install it:

    cat > /usr/src/%{modname}-%{version}-%{release}/dkms.conf << EOF
MAKE[0]="'make' KERNEL_UNAME=\${kernelver} modules"
CLEAN="'make' clean"
if  -x /usr/sbin/dkms ] ; then
     /usr/sbin/dkms add -m %{modname} -v %{version}-%{release} --rpm_safe_upgrade
     /usr/sbin/dkms build -m %{modname} -v %{version}-%{release}
     /usr/sbin/dkms install --force -m %{modname} -v %{version}-%{release}

I.e. it creates a dkms.conf file with appropriate content, and then calls “dkms add …”, “dkms build …”, and “dkms install …”.
No idea whether the latter two are actually necessary, or just to make sure the kernel module is built immediately after the installation.

It is my impression that the .run installer can set it up for you, but I’m not sure whether it would do it automatically or you’d have to pass some command line option for that.

Btw, the nvidia packages from the Bumblebee repo (which exist for quite some time) should work on a “normal” system too, I think… :wink:

If I understand well:
1.if the kernel updates and there is a problem with nvidia driver - either way (repository or hard way install) will be a problem, because the nvidia driver doesn’t work with the last kernel.
2.if the nvidia driver updates and there is a problem, I will use the old driver (kept in /Downloads?), hard way install, and I am looking forward to solving the problems.
(3. buy an AMD card and no more problems with nvidia driver lol!.)


From nvidia’s README file (version 390.25):

Registering the NVIDIA Kernel Module with DKMS

The installer will check for the presence of DKMS on your system. If DKMS is found, you will be given the option of registering the kernel module with DKMS, and using the DKMS infrastructure to build and install the kernel module. On most systems with DKMS, DKMS will take care of automatically rebuilding registered kernel modules when installing a different Linux kernel.

If nvidia-installer is unable to install the kernel module through DKMS, the installation will be aborted and no kernel module will be installed. If this happens, installation should be attempted again, without the DKMS option.

Note that versions of nvidia-installer shipped with drivers before release 304 do not interact with DKMS. If you choose to register the NVIDIA kernel module with DKMS, please ensure that the module is removed from the DKMS database before using a non-DKMS aware version of nvidia-installer to install an older driver; otherwise, module source files may be deleted without first unregistering the module, potentially leaving the DKMS database in an inconsistent state. Running nvidia-uninstall before installing a driver using an older installer will invoke the correct dkms remove command to clean up the installation.

Due to the lack of secure storage for private keys that can be utilized by automated processes such as DKMS, it is not possible to use DKMS in conjunction with the module signing support built into nvidia-installer.

So the .run installer should indeed do everything necessary it seems, it apparently should ask the user whether DKMS should be “enabled” if it detects DKMS on the system.

Yes, this may happen with major new kernel versions in particular.

Most of the time when this happens a patch is available already though, and/or the latest beta version would work.

In such a case, you should of course still be able to boot the previous kernel and have a working nvidia driver.

2.if the nvidia driver updates and there is a problem, I will use the old driver (kept in /Downloads?), hard way install, and I am looking forward to solving the problems.

Unless it is a problem in the driver itself, which is a binary, closed-source blob provided by NVidia.

(3. buy an AMD card and no more problems with nvidia driver lol!.)

Or use nouveau… :wink:
But that’s probably not an adequate replacement for you I suppose, and it has its own share of problems anyway.

Thank you.

Thanks for the answer, actually I never deepened the use of dksm, seeing that nothing happened at every Kernel update proceeded to uninstall and reinstall the drivers.
Now I use the Nvidia repository that works well enough, and only in case of failure; I use from init3 (five minutes of time)