Kernel 4.14.2 = no nvidia, no bbswitch support

Hello,

OMV LX 3.03

KDE, dual graphics INTEL + nvidia

Recent update to kernel-4.14.2 yields errors with bbswitch bbswitch_make.log.txt (546 Bytes)
and nvidia compilation nvidia_make.log.txt (28,8 KB)
. Thus, no nvidia.

{ make KERNELRELEASE=4.14.2-desktop-1omv KVERSION=4.14.2-desktop-1omv -j8; } >> /var/lib/dkms/bbswitch/0.8-5/build/make.log 2>&1
{ 'make' CC=gcc CXX=g++ SYSSRC=/lib/modules/4.14.2-desktop-1omv/build modules -j8; } >> /var/lib/dkms/nvidia-current/384.98-2/build/make.log 2>&1
(bad exit status: 2)
Error! Bad return status for module build on kernel: 4.14.2-desktop-1omv (x86_64)
Consult /var/lib/dkms/bbswitch/0.8-5/build/make.log for more information.
(bad exit status: 2)
Error! Bad return status for module build on kernel: 4.14.2-desktop-1omv (x86_64)
Consult /var/lib/dkms/nvidia-current/384.98-2/build/make.log for more information.

There is nothing that may help in bbswitch_make.log
In your nvidia_make.log i found this plenty of messages:
Arquivo ou diretĂłrio nĂŁo encontrado

maybe you ran out of free memory or disk space ?

Try with kernel 4.14.13

Same problem here.
Only I have a nVidia Quadro FX 4600 wihich use the nVidia340 kernel module.
I know there is a 340.104 version on the nVidia site.

I build my own 340.104 x86-64 rpm from pieces here and there.
And I choose not that the spec file patch the nvidia source-code.
But through the dkms.conf file.

It seem that with the kernel 4.14.2 I have’t the object files.

With the kernel 4.13.12 no problems.
make.log.4.14.2.txt (9.0 KB)

Sorry, I didn’t notice it was not in english. The error messages are

“No such file or directory”

as in Maurice’s make.log below.

Just updated bbswitch and the problem seems to be the same:

Creating symlink /var/lib/dkms/bbswitch/0.8-6/source ->
                 /usr/src/bbswitch-0.8-6

DKMS: add completed.

Kernel preparation unnecessary for this kernel.  Skipping...

Building module:
cleaning build area...
make KERNELRELEASE=4.14.2-desktop-1omv KVERSION=4.14.2-desktop-1omv -j8...(bad exit status: 2)
Error! Bad return status for module build on kernel: 4.14.2-desktop-1omv (x86_64)
Consult /var/lib/dkms/bbswitch/0.8-6/build/make.log for more information.
modprobe: FATAL: Module bbswitch not found in directory /lib/modules/4.14.2-desktop-1omv

Trying to run dkms for nvidia340-340.104 with kernel 4.14.13 testing, the same error as with kernel 4.14.2.
make.log.txt (9.0 KB)

Edit: I’m kind of trying to learn by doing here and bear in mind I don’t have nvidia hardware so I can’t look on my own system for things. Trying to see if I can spot in build logs just what might be wrong. So be patient with me please.

Edit some more: From @MauRice build logs.

   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.";	\

Surely this means something? I don’t know and am trying to learn this but don’t nvidia packages and kernel versions need to match or if they don’t match they need to be patched? See related here.

These are from @adelson.oliveira build logs. Just guessing is something missing or wrong version?

make[2]: *** No rule to make target 'tools/objtool/objtool', needed by '/var/lib/dkms/bbswitch/0.8-5/build/bbswitch.o'.  Pare.
make[1]: *** [Makefile:1503: _module_/var/lib/dkms/bbswitch/0.8-5/build] Error 2

In your nvidia build log obviously there are a lot of missing files are these files in fact missing? Labeled differently?

I’ve looked at

/var/lib/dkms/nvidia-current/384.98-2/build/nvidia-drm/nvidia-drm-drv.o

it doesn’t exist. However,

/var/lib/dkms/nvidia-current/384.98-2/build/nvidia-drm/nvidia-drm-drv.h
/var/lib/dkms/nvidia-current/384.98-2/build/nvidia-drm/nvidia-drm-drv.c

are there, indicating that the compilation/building has failed. Couldn’t find any message on why compilation/building has failed.

1 Like

Well it is Error 1 and Error 2 according to:

