While installing via yay from AUR nvidia 340 driver i have this error
Its can be solved?
(1/1) Install DKMS modules
==> dkms install --no-depmod nvidia/340.108 -k 6.2.2-artix1-1
Error! Bad return status for module build on kernel: 6.2.2-artix1-1 (x86_64)
Consult /var/lib/dkms/nvidia/340.108/build/make.log for more information.
==> WARNING: `dkms install --no-depmod nvidia/340.108 -k 6.2.2-artix1-1' exited 10
home:[freeartist-artix]:~/Downloads$
/var/lib/dkms/nvidia/340.108/build/make.log 1755/1755
100%
DKMS make.log for nvidia-340.108 for kernel 6.2.2-artix1-1 (x86_64)
Wed 8 Mar 01:47:37 EET 2023
gcc-version-check failed:
The compiler used to compile the kernel (gcc
12.1) does not exactly match the current compiler
(gcc 12.2). 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.
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! ***
make: *** [nvidia-modules-common.mk:201: build-sanity-checks] Error 1
make: Entering directory '/var/lib/dkms/nvidia/340.108/build/uvm'
cd ./..; make module SYSSRC=/lib/modules/6.2.2-artix1-1/build SYSOUT=/lib/modules/6.2.2-artix1-1/build KBUILD_EXTMOD=./..
make[1]: Entering directory '/var/lib/dkms/nvidia/340.108/build'
NVIDIA: calling KBUILD...
warning: the compiler differs from the one used to build the kernel
The kernel was built by: gcc (GCC) 12.2.1 20230201
You are using: cc (GCC) 12.2.1 20230201
make -f ./scripts/Makefile.build obj=.. need-builtin=1 need-modorder=1
scripts/Makefile.build:41: ../Makefile: No such file or directory
make[3]: *** No rule to make target '../Makefile'. Stop.
make[2]: *** [Makefile:2021: ..] Error 2
NVIDIA: left KBUILD.
nvidia.ko failed to build!
make[1]: *** [Makefile:202: nvidia.ko] Error 1
make[1]: Leaving directory '/var/lib/dkms/nvidia/340.108/build'
make: *** [Makefile:222: ../Module.symvers] Error 2
make: Leaving directory '/var/lib/dkms/nvidia/340.108/build/uvm'
What's the output of
cat /proc/version
Solved. I realy dont know how :)
Rebooted and do again
yay -S nvidia-340xx-dkms
home:[root]:/etc# cat /proc/version
Linux version 6.2.2-artix1-1 (linux@artixlinux) (gcc (GCC) 12.2.1 20230201, GNU ld (GNU Binutils) 2.40) #1 SMP PREEMPT_DYNAMIC Fri, 03 Mar 2023 18:24:33 +0000
home:[root]:/etc#
I should have thought of that. You'd updated to the new kernel but the old one was still running.
Whenever the kernel updates reboot as soon as it's practical.
Is the nvidia driver working for you ?
Yes, old driver worked now :)
AUR community patched legacy driver for new kernels ;)
https://aur.archlinux.org/packages/nvidia-340xx-dkms
Happy days :D