Bug 3946

Summary: Unknown symbols mtrr_del & mtrr_add with kernel 4.3.3-300.fc23.i686
Product: Fedora Reporter: Alexander P <alexpl>
Component: nvidia-304xx-kmodAssignee: Nicolas Chauvet <kwizart>
Status: RESOLVED FIXED    
Severity: major CC: leigh123linux, Mikhail.Kalenkov, orion, russ+bugzilla-rf, russ+bz-rf, sergio, ulatekh
Priority: P5    
Version: 23   
Hardware: All   
OS: GNU/Linux   
namespace:
Attachments: refs to mtrr in different nvidia drivers

Description Alexander P 2016-01-19 16:46:08 CET
After installing kernel 4.3.3-300, X fails to start, and I've got this in my kernel log:

dmesg | grep -i nvidia
[   17.644660] nvidia: module license 'NVIDIA' taints kernel.
[   17.722569] nvidia: module verification failed: signature and/or required key missing - tainting kernel
[   17.724240] nvidia: Unknown symbol mtrr_del (err 0)
[   17.724414] nvidia: Unknown symbol mtrr_add (err 0)
[   30.098207] nvidia: Unknown symbol mtrr_del (err 0)
[   30.098396] nvidia: Unknown symbol mtrr_add (err 0)
[   38.260429] nvidia: Unknown symbol mtrr_del (err 0)
[   38.260634] nvidia: Unknown symbol mtrr_add (err 0)
[   39.714279] nvidia: Unknown symbol mtrr_del (err 0)
[   39.714483] nvidia: Unknown symbol mtrr_add (err 0)
[   40.795202] nvidia: Unknown symbol mtrr_del (err 0)
[   40.795407] nvidia: Unknown symbol mtrr_add (err 0)
[   42.132823] nvidia: Unknown symbol mtrr_del (err 0)
[   42.133027] nvidia: Unknown symbol mtrr_add (err 0)
[   44.600360] nvidia: Unknown symbol mtrr_del (err 0)
[   44.600585] nvidia: Unknown symbol mtrr_add (err 0)
[   46.290016] nvidia: Unknown symbol mtrr_del (err 0)
[   46.290221] nvidia: Unknown symbol mtrr_add (err 0)
[   47.469779] nvidia: Unknown symbol mtrr_del (err 0)
[   47.469988] nvidia: Unknown symbol mtrr_add (err 0)
[   48.512863] nvidia: Unknown symbol mtrr_del (err 0)
[   48.513068] nvidia: Unknown symbol mtrr_add (err 0)
[   49.615407] nvidia: Unknown symbol mtrr_del (err 0)
[   49.615616] nvidia: Unknown symbol mtrr_add (err 0)
[   50.711348] nvidia: Unknown symbol mtrr_del (err 0)
[   50.711551] nvidia: Unknown symbol mtrr_add (err 0)

Wasn't this fixed upstream or was it only for 340xx and higher?