make[2]: *** [/var/lib/dkms/nvidia-current/384.98-2/build/nvidia-modeset/nvidia-modeset.Kbuild:73: /var/lib/dkms/nvidia-current/384.98-2/build/nvidia-modeset/nv-modeset-interface.o] Error 1
make[2]: *** [scripts/Makefile.build:560: /var/lib/dkms/nvidia-current/384.98-2/build/nvidia-uvm.o] Error 1
make[2]: *** [scripts/Makefile.build:560: /var/lib/dkms/nvidia-current/384.98-2/build/nvidia-modeset.o] Error 1
make[2]: *** [scripts/Makefile.build:560: /var/lib/dkms/nvidia-current/384.98-2/build/nvidia.o] Error 1
make[1]: *** [Makefile:1503: _module_/var/lib/dkms/nvidia-current/384.98-2/build] Error 2
make[1]: Leaving directory '/usr/src/linux-4.14.2-desktop-1omv'
make: *** [Makefile:81: modules] Error 2

Make always returns one of three error codes, as stated on gnu.org:

0: Exit status is ‘Successful’
2: Make Encountered Errors
1: Return response to -q (question) flag, indicating that targets require updating

if it sounds like I know what I’m talking about, not exactly, I’m a student in this thread and I got the above by reading the log file and Google ing. I’m guessing that Error 1 is the most instructive “Return response to -q (question) flag, indicating that targets require updating”. Which if I’m reading correctly is telling us something is out of date and needs updating. Being as what has changed (AFAIK) is kernel I’m speculating that something regarding the new kernel needs to be changed for modules to make/build. Like a patch?

Edit: The quote (block quote) about build/make Error codes is from here.

I’m building 340.106 driver version, and i hope it will fix your issue.

Ben,

That crap in make.log file you get also when dkms build the kernel module succesful.
That not the point, what matter me, for some mysterious reason it won’t make the object files with kernel 4.14.x.

Ok the problem is caused by kernel ORC feature, which has been enabled in 4.14.x series.

TPG,

How and where you can disable this.
Makefile?
dkms.conf?
An other file?

Because I make mine 340.104 rpm version without patching in the spec file.
But whitin the dkms.conf file, I have the ‘virgin’ 340.104 source-code in /usr/src/nvidia340-340.104-1/
I put the patches in /usr/src/nvidia340-340.104-1/patches/
Il can play with the dkms.conf file which patch file I enable or not.

PACKAGE_NAME=“nvidia340”
PACKAGE_VERSION=“340.104-1”
BUILT_MODULE_NAME[0]=“nvidia”
DEST_MODULE_LOCATION[0]=“/kernel/drivers/char/drm”
DEST_MODULE_NAME[0]=“nvidia340”
#PATCH[0]=“340.104-no-cc-version-check.patch”
PATCH[0]=“340.104-kernel-4.11.patch”
PATCH[1]=“340.104-kernel-4.14.patch”
PATCH[2]=“nvidia-gpl.patch”
BUILT_MODULE_NAME[1]=“nvidia-uvm”
BUILT_MODULE_LOCATION[1]=“uvm/”
DEST_MODULE_LOCATION[1]=“/kernel/drivers/char/drm”
MAKE[0]=“make CC=gcc SYSSRC=${kernel_source_dir} module”
MAKE[0]+=“; make CC=gcc SYSSRC=${kernel_source_dir} -C uvm module KBUILD_EXTMOD=${dkms_tree}/nvidia340/340.104-1/build/uvm”
CLEAN=“make -f Makefile.kbuild clean”
CLEAN+=“; make -C uvm clean”
AUTOINSTALL=“yes”

Mine spec file: nvidia340.spec.txt (40.1 KB)

I am preparing new kernel 4.14.14 which should fix this issue.

Thanks TPG,

Do not bother for the 340.106 version.
The patch files that I have aren’t suitable for the 340.106 version.
Even the ‘virgin’ source-code won’t build succesful.
Have to find suitable patch files for the 340.106 version in order to build succesful.

Please be patient.

Kernel 4.14.14 need gcc with RETPOLINE patches. Our build system is currently occupied, as gcc build needs around 2h and then i need to push kernel-build which takes around 2h to build.
If my local testing would be fine, then over the upcoming weekend these will be available for you to give it a wider testing.

Thanks TPG; this is not an easy one to fix with all the noise around the RETPOLINE patches.

Ok TPG, no problem take your time.
It works fine with kernel 4.13.12

FYI,

For the nVidia340 340.106 version, found one patch (kernel 4.14.3).
https://devtalk.nvidia.com/default/topic/1028812/?comment=5233173

With only this patch in mine dkms.conf file, dkms build succesful the 340.106 kernel module for kernel 4.13.12. For kernel 4.14.2 stil te same error.