[SOLVED] kernel upgrade procedure with nvidia-kernel
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.
I'm running proprietary nvidia drivers on Slackware 15 multilib (so nvidia-driver and nvidia-kernel from slackbuilds.org)
If I was to upgrade my kernel, I assume this would break nvidia, as my modules would need to be upgraded as well. Can i just rebuild the package from the slackbuild and reinstall once im running the newer kernel? Is it necessary to uninstall nvidia-kernel before the kernel upgrade takes place?
Distribution: Slackware64-current with "True Multilib" and KDE4Town.
Posts: 9,116
Rep:
Each time you change your kernel you need to re-install the Nvidia driver.
I have always uninstalled the Nvidia driver, than installed the new kernel, then re-installed the Nvidia driver. If you are using the driver from .SBo, you'll need to rebuild both the Nvidia kernel module and then the driver.
Instructions for the .SBo driver and kernel module are available on each appropriate page at .Sbo. http://www.slackbuilds.org/result/?s...nvidia&sv=15.0
If you try the package directly from Nvidia (which is both the Nvidia kernel module and the driver in one package) installation instructions are available under the heading, "additional information." https://www.nvidia.com/en-us/drivers/unix/
Last edited by cwizardone; 08-14-2022 at 11:09 AM.
Each time you change your kernel you need to re-install the Nvidia driver.
I have always uninstalled the Nvidia driver, than installed the new kernel, then re-installed the Nvidia driver.
You are using the SlackBuilds.org nvidia-kernel and nvidia-driver?
As long as you stick with the same version of the NVIDIA run file, there is no need to recompile or re-install the nvidia-driver package. You can compile nvidia-kernel for multiple kernels that you have installed on your computer as long as all of them are for the same NVIDIA version that the nvidia-driver was also built from.
Summarizing: if you install a new kernel, then before your reboot you compile a new nvidia-kernel package, and install that.
You'll have to explicitly tell the nvidia-kernel.SlackBuild script that it should not compile for the running kernel but for the new kernel that you just installed. For instance if NVIDIA version is 515.65.01 and your new kernel is 5.18.17:
Distribution: Slackware64-current with "True Multilib" and KDE4Town.
Posts: 9,116
Rep:
Quote:
Originally Posted by Windu
You are using the SlackBuilds.org nvidia-kernel and nvidia-driver?
As long as you stick with the same version of the NVIDIA run file, there is no need to recompile or re-install the nvidia-driver package.......
Different experience then. I never recompile or even re-install nvidia-driver when the NVIDIA version stays the same. Just compile and install a new nvidia-kernel and reboot. Works all the time.
I use driver version 390.xxx, and I have just been installing it using the nvidia .run file. When I upgrade the kernel (on 15.0, not current), I boot to run level 3 with the huge kernel, do my mkinitrd stuff, boot to generic, the re-compile nvidia using the .run file, and then I'm off to X via startx.
The .run file always tells me there is a previous driver installed (whether its the same version or not), and rebuilds whatever it needs to rebuild (kernel portions, driver).
the .run file is much easier for me... I'm on -current and kernel upgrades are common for me. I'm always in runlevel 3 so i just su - then sh <nvidia .run file> and follow the prompts. it's snazzy.
I dont un-install the old Nvidia driver unless i meet problems which is rarely
Last edited by Regnad Kcin; 08-14-2022 at 07:30 PM.
With the nvidia .run file on -current (where kernel version changes often), I use and recommend DKMS (development/dkms at SBo). Once installed, you can enable dkms support when running the nvidia installer. Now, whenever a new kernel version is installed, do nothing - just reboot, at which time the driver will be rebuilt for you (provided you've edited rc.modules.local, as described in the README).
The last couple of times I've upgraded my kernel on 15.0, the nvidia .run file has offered to add the rebuild to the DKMS settings for me. (I had installed DKMS for something else that insisted needed it - I think it was the motherboard sensors module for my ASUS mobo.)
Since I have not yet spent time to figure out how to use DKMS properly, I've told nvidia not to do that. Sticking to the "if it works, don't fix it" policy.
The "-K" option is nice, btw. It'll only build the kernel module (for the current kernel) and not reinstall everything else, which means your last known-good kernel also has video card drivers. (This was useful when 5.19 wouldn't boot.) I clean things out and uninstall drivers every other kernel or so, when I know the new kernel boots, or if there's a new video card driver.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.