Package: src:nvidia-graphics-drivers-legacy-340xx Version: 340.108-29 Severity: normal Tags: patch
Dear Debian NVIDIA Maintainers, During the restoration and modernization of a legacy Compaq ProLiant ML350 Generation 2 server equipped with dual Intel Pentium III-S processors and an NVIDIA GeForce 9400 GT PCI graphics card, I encountered a memory allocation compatibility issue in the NVIDIA 340.108 driver. Using kernel-level tracing and source code analysis, an unsupported write-combined system memory allocation was identified as the cause of the X.Org initialization failure. An experimental patch implementing a conditional WC-to-UC fallback resolves the observed issue. The modified driver has been successfully tested with: Debian 12.15.0 i386 Linux kernel 6.1.0-57-686-pae X.Org 1.21.1.7 Hardware-accelerated OpenGL 3.3 GNOME Shell 43.9 Automatic graphical system startup The investigation, source code analysis and experimental patch development were carried out with the assistance of OpenAI ChatGPT. All builds, diagnostic measurements and hardware validation were performed on an actual physical system. The attached technical report provides a detailed description of the failure, kernel tracing results, proposed patch, validation results and remaining technical limitations. I would appreciate your independent technical review and consideration of the proposed compatibility fix for inclusion in the Debian legacy NVIDIA 340xx patch series. The patch remains experimental, particularly regarding cache coherency and potential regressions on other hardware platforms. Thank you for your continued maintenance of legacy NVIDIA drivers. If I can be of any further assistance in testing, troubleshooting, or improving software compatibility on this legacy hardware platform, I would be happy to contribute my time and provide additional test results as needed. Best regards, József Ecseki Hungary
NVIDIA_340.108_WCFIX1_Technical_Report.pdf
Description: Adobe PDF document
--- a/nv.c
+++ b/nv.c
@@ -2241,6 +2241,19 @@
memory_type = NV_MEMORY_TYPE_SYSTEM;
#if !defined(NV_VMWARE)
+#if defined(NVCPU_X86) || defined(NVCPU_X86_64)
+ if ((cache_type == NV_MEMORY_WRITECOMBINED) &&
+ !NV_ALLOW_WRITE_COMBINING(memory_type) &&
+ nv_update_memory_types)
+ {
+ printk(KERN_INFO
+ "NVRM: WCFIX1: WC fallback to UC: %u pages, contiguous=%u\n",
+ page_count, (unsigned int)contiguous);
+
+ cache_type = NV_MEMORY_UNCACHED;
+ }
+#endif
+
if (nv_encode_caching(NULL, cache_type, memory_type))
return RM_ERR_NOT_SUPPORTED;
#endif

