Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 582628 - x11-drivers/nvidia-drivers-304.131-r4 links against missing symbols on kernel 4.4.6
Summary: x11-drivers/nvidia-drivers-304.131-r4 links against missing symbols on kernel...
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Library (show other bugs)
Hardware: AMD64 Linux
: Normal normal
Assignee: Jeroen Roovers (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-05-10 05:56 UTC by spock128
Modified: 2016-05-12 12:02 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Patch to run against linux kernel 4.3+ (kernel-4.3-mtrr.patch,2.19 KB, patch)
2016-05-10 05:56 UTC, spock128
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description spock128 2016-05-10 05:56:53 UTC
Created attachment 433820 [details, diff]
Patch to run against linux kernel 4.3+

Ran into this when upgrading to sys-kernel/gentoo-sources-4.4.6 recently.  The old nvidia-drivers ebuild will compile and install successfully against the new kernel, but the resulting module fails to load.  Instead it produces unknown symbol errors with mtrr_add and mtrr_del.

I tried the patch suggested here: https://devtalk.nvidia.com/default/topic/893282/304-128-and-kernel-4-3-can-compile-but-cannot-insert-it-mtrr-symbols-related-errors-/ and it seems to work (attached as well).  I suppose nVidia might release a patched version, but until then, this might be useful to others with these old cards.
Comment 1 Nico Baggus 2016-05-10 22:21:50 UTC
i can confirm this as well.

Debian has a patch for the kernel/nv-linux.h file:

https://anonscm.debian.org/viewvc/pkg-nvidia/packages/nvidia-graphics-drivers-legacy-304xx/trunk/debian/module/debian/patches/disable-mtrr.patch?view=markup

Their bug:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=809324

This patch at least load the driver:  (based on debian description).

--- a/kernel/nv-linux.h
+++ b/kernel/nv-linux.h
@@ -256,6 +256,15 @@
 #include <linux/seq_file.h>
 #endif

+/*
+ * As of version 304.131, os-agp.c and os-mtrr.c still use deprecated
+ * kernel APIs for mtrr which are no longer exported since 4.3, causing
+ * the module to error out when loaded.
+ */
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,3,0)
+#undef CONFIG_MTRR
+#endif
+
 #if !defined(NV_VMWARE) && defined(CONFIG_MTRR)
 #include <asm/mtrr.h>
 #endif



Before:

[ 1636.024448] nvidia: Unknown symbol mtrr_del (err 0)
[ 1636.024771] nvidia: Unknown symbol mtrr_add (err 0)

After:
[ 3735.439605] ACPI: PCI Interrupt Link [SGRU] enabled at IRQ 23
[ 3735.439652] vgaarb: device changed decodes: PCI:0000:02:00.0,olddecodes=io+mem,decodes=none:owns=io+mem
[ 3735.440156] [drm] Initialized nvidia-drm 0.0.0 20150116 for 0000:02:00.0 on minor 0
[ 3735.440189] NVRM: loading NVIDIA UNIX x86 Kernel Module  304.131  Sun Nov  8 21:44:08 PST 2015
[ 3735.503470] ACPI Warning: \_SB_.PCI0.IXVE.IGPU._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20150930/nsarguments-95)
[ 3735.503519] ACPI Warning: \_SB_.PCI0.IXVE.IGPU._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20150930/nsarguments-95)
[ 3735.503597] ACPI Warning: \_SB_.PCI0.IXVE.IGPU._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20150930/nsarguments-95)
[ 3735.503635] ACPI Warning: \_SB_.PCI0.IXVE.IGPU._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20150930/nsarguments-95)
[ 3735.503669] ACPI Warning: \_SB_.PCI0.IXVE.IGPU._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20150930/nsarguments-95)
[ 3735.503701] ACPI Warning: \_SB_.PCI0.IXVE.IGPU._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20150930/nsarguments-95)
[ 3735.503733] ACPI Warning: \_SB_.PCI0.IXVE.IGPU._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20150930/nsarguments-95)
Comment 2 Nico Baggus 2016-05-10 22:32:21 UTC
I also tested the path as attached to this bugreport:

rmmod nvidia
[ 4058.803401] [drm] Module unloaded

modprobe nvidia
[ 4353.476379] vgaarb: device changed decodes: PCI:0000:02:00.0,olddecodes=none,decodes=none:owns=io+mem
[ 4353.476891] [drm] Initialized nvidia-drm 0.0.0 20150116 for 0000:02:00.0 on minor 0
[ 4353.476922] NVRM: loading NVIDIA UNIX x86 Kernel Module  304.131  Sun Nov  8 21:44:08 PST 2015
[ 4353.538812] ACPI Warning: \_SB_.PCI0.IXVE.IGPU._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20150930/nsarguments-95)
[ 4353.538862] ACPI Warning: \_SB_.PCI0.IXVE.IGPU._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20150930/nsarguments-95)
[ 4353.538941] ACPI Warning: \_SB_.PCI0.IXVE.IGPU._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20150930/nsarguments-95)
[ 4353.538978] ACPI Warning: \_SB_.PCI0.IXVE.IGPU._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20150930/nsarguments-95)
[ 4353.539012] ACPI Warning: \_SB_.PCI0.IXVE.IGPU._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20150930/nsarguments-95)
[ 4353.539044] ACPI Warning: \_SB_.PCI0.IXVE.IGPU._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20150930/nsarguments-95)
[ 4353.539076] ACPI Warning: \_SB_.PCI0.IXVE.IGPU._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20150930/nsarguments-95)