LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 05-16-2024, 01:38 AM   #1
Toutatis
Member
 
Registered: Feb 2013
Posts: 415

Rep: Reputation: Disabled
new kernel 6.9.0 and nvidia drivers


On slackware64-current, kernel 6.9.90 boots correctly, but Nvidia driver 470.239.06 cannot be built

nvidia-installer.log
 
Old 05-16-2024, 01:49 AM   #2
marrowsuck
Member
 
Registered: Sep 2006
Posts: 205

Rep: Reputation: 91
Thanks for the heads up. I was afraid there would be problems.

According to the nvidia forum, this is related to gcc-14 and should be fixed with three patches:
https://forums.developer.nvidia.com/...test-sh/292645

Last edited by marrowsuck; 05-16-2024 at 01:51 AM.
 
1 members found this post helpful.
Old 05-16-2024, 02:09 AM   #3
Toutatis
Member
 
Registered: Feb 2013
Posts: 415

Original Poster
Rep: Reputation: Disabled
Do you know how to rebuild a Nvidia run file, after it has been extracted and the patches are applied ?
 
Old 05-16-2024, 02:30 AM   #4
willysr
Senior Member
 
Registered: Jul 2004
Location: Jogja, Indonesia
Distribution: Slackware-Current
Posts: 4,686

Rep: Reputation: 1801Reputation: 1801Reputation: 1801Reputation: 1801Reputation: 1801Reputation: 1801Reputation: 1801Reputation: 1801Reputation: 1801Reputation: 1801Reputation: 1801
run ./nvidia-installer
 
Old 05-16-2024, 02:53 AM   #5
Toutatis
Member
 
Registered: Feb 2013
Posts: 415

Original Poster
Rep: Reputation: Disabled
Thank you very much marrowsuck and willysr. Everything works !
 
Old 05-16-2024, 07:42 AM   #6
camorri
LQ 5k Club
 
Registered: Nov 2002
Location: Somewhere inside 9.9 million sq. km. Canada
Distribution: Slackware 15.0, current, slackware-arm-currnet
Posts: 6,243

Rep: Reputation: 861Reputation: 861Reputation: 861Reputation: 861Reputation: 861Reputation: 861Reputation: 861
Could someone post an over view of how to apply the patches to Nvidia driver 470.239.06 ?

I have had little experience patching.

Thanks in advance.
 
Old 05-16-2024, 08:28 AM   #7
marrowsuck
Member
 
Registered: Sep 2006
Posts: 205

Rep: Reputation: 91
I usually patch the installer
Code:
sh NVIDIA-Linux-x86_64-470.239.06.run --apply-patch PATCH-FILE
And here is the patch

