375.39 has compile errors on Fedora 25 running 4.10.10 kernel targeting GTX1070

The 375.39 installer has compile errors on Fedora 25 running 4.10.10 kernel targeting GTX1070. I tried attaching the complete log file, but it gets classified as infected by the virus scanner (very odd for a log file). Here’s the head of the install log…

#--------------

nvidia-installer log file ‘/var/log/nvidia-installer.log’
creation time: Fri Apr 21 07:31:09 2017
installer version: 375.39

PATH: /usr/lib64/qt-3.3/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin

nvidia-installer command line:
./nvidia-installer

Using: nvidia-installer ncurses v6 user interface
→ Detected 64 CPUs online; setting concurrency level to 32.
→ Tagging shared libraries with chcon -t textrel_shlib_t.
→ License accepted.
→ Installing NVIDIA driver version 375.39.
→ Performing CC sanity check with CC=“/usr/bin/cc”.
→ Kernel source path: ‘/lib/modules/4.10.10-200.fc25.x86_64/source’
→ Kernel output path: ‘/lib/modules/4.10.10-200.fc25.x86_64/build’
→ Performing rivafb check.
→ Performing nvidiafb check.
→ Performing Xen check.
→ Performing PREEMPT_RT check.
→ Cleaning kernel module build directory.
executing: ‘cd ./kernel; /usr/bin/make -k -j32 clean NV_EXCLUDE_KERNEL_MODULES=“” SYSSRC=“/lib/modules/4.10.10-200.fc25.x86_64/source” SYSOUT=“/lib/modules/4.10.10-200.fc25.x86_64/build”’…
rm -f -r conftest
/usr/bin/make “CC=cc” KBUILD_OUTPUT=/lib/modules/4.10.10-200.fc25.x86_64/build KBUILD_VERBOSE= -C /lib/modules/4.10.10-200.fc25.x86_64/source M=/tmp/selfgz15654/NVIDIA-Linux-x86_64-375.39/kernel ARCH=x86_64 NV_KERNEL_SOURCES=/lib/modules/4.10.10-200.fc25.x86_64/source NV_KERNEL_OUTPUT=/lib/modules/4.10.10-200.fc25.x86_64/build NV_KERNEL_MODULES=“nvidia nvidia-uvm nvidia-modeset nvidia-drm” INSTALL_MOD_DIR=kernel/drivers/video clean

#--------------

then… a bunch of normal looking stuff, followed by the errors below…

#--------------

 /tmp/selfgz15654/NVIDIA-Linux-x86_64-375.39/kernel/nvidia/nv-pat.c: In function ‘nvidia_cpu_callback’:

/tmp/selfgz15654/NVIDIA-Linux-x86_64-375.39/kernel/nvidia/nv-pat.c:213:14: error: ‘CPU_DOWN_FAILED’ undeclared (first use in this function)
case CPU_DOWN_FAILED:
^~~~~~~~~~~~~~~
/tmp/selfgz15654/NVIDIA-Linux-x86_64-375.39/kernel/nvidia/nv-pat.c:213:14: note: each undeclared identifier is reported only once for each function it appears in
/tmp/selfgz15654/NVIDIA-Linux-x86_64-375.39/kernel/nvidia/nv-pat.c:220:14: error: ‘CPU_DOWN_PREPARE’ undeclared (first use in this function)
case CPU_DOWN_PREPARE:
^~~~~~~~~~~~~~~~
In file included from /tmp/selfgz15654/NVIDIA-Linux-x86_64-375.39/kernel/nvidia/nv-pat.c:15:0:
/tmp/selfgz15654/NVIDIA-Linux-x86_64-375.39/kernel/nvidia/nv-pat.c: In function ‘nv_init_pat_support’:
/tmp/selfgz15654/NVIDIA-Linux-x86_64-375.39/kernel/common/inc/nv-linux.h:391:34: error: implicit declaration of function ‘register_cpu_notifier’ [-Werror=implicit-function-declaration]
#define register_hotcpu_notifier register_cpu_notifier
^
/tmp/selfgz15654/NVIDIA-Linux-x86_64-375.39/kernel/nvidia/nv-pat.c:258:17: note: in expansion of macro ‘register_hotcpu_notifier’
if (register_hotcpu_notifier(&nv_hotcpu_nfb) != 0)
^~~~~~~~~~~~~~~~~~~~~~~~
/tmp/selfgz15654/NVIDIA-Linux-x86_64-375.39/kernel/nvidia/nv-pat.c: In function ‘nv_teardown_pat_support’:
/tmp/selfgz15654/NVIDIA-Linux-x86_64-375.39/kernel/common/inc/nv-linux.h:388:36: error: implicit declaration of function ‘unregister_cpu_notifier’ [-Werror=implicit-function-declaration]
#define unregister_hotcpu_notifier unregister_cpu_notifier
^
/tmp/selfgz15654/NVIDIA-Linux-x86_64-375.39/kernel/nvidia/nv-pat.c:283:9: note: in expansion of macro ‘unregister_hotcpu_notifier’
unregister_hotcpu_notifier(&nv_hotcpu_nfb);
^~~~~~~~~~~~~~~~~~~~~~~~~~
CC [M] /tmp/selfgz15654/NVIDIA-Linux-x86_64-375.39/kernel/nvidia-uvm/uvm_page_migration.o
cc1: some warnings being treated as errors
/usr/src/kernels/4.10.10-200.fc25.x86_64/scripts/Makefile.build:294: recipe for target ‘/tmp/selfgz15654/NVIDIA-Linux-x86_64-375.39/kernel/nvidia/nv-pat.o’ failed

