NVidia driver won't work with more than one kernel

Hi all,
my issue is so, that i’ve compiled new kernel and it even boots, but only with x11failsafe option.
Ok, i’ve installed driver from nvidia site - It works.
But after that i wanted to boot the “old” kernel - it works only with x11failsafe.
Reinstalled nvidia driver. Now no fancy graphics booting “new” kernel.

How can i install this **** driver “twice”??

Thanks.

question: is this possible anyway? I’d say yes, but it will need some manual work, which could be easily undone by updating.

So by default, each time you update, replace or downgrade the running kernel, you must reinstall the proprietary nVIDIA video driver. This is because it is not included in the kernel, but must be externally installed. You have several options but the first is to reinstall after each kernel update. There is a procedure called the repository method which call allow you to have the kernel reinstall on each kernel update. Have a look here:

SDB:NVIDIA drivers - openSUSE

Else, you can reinstall the driver down the hard way as described here:

Installing the nVIDIA Video Driver the Hard Way - Blogs - openSUSE Forums

AND

LNVHW - Load NVIDIA (driver the) Hard Way from runlevel 3 - Version 1.46 - Blogs - openSUSE Forums

You can install it using DKMS automatically to install from here:

S.A.N.D.I. - SuSE Automated NVIDIA Driver Installer - Version 1.47 - Blogs - openSUSE Forums

But this only works if you externally compile a new kernel using something like this:

S.A.K.C. - SUSE Automated Kernel Compiler - Version 2.78 - Blogs - openSUSE Forums

So, if you stick with the default kernel and its security updates, use the repository way. If you compile your own kernels, consider using SAKC and SANDI together. Right now, the latest nVIDIA driver does not work with kernel 3.7 without using a pre-install patch. The situation similar for ATI users, but that does not work with the links I just posted which only work with nVIDIA.

Thank You,

Thanks for replies. Those articles i’ve already read.
But the main question is - can i run both kernels with proper graphics or is it too much work for too small gain?

On 2012-11-05 15:46, damkrat wrote:
>
> Thanks for replies. Those articles i’ve already read.
> But the main question is - can i run both kernels with proper graphics
> or is it too much work for too small gain?

You need to find out where exactly are the kernel related files saved
to, and move them to a different place for each kernel, a path with the
kernel version in the name.

(IMO, not tested)


Cheers / Saludos,

Carlos E. R.
(from 11.4 x86_64 “Celadon” (Minas Tirith))

Carlos E. R. wrote:
> On 2012-11-05 15:46, damkrat wrote:
>> Thanks for replies. Those articles i’ve already read.
>> But the main question is - can i run both kernels with proper graphics
>> or is it too much work for too small gain?
>
> You need to find out where exactly are the kernel related files saved
> to, and move them to a different place for each kernel, a path with the
> kernel version in the name.
>
> (IMO, not tested)

I’m not a kernel expert (perhaps Larry or somebody will come along) but
isn’t it the case that kernel modules should already be in a
kernel-specific directory?

So it sounds like something may have gone wrong with building the
module. I would try

modinfo <nvidia-module-name>

and see what it reports for the filename and path.

See the **“I just upgraded my kernel, and now the NVIDIA kernel module will not load” **section of Chapter

On 11/05/2012 09:26 AM, Tyler K wrote:
>
> See the *“I just upgraded my kernel, and now the NVIDIA kernel module
> will not load” *section of ‘Chapter’ (http://tinyurl.com/d8g3wkh)

I do not understand the problem, but building an NVIDIA driver for a new kernel
using the .run file prevents the driver from working, even though the module
still exists. I suspect that the problem becomes a mismatch in one of the
library routines that is built at the same time as the kernel module.

I am in the middle of bisecting the kernel to find a problem in the ivtv driver,
and this difficulty is a real hassle, particularly as this system supports the
main TV in the house, and I must always leave the system in a working state.

Larry Finger wrote:
> On 11/05/2012 09:26 AM, Tyler K wrote:
>>
>> See the *“I just upgraded my kernel, and now the NVIDIA kernel module
>> will not load” *section of ‘Chapter’ (http://tinyurl.com/d8g3wkh)
>
> I do not understand the problem, but building an NVIDIA driver for a new
> kernel using the .run file prevents the driver from working, even though
> the module still exists. I suspect that the problem becomes a mismatch
> in one of the library routines that is built at the same time as the
> kernel module.

Just looking at chapter 5 in that doc, I would guess that what is
happening is that some of the symlinks are left pointing to the library
versions for the new kernel. e.g.

/usr/lib/libGL.so.x.y.z
/usr/lib/libGL.so.x -> libGL.so.x.y.z
/usr/lib/libGL.so -> libGL.so.x

I have no idea how those links are supposed to get redirected when a new
kernel is run. It seems possible the whole mechanism is broken wrt
kernel multiversion, but who am I to know? YMMV

maybe i have to compile nvidia.ko for both kernels from nvidia-****.run,
cause for new one i’ve made so and for the old one i’ve let it install from repo.

I think maybe it is possible. This got me thinking: On bumblebee (yup, I know this is not bumblebee, but read on) the thing that’s avoided in installing the NVIDIA driver, is these symlinks replacing the libGL files, this to be able to use the intel as well. To accomplish this, in bumblebee.conf an XorgModulePath is set, pointing to the real NVIDIA files. Using this info, one could create a script which detects the running kernel (each kernel having the NVIDIA kernel module built). Doing a “man xorg.conf” shows


      ModulePath "path"
              sets  the  search path for loadable Xorg server modules.  This path is a comma separated list of directories which the Xorg server searches
              for loadable modules loading in the order specified.  Multiple ModulePath entries may be specified, and they will be concatenated to  build
              the module search path used by the server.  The default module path is

                  /usr/lib64/xorg/modules

Puzzled :smiley:

From nvidia-installer help:

-K, --kernel-module-only
Install a kernel module only, and do not uninstall the existing driver.
This is intended to be used to install kernel modules for additional
kernels (in cases where you might boot between several different
kernels). To use this option, you must already have a driver installed,
and the version of the installed driver must match the version of this
kernel module.

libGLX, Xorg ModulePath etc are absolutely unrelated to kernels.

Makes sense, thanks A LOT!!!

Looking at the advanced options for the downloadable installer I see this:

-k, --kernel-name=KERNEL-NAME
Build and install the NVIDIA kernel module for the
non-running kernel specified by KERNEL-NAME (KERNEL-NAME
should be the output of uname -r when the target kernel
is actually running). This option implies
‘–no-precompiled-interface’. If the options
‘–kernel-install-path’ and ‘–kernel-source-path’ are not
given, then they will be inferred from KERNEL-NAME; eg:
‘/lib/modules/KERNEL-NAME/kernel/drivers/video/’ and
‘/lib/modules/KERNEL-NAME/build/’, respectively.

That would work I suppose.

I should have scrolled down further in the advanced options, you get them this way:

./NVIDIA-Linux-x86_64-295.59.run -A | less

I found this, which seems to be for this probleM

-K, --kernel-module-only
Install a kernel module only, and do not uninstall the
existing driver. This is intended to be used to install
kernel modules for additional kernels (in cases where you
might boot between several different kernels). To use this
option, you must already have a driver installed, and the
version of the installed driver must match the version of
this kernel module.

See, just like I told you – its the special k option …err, K :smiley: