NVIDIA on 64-bit
Tested on two computers, one desktop with a GeForce 240 discrete video card and a laptop with Quadro NVS 140M, both using NVIDIA 340.96.
32-bit builds and runs without problems.
64-bit fails. 647.2 STD B1. Log file attached.
The display is messed up during the procedure on 64-bit, no spaces in text, but I have successfully built module on 7.1 under those conditions.
Comments (9)
-
-
reporter Did some stumbling around based on a few snippets of info and lots of assumptions.. added the above code in a .diff file in "/usr/src/build-4.4.14/patches", then ran the included slackbuild. Kernel built and installed. Rebooted.
Edited "/usr/src/linux-4.4.14/kernel/locking/mutex.c" as indicated and tried building again. No change.
FWIW, did this in a vb vm. The nvidia installer will run without an nvidia card, after warning about not finding an installed vcard.
-
You would actually have to edit the SlackBuild to make sure the patch is applied. Just putting it in the patches dir will not do it.
Can you post the link to the nvidia installer you are attempting to run?
-
reporter Ah. Important detail. Will try again.
Nvidia file here: http://www.nvidia.com/download/driverResults.aspx/95165/en-us
-
reporter Editing the slackbuild seems to have done it, the modules built this time. I'll be able to test it on real hardware this evening.
-
It took a little effort, but I was finally able to try this (with some success). Here is how I did it.
- Cloned the vl72 vabs repo (this repo)
- Added the suggested patch above to the patches directory of the kernel4.4 dir with the name
mutex-lock-nested.diff
- Edited the kernel4.4.SlackBuild to add
patch -Np0 --verbose -i $CWD/patches/mutex-lock-nested.diff
in itspatches
section - Executed the SlackBuild.
Once the packages were created, I ran installpkg on the kernel4.4-src package and was ready to attempt the nvidia installation.
As it turns out, it looks like the nvidia installer runs some kind of detection because it would not run on my machine (i have no nvidia cards on it). It said I did not have a video card supported by the driver and it just exited. Then I remembered my vostro box has an nvidia card, so I turn to it.
I was able to run the installer there in a vlsandbox after installing the patched kernel4.4-src package. The module compiled fine for me, but the installer was unable to load it (understandably, given that this was done inside docker which should not be able to load kernel modules). I should point out that the installer will not run if the nouveau module is loaded (it was in my case, so I had to blacklist it and reboot).
Here is the build log from my attempt
-
reporter Found an old box with a GF 7300 to test on, using nvidia 304.131 and my modded kernel. This time the module builds, but will not load - complains about unknown symbols and tainting the kernel.
-
reporter Installed new kernel 4.4.15.
Module builds, loads and runs.
Will test on more machines before closing issue.
-
reporter - changed status to resolved
Tested new 4.4.15 pkgs from commit 88dd4d2 .. kernel, kernel-modules, kernel-headers and kernel-stripped-src.
Successfully built and ran nvidia on three different computers, 64 and 32 bit.
Looks good.
- Log in to comment
I dont know much about this but a couple of things that may help. The most concerning to us should be the fact that the results are different from arch to another, if anything, the results should be identical.
As for a resolution to the problem, i'm not convinced this is a bug at all on our part. The problem stems from the nvidia code attempting to utilize some kernel functioning that has been locked away by the linux devs (this was probably not locked before, not sure). I believe this line from your build log really reveals the source of the problem as well as what is required to get around it.
FATAL: modpost: GPL-incompatible module nvidia.ko uses GPL-only symbol 'mutex_lock_nested'
I believe the reason for that output is that the
kernel/locking/mutex.c
file (from the linux kernel sources) defines themutex_lock_nested
as a GPL-Only symbol. Meaning that proprietary software can no longer use it.Check this output from a grep command ran on the extracted kernel source tarball.
If you're interested in compiling this module, you may have to patch the kernel source and rebuild.
Try applying this patch
After the kernel rebuilds, you'd have to reboot and try compiling the nvidia stuff again. Let us know if that works.