LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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 02-25-2022, 04:50 AM   #1
keithpeter
Member
 
Registered: Nov 2015
Location: 52:30N 1:55W
Distribution: Slackware 15.0, OpenBSD 7.4
Posts: 310

Rep: Reputation: Disabled
Kernel 5.4.181 with Nvidia 340.108 legacy drivers on 15.0: a few questions


Hello All

This is not a request for help but more for background information.

I'm posting this off my old Thinkpad T61p with its ancient Nvidia graphics card. I've installed Slackware64 15.0 and I have built the LTS 5.4.181 kernel (EoL 2025) using a 'manual' process (Salix tutorial). I then installed the Nvidia legacy driver 'the Nvidia way' and it is all nice and apparently stable with no blanking or visual artifacts.

Initially, I 'downgraded' to the Slackware64 14.2 kernel packages as the Nvidia legacy drivers won't work with the 15.0 kernel without significant patching. The 4.4.x kernel series is EoL next month so I decided to use the 5.4.x LTS kernel instead.

I used the zcat /proc/config.gz > config command to save the configuration from the running Huge 4.4.301 kernel to the 5.4.181 kernel source file then ran make oldconfig... and had to work through a large number of choices few of which meant anything to me. I abandoned that and used make olddefconfig to accept default choices. That worked but there were a few warnings at the end about the 'm' option (module) being chosen but not available for the option. Then I compiled the kernel and installed the modules and copied vmlinuz and System.map across to /boot. All good.

My questions:

1) Is there a more appropriate configuration method for this task? would it be better to work back from the Huge config file in the 'Kernels' directory of Slackware 15.0? I'm wondering if I am actually losing the benefit of the later kernel by switching off security fixes or something. On a machine dating from 2006 the new drivers and all don't matter.

2) Is there a way of having both the 4.4.301 and 5.4.181 kernels working with the Nvidia legacy drivers? At present, I've re-run the Nvidia .run file with 5.4.181 running and it uninstalled itself and reinstalled itself again presumably inserting the nvidia module in the 5.4.181 kernel. The 4.4.301 kernel still boots for emergency access to the console but won't run X, presumably because of the patched Xorg.conf file.

3) I've blacklisted kernel packages in slackpkg, and I have copied the 5.4.181 source tree to /usr/src but I have not altered the linux symlink - that still points to 4.4.301 sources. Will this matter to anything at all? Building slackbuilds?

Not urgent, this machine is working fine, just trying to understand what I'm doing.
 
Old 02-25-2022, 05:27 AM   #2
elcore
Senior Member
 
Registered: Sep 2014
Distribution: Slackware
Posts: 1,754

Rep: Reputation: Disabled
Not sure about 64bit, but for 32bit one:

340.108 works fine on LTS kernel 4.14 (no patching needed).

390.147 works fine on LTS kernel 5.15 (this might be the last 32bit driver).

I've somehow got a chip supported by both 340 and 390 branch, so I've tested this.
My suggestion would be to compile your own kernel and stick to the supported LTS branch.
Because then you won't have to patch anything until the relevant LTS kernel branch goes EOL.
If you go with latest kernel, you may be forced to patch the driver every time the kernel changes.

For me it's easier to replace the distribution kernel than to follow unofficial patches FWWIW.
 
1 members found this post helpful.
Old 02-25-2022, 10:09 AM   #3
JayByrd
Member
 
Registered: Aug 2021
Location: Seattle, WA
Distribution: Slackware
Posts: 302

Rep: Reputation: 310Reputation: 310Reputation: 310Reputation: 310
Quote:
Originally Posted by keithpeter View Post
...
My questions:

1) Is there a more appropriate configuration method for this task? would it be better to work back from the Huge config file in the 'Kernels' directory of Slackware 15.0?...
For myself, I would snag an official Slackware kernel .config file for whichever kernel version you are using as the starting point. The cumulative mirror at slackware.uk has Slackware kernel packages for 4.4, 4.9, 4.14, 5.4, 5.10, etc. Download the generic or huge kernel of your choice, then use "explodepkg" to get the config file(s) you need. When I was running test builds of the nVidia drivers (the even older 304 version,) I used these configs as my baseline for all the different kernel versions. You can find them here.

Quote:
Originally Posted by keithpeter View Post
2) Is there a way of having both the 4.4.301 and 5.4.181 kernels working with the Nvidia legacy drivers? At present, I've re-run the Nvidia .run file with 5.4.181 running and it uninstalled itself and reinstalled itself again presumably inserting the nvidia module in the 5.4.181 kernel. The 4.4.301 kernel still boots for emergency access to the console but won't run X, presumably because of the patched Xorg.conf file.
I'm not sure about having multiple versions of nvidia installed when using the "nvidia way"--i.e., using the *.run method. However, you could use the SlackBuild scripts available at SBo to create multiple nvidia packages for different kernels. At the moment, I have nvidia-legacy304-kernel packages installed for 5.15, 5.16, and 5.17 kernels simultaneously. The appropriate nvidia version loads up automatically, depending on whichever kernel I choose to boot from the lilo menu.
For the record, if you go this route, you will need separate versions only for the nvidia kernel module. Only one build of the binary driver should be necessary, as the binary driver is not kernel-specific.

Quote:
Originally Posted by keithpeter View Post
3) I've blacklisted kernel packages in slackpkg, and I have copied the 5.4.181 source tree to /usr/src but I have not altered the linux symlink - that still points to 4.4.301 sources. Will this matter to anything at all? Building slackbuilds?
The symlink should not be a problem when working with the SlackBuild scripts, provided that you pass the appropriate kernel version when invoking the build script. See the README for the nvidia-legacy340-kernel SlackBuild I linked to above.
 
1 members found this post helpful.
Old 02-25-2022, 10:47 AM   #4
keithpeter
Member
 
Registered: Nov 2015
Location: 52:30N 1:55W
Distribution: Slackware 15.0, OpenBSD 7.4
Posts: 310

Original Poster
Rep: Reputation: Disabled
@ elcore and JayBird

Thanks for your replies. Much useful information. I suspected that I should have used slackbuild packages for the nvidia drivers!

Quote:
Originally Posted by JayByrd View Post
The cumulative mirror at slackware.uk has Slackware kernel packages for 4.4, 4.9, 4.14, 5.4, 5.10, etc. Download the generic or huge kernel of your choice, then use "explodepkg" to get the config file(s) you need.
So explodepkg on

Code:
http://slackware.uk/cumulative/slackware64-current/slackware64/a/kernel-huge-5.4.84-x86_64-1.txz
and then 'make oldconfig' and only 3 questions (I just accepted the defaults). I wasn't previously aware of the 'cumulative' repo. I'm marking this solved.

Last edited by keithpeter; 02-25-2022 at 11:33 AM. Reason: oldconfig only 3 questions this time not hundreds. Compiling.
 
  


Reply



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
nvidia 340.108 (no-compat32) on linux kernel 5.15.19 twy Slackware 16 04-13-2022 09:44 PM
LXer: Solus Gets Linux Kernel 5.5, Deprecates Nvidia 340 Legacy Driver LXer Syndicated Linux News 0 02-13-2020 10:42 PM
LXer: NVIDIA end updates to the 340 series legacy driver for Linux LXer Syndicated Linux News 0 02-03-2020 04:21 AM
4.4.172 kernel and nividia-legacy*340* (SBo) j12i Slackware 13 04-04-2019 09:36 AM

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

All times are GMT -5. The time now is 01:23 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