#-------------

further down, you get these errors…

#-------------

CC [M] /tmp/selfgz15654/NVIDIA-Linux-x86_64-375.39/kernel/nvidia-drm/nv-pci-table.o
In file included from /tmp/selfgz15654/NVIDIA-Linux-x86_64-375.39/kernel/nvidia-drm/nvidia-drm.c:27:0:
/tmp/selfgz15654/NVIDIA-Linux-x86_64-375.39/kernel/nvidia-drm/nvidia-drm-priv.h:37:25: fatal error: linux/fence.h: No such file or directory
#include <linux/fence.h>
^
compilation terminated.
/usr/src/kernels/4.10.10-200.fc25.x86_64/scripts/Makefile.build:294: recipe for target ‘/tmp/selfgz15654/NVIDIA-Linux-x86_64-375.39/kernel/nvidia-drm/nvidia-drm.o’ failed
make[3]: *** [/tmp/selfgz15654/NVIDIA-Linux-x86_64-375.39/kernel/nvidia-drm/nvidia-drm.o] Error 1
In file included from /tmp/selfgz15654/NVIDIA-Linux-x86_64-375.39/kernel/nvidia-drm/nvidia-drm-drv.c:25:0:
/tmp/selfgz15654/NVIDIA-Linux-x86_64-375.39/kernel/nvidia-drm/nvidia-drm-priv.h:37:25: fatal error: linux/fence.h: No such file or directory
#include <linux/fence.h>
^
compilation terminated.
/usr/src/kernels/4.10.10-200.fc25.x86_64/scripts/Makefile.build:294: recipe for target ‘/tmp/selfgz15654/NVIDIA-Linux-x86_64-375.39/kernel/nvidia-drm/nvidia-drm-drv.o’ failed
make[3]: *** [/tmp/selfgz15654/NVIDIA-Linux-x86_64-375.39/kernel/nvidia-drm/nvidia-drm-drv.o] Error 1
In file included from /tmp/selfgz15654/NVIDIA-Linux-x86_64-375.39/kernel/nvidia-drm/nvidia-drm-utils.c:27:0:
/tmp/selfgz15654/NVIDIA-Linux-x86_64-375.39/kernel/nvidia-drm/nvidia-drm-priv.h:37:25: fatal error: linux/fence.h: No such file or directory
#include <linux/fence.h>
^
compilation terminated.
In file included from /tmp/selfgz15654/NVIDIA-Linux-x86_64-375.39/kernel/nvidia-drm/nvidia-drm-crtc.c:27:0:
/tmp/selfgz15654/NVIDIA-Linux-x86_64-375.39/kernel/nvidia-drm/nvidia-drm-priv.h:37:25: fatal error: linux/fence.h: No such file or directory
#include <linux/fence.h>
^
compilation terminated.
/usr/src/kernels/4.10.10-200.fc25.x86_64/scripts/Makefile.build:294: recipe for target ‘/tmp/selfgz15654/NVIDIA-Linux-x86_64-375.39/kernel/nvidia-drm/nvidia-drm-utils.o’ failed
make[3]: *** [/tmp/selfgz15654/NVIDIA-Linux-x86_64-375.39/kernel/nvidia-drm/nvidia-drm-utils.o] Error 1
/usr/src/kernels/4.10.10-200.fc25.x86_64/scripts/Makefile.build:294: recipe for target ‘/tmp/selfgz15654/NVIDIA-Linux-x86_64-375.39/kernel/nvidia-drm/nvidia-drm-crtc.o’ failed
make[3]: *** [/tmp/selfgz15654/NVIDIA-Linux-x86_64-375.39/kernel/nvidia-drm/nvidia-drm-crtc.o] Error 1
In file included from /tmp/selfgz15654/NVIDIA-Linux-x86_64-375.39/kernel/nvidia-drm/nvidia-drm-connector.c:27:0:
/tmp/selfgz15654/NVIDIA-Linux-x86_64-375.39/kernel/nvidia-drm/nvidia-drm-priv.h:37:25: fatal error: linux/fence.h: No such file or directory
#include <linux/fence.h>
^
compilation terminated.
/usr/src/kernels/4.10.10-200.fc25.x86_64/scripts/Makefile.build:294: recipe for target ‘/tmp/selfgz15654/NVIDIA-Linux-x86_64-375.39/kernel/nvidia-drm/nvidia-drm-connector.o’ failed
make[3]: *** [/tmp/selfgz15654/NVIDIA-Linux-x86_64-375.39/kernel/nvidia-drm/nvidia-drm-connector.o] Error 1
ld -r -o /tmp/selfgz15654/NVIDIA-Linux-x86_64-375.39/kernel/nvidia-modeset/nv-modeset-interface.o /tmp/selfgz15654/NVIDIA-Linux-x86_64-375.39/kernel/nvidia-modeset/nvidia-modeset-linux.o
LD [M] /tmp/selfgz15654/NVIDIA-Linux-x86_64-375.39/kernel/nvidia-modeset.o
In file included from /tmp/selfgz15654/NVIDIA-Linux-x86_64-375.39/kernel/nvidia-drm/nvidia-drm-encoder.c:27:0:
/tmp/selfgz15654/NVIDIA-Linux-x86_64-375.39/kernel/nvidia-drm/nvidia-drm-priv.h:37:25: fatal error: linux/fence.h: No such file or directory
#include <linux/fence.h>
^
compilation terminated.
/usr/src/kernels/4.10.10-200.fc25.x86_64/scripts/Makefile.build:294: recipe for target ‘/tmp/selfgz15654/NVIDIA-Linux-x86_64-375.39/kernel/nvidia-drm/nvidia-drm-encoder.o’ failed
make[3]: *** [/tmp/selfgz15654/NVIDIA-Linux-x86_64-375.39/kernel/nvidia-drm/nvidia-drm-encoder.o] Error 1
In file included from /tmp/selfgz15654/NVIDIA-Linux-x86_64-375.39/kernel/nvidia-drm/nvidia-drm-gem.c:27:0:
/tmp/selfgz15654/NVIDIA-Linux-x86_64-375.39/kernel/nvidia-drm/nvidia-drm-priv.h:37:25: fatal error: linux/fence.h: No such file or directory
#include <linux/fence.h>
^
compilation terminated.
/usr/src/kernels/4.10.10-200.fc25.x86_64/scripts/Makefile.build:294: recipe for target ‘/tmp/selfgz15654/NVIDIA-Linux-x86_64-375.39/kernel/nvidia-drm/nvidia-drm-gem.o’ failed
make[3]: *** [/tmp/selfgz15654/NVIDIA-Linux-x86_64-375.39/kernel/nvidia-drm/nvidia-drm-gem.o] Error 1
In file included from /tmp/selfgz15654/NVIDIA-Linux-x86_64-375.39/kernel/nvidia-drm/nvidia-drm-fb.c:27:0:
/tmp/selfgz15654/NVIDIA-Linux-x86_64-375.39/kernel/nvidia-drm/nvidia-drm-priv.h:37:25: fatal error: linux/fence.h: No such file or directory
#include <linux/fence.h>
^
compilation terminated.
/usr/src/kernels/4.10.10-200.fc25.x86_64/scripts/Makefile.build:294: recipe for target ‘/tmp/selfgz15654/NVIDIA-Linux-x86_64-375.39/kernel/nvidia-drm/nvidia-drm-fb.o’ failed
make[3]: *** [/tmp/selfgz15654/NVIDIA-Linux-x86_64-375.39/kernel/nvidia-drm/nvidia-drm-fb.o] Error 1
In file included from /tmp/selfgz15654/NVIDIA-Linux-x86_64-375.39/kernel/nvidia-drm/nvidia-drm-modeset.c:27:0:
/tmp/selfgz15654/NVIDIA-Linux-x86_64-375.39/kernel/nvidia-drm/nvidia-drm-priv.h:37:25: fatal error: linux/fence.h: No such file or directory
#include <linux/fence.h>
^
compilation terminated.
/usr/src/kernels/4.10.10-200.fc25.x86_64/scripts/Makefile.build:294: recipe for target ‘/tmp/selfgz15654/NVIDIA-Linux-x86_64-375.39/kernel/nvidia-drm/nvidia-drm-modeset.o’ failed
make[3]: *** [/tmp/selfgz15654/NVIDIA-Linux-x86_64-375.39/kernel/nvidia-drm/nvidia-drm-modeset.o] Error 1
In file included from /tmp/selfgz15654/NVIDIA-Linux-x86_64-375.39/kernel/nvidia-drm/nvidia-drm-mmap.c:27:0:
/tmp/selfgz15654/NVIDIA-Linux-x86_64-375.39/kernel/nvidia-drm/nvidia-drm-priv.h:37:25: fatal error: linux/fence.h: No such file or directory
#include <linux/fence.h>
^
compilation terminated.
/usr/src/kernels/4.10.10-200.fc25.x86_64/scripts/Makefile.build:294: recipe for target ‘/tmp/selfgz15654/NVIDIA-Linux-x86_64-375.39/kernel/nvidia-drm/nvidia-drm-mmap.o’ failed
make[3]: *** [/tmp/selfgz15654/NVIDIA-Linux-x86_64-375.39/kernel/nvidia-drm/nvidia-drm-mmap.o] Error 1
In file included from /tmp/selfgz15654/NVIDIA-Linux-x86_64-375.39/kernel/nvidia-drm/nvidia-drm-fence.c:27:0:
/tmp/selfgz15654/NVIDIA-Linux-x86_64-375.39/kernel/nvidia-drm/nvidia-drm-priv.h:37:25: fatal error: linux/fence.h: No such file or directory
#include <linux/fence.h>
^
compilation terminated.
/usr/src/kernels/4.10.10-200.fc25.x86_64/scripts/Makefile.build:294: recipe for target ‘/tmp/selfgz15654/NVIDIA-Linux-x86_64-375.39/kernel/nvidia-drm/nvidia-drm-fence.o’ failed
make[3]: *** [/tmp/selfgz15654/NVIDIA-Linux-x86_64-375.39/kernel/nvidia-drm/nvidia-drm-fence.o] Error 1
LD [M] /tmp/selfgz15654/NVIDIA-Linux-x86_64-375.39/kernel/nvidia-uvm.o
make[3]: Target ‘__build’ not remade because of errors.
/usr/src/kernels/4.10.10-200.fc25.x86_64/Makefile:1494: recipe for target ‘module/tmp/selfgz15654/NVIDIA-Linux-x86_64-375.39/kernel’ failed