Code:
--- kernel/conftest.sh  2024-02-03 06:53:55.000000000 +0100
+++ kernel/conftest.sh  2024-05-16 09:40:42.630283046 +0200
@@ -101,7 +101,8 @@
 build_cflags() {
     BASE_CFLAGS="-O2 -D__KERNEL__ \
 -DKBUILD_BASENAME=\"#conftest$$\" -DKBUILD_MODNAME=\"#conftest$$\" \
--nostdinc -isystem $ISYSTEM"
+-nostdinc -isystem $ISYSTEM -fshort-wchar \
+-Wno-implicit-function-declaration -Wno-strict-prototypes"
 
     if [ "$OUTPUT" != "$SOURCES" ]; then
         OUTPUT_CFLAGS="-I$OUTPUT/include2 -I$OUTPUT/include"
@@ -4592,8 +4593,13 @@
             #
             CODE="
             #include <drm/drm_gem.h>
+            #if defined(NV_LINUX_IOSYS_MAP_H_PRESENT)
+            typedef struct iosys_map nv_sysio_map_t;
+            #else
+            typedef struct dma_buf_map nv_sysio_map_t;
+            #endif
             int conftest_drm_gem_object_vmap_has_map_arg(
-                    struct drm_gem_object *obj, struct dma_buf_map *map) {
+                    struct drm_gem_object *obj, nv_sysio_map_t *map) {
                 return obj->funcs->vmap(obj, map);
             }"
Not tested though.
 
1 members found this post helpful.
Old 05-16-2024, 07:13 PM   #8
Geremia
Member
 
Registered: Apr 2011
Distribution: slackware64-current
Posts: 516

Rep: Reputation: 50
Nvidia 550.76 works for me with kernel 6.9.0. (The latest, 550.78, probably works, too.)

But I need help patching Nvidia 550.54.14 (the latest that's compatible with cudatoolkit 12.4.1) to work with kernel 6.9.0.

Is there a patch for this?

Update: It's solely an nvidia-drm issue. I prepended NV_EXCLUDE_KERNEL_MODULES=nvidia-drm to make and deleted the install nvidia-drm line, and everything else built successfully!

Diff to nvidia-kernel.SlackBuild:
Code:
--- /var/lib/sbopkg/SBo/15.0/system/nvidia-kernel/nvidia-kernel.SlackBuild	2024-04-26 19:32:53.000000000 -0700
+++ /var/lib/sbopkg/SBo/15.0/system/nvidia-kernel/nvidia-kernel.SlackBuild.sbopkg	2024-05-16 17:52:34.461876671 -0700
@@ -29,7 +29,7 @@
 cd $(dirname $0) ; CWD=$(pwd)
 
 PRGNAM=nvidia-kernel
-VERSION=${VERSION:-550.76}
+VERSION=${VERSION:-550.54.14}
 BUILD=${BUILD:-1}
 TAG=${TAG:-_SBo}
 PKGTYPE=${PKGTYPE:-tgz}
@@ -90,13 +90,12 @@
 # CC=${CC:-gcc} suppresses an otherwise harmless "compiler mismatch"
 # message.  If you custom-build your kernel with clang,
 # then pass CC=clang to this script.
-  CC=${CC:-gcc} make SYSSRC=$KERNELPATH module || exit 1
+  CC=${CC:-gcc} NV_EXCLUDE_KERNEL_MODULES=nvidia-drm make SYSSRC=$KERNELPATH module || exit 1
 )
 
 mkdir -p $PKG/lib/modules/$KERNEL/kernel/drivers/video
 install -m 0664 kernel/nvidia.ko $PKG/lib/modules/$KERNEL/kernel/drivers/video/
 install -m 0664 kernel/nvidia-modeset.ko $PKG/lib/modules/$KERNEL/kernel/drivers/video/
-install -m 0664 kernel/nvidia-drm.ko $PKG/lib/modules/$KERNEL/kernel/drivers/video/
 install -m 0664 kernel/nvidia-uvm.ko $PKG/lib/modules/$KERNEL/kernel/drivers/video/
 
 mkdir -p $PKG/usr/share/X11/xorg.conf.d/

Last edited by Geremia; 05-16-2024 at 07:53 PM.
 
Old 05-26-2024, 10:05 AM   #9
chrisretusn
Senior Member
 
Registered: Dec 2005
Location: Philippines
Distribution: Slackware64-current
Posts: 2,987

Rep: Reputation: 1556Reputation: 1556Reputation: 1556Reputation: 1556Reputation: 1556Reputation: 1556Reputation: 1556Reputation: 1556Reputation: 1556Reputation: 1556Reputation: 1556
Quote:
Originally Posted by marrowsuck View Post
I usually patch the installer
Code:
sh NVIDIA-Linux-x86_64-470.239.06.run --apply-patch PATCH-FILE
And here is the patch

Code:
--- kernel/conftest.sh  2024-02-03 06:53:55.000000000 +0100
+++ kernel/conftest.sh  2024-05-16 09:40:42.630283046 +0200
@@ -101,7 +101,8 @@
 build_cflags() {
     BASE_CFLAGS="-O2 -D__KERNEL__ \
 -DKBUILD_BASENAME=\"#conftest$$\" -DKBUILD_MODNAME=\"#conftest$$\" \
--nostdinc -isystem $ISYSTEM"
+-nostdinc -isystem $ISYSTEM -fshort-wchar \
+-Wno-implicit-function-declaration -Wno-strict-prototypes"
 
     if [ "$OUTPUT" != "$SOURCES" ]; then
         OUTPUT_CFLAGS="-I$OUTPUT/include2 -I$OUTPUT/include"
@@ -4592,8 +4593,13 @@
             #
             CODE="
             #include <drm/drm_gem.h>
+            #if defined(NV_LINUX_IOSYS_MAP_H_PRESENT)
+            typedef struct iosys_map nv_sysio_map_t;
+            #else
+            typedef struct dma_buf_map nv_sysio_map_t;
+            #endif
             int conftest_drm_gem_object_vmap_has_map_arg(
-                    struct drm_gem_object *obj, struct dma_buf_map *map) {
+                    struct drm_gem_object *obj, nv_sysio_map_t *map) {
                 return obj->funcs->vmap(obj, map);
             }"
Not tested though.
Tested here with 470.239.06 built kernels 6.6.30 and 6.9.2 with no issues. Currently using 6.9.2, 6.6.30 is a back up.
 
  


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
[SOLVED] latest Nvidia GT 710 2GB GPU drivers not installing. Kernel.h not found by Nvidia installer. megawatt Linux - Newbie 4 11-12-2019 11:07 AM
UNinstalling proprietry mandriva nVidia drivers and installing new nVidia drivers deathman Linux - Hardware 3 11-18-2006 05:10 AM
Questions on compiling new kernel, nVidia drivers and LILO Mechanic Slackware 3 02-06-2006 11:01 AM
mandrake 10 nvidia drivers and winmodem drivers mikeymouse Mandriva 6 08-28-2004 07:57 AM
nvidia drivers and new compile of kernel c0rderr0y Linux - Newbie 8 02-22-2004 08:39 PM

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

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