My card is a GeForce 6800 (AGP).
Comment 1 Steve 2016-01-23 19:53:04 CET
Note that this problem was caused by the kernel patch found at http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=2baa891e42d84159b693eadd44f6fe1486285bdc . Reverting that and rebuilding the kernel should work around the problem temporarily.
Comment 2 Alexander P 2016-01-23 19:57:14 CET
(In reply to comment #1)
> Note that this problem was caused by the kernel patch found at
> http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=2baa891e42d84159b693eadd44f6fe1486285bdc
> . Reverting that and rebuilding the kernel should work around the problem
> temporarily.

Thanks, I knew about the kernel patch, but I thought nVidia had in turn patched all their driver series to work with kernels ≥4.3, apparently I was mistaken.
Comment 3 Nicolas Chauvet 2016-01-23 21:55:23 CET
Is there a report on nvidia http://devtalk.nvidia.com/ ?
Comment 5 Nicolas Chauvet 2016-01-25 12:18:49 CET
I've submitted a scratch build with the patch reverted:
http://koji.fedoraproject.org/koji/taskinfo?taskID=12675460

(build should finish in few hours from now)
Comment 6 Nicolas Chauvet 2016-01-25 13:12:39 CET
Ok, it sounds like it's only on 304xx (or maybe 340xx ?) current serie is not affected, so I think I will wait for a nvidia fix. Unless it can be workarounded in the nvidia glue side. Anyone to have a look ?
Comment 7 Alexander P 2016-01-25 14:17:05 CET
(In reply to comment #6)
> Ok, it sounds like it's only on 304xx (or maybe 340xx ?) current serie is not
> affected, so I think I will wait for a nvidia fix. Unless it can be
> workarounded in the nvidia glue side. Anyone to have a look ?

I am using 340xx on another system (x86_64) and it doesn't suffer from this.

According to

https://devtalk.nvidia.com/default/topic/910803/linux/-304-131-can-t-install-on-kernel-4-4/post/4787645/#4787645

the problem lies with a wrapper script (?). Could this be patched downstream?
Comment 8 Nicolas Chauvet 2016-01-25 14:50:27 CET
(In reply to comment #7)

> the problem lies with a wrapper script (?). Could this be patched downstream?
Sure, If someone can produce and test a working patch, I can apply it.
Best would be to compare with what is done in later serie.
Comment 9 Alexander P 2016-01-25 21:28:59 CET
Created attachment 1550 [details]
refs to mtrr in different nvidia drivers

I downloaded and extracted 32-bit drivers 304.131, 340.96, 352.63 and 355.06 from nVidia. After grepping for mtrr in them, I can tell that there is an os-mtrr.c and an os-agp.c that contain the deprecated symbols.

The 304.131 driver also contains nv-reg.h, nv-pat.c that contain references to mtrr, but those references are no longer there in later series drivers.

All of the above are called by Makefile.nvidia and Makefile.kbuild.

I have briefly touched C in the past, but I am by no means the right person to produce a patch (at least at the moment)...
Comment 10 Russ Odom 2016-01-26 21:46:54 CET
Just confirming this on x86_64 - kernels tested:
4.3.3-300.fc23.x86_64
4.3.3-301.fc23.x86_64

[root@gigalith ~]# rpm -qa | grep nvidia | sort
akmod-nvidia-304xx-304.131-1.fc23.x86_64
kmod-nvidia-304xx-4.2.8-300.fc23.x86_64-304.131-1.fc23.x86_64
kmod-nvidia-304xx-4.3.3-300.fc23.x86_64-304.131-1.fc23.x86_64
kmod-nvidia-304xx-4.3.3-301.fc23.x86_64-304.131-1.fc23.x86_64
xorg-x11-drv-nvidia-304xx-304.131-1.fc23.x86_64
xorg-x11-drv-nvidia-304xx-libs-304.131-1.fc23.x86_64

I'll reboot back to the 4.2.8 kernel for now.
Comment 11 Alexander P 2016-01-27 08:31:23 CET
Apparently there haven't been any recent builds on buildsys.rpmfusion.org. Where is your current build system? And where can I find your CVS?
Comment 12 leigh scott 2016-01-27 09:18:39 CET
(In reply to comment #6)
> I think I will wait for a nvidia fix. Unless it can be
> workarounded in the nvidia glue side. Anyone to have a look ?

Sorry I have no spare time here for a driver I don't use.
Comment 13 Sérgio Basto 2016-01-27 18:32:34 CET
(In reply to comment #11)
> Apparently there haven't been any recent builds on buildsys.rpmfusion.org.
> Where is your current build system? And where can I find your CVS?

Last updates are in github :

http://rpmfusion.org/Contributors_github
Comment 14 Alexander P 2016-01-27 20:34:41 CET
(In reply to comment #8)
> (In reply to comment #7)
> 
> > the problem lies with a wrapper script (?). Could this be patched downstream?
> Sure, If someone can produce and test a working patch, I can apply it.
> Best would be to compare with what is done in later serie.

While googling around to figure out how and where to undefine CONFIG_MTRR, I discovered that Debian has a patch for the last couple of weeks:

https://anonscm.debian.org/viewvc/pkg-nvidia/packages/nvidia-graphics-drivers-legacy-304xx/trunk/debian/module/debian/patches/disable-mtrr.patch?view=markuphttps://anonscm.debian.org/viewvc/pkg-nvidia/packages/nvidia-graphics-drivers-legacy-304xx/trunk/debian/module/debian/patches/disable-mtrr.patch?view=markup
Comment 16 Alexander P 2016-01-28 03:32:40 CET
I cloned xorg-x11-drv-nvidia-304xx and nvidia-304xx-kmod, added the patch, and patched the spec files. I built xorg-x11-drv-nvidia-304xx successfully and after a lot of failed attempts due to a missing f22 kernel-devel package (I'm on f23) I managed to build and install the kmod-nvidia-304xx module, though I could not find any hints as to how to rebuild the akmod package.

However, after booting into the kernel for which I've built the module, I'm still getting the same error. Could it be because of the akmods package, or is the patch a dud?

Now, I have:

# rpm -qa | grep nvidia | sort
akmod-nvidia-304xx-304.131-1.fc23.i686
kmod-nvidia-304xx-4.2.7-300.fc23.i686-304.131-1.fc23.i686
kmod-nvidia-304xx-4.2.8-300.fc23.i686-304.131-1.fc23.i686
kmod-nvidia-304xx-4.3.3-302.fc23.i686-304.131-2.fc23.i686
xorg-x11-drv-nvidia-304xx-304.131-2.fc23.i686
xorg-x11-drv-nvidia-304xx-libs-304.131-2.fc23.i686


I could not push my changes to github, because they're having an outage.
Comment 17 Alexander P 2016-01-28 15:53:31 CET
This is the original bug report from Debian:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=809324

It seems they could only test the patch on x86_64 where it does work. Now that github is back online, would you like me to do a pull request, so that at least our 64-bit users get the workaround?

I guess I'll have to stick with kernel 4.2.8 until there is an upstream fix.
Comment 18 Orion Poplawski 2016-02-15 18:49:10 CET
Any progress here?
Comment 19 Orion Poplawski 2016-02-16 00:53:48 CET
https://github.com/rpmfusion/nvidia-304xx-kmod/pull/1
Comment 20 Sérgio Basto 2016-02-16 17:10:21 CET
(In reply to comment #19)
> https://github.com/rpmfusion/nvidia-304xx-kmod/pull/1

is this approved ? I can merge it .
Comment 21 Russ Odom 2016-02-23 13:34:13 CET
From http://download1.rpmfusion.org/nonfree/fedora/updates/testing/23/x86_64/repoview/akmod-nvidia-304xx.html it looks like this fix is released in akmod-nvidia-304xx-304.131-2.fc23. All being well, I will test this later today.
Thanks to all concerned :-)
Comment 22 Russ Odom 2016-02-24 10:43:24 CET
Confirmed working for me now - akmod-nvidia-304xx-304.131-2.fc23.x86_64 on kernel-4.3.5-300.fc23.x86_64.
Comment 23 Sérgio Basto 2016-02-24 21:59:34 CET
Also published in F22 : http://download1.rpmfusion.org/nonfree/fedora/updates/22/x86_64/repoview/akmod-nvidia-304xx.html

Closing because this bug is fixed , please reopen if not 

Thanks.