LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 11-19-2023, 05:45 AM   #16
Petri Kaukasoina
Senior Member
 
Registered: Mar 2007
Posts: 1,938

Rep: Reputation: 1568Reputation: 1568Reputation: 1568Reputation: 1568Reputation: 1568Reputation: 1568Reputation: 1568Reputation: 1568Reputation: 1568Reputation: 1568Reputation: 1568

Quote:
Originally Posted by rizitis View Post
...
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.
 
1 members found this post helpful.
Old 11-19-2023, 06:02 AM   #17
rizitis
Member
 
Registered: Mar 2009
Location: Greece,Crete
Distribution: Slackware64-current, Slint
Posts: 708
Blog Entries: 1

Rep: Reputation: 515Reputation: 515Reputation: 515Reputation: 515Reputation: 515Reputation: 515
Ah... were was you so far?
I was running
Code:
sh NVIDIA-xx.run -k 5.15.117
And it was not working...
I didnt understand that -K -k needed!
thanks!
 
Old 11-19-2023, 07:38 AM   #18
garpu
Senior Member
 
Registered: Oct 2009
Distribution: Slackware
Posts: 1,610

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
Quote:
Originally Posted by Petri Kaukasoina View Post
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.)
 
Old 11-19-2023, 07:52 AM   #19
dhalliwe
Member
 
Registered: Mar 2022
Location: Ontario, Canada
Distribution: Slackware
Posts: 168

Rep: Reputation: 158Reputation: 158
Quote:
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.
 
1 members found this post helpful.
Old 11-20-2023, 12:35 PM   #20
yvesjv
Member
 
Registered: Sep 2015
Location: Australia
Distribution: Slackware, Devuan, Freebsd
Posts: 581

Original Poster
Rep: Reputation: Disabled
So, thought I'd look up wayland this morning to see if that could work...nope
That is one long whinge: https://gist.github.com/probonopd/9f...5e3a9f2d1f2277
 
Old 11-20-2023, 03:01 PM   #21
drumz
Member
 
Registered: Apr 2005
Location: Oklahoma, USA
Distribution: Slackware
Posts: 907

Rep: Reputation: 697Reputation: 697Reputation: 697Reputation: 697Reputation: 697Reputation: 697
I can't believe nobody has yet mentioned dkms.

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.
 
Old 11-20-2023, 03:52 PM   #22
enorbet
Senior Member
 
Registered: Jun 2003
Location: Virginia
Distribution: Slackware = Main OpSys
Posts: 4,811

Rep: Reputation: 4447Reputation: 4447Reputation: 4447Reputation: 4447Reputation: 4447Reputation: 4447Reputation: 4447Reputation: 4447Reputation: 4447Reputation: 4447Reputation: 4447
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.
 
2 members found this post helpful.
Old 11-20-2023, 07:32 PM   #23
dhalliwe
Member
 
Registered: Mar 2022
Location: Ontario, Canada
Distribution: Slackware
Posts: 168

Rep: Reputation: 158Reputation: 158
Quote:
I can't believe nobody has yet mentioned dkms.
I mentioned it.

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

I also said

Quote:
it works, so I don't fix it.
...but I agree that dkms is a possible option.
 
1 members found this post helpful.
  


Reply

Tags
kernel, nvidia kernel, nvidia-driver



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Proprietary versus non-proprietary software dcs.79c Linux - Software 8 03-17-2017 01:09 PM
[SOLVED] Nvidia proprietary driver - running under separate kernels raypen Slackware 12 12-13-2011 02:08 PM
nvidia proprietary driver, nvidia-settings and how to configure panning bluebox Linux - Hardware 1 03-11-2011 03:21 PM
LXer: Proprietary browsers built on proprietary browsers: the blind leading the blind LXer Syndicated Linux News 0 09-15-2009 12:20 AM
LXer: Declare your independence from proprietary software (Or how to break the habit of proprietary software) LXer Syndicated Linux News 0 07-05-2006 01:54 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 12:07 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration