You are not logged in.

#1 2015-02-23 11:22:25

weirddan455
Member
Registered: 2012-04-15
Posts: 209

[SOLVED] Proprietary Nvidia driver on Linux 4.0?

So I thought it would be cool to try out the new Linux 4.0 rc1 (I know nothing's drastically different from 3.X but still tongue)  I'm booted with it at the moment and all is working well with Nouveau.  I followed the instructions from the wiki and attempted to build the proprietary Nvidia module from ABS but I'm hitting this error:

/home/daniel/ABS/nvidia/src/NVIDIA-Linux-x86_64-346.35-no-compat32/kernel/nv-pat.c: In function ‘nv_disable_caches’:
/home/daniel/ABS/nvidia/src/NVIDIA-Linux-x86_64-346.35-no-compat32/kernel/nv-pat.c:38:5: error: implicit declaration of function ‘read_cr4’ [-Werror=implicit-function-declaration]
     *cr4 = read_cr4();
     ^
/home/daniel/ABS/nvidia/src/NVIDIA-Linux-x86_64-346.35-no-compat32/kernel/nv-pat.c:39:5: error: implicit declaration of function ‘write_cr4’ [-Werror=implicit-function-declaration]
     if (*cr4 & 0x80) write_cr4(*cr4 & ~0x80);
     ^
cc1: some warnings being treated as errors
scripts/Makefile.build:258: recipe for target '/home/daniel/ABS/nvidia/src/NVIDIA-Linux-x86_64-346.35-no-compat32/kernel/nv-pat.o' failed
make[2]: *** [/home/daniel/ABS/nvidia/src/NVIDIA-Linux-x86_64-346.35-no-compat32/kernel/nv-pat.o] Error 1
make[2]: *** Waiting for unfinished jobs....
In file included from include/uapi/linux/stddef.h:1:0,
                 from include/linux/stddef.h:4,
                 from ./include/uapi/linux/posix_types.h:4,
                 from include/uapi/linux/types.h:13,
                 from include/linux/types.h:5,
                 from include/uapi/linux/capability.h:16,
                 from include/linux/capability.h:15,
                 from include/linux/sched.h:15,
                 from include/linux/utsname.h:5,
                 from /home/daniel/ABS/nvidia/src/NVIDIA-Linux-x86_64-346.35-no-compat32/kernel/nv-linux.h:44,
                 from /home/daniel/ABS/nvidia/src/NVIDIA-Linux-x86_64-346.35-no-compat32/kernel/nv-usermap.c:15:
./arch/x86/include/asm/uaccess.h: In function ‘copy_from_user’:
./arch/x86/include/asm/uaccess.h:712:26: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  if (likely(sz < 0 || sz >= n))
                          ^
include/linux/compiler.h:163:40: note: in definition of macro ‘likely’
 # define likely(x) __builtin_expect(!!(x), 1)
                                        ^
./arch/x86/include/asm/uaccess.h: In function ‘copy_to_user’:
./arch/x86/include/asm/uaccess.h:730:26: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  if (likely(sz < 0 || sz >= n))
                          ^
include/linux/compiler.h:163:40: note: in definition of macro ‘likely’
 # define likely(x) __builtin_expect(!!(x), 1)
                                        ^
  if [ "-pg" = "-pg" ]; then if [ /home/daniel/ABS/nvidia/src/NVIDIA-Linux-x86_64-346.35-no-compat32/kernel/nv-p2p.o != "scripts/mod/empty.o" ]; then ./scripts/recordmcount  "/home/daniel/ABS/nvidia/src/NVIDIA-Linux-x86_64-346.35-no-compat32/kernel/nv-p2p.o"; fi; fi;
  if [ "-pg" = "-pg" ]; then if [ /home/daniel/ABS/nvidia/src/NVIDIA-Linux-x86_64-346.35-no-compat32/kernel/nv-procfs.o != "scripts/mod/empty.o" ]; then ./scripts/recordmcount  "/home/daniel/ABS/nvidia/src/NVIDIA-Linux-x86_64-346.35-no-compat32/kernel/nv-procfs.o"; fi; fi;
  if [ "-pg" = "-pg" ]; then if [ /home/daniel/ABS/nvidia/src/NVIDIA-Linux-x86_64-346.35-no-compat32/kernel/nv-usermap.o != "scripts/mod/empty.o" ]; then ./scripts/recordmcount  "/home/daniel/ABS/nvidia/src/NVIDIA-Linux-x86_64-346.35-no-compat32/kernel/nv-usermap.o"; fi; fi;
Makefile:1390: recipe for target '_module_/home/daniel/ABS/nvidia/src/NVIDIA-Linux-x86_64-346.35-no-compat32/kernel' failed
make[1]: *** [_module_/home/daniel/ABS/nvidia/src/NVIDIA-Linux-x86_64-346.35-no-compat32/kernel] Error 2
make[1]: Leaving directory '/home/daniel/Downloads/linux-4.0-rc1'
NVIDIA: left KBUILD.
nvidia.ko failed to build!
nvidia-modules-common.mk:248: recipe for target 'module' failed
make: *** [module] Error 1
==> ERROR: A failure occurred in build().
    Aborting...

Anyone know of a solution or is this something we're gonna have to wait for an update from Nvidia for?

Last edited by weirddan455 (2015-02-23 15:20:38)

Offline

#2 2015-02-23 11:34:58

Gusar
Member
Registered: 2009-08-25
Posts: 3,605

Re: [SOLVED] Proprietary Nvidia driver on Linux 4.0?

The Nvidia Linux forum is usually a good place to look. Here you go https://devtalk.nvidia.com/default/topi … tions-fix/ smile

Offline

#3 2015-02-23 12:38:25

weirddan455
Member
Registered: 2012-04-15
Posts: 209

Re: [SOLVED] Proprietary Nvidia driver on Linux 4.0?

Awesome that's got it working.  Now for another question:  How do I get it the module to load automatically like the stock kernel does?

The normal "modprobe nvidia" reports module not found so I'm having to do "insmod /usr/lib/modules/extramodules-4.0-ARCH/nvidia.ko.gz" (at first that gave a bunch of undefined symbol errors but that was resolved by manually doing a "modprobe drm")

So how does modprobe whatever autoloads the modules at boot know where to look?  I already symlinked /usr/lib/modules/extramodules-4.0-ARCH to /usr/lib/modules/4.0.0-rc1-ARCH/extramodules like the stock kernel does but I guess that's not enough.

Offline

#4 2015-02-23 14:55:09

clfarron4
Member
From: London, UK
Registered: 2013-06-28
Posts: 2,163
Website

Re: [SOLVED] Proprietary Nvidia driver on Linux 4.0?

You'll need to tell the install files to put it in the 4.0 kernel, as the standard Arch package puts them in 3.19.


Claire is fine.
Problems? I have dysgraphia, so clear and concise please.
My public GPG key for package signing
My x86_64 package repository

Offline

#5 2015-02-23 15:14:48

weirddan455
Member
Registered: 2012-04-15
Posts: 209

Re: [SOLVED] Proprietary Nvidia driver on Linux 4.0?

clfarron4 wrote:

You'll need to tell the install files to put it in the 4.0 kernel, as the standard Arch package puts them in 3.19.

I did.  It's in /usr/lib/modules/extramodules-4.0-ARCH/ but modprobe still won't find it hmm

Offline

#6 2015-02-23 15:20:10

weirddan455
Member
Registered: 2012-04-15
Posts: 209

Re: [SOLVED] Proprietary Nvidia driver on Linux 4.0?

Nevermind I got it.  I only made the symlink after I installed the package.  I reran the "depmod" command and all is working now smile

Offline

#7 2015-03-04 01:09:04

r3ddr4gOn
Member
From: Rheinzabern, Germany
Registered: 2013-11-08
Posts: 1

Re: [SOLVED] Proprietary Nvidia driver on Linux 4.0?

Hi, I just randomly stumbled over this topic and thought I should mention that there are packages in the AUR for the mainline linux kernel so you don´t have to do the patching yourself (of course you can if you want to smile ): linux-mainline and nvidia-mainline

Offline

Board footer

Powered by FluxBB