LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   NVIDIA on slackware 14.1...need help (https://www.linuxquestions.org/questions/slackware-14/nvidia-on-slackware-14-1-need-help-4175492268/)

freakTux 01-23-2014 04:21 AM

NVIDIA on slackware 14.1...need help
 
Hi all guys...I'am trying to install the nvidia driver in my slacky 14.1 x86_64 with the kernel 3.12.6...
What I do is close x server, log in as root and then first I remove the nouveau driver with the xf86-video-nouveau-blacklist that I found in /extra dir of slackware64...and finally I execute the NVIDIA installer...but something goes wrong...it says me that installation is failed because it cannot find the tmp/selfgz876/NVIDIA-Linux-x86_64-331.38/kernel/.nv-kernel.o.cmd...

precisely (from the last part of /var/log/nvidia-installer.log):
Code:

In file included from /usr/src/linux-3.12.6/include/uapi/linux/stddef.h:1:0,
                    from /usr/src/linux-3.12.6/include/linux/stddef.h:4,
                    from /usr/src/linux-3.12.6/include/uapi/linux/posix_types.h:4,
                    from /usr/src/linux-3.12.6/include/uapi/linux/types.h:13,
                    from /usr/src/linux-3.12.6/include/linux/types.h:5,
                    from /usr/src/linux-3.12.6/include/uapi/linux/capability.h:16,
                    from /usr/src/linux-3.12.6/include/linux/capability.h:15,
                    from /usr/src/linux-3.12.6/include/linux/sched.h:13,
                    from /usr/src/linux-3.12.6/include/linux/utsname.h:5,
                    from /tmp/selfgz876/NVIDIA-Linux-x86_64-331.38/kernel/nv-linux.h:44,
                    from /tmp/selfgz876/NVIDIA-Linux-x86_64-331.38/kernel/nv-frontend.c:13:
  /usr/src/linux-3.12.6/arch/x86/include/asm/uaccess_64.h: In function 'copy_from_user':
  /usr/src/linux-3.12.6/arch/x86/include/asm/uaccess_64.h:62:28: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
    if (likely(sz == -1 || sz >= n))
                              ^
  /usr/src/linux-3.12.6/include/linux/compiler.h:152:40: note: in definition of macro 'likely'
    # define likely(x) __builtin_expect(!!(x), 1)
                                          ^
    if [ "-pg" = "-pg" ]; then if [ /tmp/selfgz876/NVIDIA-Linux-x86_64-331.38/kernel/nv-frontend.o != "scripts/mod/empty.o" ]; then /usr/src/linux-3.12.6/scripts/recordmcount  "/tmp/selfgz876/NVIDIA-Linux-x86_64-331.38/kernel/nv-frontend.o"; fi; fi;
    ld -m elf_x86_64  -r -o /tmp/selfgz876/NVIDIA-Linux-x86_64-331.38/kernel/nvidia.o /tmp/selfgz876/NVIDIA-Linux-x86_64-331.38/kernel/nv-kernel.o /tmp/selfgz876/NVIDIA-Linux-x86_64-331.38/kernel/nv.o /tmp/selfgz876/NVIDIA-Linux-x86_64-331.38/kernel/nv-acpi.o /tmp/selfgz876/NVIDIA-Linux-x86_64-331.38/kernel/nv-chrdev.o /tmp/selfgz876/NVIDIA-Linux-x86_64-331.38/kernel/nv-cray.o /tmp/selfgz876/NVIDIA-Linux-x86_64-331.38/kernel/nv-drm.o /tmp/selfgz876/NVIDIA-Linux-x86_64-331.38/kernel/nv-gvi.o /tmp/selfgz876/NVIDIA-Linux-x86_64-331.38/kernel/nv-i2c.o /tmp/selfgz876/NVIDIA-Linux-x86_64-331.38/kernel/nv-mempool.o /tmp/selfgz876/NVIDIA-Linux-x86_64-331.38/kernel/nv-mlock.o /tmp/selfgz876/NVIDIA-Linux-x86_64-331.38/kernel/nv-mmap.o /tmp/selfgz876/NVIDIA-Linux-x86_64-331.38/kernel/nv-p2p.o /tmp/selfgz876/NVIDIA-Linux-x86_64-331.38/kernel/nv-pat.o /tmp/selfgz876/NVIDI
  A-Linux-x86_64-331.38/kernel/nv-procfs.o /tmp/selfgz876/NVIDIA-Linux-x86_64-331.38/kernel/nv-usermap.o /tmp/selfgz876/NVIDIA-Linux-x86_64-331.38/kernel/nv-vm.o /tmp/selfgz876/NVIDIA-Linux-x86_64-331.38/kernel/nv-vtophys.o /tmp/selfgz876/NVIDIA-Linux-x86_64-331.38/kernel/os-interface.o /tmp/selfgz876/NVIDIA-Linux-x86_64-331.38/kernel/os-pci.o /tmp/selfgz876/NVIDIA-Linux-x86_64-331.38/kernel/os-registry.o /tmp/selfgz876/NVIDIA-Linux-x86_64-331.38/kernel/os-smp.o /tmp/selfgz876/NVIDIA-Linux-x86_64-331.38/kernel/os-usermap.o /tmp/selfgz876/NVIDIA-Linux-x86_64-331.38/kernel/nv_uvm_interface.o /tmp/selfgz876/NVIDIA-Linux-x86_64-331.38/kernel/nv-frontend.o
  (cat /dev/null;  echo kernel//tmp/selfgz876/NVIDIA-Linux-x86_64-331.38/kernel/nvidia.ko;) > /tmp/selfgz876/NVIDIA-Linux-x86_64-331.38/kernel/modules.order
  make -f /usr/src/linux-3.12.6/scripts/Makefile.modpost
    find /tmp/selfgz876/NVIDIA-Linux-x86_64-331.38/kernel/.tmp_versions -name '*.mod' | xargs -r grep -h '\.ko$' | sort -u | sed 's/\.ko$/.o/' | scripts/mod/modpost  -i /usr/src/linux-3.12.6/Module.symvers -I /tmp/selfgz876/NVIDIA-Linux-x86_64-331.38/kernel/Module.symvers  -o /tmp/selfgz876/NVIDIA-Linux-x86_64-331.38/kernel/Module.symvers -S -w -s -T -
  WARNING: could not find /tmp/selfgz876/NVIDIA-Linux-x86_64-331.38/kernel/.nv-kernel.o.cmd for /tmp/selfgz876/NVIDIA-Linux-x86_64-331.38/kernel/nv-kernel.o
  FATAL: modpost: GPL-incompatible module nvidia.ko uses GPL-only symbol 'mutex_lock_nested'
  make[3]: *** [__modpost] Error 1
  make[2]: *** [modules] Error 2
  make[1]: *** [sub-make] Error 2
  make[1]: Leaving directory `/usr/src/linux-3.12.6'
  NVIDIA: left KBUILD.
    nvidia.ko failed to build!
  make: *** [nvidia.ko] Error 1
-> Error.
ERROR: Unable to build the NVIDIA kernel module.
-> done.
ERROR: Installation has failed.  Please see the file '/var/log/nvidia-installer.log' for details.  You may find suggestions on fixing installation problems in the README available on the Linux driver download page at www.nvidia.com.

Can you give me some suggest to resolve this?Thank you in advance...

Bindestreck 01-23-2014 05:48 AM

Maybe the same problem as her: https://devtalk.nvidia.com/default/t...compatibility/

Try building your NVIDA module against Slackwares official kernel.

enorbet 01-23-2014 02:27 PM

Greetings
Hmmm interesting webpage. Odd though. I'm running a custom 3.12.0 kernel with Slackware 14 and the NVIDIA-linux-x86-331.20.run driver worked perfectly the first time with no changes. OP, Possibly try backing off to the 331.20?
I don't have debugging disabled in the kernel so it is not that, at least for my combination.

freakTux 01-24-2014 02:42 AM

Quote:

Originally Posted by enorbet (Post 5103876)
Greetings
Hmmm interesting webpage. Odd though. I'm running a custom 3.12.0 kernel with Slackware 14 and the NVIDIA-linux-x86-331.20.run driver worked perfectly the first time with no changes. OP, Possibly try backing off to the 331.20?
I don't have debugging disabled in the kernel so it is not that, at least for my combination.

Tried this solution, but I still have the same error...Maybe this problem is related to the kernel headers??How can I check what headers I have installed?...perhaps I have installed the slackware official kernel headers and not the 3.12.6 headers...

enorbet 01-24-2014 05:57 AM

Quote:

Originally Posted by freakTux (Post 5104208)
Tried this solution, but I still have the same error...Maybe this problem is related to the kernel headers??How can I check what headers I have installed?...perhaps I have installed the slackware official kernel headers and not the 3.12.6 headers...

Now I'm a bit confused about how you got a 3.12.6 kernel? My 3.12.0 as I said is a custom kernel. I got it by downloading the "linux-3.12.0.bz2" from "ftp://ftp.kernel.org/pub/linux/kernel/v3.x/" and extracted it in "/usr/src" and then linked it to "/usr/src/linux". Basically I did the same as Alien Bob's Kernel From Source Page which is a nice roadmap for the changes from 2.4.x kernels, incidentally of which I may have built over 100 times messing with an Atheros wifi card (on 2.4.x kernels, years ago)until I got smart and installed a 50 foot Cat5 cable and side-stepped the entire issue as well as getting better and faster connections. Anyway, first the 2.6.x and now the 3X kernels are a welcome improvement.

The nvidia drivers need, iirc, either fully qualified and linked headers OR source tree, complete with matching, built modules in "lib/modules/". In my case it is "lib/modules/3.12.0-smp". You can
Code:

ls /usr/src
to see which kernels are in there, and
Code:

file /usr/src/linux
to see where the symlink goes. Obviously you can also "ls /lib/modules" to see which kernels have modules installed. In order to properly install the nvidia drivers, you need for all these to match and be consistent.

I hope this isn't redundant or offensive to be this basic. Just making sure we are "on the same page".

guanx 01-24-2014 06:56 AM

Since the only error here is about "mutex_lock_nested", can you disable lock debugging in your kernel config and try again?

freakTux 01-24-2014 09:45 AM

Quote:

Originally Posted by enorbet (Post 5104308)
Now I'm a bit confused about how you got a 3.12.6 kernel? My 3.12.0 as I said is a custom kernel. I got it by downloading the "linux-3.12.0.bz2" from "ftp://ftp.kernel.org/pub/linux/kernel/v3.x/" and extracted it in "/usr/src" and then linked it to "/usr/src/linux". Basically I did the same as Alien Bob's Kernel From Source Page which is a nice roadmap for the changes from 2.4.x kernels, incidentally of which I may have built over 100 times messing with an Atheros wifi card until I got smart and installed a 50 foot Cat5 cable and side-stepped the entire issue as well as getting better and faster connections.

The nvidia drivers need, iirc, either fully qualified and linked headers OR source tree, complete with matching, built modules in "lib/modules/". In my case it is "lib/modules/3.12.0-smp". You can
Code:

ls /usr/src
to see which kernels are in there, and
Code:

file /usr/src/linux
to see where the symlink goes. Obviously you can also "ls /lib/modules" to see which kernels have modules installed. In order to properly install the nvidia drivers, you need for all these to match and be consistent.

I hope this isn't redundant or offensive to be this basic. Just making sure we are "on the same page".

OK...I think that is everything ok with headers etc...in /usr/src "linux" is linked properly, and I have the 3.12.6 in /lib/modules too...


Quote:

Originally Posted by guanx (Post 5104308)
Since the only error here is about "mutex_lock_nested", can you disable lock debugging in your kernel config and try again?

How can I do this?Do you mean that I should edit my .config and try to recompile my kernel after disabled lock debugging?

guanx 01-24-2014 03:41 PM

Quote:

Originally Posted by freakTux (Post 5104446)
How can I do this? Do you mean that I should edit my .config and try to recompile my kernel after disabled lock debugging?

Disabling "Kernel hacking -> Lock Debugging" with "make menuconfig" is easier, but of course you can edit ".config" manually.

freakTux 01-24-2014 04:56 PM

Quote:

Originally Posted by guanx (Post 5104646)
Disabling "Kernel hacking -> Lock Debugging" with "make menuconfig" is easier, but of course you can edit ".config" manually.

Ok...I understood well...Thanks for giving me even the exact position of this option...tomorrow I will try...
Anyway obviously I meant to edit the .config with menuconfig (or similar)...not manually!XD
thanks again

WiseDraco 01-27-2014 03:09 AM

1 Attachment(s)
Hmm...i too,today, get similar problem: slackware64 14.1, try to install

NVIDIA-Linux-x86_64-319.17.run

and
NVIDIA-Linux-x86_64-310.44.run

- both give the same result - after a "building kernel module", installer says "Error: Unable to build NVIDIA kernel module".

nvidia_installer.log says:


/usr/src/linux-3.10.17/include/linux/compiler.h:152:40: note: in definition of macro 'likely'
# define likely(x) __builtin_expect(!!(x), 1)
^
/tmp/selfgz4993/NVIDIA-Linux-x86_64-319.17/kernel/nv-i2c.c: In function 'nv_i2c_del_adapter':
/tmp/selfgz4993/NVIDIA-Linux-x86_64-319.17/kernel/nv-i2c.c:327:14: error: void value not ignored as it ought to be
osstatus = i2c_del_adapter(pI2cAdapter);
^
make[4]: *** [/tmp/selfgz4993/NVIDIA-Linux-x86_64-319.17/kernel/nv-i2c.o] Error 1
make[3]: *** [_module_/tmp/selfgz4993/NVIDIA-Linux-x86_64-319.17/kernel] Error 2
make[2]: *** [sub-make] Error 2
NVIDIA: left KBUILD.
nvidia.ko failed to build!
make[1]: *** [module] Error 1
make: *** [module] Error 2
-> Error.
ERROR: Unable to build the NVIDIA kernel module.
ERROR: Installation has failed. Please see the file '/var/log/nvidia-installer.log' for details. You may find suggestions on fixing installation problems in the README available on the Linux driver download page at www.nvidia.com.


(at end. full log is attached to this message)

Alien Bob 01-27-2014 05:23 AM

Did you try the patch found at https://devtalk.nvidia.com/default/t...14531/#3814531 ?

As suggested in http://www.linuxquestions.org/questi...5/#post4981707 that patch works with the 3.10.17 kernel of Slackware64 14.1.

Eric

WiseDraco 01-27-2014 05:49 AM

Thank you very much, Alien Bob - yes, it works. i patched latest nvidia driver, and after that it installs good. strange to me, because all my experience with nvidia self-extracting driver until that be very fine- it always installing and work good in slackware...
thank you again...

devnod 01-30-2014 03:27 AM

Removal requested, wrong kernel version.

freakTux 02-02-2014 07:42 AM

Quote:

Originally Posted by Alien Bob (Post 5106011)
Did you try the patch found at https://devtalk.nvidia.com/default/t...14531/#3814531 ?

As suggested in http://www.linuxquestions.org/questi...5/#post4981707 that patch works with the 3.10.17 kernel of Slackware64 14.1.

Eric

I tried to apply this patch...but it doesn't work...when I try to patch it says me that:
Code:

patching file kernel/nv-i2v.c
Reversed (or previously applied) pathc detected! Assume -R?

And when I try to apply it aniway it says me that the apply is failed...I tried to apply it on 338.31 after having adjusted the driver version in the diff file...and tried even to install the 325.15 (because I read that the 325.15 is already patched)

LightStar 02-08-2014 03:36 AM

This is my patch for this issue. Maybe not ideal, but it is working.

Code:

diff -uNr a/kernel/nv.c b/kernel/nv.c
--- a/kernel/nv.c        2013-08-14 10:27:46.000000000 +0800
+++ b/kernel/nv.c        2013-09-06 20:03:59.930725559 +0800
@@ -16,7 +16,7 @@
 #include "rmil.h"
 
 #if defined(MODULE_LICENSE)
-MODULE_LICENSE("NVIDIA");
+MODULE_LICENSE("GPL");
 #endif
 #if defined(MODULE_INFO)
 MODULE_INFO(supported, "external");
diff -uNr a/kernel/nv-frontend.c b/kernel/nv-frontend.c
--- a/kernel/nv-frontend.c        2013-08-14 10:27:46.000000000 +0800
+++ b/kernel/nv-frontend.c        2013-09-06 20:03:59.930725559 +0800
@@ -16,7 +16,7 @@
 #include "nv-frontend.h"
 
 #if defined(MODULE_LICENSE)
-MODULE_LICENSE("NVIDIA");
+MODULE_LICENSE("GPL");
 #endif
 #if defined(MODULE_VERSION)
 MODULE_VERSION(NV_VERSION_STRING);


55020 02-08-2014 05:14 AM

Code:

-MODULE_LICENSE("NVIDIA");
+MODULE_LICENSE("GPL");

Wow. I don't know who would be more angry about this blatant act of copyright infringement - nVidia, or the thousands of kernel contributors.

And at the end of the day, all that patch does is prevent the kernel's taint flag from being set. It won't fix any build problems at all.

LightStar 02-08-2014 05:35 AM

Quote:

Originally Posted by 55020 (Post 5113872)
Code:

-MODULE_LICENSE("NVIDIA");
+MODULE_LICENSE("GPL");

Wow. I don't know who would be more angry about this blatant act of copyright infringement - nVidia, or the thousands of kernel contributors.

And at the end of the day, all that patch does is prevent the kernel's taint flag from being set. It won't fix any build problems at all.

But it fixed. No more "FATAL: modpost: GPL-incompatible module nvidia.ko uses GPL-only symbol 'mutex_lock_nested'" error for me

55020 02-08-2014 05:47 AM

Quote:

Originally Posted by LightStar (Post 5113875)
But it fixed. No more "FATAL: modpost: GPL-incompatible module nvidia.ko uses GPL-only symbol 'mutex_lock_nested'" error for me

That's not a build problem. That's working as designed.

If nVidia wants to put its hand in the GPL cookie-jar...

ReaperX7 02-08-2014 03:53 PM

It's a dirty fix regardless. That's a fix better suited for developers only, testers, and such crowds, not end users.

It is nothing more than a kernel license lockout avoidance, not a fix. That feature that is disabled is only a kernel feature used by debugging and developments. You gain no benefit from applying that except extra debugging.

LightStar 02-08-2014 11:02 PM

You are right indeed. But can't find any other solution yet. Nvidia kernel driver 331.20 won't build for 3.12 kernel otherwise.

guanx 02-09-2014 02:27 AM

Quote:

Originally Posted by LightStar (Post 5114281)
...
Nvidia kernel driver 331.20 won't build for 3.12 kernel otherwise.

How did you come to this conclusion? No one else have this problem. Besides, is there any reason to not use v331.38 or later drivers?

LightStar 02-09-2014 02:48 AM

Well, topic starter had this problem (and by the way he tried to build newer version 331.38). I had it too and just posted my solution because didn't seen any other solution in this thread which is working (other then using stock 3.10.17 kernel, which is in fact no solution at all). If you have any other idea how to solve it - just post it please.

LightStar 02-09-2014 03:15 AM

But sorry, didn't tried "disable lock debugging" thing yet. Will do it when have time.


All times are GMT -5. The time now is 10:08 AM.