#------------------

Any suggestions?

Same as [url]https://devtalk.nvidia.com/default/topic/1005246/linux/unable-to-install-nvidia-driver-linux-x86_64-378-13-on-kernel-4-10-10-200-fc25-x86_64/[/url]

This issue has been discussed to death in these forums. Have you ever used Search?

I haven’t found a post that got me all the way to an installed driver. I have to figure out how to successfully downgrade the kernel (probably to 4.8.6-300 - the first step down that’s still left on kernel.org) and everything it drags in. dnf says I’m making conflicting requests.

You should not be using official NVIDIA drivers unless you’re an experienced Linux user which you don’t look like.

Please install NVIDIA drivers from the RPM Fusion repository.

I installed from the RPM Fusion repository earlier. It gets me to the black screen that others have mentioned.

I was successful installing 381.09 on the 4.10.10 kernel - it builds nvidia.ko without complaint. I was initially getting the “Unable to determine if Secure Boot is enabled” error (on a BIOS machine), but after a run or two in ‘expert’ mode, subsequent runs don’t complain about that. I installed dkms and added the -dkms option when running the installer, so I should be set even after a kernel upgrade. Hoo Haa!

Did you make sure you had the right kernel-devel package installed? (kernel-debug-devel is not suitable).

yup, but thanks for the heads-up.

Link to required patch

https://pkgs.rpmfusion.org/cgit/nonfree/nvidia-kmod.git/plain/kernel_4.10.patch?h=f25

Rough guide to patch dkms setup

[url]GeForce GTX1070 display issues · Issue #19 · negativo17/nvidia-driver · GitHub

I got the same black screen with a blinking cursor when I installed 381.09 that I got when I installed xorg-xll-drv-nvidia from RPMFusion (so I uninstalled 381.09 and went back to 375.39). NVIDIA (GTX 1070) is the loaded driver according to lspci (see below). Nouveau is disabled. Can anyone suggest how to get past the blank/black screen?

01:04.0 VGA compatible controller: Matrox Electronics Systems Ltd. MGA G200eW WPCM450 (rev 0a)
04:00.0 VGA compatible controller: NVIDIA Corporation GP104 [GeForce GTX 1070] (rev a1)
04:00.1 Audio device: NVIDIA Corporation GP104 High Definition Audio Controller (rev a1)

DarkSky, here’s what worked for me on Fedora 25 (Kernel 4.10.8) mirror of https://pkgs.rpmfusion.org/cgit/nonfree/nvidia-kmod.git/plain/kernel_4.10.patch?h=f25 · GitHub