DKMS make.log for nvidia-340.96 for kernel 4.5.2-1-ARCH (x86_64) gcc-version-check failed: You appear to be compiling the NVIDIA kernel module with a different compiler than the one that was used to compile the running kernel. The Linux 2.6 kernel module loader rejects kernel modules built with a version of gcc that does not exactly match that of the compiler used to build the running kernel. The compiler used to compile the kernel was gcc 5.3; the current compiler is gcc 6.1. If you know what you are doing and want to override the gcc version check, you can do so by setting the IGNORE_CC_MISMATCH environment variable to "1". In any other case, set the CC environment variable to the name of the compiler that was used to compile the kernel. *** Failed CC version check. Bailing out! *** nvidia-modules-common.mk:201: recipe for target 'build-sanity-checks' failed make: *** [build-sanity-checks] Error 1 make: Entering directory '/var/lib/dkms/nvidia/340.96/build/uvm' cd ./..; make module SYSSRC=/lib/modules/4.5.2-1-ARCH/build SYSOUT=/lib/modules/4.5.2-1-ARCH/build KBUILD_EXTMOD=./.. make[1]: Entering directory '/var/lib/dkms/nvidia/340.96/build' NVIDIA: calling KBUILD... make[2]: Entering directory '/usr/lib/modules/4.5.2-1-ARCH/build' test -e include/generated/autoconf.h -a -e include/config/auto.conf || ( \ echo >&2; \ echo >&2 " ERROR: Kernel configuration is invalid."; \ echo >&2 " include/generated/autoconf.h or include/config/auto.conf are missing.";\ echo >&2 " Run 'make oldconfig && make prepare' on kernel src to fix it."; \ echo >&2 ; \ /bin/false) mkdir -p ./../.tmp_versions ; rm -f ./../.tmp_versions/* make -f ./scripts/Makefile.build obj=./.. scripts/Makefile.build:44: ../Makefile: No such file or directory make[3]: *** No rule to make target '../Makefile'. Stop. Makefile:1391: recipe for target '_module_./..' failed make[2]: *** [_module_./..] Error 2 make[2]: Leaving directory '/usr/lib/modules/4.5.2-1-ARCH/build' NVIDIA: left KBUILD. nvidia.ko failed to build! Makefile:184: recipe for target 'nvidia.ko' failed make[1]: *** [nvidia.ko] Error 1 make[1]: Leaving directory '/var/lib/dkms/nvidia/340.96/build' Makefile:219: recipe for target '../Module.symvers' failed make: *** [../Module.symvers] Error 2 make: Leaving directory '/var/lib/dkms/nvidia/340.96/build/uvm'