LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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-05-2023, 03:59 PM   #1
JayByrd
Member
 
Registered: Aug 2021
Location: Seattle, WA
Distribution: Slackware
Posts: 302

Rep: Reputation: 310Reputation: 310Reputation: 310Reputation: 310
Smile nvidia-legacy304 for Slackware 15


As many of you probably already know, I've been working on keeping the supremely vintage 304-version of the proprietary nVidia driver alive for Slackware 15. I do realize that, in all probability, there aren't many out there still running a GPU old enough to require this 304-version. But, if there are others like me--content to continue running the same hardware until it dies a natural death--and still run a very long-in-the-tooth nvidia GPU, you may find this stuff useful. (After tinkering with it on-and-off for over a year, I think it's ready to go.)

The build scripts haven't changed dramatically since my previous thread, but there have been minor tweaks and many patches added. The patches include five more for the nvidia kernel module to fix build issues on kernels 5.18-6.2 and fifteen(!) more to fix Xorg-server CVEs. Between the new ones and the ones from volkerdi that I'd already been applying, we are now up to 21 CVEs fixed from 2018 up to the latest batch for December 2022.

So, for any who want them, here they are. (As per usual, all necessary info can be found in the various README files and source download links are in the .info files.)

Feedback welcomed.

EDIT: Thanks to Daedra's heads-up about another CVE, I just removed the xorg-legacy119 temporarily while I test the latest patch. I'll attach the updated one soon.


EDIT #2: OK, the latest patch has been applied to the xorg-server-legacy build. Twenty-two CVEs now accounted for ;-) Latest SlackBuild attached to post #5 below.
Attached Files
File Type: txt nvidia-legacy304-driver.tar.gz.txt (7.9 KB, 59 views)

Last edited by JayByrd; 04-01-2023 at 02:21 PM.
 
Old 02-06-2023, 02:31 PM   #2
scuzzy_dog
Member
 
Registered: Apr 2021
Location: Free State of Texas (somewhat free)
Posts: 108

Rep: Reputation: Disabled
Thanks for taking the time to do all of that.
 
2 members found this post helpful.
Old 02-06-2023, 04:22 PM   #3
cwizardone
LQ Veteran
 
Registered: Feb 2007
Distribution: Slackware64-current with "True Multilib" and KDE4Town.
Posts: 9,154

Rep: Reputation: 7323Reputation: 7323Reputation: 7323Reputation: 7323Reputation: 7323Reputation: 7323Reputation: 7323Reputation: 7323Reputation: 7323Reputation: 7323Reputation: 7323
Quote:
Originally Posted by scuzzy_dog View Post
Thanks for taking the time to do all of that.
Ditto!
 
1 members found this post helpful.
Old 02-07-2023, 01:46 AM   #4
basharx
Member
 
Registered: Nov 2013
Posts: 30

Rep: Reputation: Disabled
Thank you, very useful.

Also, an alternative without the Slackware packaging, including other legacy drivers and for kernels 6.x is available here:

https://www.if-not-true-then-false.c...vidia-patcher/
 
1 members found this post helpful.
Old 02-07-2023, 04:20 PM   #5
JayByrd
Member
 
Registered: Aug 2021
Location: Seattle, WA
Distribution: Slackware
Posts: 302

Original Poster
Rep: Reputation: 310Reputation: 310Reputation: 310Reputation: 310
Update for xorg-legacy119.

OK, so the new patch referenced in my edit of the post above appears to compile and run nicely. Attached is the updated SlackBuild with the new (Jan 2023) CVE fix included.

Last edited by JayByrd; 04-01-2023 at 02:21 PM.
 
2 members found this post helpful.
Old 02-07-2023, 04:42 PM   #6
LuckyCyborg
Senior Member
 
Registered: Mar 2010
Posts: 3,555

Rep: Reputation: 3419Reputation: 3419Reputation: 3419Reputation: 3419Reputation: 3419Reputation: 3419Reputation: 3419Reputation: 3419Reputation: 3419Reputation: 3419Reputation: 3419
@JayByrd

Man, you are great! You made a set of fine SlackBuilds.

Specially, I loved how you build the kernel packages.

BTW, you tried "ignore-abi" for the Xorg driver? I remember that time ago I managed to run a legacy NVIDIA blob with -current almost Slackware 15.0 because somewhere on garage I have a NVIDIA GeForce 210. Ended that Nouveau already handled well this particular graphics card and I stuck in the end with it.

Last edited by LuckyCyborg; 02-07-2023 at 04:44 PM.
 
4 members found this post helpful.
Old 02-07-2023, 07:07 PM   #7
JayByrd
Member
 
Registered: Aug 2021
Location: Seattle, WA
Distribution: Slackware
Posts: 302

Original Poster
Rep: Reputation: 310Reputation: 310Reputation: 310Reputation: 310
Quote:
Originally Posted by LuckyCyborg View Post
@JayByrd
Man, you are great! You made a set of fine SlackBuilds.
Specially, I loved how you build the kernel packages.
Thanks, LC.

Quote:
Originally Posted by LuckyCyborg View Post
... Ended that Nouveau already handled well this particular graphics card and I stuck in the end with it.
Oh, how I wish nouveau worked well with my hardware... If it did, none of this would be required.

I did try the ignore-ABI option when I first ran into this problem back in September 2021. However, the Xserver failed to launch, and the error log still said something along the lines of "ABI incompatible."
 
Old 04-01-2023, 02:18 PM   #8
JayByrd
Member
 
Registered: Aug 2021
Location: Seattle, WA
Distribution: Slackware
Posts: 302

Original Poster
Rep: Reputation: 310Reputation: 310Reputation: 310Reputation: 310
Post Latest updates.

Attached below is the latest update to the xorg-server-legacy119 SlackBuild. I added volkerdi's patch to fix CVE-2023-1393.

That makes 23 CVEs addressed so far, and I think that accounts for all of them. If anyone knows of any I have missed, let me know and I'll look into it.


Also attached is the latest update to the nvidia-legacy304-kernel SlackBuild. No substantive changes here, just a little clean-up.

EDIT: Nvidia SlackBuild removed. See post #9.
Attached Files
File Type: txt xorg-server-legacy119.tar.gz.txt (45.4 KB, 20 views)

Last edited by JayByrd; 04-07-2023 at 11:20 AM.
 
3 members found this post helpful.
Old 04-07-2023, 11:26 AM   #9
JayByrd
Member
 
Registered: Aug 2021
Location: Seattle, WA
Distribution: Slackware
Posts: 302

Original Poster
Rep: Reputation: 310Reputation: 310Reputation: 310Reputation: 310
Post Latest nvidia kernel module build...

Attached is the latest update to my nvidia-legacy304-kernel SlackBuild. Yet another patch has been added: this one to allow compilation on 6.3-rc kernels. (See changelog.txt and patch_credits.txt for info.)
Attached Files
File Type: txt nvidia-legacy304-kernel.tar.gz.txt (32.9 KB, 30 views)
 
3 members found this post helpful.
Old 05-20-2023, 01:40 PM   #10
sinanqapudan
LQ Newbie
 
Registered: May 2023
Posts: 2

Rep: Reputation: 0
Unhappy xorg-server-legacy119.SlackBuild is not working for me

Hi,

xorg-server-legacy119.SlackBuild is not working for me. This is what I get:

Code:
root@lucia:/nvidia/xorg-server-legacy119# ./xorg-server-legacy119.SlackBuild
tar: /nvidia/xorg-server-legacy119/xorg-server-1.19.7.tar.gz: Cannot open: No such file or directory
tar: Error is not recoverable: exiting now
./xorg-server-legacy119.SlackBuild: line 96: cd: xorg-server-1.19.7: No such file or directory
Hmm...  Looks like a unified diff to me...
can't find file to patch at input line 4
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff -Nur xorg-server-1.12.1.orig/dix/window.c xorg-server-1.12.1/dix/window.c
|--- xorg-server-1.12.1.orig/dix/window.c       2012-03-29 21:57:25.000000000 -0500
|+++ xorg-server-1.12.1/dix/window.c    2012-04-13 22:01:24.456073603 -0500
--------------------------
File to patch: ^C
What am I doing wrong?

I am quite new to slackware...

Regards
 
Old 05-20-2023, 01:45 PM   #11
sinanqapudan
LQ Newbie
 
Registered: May 2023
Posts: 2

Rep: Reputation: 0
Angry xorg-server-legacy119.SlackBuild not working for me

Hi,

xorg-server-legacy119.SlackBuild is not working for me. This is what I get when I run it:

Code:
root@lucia:/nvidia/xorg-server-legacy119# ./xorg-server-legacy119.SlackBuild
tar: /nvidia/xorg-server-legacy119/xorg-server-1.19.7.tar.gz: Cannot open: No such file or directory
tar: Error is not recoverable: exiting now
./xorg-server-legacy119.SlackBuild: line 96: cd: xorg-server-1.19.7: No such file or directory
Hmm...  Looks like a unified diff to me...
can't find file to patch at input line 4
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff -Nur xorg-server-1.12.1.orig/dix/window.c xorg-server-1.12.1/dix/window.c
|--- xorg-server-1.12.1.orig/dix/window.c       2012-03-29 21:57:25.000000000 -0500
|+++ xorg-server-1.12.1/dix/window.c    2012-04-13 22:01:24.456073603 -0500
--------------------------
File to patch: ^C
Am I doing something wrong?

[EDIT]Answer: Yes, you are. Simply download xorg-server-1.19.7.tar.gz in the same directory where the xorg-server-legacy119.SlackBuild is. That will fix it. Next time read more carefully the output.[EDIT]

Any help will be greatly appreciated. Please keep in mind that I am quite new to Slackware

Regards,

Sinanqapudan

Last edited by sinanqapudan; 05-21-2023 at 05:11 AM. Reason: Solution found
 
Old 09-09-2023, 11:34 AM   #12
JayByrd
Member
 
Registered: Aug 2021
Location: Seattle, WA
Distribution: Slackware
Posts: 302

Original Poster
Rep: Reputation: 310Reputation: 310Reputation: 310Reputation: 310
Lightbulb Latest patch to keep nvidia-legacy304 kernel module working on kernel 6.5

For some reason, LQ isn't letting me attach files ("invalid post specified"), so here's the text of the patch:

Code:
--- ./kernel/nv-linux.h	2023-07-18 06:56:27.000000000 -0700
+++ ./kernel/nv-linux.h.fixed	2023-07-18 07:04:09.000000000 -0700
@@ -1969,7 +1969,11 @@
             if (force)
                 flags |= FOLL_FORCE;
 
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 5, 0)
+            return get_user_pages(start, nr_pages, flags, pages);
+#else
             return get_user_pages(start, nr_pages, flags, pages, vmas);
