Proprietary Nvidia installation that is unconstrained from the running kernels versions?
SlackwareThis Forum is for the discussion of Slackware Linux.
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.
...
c) Then boot in init 3 and Slackware stock kernel, then run ./NVIDIA-xxx.run -K
Actually you don't need to boot to the new kernel first. Say, you are running kernel 5.15.19, where you are already using the nvidia blob. Then you install the new kernel 5.15.117 with source and modules. Run the nvidia .run-file with options '-K -k 5.15.117' to build and install the nvidia kernel module for kernel 5.15.117. Only after that boot to the new kernel.
Actually you don't need to boot to the new kernel first. Say, you are running kernel 5.15.19, where you are already using the nvidia blob. Then you install the new kernel 5.15.117 with source and modules. Run the nvidia .run-file with options '-K -k 5.15.117' to build and install the nvidia kernel module for kernel 5.15.117. Only after that boot to the new kernel.
Oh wow. I've been using Slackware since 2005, and I didn't know that until today. Makes sense--you've got source and modules for the new kernel, so that's what's going to build. (Which is what happens when you screw up and didn't install the source package for the new kernel--you get an error message that it's the wrong source.)
Over that time I have never been able to install a Nvidia driver without first removing the previous installation.
Further details on my kernel update process, where the nvida .run file removes the old driver for me. I am always configured to boot to run level 3 - command line interface, no X running. Here are my manual steps, after running upgradepkg with the kernel-related packages. Some steps may be unnecessary or redundant, but it works, so I don't fix it.
Run lilo (have both generic and huge kernels listed)
Reboot into huge kernel
Generate new initrd with geninitrd
Run lilo
Reboot into generic kernel
Rebuild the nvidia driver (latest version is currently 390.157)
Yes to deleting old driver
No to registering with dkms
....eventually reboot again before running X (startx).
Nvidia does not update the 390.x series drivers very often, but I usually check for a new version whenever I upgrade a kernel. Just in case.
First install dkms and then run the nVidia installer. When it asks if you want to register with DKMS say "yes".
After installing a new kernel just run
Code:
dkms autoinstall -k ${KVER}
before rebooting.
(obviously replace "${KVER}" with your actual kernel version, i.e., that which would be return by "uname -r".)
No need to rerun the nVidia installer this way.
I've been doing this for quite a while now.
I have a script to help with upgrading to a new version, or rerun the installer when DKMS failed for whatever reason:
Code:
#!/bin/bash
NvVER=545.29.02
KVER=${KVER:-$(uname -r)}
#MODULE_ONLY=--kernel-modules-only
MODULE_ONLY=
if [ -z "$MODULE_ONLY" ]; then
# Both of these call nvidia-smi. If it is running it prevents
# the nvidia module from unloading.
/etc/rc.d/rc.system76-power stop
/etc/rc.d/rc.monitor_sensors stop
sleep 2s
fi
# --dkms \
# --expert
sh ./NVIDIA-Linux-x86_64-$NvVER.run \
--kernel-name="$KVER" \
--kernel-output-path=/lib/modules/"$KVER"/build \
--kernel-source-path=/lib/modules/"$KVER"/build/source \
"$MODULE_ONLY" \
--kernel-module-build-directory=kernel-open \
--install-compat32-libs \
--no-cc-version-check
I just recently added the "--kernel-module-build-directory=kernel-open" option as my card is now supported.
I also had to add the "--kernel-source-path=/lib/modules/"$KVER"/build/source" switch for the 6.6.y kernel series. Before it worked without that option.
Well this is weird and very likely hilarious. I bought my first Nvidia card in 1998. That year I began running Linux. Within a very short time I started installing the proprietary drive for Nvidia on Linux using the .run installers, first on Mandrake and then in 1999 on Slackware which became my Main.
I have never, not once, uninstalled a previous Nvidia driver. In fact, I have both upgraded and downgraded drivers simply by running the .run installer. What's more I am an avid gamer and benchmark enthusiast and have never had an Nvidia driver performance problem.
Well, I should amend that slightly around a few months when I had bought an oddball Xfx (Synergy ? ) Nvidia card somewhere around 2000-2001 that deviated so far from spec that, for an AGP card, had twice as much VRAM as any other card with the same GPU. It was a problem installing drivers on ANY OpSys and Linux was no exception. Thankfully I ditched that card quickly... and by "ditched" I do mean tossing it out with other trash. Other than that mongrel, it's been all smooth sailing.
Reboot into generic kernel
Rebuild the nvidia driver (latest version is currently 390.157)
Yes to deleting old driver
No to registering with dkms
I have dkms installed, and I use it to rebuild my ASUS sensors widget for X, but I simply have not taken the time to figure out how dkms works in detail and how to automate it. I also have to rebuild the virtualbox drivers - but I do that manually (no dkms).
I update kernels only when there is a new one in 15.0 stable. The amount of time I spend on it is small, so spending time learning dkms has been a low priority.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.