How to not rebuild NVIDIA drivers for each kernel?
Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
How to not rebuild NVIDIA drivers for each kernel?
Is it possible to not rebuild the NVIDIA drivers for each kernel build, if not for different versions of the kernel at least for rebuilds of the same kernel?
yes, before doing make modules_install simply backup the old nvdia module and copy it back afterwards...
(works only for rebuild of the same kernel version)
1. Boot with the new kernel.
2. Then cd to the following directory : /lib/modules/OLDKERNELVERSION/kernel/drivers/video/
(replace OLDKERNELVERSION with your own specific version)
3. Make a copy of the old driver: "cp nvidia.(k)o nvidia.(k)o.old"
4. Run the Nvidia installer
(this will create the new driver in /lib/modules/CURRENTKERNELVERSION/kernel/drivers/video/)
5. In the same directory mentioned under 2 do a rename to the original name
"mv nvidia.(k)o.old nvidia.(k)o"
These 5 simple steps will give you the Nvidia module in both kernels,
and you can quite happily boot into either one without re-installing.
I've had these instructions for a year or more, but just tried
them on a customer's box. I've done it, rebooted a few times, and
it's nice how they work.
I think it's not the problem building two nvidia-modules for different kernels, but keeping the nvidia module when rebuilding the kernel... (what is solved with my idea)
Your method can be achieved much easier using NVIDIA-INSTALLER -N (see advanced installer options)
So now we know how to keep the Nvidia module for a rebuild
of the same kernel version, and how to keep if for a rebuild
of a different kernel version. Nice to work together, eh?
-n, --no-precompiled-interface
Disable use of precompiled kernel interfaces.
-N, --no-network
This option instructs the installer to not attempt to connect to the NVIDIA
ftp site (for updated precompiled kernel interfaces, for example).
-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 ker-
nels (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.
doc.nice,
Don't forget that *nix commands are case sensitive. As for the -N switch, I always tell it NOT to go to the Nvidia FTP site, because it's just an unnecessary waste of time. When I first ran Slackware in 2003 I would let it try, but it never reached the site. Same with trying the "nvidia-installer --update" option. It can get there to tell me there's a new version, but it can't download it for me (never gets past 1%). Today it's hung here:
sorry for the confusion, of course I meant -K, not -N...
CMIIW:
you can add these parameters to the .run files an to the nvidia-installer script contained inside, as the .run script passes them on.
the download-problem seems specific to your system, as it works perfectly for me (and btw. also using a browser pointing to the address given by your output).
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.