Skip to main content
Topic solved
This topic has been marked as solved and requires no further attention.
Topic: [SOLVED] nvidia 340 Install DKMS modules - error (Read 1072 times) previous topic - next topic
0 Members and 2 Guests are viewing this topic.

[SOLVED] nvidia 340 Install DKMS modules - error

While installing via yay from AUR nvidia 340 driver i have this error
Its can be solved?

Code: [Select]
(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             
Code: [Select]
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'
-=linux its buggy crap that have no antifool protection (c)=- :)
*linux is free software, and comes with ABSOLUTELY NO WARRANTY* :)
+ALL YOURS ACTIONS at Linux YOU DO at YOUR OWN RISK!+ :)

Re: nvidia 340 Install DKMS modules - error

Reply #1
What's the output of
Code: [Select]
cat /proc/version

Re: nvidia 340 Install DKMS modules - error

Reply #2
Solved. I realy dont know how :)
Rebooted and do again
Code: [Select]
yay -S nvidia-340xx-dkms

Code: [Select]
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#
-=linux its buggy crap that have no antifool protection (c)=- :)
*linux is free software, and comes with ABSOLUTELY NO WARRANTY* :)
+ALL YOURS ACTIONS at Linux YOU DO at YOUR OWN RISK!+ :)

 

Re: nvidia 340 Install DKMS modules - error

Reply #3
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 ?

Re: nvidia 340 Install DKMS modules - error

Reply #4
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
-=linux its buggy crap that have no antifool protection (c)=- :)
*linux is free software, and comes with ABSOLUTELY NO WARRANTY* :)
+ALL YOURS ACTIONS at Linux YOU DO at YOUR OWN RISK!+ :)

Re: nvidia 340 Install DKMS modules - error

Reply #5
Happy days  :D