provide libglx.so symlink to fix glx on x11

added patch for kernel 6.17
smp build [release 470.256.02-6mamba;Tue Nov 11 2025]
This commit is contained in:
2025-11-11 19:54:34 +01:00
parent cd2de194f4
commit f965004b42
2 changed files with 110 additions and 3 deletions

View File

@@ -0,0 +1,98 @@
From fd52e276f587394b9ae3ba7013b6a44cbdd526f2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Joan=20Bruguera=20Mic=C3=B3?= <joanbrugueram@gmail.com>
Date: Sat, 26 Jul 2025 21:19:03 +0000
Subject: [PATCH] Tentative fix for NVIDIA 470.256.02 driver for Linux 6.17-rc1
---
nvidia-drm/nvidia-drm-drv.c | 8 ++++++++
nvidia-drm/nvidia-drm-fb.c | 9 +++++++++
nvidia-drm/nvidia-drm-fb.h | 6 ++++++
3 files changed, 23 insertions(+)
diff --git a/nvidia-drm/nvidia-drm-drv.c b/nvidia-drm/nvidia-drm-drv.c
index b50b17a..9da3294 100644
--- a/nvidia-drm/nvidia-drm-drv.c
+++ b/nvidia-drm/nvidia-drm-drv.c
@@ -140,6 +140,10 @@ static void nv_drm_output_poll_changed(struct drm_device *dev)
static struct drm_framebuffer *nv_drm_framebuffer_create(
struct drm_device *dev,
struct drm_file *file,
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 17, 0)
+ // Rel. commit. "drm: Pass the format info to .fb_create()" (Ville Syrjälä, 1 Jul 2025)
+ const struct drm_format_info *info,
+#endif
#if defined(NV_DRM_HELPER_MODE_FILL_FB_STRUCT_HAS_CONST_MODE_CMD_ARG)
const struct drm_mode_fb_cmd2 *cmd
#else
@@ -155,6 +159,10 @@ static struct drm_framebuffer *nv_drm_framebuffer_create(
fb = nv_drm_internal_framebuffer_create(
dev,
file,
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 17, 0)
+ // Rel. commit. "drm: Allow the caller to pass in the format info to drm_helper_mode_fill_fb_struct()" (Ville Syrjälä, 1 Jul 2025)
+ info,
+#endif
&local_cmd);
#if !defined(NV_DRM_HELPER_MODE_FILL_FB_STRUCT_HAS_CONST_MODE_CMD_ARG)
diff --git a/nvidia-drm/nvidia-drm-fb.c b/nvidia-drm/nvidia-drm-fb.c
index d119e7c..b84e026 100644
--- a/nvidia-drm/nvidia-drm-fb.c
+++ b/nvidia-drm/nvidia-drm-fb.c
@@ -33,6 +33,7 @@
#include "nvidia-drm-format.h"
#include <drm/drm_crtc_helper.h>
+#include <linux/version.h>
static void __nv_drm_framebuffer_free(struct nv_drm_framebuffer *nv_fb)
{
@@ -184,6 +185,10 @@ static int nv_drm_framebuffer_init(struct drm_device *dev,
struct drm_framebuffer *nv_drm_internal_framebuffer_create(
struct drm_device *dev,
struct drm_file *file,
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 17, 0)
+ // Rel. commit. "drm: Allow the caller to pass in the format info to drm_helper_mode_fill_fb_struct()" (Ville Syrjälä, 1 Jul 2025)
+ const struct drm_format_info *info,
+#endif
struct drm_mode_fb_cmd2 *cmd)
{
struct nv_drm_device *nv_dev = to_nv_device(dev);
@@ -237,6 +242,10 @@ struct drm_framebuffer *nv_drm_internal_framebuffer_create(
dev,
#endif
&nv_fb->base,
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 17, 0)
+ // Rel. commit. "drm: Allow the caller to pass in the format info to drm_helper_mode_fill_fb_struct()" (Ville Syrjälä, 1 Jul 2025)
+ info,
+#endif
cmd);
/*
diff --git a/nvidia-drm/nvidia-drm-fb.h b/nvidia-drm/nvidia-drm-fb.h
index cf477cc..b61b309 100644
--- a/nvidia-drm/nvidia-drm-fb.h
+++ b/nvidia-drm/nvidia-drm-fb.h
@@ -35,6 +35,8 @@
#include <drm/drm_framebuffer.h>
#endif
+#include <linux/version.h>
+
#include "nvidia-drm-gem-nvkms-memory.h"
#include "nvkms-kapi.h"
@@ -59,6 +61,10 @@ static inline struct nv_drm_framebuffer *to_nv_framebuffer(
struct drm_framebuffer *nv_drm_internal_framebuffer_create(
struct drm_device *dev,
struct drm_file *file,
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 17, 0)
+ // Rel. commit. "drm: Allow the caller to pass in the format info to drm_helper_mode_fill_fb_struct()" (Ville Syrjälä, 1 Jul 2025)
+ const struct drm_format_info *info,
+#endif
struct drm_mode_fb_cmd2 *cmd);
#endif /* NV_DRM_ATOMIC_MODESET_AVAILABLE */
--
2.50.1

View File

@@ -3,7 +3,7 @@
Name: nvidia_470
Version: 470.256.02
Epoch: 1
Release: 5mamba
Release: 6mamba
Summary: NVIDIA proprietary accelerated drivers for the Linux Kernel
Group: System/Kernel and Hardware
Vendor: openmamba
@@ -25,6 +25,7 @@ Patch6: nvidia-470-470.256.02-kernel-6.12.patch
Patch7: nvidia-470-470.256.02-kernel-6.13.patch
Patch8: nvidia_470-470.256.02-kernel-6.14.patch
Patch9: nvidia_470-470.256.02-kernel-6.15.patch
Patch10: nvidia_470-470.256.02-kernel-6.17.patch
License: no OSI Approved
ExclusiveArch: x86_64
## AUTOBUILDREQ-BEGIN
@@ -117,6 +118,7 @@ cd kernel
%patch 7 -p1 -b .kernel-6.13
%patch 8 -p1 -b .kernel-6.14
%patch 9 -p1 -b .kernel-6.15
%patch 10 -p1 -b .kernel-6.17
cd ..
%patch 1 -p1
@@ -148,6 +150,7 @@ install -D -m755 libglxserver_nvidia.so.%{version} %{buildroot}%{_libdir}/nvidia
# Ensure that X finds glx
ln -s libglxserver_nvidia.so.%{version} %{buildroot}%{_libdir}/nvidia/xorg/libglxserver_nvidia.so.1
ln -s libglxserver_nvidia.so.%{version} %{buildroot}%{_libdir}/nvidia/xorg/libglxserver_nvidia.so
ln -s libglxserver_nvidia.so %{buildroot}%{_libdir}/nvidia/xorg/libglx.so
install -D -m755 libGLX_nvidia.so.%{version} %{buildroot}%{_libdir}/libGLX_nvidia.so.%{version}
@@ -306,7 +309,7 @@ cat > %{buildroot}%{_prefix}/src/%{name}-%{version}/dkms.conf << _EOF
PACKAGE_NAME=%{name}
PACKAGE_VERSION=%{version}
MAKE="ln -sf /usr/src/\${PACKAGE_NAME}-\${PACKAGE_VERSION}/nv-kernel.o \${dkms_tree}/\${PACKAGE_NAME}/\${PACKAGE_VERSION}/build/;\
IGNORE_CC_MISMATCH=1 make SYSSRC=\${kernel_source_dir} modules"
IGNORE_CC_MISMATCH=1 make j\$(nproc) SYSSRC=\${kernel_source_dir} modules"
CLEAN="make SYSSRC=\${kernel_source_dir} clean"
BUILT_MODULE_NAME[0]=nvidia
BUILT_MODULE_LOCATION[0]=./
@@ -334,7 +337,7 @@ cd current/kernel
# kver=`echo $d|sed "s|/lib/modules/\(.*\)/build.*|\1|"`
# [ "${kver:0:4}" == "4.0." -o "${kver:0:3}" == "4.1." ] && continue
# [ "${kver/-arm}" == "${kver}" ] || continue
d=/lib/modules/`uname -r`/build
d=/usr/src/linux-mamba-%{_target_cpu}
rm -f *.ko
make %{_smp_mflags} SYSSRC=$d
for n in nvidia nvidia-drm nvidia-modeset nvidia-uvm nvidia-peermem; do
@@ -404,6 +407,7 @@ INITRAMFS=/boot/initramfs-${KVER}.img
%dir %{_libdir}/nvidia/xorg
%{_libdir}/nvidia/xorg/libglxserver_nvidia.so
%{_libdir}/nvidia/xorg/libglxserver_nvidia.so.*
%{_libdir}/nvidia/xorg/libglx.so
%{_libdir}/nvidia/wine/_nvngx.dll
%{_libdir}/nvidia/wine/nvngx.dll
%{_libdir}/gbm/nvidia-drm_gbm.so
@@ -426,6 +430,11 @@ INITRAMFS=/boot/initramfs-${KVER}.img
%doc current/{NVIDIA_Changelog,README.txt} current/html
%changelog
* Tue Nov 11 2025 Silvan Calarco <silvan.calarco@mambasoft.it> 470.256.02-6mamba
- provide libglx.so symlink to fix glx on x11
- added patch for kernel 6.17
- smp build
* Tue Jun 03 2025 Silvan Calarco <silvan.calarco@mambasoft.it> 470.256.02-5mamba
- updated patches for kernel up to 6.15; fixed conditions in nvidia-fallback.service