Slackware This 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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
05-16-2024, 01:38 AM
#1
Member
Registered: Feb 2013
Posts: 415
Rep:
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
05-16-2024, 01:49 AM
#2
Member
Registered: Sep 2006
Posts: 205
Rep:
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.
05-16-2024, 02:09 AM
#3
Member
Registered: Feb 2013
Posts: 415
Original Poster
Rep:
Do you know how to rebuild a Nvidia run file, after it has been extracted and the patches are applied ?
05-16-2024, 02:30 AM
#4
Senior Member
Registered: Jul 2004
Location: Jogja, Indonesia
Distribution: Slackware-Current
Posts: 4,686
run ./nvidia-installer
05-16-2024, 02:53 AM
#5
Member
Registered: Feb 2013
Posts: 415
Original Poster
Rep:
Thank you very much marrowsuck and willysr. Everything works !
05-16-2024, 07:42 AM
#6
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
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.
05-16-2024, 08:28 AM
#7
Member
Registered: Sep 2006
Posts: 205
Rep:
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.
05-16-2024, 07:13 PM
#8
Member
Registered: Apr 2011
Distribution: slackware64-current
Posts: 516
Rep:
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 .
05-26-2024, 10:05 AM
#9
Senior Member
Registered: Dec 2005
Location: Philippines
Distribution: Slackware64-current
Posts: 2,987
Quote:
Originally Posted by
marrowsuck
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.
All times are GMT -5. The time now is 10:28 AM .
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know .
Latest Threads
LQ News