graphics driver module fails CENTOS 9 (5.14.0-350)

Discussions about using Linux guests in VirtualBox.
Post Reply
dragonlavande
Posts: 4
Joined: 8. Aug 2023, 11:35

graphics driver module fails CENTOS 9 (5.14.0-350)

Post by dragonlavande »

Hi,

I have a Centos 9 VM as guest with the Kernel 5.14.0-350 el9 x86_64.
The graphics driver module fails to compile with an error drm/ttm/ttm_bo_api.h missing.

I had installed kernel headers.

I tried with 7.0.10 (error) and 7.0.11-158681 (error)

Thank you for your help

Kind regards,
VBoxAdd-Setup.zip
(1.91 KiB) Downloaded 25 times
scottgus1
Site Moderator
Posts: 20945
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: graphics driver module fails CENTOS 9 (5.14.0-350)

Post by scottgus1 »

I deduce that you are trying to install Guest Additions in the VM.

Guest Additions have prerequisites in Linux, same as Virtualbox on the host, see https://www.virtualbox.org/manual/ch04. ... ions-linux and https://www.virtualbox.org/manual/ch02. ... nux-prereq
Also, watch the terminal installation report when running the GAs installer. Error messages will show if the install ran into a problem.
dragonlavande
Posts: 4
Joined: 8. Aug 2023, 11:35

Re: graphics driver module fails CENTOS 9 (5.14.0-350)

Post by dragonlavande »

Hi, Thank you.

All pre-requisite are OK:

[root@FRVA00001 VBox_GAs_7.0.11]# ./VBoxLinuxAdditions.run
Verifying archive integrity... 100% MD5 checksums are OK. All good.
Uncompressing VirtualBox 7.0.11 Guest Additions for Linux 100%
VirtualBox Guest Additions installer
Copying additional installer modules ...
Installing additional modules ...
VirtualBox Guest Additions: Starting.
VirtualBox Guest Additions: Setting up modules
VirtualBox Guest Additions: Building the VirtualBox Guest Additions kernel
modules. This may take a while.
VirtualBox Guest Additions: To build modules for other installed kernels, run
VirtualBox Guest Additions: /sbin/rcvboxadd quicksetup <version>
VirtualBox Guest Additions: or
VirtualBox Guest Additions: /sbin/rcvboxadd quicksetup all
VirtualBox Guest Additions: Building the modules for kernel
5.14.0-350.el9.x86_64.

VirtualBox Guest Additions: Look at /var/log/vboxadd-setup.log to find out what
went wrong
[root@FRVA00001 VBox_GAs_7.0.11]#


Building the main Guest Additions 7.0.11 module for kernel 5.14.0-350.el9.x86_64.
Building the shared folder support module.
Building the graphics driver module.
Error building the module. Build output follows.
make V=1 CONFIG_MODULE_SIG= CONFIG_MODULE_SIG_ALL= -C /lib/modules/5.14.0-350.el9.x86_64/build M=/tmp/vbox.0 SRCROOT=/tmp/vbox.0 -j1 modules
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)
make -f ./scripts/Makefile.build obj=/tmp/vbox.0 \
single-build= \
need-builtin=1 need-modorder=1
printf '%s\n' hgsmi_base.o modesetting.o vbox_drv.o vbox_fb.o vbox_irq.o vbox_main.o vbox_mode.o vbox_ttm.o vbva_base.o vbox_prime.o vbox_hgsmi.o | awk '!x[$0]++ { print("/tmp/vbox.0/"$0) }' > /tmp/vbox.0/vboxvideo.mod
gcc -Wp,-MMD,/tmp/vbox.0/.hgsmi_base.o.d -nostdinc -I./arch/x86/include -I./arch/x86/include/generated -I./include -I./arch/x86/include/uapi -I./arch/x86/include/generated/uapi -I./include/uapi -I./include/generated/uapi -include ./include/linux/compiler-version.h -include ./include/linux/kconfig.h -include ./include/linux/compiler_types.h -D__KERNEL__ -fmacro-prefix-map=./= -Wall -Wundef -Werror=strict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -fshort-wchar -fno-PIE -Werror=implicit-function-declaration -Werror=implicit-int -Werror=return-type -Wno-format-security -std=gnu11 -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -mno-avx -fcf-protection=none -m64 -falign-jumps=1 -falign-loops=1 -mno-80387 -mno-fp-ret-in-387 -mpreferred-stack-boundary=3 -mskip-rax-setup -mtune=generic -mno-red-zone -mcmodel=kernel -Wno-sign-compare -fno-asynchronous-unwind-tables -mindirect-branch=thunk-extern -mindirect-branch-register -mindirect-branch-cs-prefix -mfunction-return=thunk-extern -fno-jump-tables -mharden-sls=all -fpatchable-function-entry=16,16 -fno-delete-null-pointer-checks -Wno-frame-address -Wno-format-truncation -Wno-format-overflow -Wno-address-of-packed-member -O2 -fno-allow-store-data-races -Wframe-larger-than=2048 -fstack-protector-strong -Wno-array-bounds "-Wimplicit-fallthrough=5" -Wno-main -Wno-unused-but-set-variable -Wno-unused-const-variable -fno-stack-clash-protection -g -pg -mrecord-mcount -mfentry -DCC_USING_FENTRY -fno-inline-functions-called-once -falign-functions=16 -Wdeclaration-after-statement -Wvla -Wno-pointer-sign -Wcast-function-type -Wno-stringop-truncation -Wno-stringop-overflow -Wno-restrict -Wno-maybe-uninitialized -Wno-alloc-size-larger-than -fno-strict-overflow -fno-stack-check -fconserve-stack -Werror=date-time -Werror=incompatible-pointer-types -Werror=designated-init -Wno-packed-not-aligned -I./include -I/tmp/vbox.0/ -I./include/drm -D__KERNEL__ -DMODULE -DRT_WITHOUT_PRAGMA_ONCE -DRT_ARCH_AMD64 -DMODULE -DKBUILD_BASENAME='"hgsmi_base"' -DKBUILD_MODNAME='"vboxvideo"' -D__KBUILD_MODNAME=kmod_vboxvideo -c -o /tmp/vbox.0/hgsmi_base.o /tmp/vbox.0/hgsmi_base.c ; ./tools/objtool/objtool --hacks=jump_label --hacks=noinstr --hacks=skylake --orc --retpoline --rethunk --sls --static-call --uaccess --module --prefix=16 /tmp/vbox.0/hgsmi_base.o

