Keeping 2 drivers for 2 different kernels
I have the drivers installed correctly on my Mandrake 9.1 box
Now i compiled another kernel on the same machine (for completeness sake, is a low-latency patched kernel for multimedia stuff).
If I start up the PC with the new kernel X doesn't start and tells me this in the log:
"(EE) NVIDIA(0): Failed to initialize the NVIDIA kernel module!"
Reading the docs it says that this could happen when you use a driver compiled for a kernel different from the one you usa, which seems to be exactly my case.
So, the questions are:
- Do I only have to run NVIDIA-Linux-x86-1.0-4363.run again to generate a new correct NVIDIA driver for my new kernel?
- Does this REPLACE my previous one, so that X will start only for the new kernel and won't start anymore for the old kernel?
- How can I have BOTH of my kernel make X start WITH a working NVIDIA driver?
Thank you very much.
run the nvidia installer and specify the new kernel directory in the install command line...read the readme on how to specify what kernel to specifically install the drivers for..
Doing what DrOzz is recommending will delete the kernel module for your other kernel, though -- they won't both work anymore, only your new kernel.
The way to get both of them working at the same time is to run the installer with the --extract-only option. This will create a directory named the same as the installer (without the .run at the end). cd into that directory, and then cd ./usr/src/nv and run make nvidia.o && make install -- this won't delete the old kernel package, but will just create a new one (you HAVE to be running the new kernel), and install it.
You can then delete the directory that the installer created when you gave it --extract-only.
Another way to prevent an install-under-kernel-B
from trashing the module already installed-under-kernel-A
is to move the installed kernel-A module first
to a place where modprobe can find it but
nvidia-installer can't, then run the nvidia-installer normally.
E.g. I have kernels "2.4.18-bigmem" and
"2.4.20-xfs". I've already run nvidia-installer
under 2.4.18-bigmem; it created a file
which I want to keep.
Now I boot to 2.4.20-xfs, but before running
nvidia-installer, I say
Moving nvidia.o out of the kernel/... subtree
also means (for better or worse) that if I
"make modules_install" on that kernel's
source tree, it won't erase nvidia.o.
That's good if I make only small changes,
but bad if I make a kernel .config change that breaks compatibility.
Find out by running "depmod -ae".
If nvidia.o has undefined symbols,
then rm /lib/modules/whatnot/misc/nvidia.o,
re-run nvidia-installer and then mv... as above.
I gave a deeper look at the docs.
Since using NVIDIA-Linux-x86-1.0-4363.run installs the new driver under /lib/modules/`uname -r`/video/nvidia.o, shouldn't it suffice to just running it again under the new kernel? Shouldn't it go automatically to the new kernel's subdir?
but seems to be designed to uninstall
whatever it already knows about -- whether
an RPM installation or an existing nvidia-installer one.
Generally that seems like a good idea,
but it gets in the way if you want to run multiple
If you do use the hide-in-misc/ subterfuge
I suggest above, you'll need to remember to
remove .../misc/nvidia.o manually if you upgrade to a later
NVidia driver version. The later driver will
come with a later libGL, and the kernel
driver and libGL need to have matched versions.
I.e. you might get in the habit of saying, just to make sure,
So, if I understood everything right, the trick is to move nvidia.o from /lib/modules/my.old.kernel/kernel/drivers/video to /lib/modules/my.old.kernel/misc, because that directory is in modprobe's path, too, but it's not recognized by NVIDIA's "auto uninstaller"?
Then I just have to boot the new kernel, run the installer and I should find a new nvidia.o in /lib/modules/my.new.kernel/kernel/drivers/video
It doesn't seem difficult. It could even be generalized for a thire or fourth kernel by playing the same trick over again, am I right?
does the other trick (manual decompressing and make/make install) give exactly the same results? This seems even easier and generalizable for n kernels.
|All times are GMT -5. The time now is 05:41 AM.|
Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Copyright ©1998 - 2014, nV News.