Go Back   nV News Forums > Linux Support Forums > NVIDIA Linux

Newegg Daily Deals

Reply
 
Thread Tools
Old 05-28-03, 10:03 AM   #1
Dnzauker
Registered User
 
Join Date: Sep 2002
Posts: 13
Default Keeping 2 drivers for 2 different kernels

Hello.
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.
Dnzauker is offline   Reply With Quote
Old 05-28-03, 02:48 PM   #2
DrOzz
Registered User
 
Join Date: May 2003
Location: Sydney, Nova Scotia
Posts: 70
Default

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..
DrOzz is offline   Reply With Quote
Old 05-28-03, 05:14 PM   #3
bwkaz
Registered User
 
Join Date: Sep 2002
Posts: 2,262
Default

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.
__________________
Registered Linux User #219692
bwkaz is offline   Reply With Quote
Old 05-29-03, 12:31 AM   #4
stuartlevy
Registered User
 
Join Date: May 2003
Location: flat, steamy Champaign, IL
Posts: 36
Default

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
/lib/modules/2.4.18-bigmem/kernel/drivers/video/nvidia.o
which I want to keep.

Now I boot to 2.4.20-xfs, but before running
nvidia-installer, I say
Code:
  cd /lib/modules/2.4.18-bigmem
  mkdir misc
  mv  kernel/drivers/video/nvidia.o  misc/
Neat huh?

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.
stuartlevy is offline   Reply With Quote
Old 05-29-03, 07:09 AM   #5
Dnzauker
Registered User
 
Join Date: Sep 2002
Posts: 13
Default

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?
Dnzauker is offline   Reply With Quote
Old 05-29-03, 10:49 AM   #6
stuartlevy
Registered User
 
Join Date: May 2003
Location: flat, steamy Champaign, IL
Posts: 36
Default

Quote:
[i]... Shouldn't it go automatically to the new kernel's subdir? [/b]
It could have been made to do that,
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
kernels.

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,
Code:
  rm /lib/modules/*/misc/nvidia.o
  nvidia-installer -a --update ...
stuartlevy is offline   Reply With Quote
Old 05-29-03, 03:16 PM   #7
Dnzauker
Registered User
 
Join Date: Sep 2002
Posts: 13
Default

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.
Dnzauker is offline   Reply With Quote
Old 05-29-03, 05:34 PM   #8
bwkaz
Registered User
 
Join Date: Sep 2002
Posts: 2,262
Default

Quote:
Originally posted by Dnzauker
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"?
Yes.

Quote:
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
Yes.

Quote:
It could even be generalized for a thire or fourth kernel by playing the same trick over again, am I right?
Yes.

Quote:
does the other trick (manual decompressing and make/make install) give exactly the same results? This seems even easier and generalizable for n kernels.
Yes. Although if you use the other method (manual decompression, make nvidia.o, make install), then you won't get the GL libraries reinstalled. This shouldn't matter, because they're the same regardless of kernel version anyway (unless you move from a RH patched kernel to a standard kernel, where the TLS stuff changes -- I don't have any idea whether or how well that would work).
__________________
Registered Linux User #219692
bwkaz is offline   Reply With Quote

Reply


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


Similar Threads
Thread Thread Starter Forum Replies Last Post
NVIDIA, please release updated 290.xx drivers for new kernels and X.org versions artem NVIDIA Linux 19 08-25-12 09:02 AM
NVIDIA Drivers Receive Windows 8 Certification News Archived News Items 0 06-01-12 05:30 AM
Creative drivers ? SparrowHawk General Hardware 39 11-18-02 08:03 AM
Radeon 9700 not all that? sancheuz Other Desktop Graphics Cards 200 10-12-02 09:31 PM
Nvidia Stereo Drivers Soudontsay NVIDIA Windows Graphics Drivers 2 08-26-02 10:48 AM

All times are GMT -5. The time now is 07:54 PM.


Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Copyright 1998 - 2014, nV News.