Dans le fichier inclus depuis /tmp/vbox.0/hgsmi_base.c:27:
/tmp/vbox.0/vbox_drv.h:174:11: erreur fatale: drm/ttm/ttm_bo_api.h : Aucun fichier ou dossier de ce type
174 | # include <drm/ttm/ttm_bo_api.h>
| ^~~~~~~~~~~~~~~~~~~~~~
compilation terminée.
make[2]: *** [scripts/Makefile.build:299 : /tmp/vbox.0/hgsmi_base.o] Erreur 1
make[1]: *** [Makefile:1928: /tmp/vbox.0] Error 2
make: *** [/tmp/vbox.0/Makefile-footer.gmk:133: vboxvideo] Error 2

it seems is it an incompatiblity with my kernel

Thank you very much
scottgus1
Site Moderator
Posts: 20945
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: graphics driver module fails CENTOS 9 (5.14.0-350)

Post by scottgus1 »

I see that the build output shows there was an error. Could you please point out what the error is?

I'm no Linux guru but I'm willing to learn it.
dragonlavande
Posts: 4
Joined: 8. Aug 2023, 11:35

Re: graphics driver module fails CENTOS 9 (5.14.0-350)

Post by dragonlavande »

Hi,

In the log, i see two errors:

The first:
----------
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 ; \

and the second:
------------------
/tmp/vbox.0/vbox_drv.h:174:11: erreur fatale: drm/ttm/ttm_bo_api.h : Aucun fichier ou dossier de ce type

this include file (drm/ttm/ttm_bo_api.h) is missing.

I'm not able to go deeper in the analyze.

Kind regards for the help.
scottgus1
Site Moderator
Posts: 20945
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: graphics driver module fails CENTOS 9 (5.14.0-350)

Post by scottgus1 »

Thanks for the explanation.

The first echo-y error apparently is not an error, rather it's a batch file segment that gets run if that error happens. I got led aside by seeing this, several times, but a forum Linux guru informed me it could be ignored.

The second could be a bug in the GAs, it has happened before.

Let's confirm a couple things:

1.
dragonlavande wrote: 9. Aug 2023, 18:36 All pre-requisite are OK:
What exactly did you do to confirm this? What exact commands did you run?

2.
Start the VM from full normal shutdown, not save-state. Run until you see the problem happen, then shut down the VM from within the VM's OS if possible. If not possible, close the Virtualbox window for the VM with the Power Off option set.

Right-click the VM in the main Virtualbox window's VM list, choose Show in Explorer/Finder/File Manager. In the "Logs" subfolder, zip the VM's "vbox.log", and post the zip file, using the forum's Attachments tab. (Configure your host OS to show all extensions so you can find the "vbox.log", not "vbox.log.1", etc.)
fth0
Volunteer
Posts: 5678
Joined: 14. Feb 2019, 03:06
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Linux, Windows 10, ...
Location: Germany

Re: graphics driver module fails CENTOS 9 (5.14.0-350)

Post by fth0 »

FWIW, I think the "first error" is not an error, but only the commands to output an error message in case that the test condition in the line above those lines fails.

The real error is the second one, but I don't know under which conditions the missing file is available or not.
dragonlavande
Posts: 4
Joined: 8. Aug 2023, 11:35

Re: graphics driver module fails CENTOS 9 (5.14.0-350)

Post by dragonlavande »

Hi,

I downloaded Guest 158810 from test build and now is OK.
I updated the kernel also 5.14.0-352.el9.x86_64

Thank you for your help.

Kind regards,
:D
Post Reply