Again about nvidia

Hello,

I have installed nvidia 396.18 with kernel 4.16 in “hard way”. With nvidia-installer.
I have two kernels: 4.16 and 4.15.3. When I boot from 4.15.3 the pc stops with command prompt who flicker.
I boot with 4.15.3 (runlevel 3). When I try to install nvidia 396.18 again, it said that it it installed.
How can I boot with kernel 4.13.3 and nvidia?
Thank you.

Do you have the devel packages (kernel-devel, kernel-default-devel, kernel-source) for kernel 4.15.3 installed?
Otherwise compiling the kernel module will fail (and it has to be built for each kernel), which will prevent the nvidia driver to work.

/var/log/Xorg.0.log (resp. /var/log/Xorg.0.log.old after a reboot) should show what’s going wrong.
But for me the likely reason is that the kernel module (for kernel 4.15.3) is not installed/cannot be loaded, and xorg.conf forces the nvidia driver.

I have installed kernel-devel and devel-default for 4.15.3. Not Kernel-source.

I have installed now for 4.16: zypper in -t pattern devel_C_C++ devel-kernel.
For 4.15.3 I cannot install.
I think I understand.
Now I have all I need for 4.16.0-1 kernel.
When will appear new kernel 4.16.x, 4.16.0-1 will be the old kernel but I have all I need for compile the kernel module.
Thank you.
I have to read better wiki.

The latest NVIDIA beta driver seems to contain the necessary patch to build the driver agains kernel 4.16 . Mind that a change in the NVIDIA driver version implies that previously installed driver versions will not work anymore, since the NVIDIA blob expects everything to be the same version. So, for previous kernels, you should reinstall the version you installed on 4.16

AFAIK, the .run installer should compile/install the kernel module for all installed kernels though.

You need to reinstall it after a kernel update though, as the kernel module will not automatically be recompiled/installed to the new kernel (unless you use DKMS).

When I boot with 4.15.3 kernel, I tried to install nvidia 396.18 but it said that it is installed.

I think that is the procedure:
Install : zypper in -t pattern devel_C_C++ devel-kernel.
When a kernel update, for old kernel that packages (devel_C_C++ devel-kernel) will remain.
Boot with new kernel.
Uninstall nvidia. (./nvidia-installer --uninstall)
Install nvidia (./nvidia-installer). This new install will work with both kernels (the old kernel will have now all it need for compile nvidia driver).

I will wait for a new kernel to test what I said.

Yes, because it is installed, the X driver at least.

I think that is the procedure:
Install : zypper in -t pattern devel_C_C++ devel-kernel.
When a kernel update, for old kernel that packages (devel_C_C++ devel-kernel) will remain.

Yes.

Boot with new kernel.
Uninstall nvidia. (./nvidia-installer --uninstall)
Install nvidia (./nvidia-installer). This new install will work with both kernels (the old kernel will have now all it need for compile nvidia driver).

Indeed.
Though I believe there is a way to just recompile/reinstall the kernel module by running nvidia-installer (which should be installed too, to /usr/bin/) with some option, but I can’t tell you how exactly.

In Yast I find only kernel-source 4.16. Not the 4.15.3 one.
I think that you are right. For recompile kernel module I need kernel-source for 4.15.3 but I cannot install it.
So I will wait the new kernel to test and find how we have to proceed.
Thank you.

Yes, unfortunately old packages are not kept in the repos, not even for the multiversion stuff like the kernel.
That’s why I didn’t suggest to install it and try again… :wink:

At this moment, the old version is still on the servers though, so you could download and install it manually.
E.g.:

sudo rpm -ivh https://download.opensuse.org/tumbleweed/repo/oss/noarch/kernel-source-4.15.13-2.4.noarch.rpm

I forgot to mention kernel-syms though, that may also be required (or may remove the need for kernel-source), but I don’t know what the nvidia .run installer exactly expects or needs.

OTOH, if you don’t have a real reason to boot kernel 4.15.3 (e.g. because 4.16.0 gives you problems), you could also just forget about it… :wink:

Hi
What is your Nvidia card… seems they have dropped support for some more with this release 396.18…

If you install the hard way with 390.48 does it work…?

Hi,
I have an GT 1030.
It worked with 390.48 with patch and with 396.18 (both with kernel 4.16).

I have a real reason to boot kernel 4.15.3.
I want to learn how things works.
This is why I like linux. I can learn a lot of things.
In Windows you learn only how to point your mouse to “Next” - or maybe I am bad. :slight_smile:

Sure, but I meant problems that would “force” you to use the older kernel.

The next kernel update definitely will come, probably much sooner that you’d expect… :wink:

I know. But I want to make a joke (in fact a semi-joke because it is real, I want to learn).

Yeah, that’s actually how I understood it.

Everything should be fine then I suppose?

Feel free to ask further questions of course.
Although I cannot guarantee you that I will answer you in every case… :wink:

Thanks for your help.
And for your kindness.
BTW, I installed kernel-source 4.15.3 but still not working…

Hello,

I found how it works. lol!

So, I have to kernels: 4.15.3-2-default and 4.16.
Boot from a kernel and: sh NVIDIA-Linux-(whatever).run -K – will install only for this kernel. Make this operation for both kernels (after I boot with kernel 4.15 and kernel 4.16).
Or, for a non running kernel: boot with 4.16 kernel and write: sh NVIDIA-Linux-(whatever).run --kernel-name=“4.15.3-2-default”
Not working until “mkinitrd”.
Problem solved.

Or, from kernel 4.16 install with nvidia-installer. It not make a link to kernel 4.15.
After, boot kernel 4.15. Install Nidia with --K. Mkinitrd. Works for both kernels now.
BTW, today after a zipper -vvv dup (thank you malcolmlewis), kernel upgrade from 4.16.0.1-5 to 4.16.0.1-6. Not need to install Nvidia again. It seems that it see that is the same kernel.

A link wouldn’t help anyway, as kernel modules built for one kernel version cannot be loaded by another version (especially if it’s a major new version like 4.15 vs 4.16, it may work with minor version updates like 4.16.0 -> 4.16.1).

After, boot kernel 4.15. Install Nidia with --K. Mkinitrd. Works for both kernels now.

Ok.
But I still think it should try to compile the module for all kernels (if you don’t use -K)

And yes, mkinitrd is necessary as the kernel module is included in the initrd and may be loaded before the root partition is mounted.

BTW, today after a zipper -vvv dup (thank you malcolmlewis), kernel upgrade from 4.16.0.1-5 to 4.16.0.1-6. Not need to install Nvidia again. It seems that it see that is the same kernel.

Yes, that was just a package rebuild (no changes, no new version), and even uses the same directories.