+#endif
         }
 
         static inline long NV_GET_USER_PAGES_REMOTE(struct task_struct *tsk,
@@ -1994,7 +1998,11 @@
                                             pages, vmas, NULL);
 
         #else
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 9, 0)
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 5, 0)
+               return get_user_pages_remote(mm, start, nr_pages, flags,
+                                            pages, NULL);
+
+#elif LINUX_VERSION_CODE >= KERNEL_VERSION(5, 9, 0)
                return get_user_pages_remote(mm, start, nr_pages, flags,
                                             pages, vmas, NULL);
 #else
Copy and paste this into your editor of choice and name it "0032-get_user_pages-6.5.patch". Then gzip the file and place it in the "patches" directory of the SlackBuild (see post #9.)

Last edited by JayByrd; 09-09-2023 at 12:49 PM.
 
1 members found this post helpful.
  


Reply

Tags
nvidia, nvidia-legacy, nvidia304, xorg-server, xorg-server-legacy



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-legacy304-kernel on -current JayByrd Slackware 50 12-01-2022 10:24 AM
[SOLVED] nvidia-legacy304 compat32 Bad Blue Bull Slackware 9 10-04-2017 06:09 PM
SBo: nvidia-legacy304-driver-304.125-x86_64-1 lopuh Slackware 2 02-18-2015 01:01 AM
Howto install nvidia-legacy304 on a 14.1 multilib system? moesasji Slackware 3 09-06-2014 09:13 AM

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

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