Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 707082 - app-emulation/virtualbox-guest-additions-6.1.2 with kernel 5.5.0 - ERROR: "VBoxGuest_RTAssertMsg2Weak" [.../work/VirtualBox-6.1.2/out/linux.amd64/release/bin/additions/src/vboxsf/vboxsf.ko] undefined!
Summary: app-emulation/virtualbox-guest-additions-6.1.2 with kernel 5.5.0 - ERROR: "VB...
Status: RESOLVED OBSOLETE
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Viorel Munteanu
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 705720
  Show dependency tree
 
Reported: 2020-01-29 10:55 UTC by Helmut Jarausch
Modified: 2022-11-11 13:53 UTC (History)
13 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build log xz-compressed (virtualbox-guest-additions-6.1.2.build.xz,88.07 KB, application/x-xz)
2020-01-29 10:57 UTC, Helmut Jarausch
Details
Temp ebuild to make vboxsf and vboxvideo optional (virtualbox-guest-additions-6.1.6-r1.ebuild,5.95 KB, text/plain)
2020-05-02 06:42 UTC, Matthew Turnbull
Details
Updated virtualbox-guest-additions-8.initd to make vboxsf optional (virtualbox-guest-additions-8.initd,611 bytes, text/plain)
2020-05-02 06:43 UTC, Matthew Turnbull
Details
Updated virtualbox-guest-additions.service to make vboxsf optional (virtualbox-guest-additions.service,413 bytes, text/plain)
2020-05-02 06:44 UTC, Matthew Turnbull
Details
Patch for 6.1.6 ebuild that works for me (file_707082.txt,802 bytes, patch)
2020-05-09 22:32 UTC, Alexandra Parker
Details | Diff
vmsvga init script (virtualbox-vmsvga,316 bytes, text/plain)
2020-05-27 21:20 UTC, Matthew Turnbull
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Helmut Jarausch 2020-01-29 10:55:35 UTC
app-emulation/virtualbox-guest-additions-6.1.2 fails to compile with kernel 5.5.0
see build
Comment 1 Helmut Jarausch 2020-01-29 10:57:07 UTC
Created attachment 607320 [details]
build log  xz-compressed
Comment 2 Jack 2020-02-02 18:30:19 UTC
How is this different from https://bugs.gentoo.org/706800 ?   Does the patch there work for this also?
Comment 3 Stefan Beier 2020-02-04 08:59:27 UTC
(In reply to Jack from comment #2)
> How is this different from https://bugs.gentoo.org/706800 ?   Does the patch
> there work for this also?

No, coz these are the modules split from virtualbox-bin. So for the host, not the guest and the patch needs modifications for this as well, if it is working anyway.
Comment 4 Helmut Jarausch 2020-02-04 14:06:23 UTC
(In reply to Jack from comment #2)
> How is this different from https://bugs.gentoo.org/706800 ?   Does the patch
> there work for this also?

Even if those patches are applied (after some adaption) these do not suffice.
Somewhere I have read that Oracle itself says that the guest additions are not ready for the 5.5.x kernel.
Comment 5 Helmut Jarausch 2020-02-21 13:38:56 UTC
It still fails with version 6.1.4
Congratulations to Oracle !!!
Comment 6 Stefan Beier 2020-02-21 13:59:24 UTC
yep still failes with:

make -f ./scripts/Makefile.modpost
  sed 's/ko$/o/' /var/tmp/portage/app-emulation/virtualbox-guest-additions-6.1.4/work/VirtualBox-6.1.4/out/linux.amd64/release/bin/additions/src/vboxsf/modules.order | scripts/mod/modpost -m  -i ./Module.symvers  -o /var/tmp/portage/app-emulation/virtualbox-guest-additions-6.1.4/work/VirtualBox-6.1.4/out/linux.amd64/release/bin/additions/src/vboxsf/Module.symvers    -s -T - 
ERROR: "VBoxGuest_RTAssertMsg2Weak" [/var/tmp/portage/app-emulation/virtualbox-guest-additions-6.1.4/work/VirtualBox-6.1.4/out/linux.amd64/release/bin/additions/src/vboxsf/vboxsf.ko] undefined!
ERROR: "VBoxGuest_RTAssertMsg1Weak" [/var/tmp/portage/app-emulation/virtualbox-guest-additions-6.1.4/work/VirtualBox-6.1.4/out/linux.amd64/release/bin/additions/src/vboxsf/vboxsf.ko] undefined!
ERROR: "VBoxGuest_RTSemMutexDestroy" [/var/tmp/portage/app-emulation/virtualbox-guest-additions-6.1.4/work/VirtualBox-6.1.4/out/linux.amd64/release/bin/additions/src/vboxsf/vboxsf.ko] undefined!
ERROR: "VBoxGuest_RTSemMutexCreate" [/var/tmp/portage/app-emulation/virtualbox-guest-additions-6.1.4/work/VirtualBox-6.1.4/out/linux.amd64/release/bin/additions/src/vboxsf/vboxsf.ko] undefined!
ERROR: "VBoxGuest_RTSemMutexRequest" [/var/tmp/portage/app-emulation/virtualbox-guest-additions-6.1.4/work/VirtualBox-6.1.4/out/linux.amd64/release/bin/additions/src/vboxsf/vboxsf.ko] undefined!
ERROR: "VBoxGuest_RTMemContAlloc" [/var/tmp/portage/app-emulation/virtualbox-guest-additions-6.1.4/work/VirtualBox-6.1.4/out/linux.amd64/release/bin/additions/src/vboxsf/vboxsf.ko] undefined!
ERROR: "VBoxGuest_RTLogLoggerEx" [/var/tmp/portage/app-emulation/virtualbox-guest-additions-6.1.4/work/VirtualBox-6.1.4/out/linux.amd64/release/bin/additions/src/vboxsf/vboxsf.ko] undefined!
ERROR: "VBoxGuest_RTAssertShouldPanic" [/var/tmp/portage/app-emulation/virtualbox-guest-additions-6.1.4/work/VirtualBox-6.1.4/out/linux.amd64/release/bin/additions/src/vboxsf/vboxsf.ko] undefined!
ERROR: "VBoxGuest_rtR0MemObjLinuxVirtToPage" [/var/tmp/portage/app-emulation/virtualbox-guest-additions-6.1.4/work/VirtualBox-6.1.4/out/linux.amd64/release/bin/additions/src/vboxsf/vboxsf.ko] undefined!
ERROR: "VBoxGuest_RTSemMutexRelease" [/var/tmp/portage/app-emulation/virtualbox-guest-additions-6.1.4/work/VirtualBox-6.1.4/out/linux.amd64/release/bin/additions/src/vboxsf/vboxsf.ko] undefined!
ERROR: "VBoxGuest_RTMemContFree" [/var/tmp/portage/app-emulation/virtualbox-guest-additions-6.1.4/work/VirtualBox-6.1.4/out/linux.amd64/release/bin/additions/src/vboxsf/vboxsf.ko] undefined!
ERROR: "VBoxGuest_RTSemFastMutexDestroy" [/var/tmp/portage/app-emulation/virtualbox-guest-additions-6.1.4/work/VirtualBox-6.1.4/out/linux.amd64/release/bin/additions/src/vboxsf/vboxsf.ko] undefined!
ERROR: "VBoxGuest_RTSemFastMutexCreate" [/var/tmp/portage/app-emulation/virtualbox-guest-additions-6.1.4/work/VirtualBox-6.1.4/out/linux.amd64/release/bin/additions/src/vboxsf/vboxsf.ko] undefined!
ERROR: "VBoxGuest_RTErrConvertToErrno" [/var/tmp/portage/app-emulation/virtualbox-guest-additions-6.1.4/work/VirtualBox-6.1.4/out/linux.amd64/release/bin/additions/src/vboxsf/vboxsf.ko] undefined!
ERROR: "VBoxGuest_RTStrCopy" [/var/tmp/portage/app-emulation/virtualbox-guest-additions-6.1.4/work/VirtualBox-6.1.4/out/linux.amd64/release/bin/additions/src/vboxsf/vboxsf.ko] undefined!
ERROR: "VBoxGuest_RTLogRelGetDefaultInstanceEx" [/var/tmp/portage/app-emulation/virtualbox-guest-additions-6.1.4/work/VirtualBox-6.1.4/out/linux.amd64/release/bin/additions/src/vboxsf/vboxsf.ko] undefined!
ERROR: "VBoxGuest_RTStrNLen" [/var/tmp/portage/app-emulation/virtualbox-guest-additions-6.1.4/work/VirtualBox-6.1.4/out/linux.amd64/release/bin/additions/src/vboxsf/vboxsf.ko] undefined!
ERROR: "VBoxGuest_RTSemFastMutexRelease" [/var/tmp/portage/app-emulation/virtualbox-guest-additions-6.1.4/work/VirtualBox-6.1.4/out/linux.amd64/release/bin/additions/src/vboxsf/vboxsf.ko] undefined!
ERROR: "VBoxGuest_RTSemFastMutexRequest" [/var/tmp/portage/app-emulation/virtualbox-guest-additions-6.1.4/work/VirtualBox-6.1.4/out/linux.amd64/release/bin/additions/src/vboxsf/vboxsf.ko] undefined!
ERROR: "VBoxGuestIDC" [/var/tmp/portage/app-emulation/virtualbox-guest-additions-6.1.4/work/VirtualBox-6.1.4/out/linux.amd64/release/bin/additions/src/vboxsf/vboxsf.ko] undefined!
ERROR: "VBoxGuest_RTLogBackdoorPrintf" [/var/tmp/portage/app-emulation/virtualbox-guest-additions-6.1.4/work/VirtualBox-6.1.4/out/linux.amd64/release/bin/additions/src/vboxsf/vboxsf.ko] undefined!
make[2]: *** [scripts/Makefile.modpost:94: __modpost] Error 1
make[1]: *** [Makefile:1606: modules] Error 2
make[1]: Leaving directory '/usr/src/linux-5.5.4-gentoo'
make: *** [/var/tmp/portage/app-emulation/virtualbox-guest-additions-6.1.4/work/VirtualBox-6.1.4/out/linux.amd64/release/bin/additions/src/vboxsf/Makefile-footer.gmk:114: vboxsf] Error 2
 * ERROR: app-emulation/virtualbox-guest-additions-6.1.4::gentoo failed (compile phase):
 *   emake failed
 * 
 * If you need support, post the output of `emerge --info '=app-emulation/virtualbox-guest-additions-6.1.4::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=app-emulation/virtualbox-guest-additions-6.1.4::gentoo'`.
 * The complete build log is located at '/var/tmp/portage/app-emulation/virtualbox-guest-additions-6.1.4/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/app-emulation/virtualbox-guest-additions-6.1.4/temp/environment'.
 * Working directory: '/var/tmp/portage/app-emulation/virtualbox-guest-additions-6.1.4/work/VirtualBox-6.1.4/out/linux.amd64/release/bin/additions/src/vboxsf'
 * S: '/var/tmp/portage/app-emulation/virtualbox-guest-additions-6.1.4/work/VirtualBox-6.1.4'
Comment 7 Alex Buell 2020-02-22 21:33:56 UTC
Likewise here :-(
Comment 8 Helmut Jarausch 2020-02-26 14:20:32 UTC
Still the same with version 6.1.4-r1
Comment 9 Alex Buell 2020-03-24 11:13:08 UTC
I can confirm the issue is still present with 6.1.4-r1. :-(
Comment 10 Alex Buell 2020-03-24 11:13:52 UTC
Builds just fine with kernel 5.4.0, fails on kernel 5.5.0
Comment 11 Yuri Sevatz 2020-04-15 19:35:40 UTC
Virtualbox 6.1.6 has just been released.

https://www.virtualbox.org/wiki/Changelog

Notably-
Linux host and guest: Support Linux kernel 5.6 (bug #19312).

I'll try it later with 5.6 when i get a chance.
Comment 12 Alex Buell 2020-04-18 17:54:45 UTC
6.1.6 has just arrived in the portage tree, but virtual-guest-additions still does not build. Same set of errors as the previous :-(

RROR: "VBoxGuest_RTAssertMsg2Weak" [/var/tmp/portage/app-emulation/virtualbox-guest-additions-6.1.6/work/VirtualBox-6.1.6/out/linux.amd64/release/bin/additions/src/vboxsf/vboxsf.ko] undefined!
ERROR: "VBoxGuest_RTAssertMsg1Weak" [/var/tmp/portage/app-emulation/virtualbox-guest-additions-6.1.6/work/VirtualBox-6.1.6/out/linux.amd64/release/bin/additions/src/vboxsf/vboxsf.ko] undefined!
ERROR: "VBoxGuest_RTSemMutexDestroy" [/var/tmp/portage/app-emulation/virtualbox-guest-additions-6.1.6/work/VirtualBox-6.1.6/out/linux.amd64/release/bin/additions/src/vboxsf/vboxsf.ko] undefined!
ERROR: "VBoxGuest_RTSemMutexCreate" [/var/tmp/portage/app-emulation/virtualbox-guest-additions-6.1.6/work/VirtualBox-6.1.6/out/linux.amd64/release/bin/additions/src/vboxsf/vboxsf.ko] undefined!
ERROR: "VBoxGuest_RTSemMutexRequest" [/var/tmp/portage/app-emulation/virtualbox-guest-additions-6.1.6/work/VirtualBox-6.1.6/out/linux.amd64/release/bin/additions/src/vboxsf/vboxsf.ko] undefined!
ERROR: "VBoxGuest_RTMemContAlloc" [/var/tmp/portage/app-emulation/virtualbox-guest-additions-6.1.6/work/VirtualBox-6.1.6/out/linux.amd64/release/bin/additions/src/vboxsf/vboxsf.ko] undefined!
ERROR: "VBoxGuest_RTLogLoggerEx" [/var/tmp/portage/app-emulation/virtualbox-guest-additions-6.1.6/work/VirtualBox-6.1.6/out/linux.amd64/release/bin/additions/src/vboxsf/vboxsf.ko] undefined!
ERROR: "VBoxGuest_RTAssertShouldPanic" [/var/tmp/portage/app-emulation/virtualbox-guest-additions-6.1.6/work/VirtualBox-6.1.6/out/linux.amd64/release/bin/additions/src/vboxsf/vboxsf.ko] undefined!
ERROR: "VBoxGuest_rtR0MemObjLinuxVirtToPage" [/var/tmp/portage/app-emulation/virtualbox-guest-additions-6.1.6/work/VirtualBox-6.1.6/out/linux.amd64/release/bin/additions/src/vboxsf/vboxsf.ko] undefined!
ERROR: "VBoxGuest_RTSemMutexRelease" [/var/tmp/portage/app-emulation/virtualbox-guest-additions-6.1.6/work/VirtualBox-6.1.6/out/linux.amd64/release/bin/additions/src/vboxsf/vboxsf.ko] undefined!
ERROR: "VBoxGuest_RTMemContFree" [/var/tmp/portage/app-emulation/virtualbox-guest-additions-6.1.6/work/VirtualBox-6.1.6/out/linux.amd64/release/bin/additions/src/vboxsf/vboxsf.ko] undefined!
ERROR: "VBoxGuest_RTSemFastMutexDestroy" [/var/tmp/portage/app-emulation/virtualbox-guest-additions-6.1.6/work/VirtualBox-6.1.6/out/linux.amd64/release/bin/additions/src/vboxsf/vboxsf.ko] undefined!
ERROR: "VBoxGuest_RTSemFastMutexCreate" [/var/tmp/portage/app-emulation/virtualbox-guest-additions-6.1.6/work/VirtualBox-6.1.6/out/linux.amd64/release/bin/additions/src/vboxsf/vboxsf.ko] undefined!
ERROR: "VBoxGuest_RTErrConvertToErrno" [/var/tmp/portage/app-emulation/virtualbox-guest-additions-6.1.6/work/VirtualBox-6.1.6/out/linux.amd64/release/bin/additions/src/vboxsf/vboxsf.ko] undefined!
ERROR: "VBoxGuest_RTStrCopy" [/var/tmp/portage/app-emulation/virtualbox-guest-additions-6.1.6/work/VirtualBox-6.1.6/out/linux.amd64/release/bin/additions/src/vboxsf/vboxsf.ko] undefined!
ERROR: "VBoxGuest_RTLogRelGetDefaultInstanceEx" [/var/tmp/portage/app-emulation/virtualbox-guest-additions-6.1.6/work/VirtualBox-6.1.6/out/linux.amd64/release/bin/additions/src/vboxsf/vboxsf.ko] undefined!
ERROR: "VBoxGuest_RTStrNLen" [/var/tmp/portage/app-emulation/virtualbox-guest-additions-6.1.6/work/VirtualBox-6.1.6/out/linux.amd64/release/bin/additions/src/vboxsf/vboxsf.ko] undefined!
ERROR: "VBoxGuest_RTSemFastMutexRelease" [/var/tmp/portage/app-emulation/virtualbox-guest-additions-6.1.6/work/VirtualBox-6.1.6/out/linux.amd64/release/bin/additions/src/vboxsf/vboxsf.ko] undefined!
ERROR: "VBoxGuest_RTSemFastMutexRequest" [/var/tmp/portage/app-emulation/virtualbox-guest-additions-6.1.6/work/VirtualBox-6.1.6/out/linux.amd64/release/bin/additions/src/vboxsf/vboxsf.ko] undefined!
ERROR: "VBoxGuestIDC" [/var/tmp/portage/app-emulation/virtualbox-guest-additions-6.1.6/work/VirtualBox-6.1.6/out/linux.amd64/release/bin/additions/src/vboxsf/vboxsf.ko] undefined!
ERROR: "VBoxGuest_RTLogBackdoorPrintf" [/var/tmp/portage/app-emulation/virtualbox-guest-additions-6.1.6/work/VirtualBox-6.1.6/out/linux.amd64/release/bin/additions/src/vboxsf/vboxsf.ko] undefined!
make[2]: *** [scripts/Makefile.modpost:93: __modpost] Error 1
Comment 13 Helmut Jarausch 2020-04-19 13:26:37 UTC
Sorry to say

ME TOO
Comment 14 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2020-04-19 16:05:45 UTC
Sorry to cause so much trouble. This package requires some overhaul which I simply didn't have the time yet to take care of. It's not only the vboxsf module that fails, the vboxovideo kernel module built by this package fails to load properly as well. Upstream told me that this can be mitigated by using the in-kernel vboxvideo module but this requires quite new kernel versions and still doesn't help with fixing the vboxsf module...
Comment 15 Alex Buell 2020-04-21 22:18:06 UTC
(In reply to Lars Wendler (Polynomial-C) from comment #14)
> Sorry to cause so much trouble. This package requires some overhaul which I
[ snip ]
> versions and still doesn't help with fixing the vboxsf module...

Everything works perfectly up to 5.4.0,so we can start with that. vboxvideo was brought into the kernel around that time so for kernels >= 5.4.0 we just check to see if the kernel config has it defined. I guess that will sort the issue for vboxvideo. vboxsf isn't linking as it needs symbols that it can't get at.
Comment 16 Matthew Turnbull 2020-05-02 06:42:02 UTC
Created attachment 635584 [details]
Temp ebuild to make vboxsf and vboxvideo optional

This is a super hacky ebuild I put together that makes vboxsf (broken) and vboxvideo (built-in to recent kernels, and replaced by vmwgfx in 6.1) optional.
Comment 17 Matthew Turnbull 2020-05-02 06:43:39 UTC
Created attachment 635586 [details]
Updated virtualbox-guest-additions-8.initd to make vboxsf optional
Comment 18 Matthew Turnbull 2020-05-02 06:44:30 UTC
Created attachment 635588 [details]
Updated virtualbox-guest-additions.service to make vboxsf optional
Comment 19 Helmut Jarausch 2020-05-03 14:17:20 UTC
(In reply to Matthew Turnbull from comment #18)
> Created attachment 635588 [details]
> Updated virtualbox-guest-additions.service to make vboxsf optional

Many thanks!

It works just fine with kernel 5.6.9 and Windows 10 guest.
Comment 20 Alexandra Parker 2020-05-09 20:21:42 UTC
I can build vboxsf from the src directory by saying 'make vboxsf'. It compiles and links fine. But if I enter src/vboxsf and try using the same 'make' command that src/Makefile uses, if fails with the undefined symbols errors. I'm trying to figure out what the difference is. linux-mod.eclass enters each module directory individually, so I'm guessing that's expected to work, but something about the Makefile structure here is weird.
Comment 21 Alexandra Parker 2020-05-09 22:14:50 UTC
The Makefile actually runs this command:

make
  KBUILD_EXTRA_SYMBOLS=/var/tmp/portage/app-emulation/virtualbox-guest-additions-6.1.6/work/VirtualBox-6.1.6/out/linux.amd64/release/bin/additions/src/vboxsf/Module.symvers

linux-mod.eclass runs this command:

make \
  V=1 \
  CONFIG_MODULE_SIG= \
  CONFIG_MODULE_SIG_ALL= \
  -C /lib/modules/5.6.11-gentoo/build \
  M=/var/tmp/portage/app-emulation/virtualbox-guest-additions-6.1.6/work/VirtualBox-6.1.6/out/linux.amd64/release/bin/additions/src/vboxsf \
  SRCROOT=/var/tmp/portage/app-emulation/virtualbox-guest-additions-6.1.6/work/VirtualBox-6.1.6/out/linux.amd64/release/bin/additions/src/vboxsf \
  -j6 \
  modules

If I add the KBUILD_EXTRA_SYMBOLS variable to the make invocation, vboxsf builds successfully.

The Makefile does some work to copy around the Module.symvers file; that's why KBUILD_EXTRA_SYMBOLS points to src/vboxsf/Module.symvers. It really comes from src/vboxguest/Module.symvers though. I'm going to try tweaking the ebuild to pass KBUILD_EXTRA_SYMBOLS and point it at src/vboxguest/Module.symvers. I'm struggling to comprehend how the eclass works though lol.
Comment 22 Alexandra Parker 2020-05-09 22:32:24 UTC
Created attachment 637204 [details, diff]
Patch for 6.1.6 ebuild that works for me

I noticed the eclass wants symbols in ${S}/Module.symvers (and even touches that path to ensure the file is present before the first module is built), and I indeed found the symbols there, so I decided to add KBUILD_EXTRA_SYMBOLS=${S}/Module.symvers to the BUILD_PARAMS and it builds fine. I don't know why ${S}/Module.symvers isn't being picked up automatically, build this ebuild works for me. I would love an explanation by someone more knowledgeable about the kernel module building conventions.
Comment 23 Alexandra Parker 2020-05-09 22:33:31 UTC
(In reply to Alex Parker from comment #22)
> Created attachment 637204 [details, diff] [details, diff]
> Patch for 6.1.6 ebuild that works for me
> 
> I noticed the eclass wants symbols in ${S}/Module.symvers (and even touches
> that path to ensure the file is present before the first module is built),
> and I indeed found the symbols there, so I decided to add
> KBUILD_EXTRA_SYMBOLS=${S}/Module.symvers to the BUILD_PARAMS and it builds
> fine. I don't know why ${S}/Module.symvers isn't being picked up
> automatically, build this ebuild works for me. I would love an explanation
> by someone more knowledgeable about the kernel module building conventions.

*but this ebuild works for me, oops
Comment 24 Raimund 2020-05-27 12:23:13 UTC
Hi Alex,

thank you so much for your patch, it also works for me!
Did someone try to use the kernel module for vboxsf? Since kernel 5.6 the guest-additions are supposed to be unnecessary.
Comment 25 Alexandra Parker 2020-05-27 17:06:59 UTC
(In reply to Raimund from comment #24)
> Hi Alex,
> 
> thank you so much for your patch, it also works for me!
> Did someone try to use the kernel module for vboxsf? Since kernel 5.6 the
> guest-additions are supposed to be unnecessary.

I'll give that a shot in my home distcc cluster after work and report back!
Comment 26 Michal G 2020-05-27 18:17:03 UTC
Writing this from inside a VM, I can certainly confirm that Alex patch makes the vbox guest additions work as well with kernel 5.6 as they did with kernels <=5.4. :)

I've also already tried the 5.6 in-tree modules about a month ago, but had troubles with guest display auto-resize, which is a must have for me. I'm using the VMSVGA adapter with "3D acceleration" enabled (with in-tree vmwgfx module), and autoresize kinda works(*) when using vboxguest from virtualbox-guest-additions, but when switching to in-tree vboxguest module, the hypervisor shows guest has no support for autoresize and it's game over.
I've tested the older VboxSVGA graphics adapter (using in-tree vboxvideo driver and in-tree vboxguest) - autoresize kinda worked, but I found that performance is inferior to the VMSVGA adapter. Maybe because the "3D acceleration" is not supported for Linux guests using VBoxSVGA... But the overall sluggishness made me go back to the VMSVGA with out-of-tree vboxguest module.

(*) with some extra hacks like running "VBoxClient --vmsvga" as root from /etc/local.d/ (before X11 starts) and having to turn the autoresize off and on again in the hypervisor "View" menu before it starts working properly.


And by the way, Virtualbox 6.1.8 is out. Its guest additions seems to contain some fixes for display auto-resize... I'll try them in a few days.
Comment 27 Matthew Turnbull 2020-05-27 21:14:49 UTC
With linux 5.6 and the in-tree drivers, I presume you still need to have virtualbox-guest-additions installed for the userspace utilities - but you wouldn't need to build/install the kernel modules (which is why I made vboxsf and vboxvideo optional in my ebuild).

I've been using VMSVGA since virtualbox 6.0, and to get resizing to work, I run

VBoxClient --foreground --vmsvga

as root from an init script. It would probably be good to actually package an init script for that, or integrate it into the existing one. 

I'm honestly not sure if there is a difference or preference between "--vmsvga" and "--vmsvga-x11" but the former seems to work when run as root. And "--vmsvga-x11" looks like it's broken 6.1.8 (maybe earlier versions too) and resizing is working without it.
Comment 28 Matthew Turnbull 2020-05-27 21:20:16 UTC
Created attachment 642116 [details]
vmsvga init script

An RC init script for running VBoxClient --foreground --vmsvga.

I don't use systemd, so I didn't make an attempt at making a corresponding service file.
Comment 29 Michal G 2020-06-02 17:45:46 UTC
(In reply to Matthew Turnbull from comment #27)
> With linux 5.6 and the in-tree drivers, I presume you still need to have
> virtualbox-guest-additions installed for the userspace utilities - but you
> wouldn't need to build/install the kernel modules (which is why I made
> vboxsf and vboxvideo optional in my ebuild).
You're correct, userspace utilities are still required. But the in-tree vboxsf requires in-tree vboxguest and refuses to load with external one from the additions package (complains about unresolved symbols). So, the vboxguest would also have to be optional, or else making the vboxsf optional is not very useful...

 
> I've been using VMSVGA since virtualbox 6.0, and to get resizing to work, I
> run
> 
> VBoxClient --foreground --vmsvga
> 
> as root from an init script. It would probably be good to actually package
> an init script for that, or integrate it into the existing one. 
Exactly like I had to. It's even already reported in bug 705832 - I hadn't noticed it earlier...


> I'm honestly not sure if there is a difference or preference between
> "--vmsvga" and "--vmsvga-x11" but the former seems to work when run as root.
> And "--vmsvga-x11" looks like it's broken 6.1.8 (maybe earlier versions too)
> and resizing is working without it.
I just tried VBox Additions v6.1.8 (not yet available in portage; take plain 6.1.6 from portage, apply Alex Parker patch from attachment 637204 [details, diff], save as 6.1.8) + VBox 6.1.8 on a Win10 host and my experience is exactly opposite - autoresize finally started working as expected. It was broken in 6.1.6, and maybe one or a few older versions.
And in 6.1.8 it works for me even *without* the "VBoxClient --vmsvga as root" hack. Seems like "--vmsvga-x11 as user" is sufficient to make it work. (I'm using KDE on X11 if that matters.)

However, using VMSVGA graphics adapter it works only with the out-of-tree vboxguest module. Trying to use the in-tree one makes VBoxClient fail with "operation not supported" errors, and the "autoresize" is grayed out and impossible to use. I guess the in-kernel drivers are way into the future, but as of kernel 5.6 we're not there yet, and the external modules are more feature complete now.
Comment 30 Larry the Git Cow gentoo-dev 2020-06-13 21:06:34 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ab5b46fcf3d20f30ff6cff94cabfa9c32142014b

commit ab5b46fcf3d20f30ff6cff94cabfa9c32142014b
Author:     Lars Wendler <polynomial-c@gentoo.org>
AuthorDate: 2020-06-13 21:06:11 +0000
Commit:     Lars Wendler <polynomial-c@gentoo.org>
CommitDate: 2020-06-13 21:06:24 +0000

    virtualbox packages: Bump to versions 5.2.42, 6.0.22 and 6.1.10
    
    Bug: https://bugs.gentoo.org/707082
    Closes: https://bugs.gentoo.org/726340
    Closes: https://bugs.gentoo.org/727292
    Package-Manager: Portage-2.3.100, Repoman-2.3.22
    Signed-off-by: Lars Wendler <polynomial-c@gentoo.org>

 app-emulation/virtualbox-additions/Manifest        |   3 +
 .../virtualbox-additions-5.2.42.ebuild             |  33 ++
 .../virtualbox-additions-6.0.22.ebuild             |  34 ++
 .../virtualbox-additions-6.1.10.ebuild             |  34 ++
 app-emulation/virtualbox-bin/Manifest              |  10 +
 .../virtualbox-bin-5.2.42.137960.ebuild            | 287 ++++++++++++
 .../virtualbox-bin-6.0.22.137980.ebuild            | 292 ++++++++++++
 .../virtualbox-bin-6.1.10.138449.ebuild            | 292 ++++++++++++
 app-emulation/virtualbox-extpack-oracle/Manifest   |   3 +
 .../virtualbox-extpack-oracle-5.2.42.137960.ebuild |  42 ++
 .../virtualbox-extpack-oracle-6.0.22.137980.ebuild |  43 ++
 .../virtualbox-extpack-oracle-6.1.10.138449.ebuild |  43 ++
 app-emulation/virtualbox-guest-additions/Manifest  |   5 +
 .../virtualbox-guest-additions-5.2.42.ebuild       | 232 ++++++++++
 .../virtualbox-guest-additions-6.0.22.ebuild       | 219 +++++++++
 .../virtualbox-guest-additions-6.1.10.ebuild       | 218 +++++++++
 app-emulation/virtualbox-modules/Manifest          |   3 +
 .../virtualbox-modules-5.2.42.ebuild               |  59 +++
 .../virtualbox-modules-6.0.22.ebuild               |  55 +++
 .../virtualbox-modules-6.1.10.ebuild               |  55 +++
 app-emulation/virtualbox/Manifest                  |   7 +-
 app-emulation/virtualbox/virtualbox-5.2.42.ebuild  | 493 ++++++++++++++++++++
 app-emulation/virtualbox/virtualbox-6.0.22.ebuild  | 507 +++++++++++++++++++++
 app-emulation/virtualbox/virtualbox-6.1.10.ebuild  | 505 ++++++++++++++++++++
 app-emulation/virtualbox/virtualbox-6.1.6.ebuild   |   2 +-
 25 files changed, 3474 insertions(+), 2 deletions(-)
Comment 31 Xavier Rival 2020-07-28 15:01:37 UTC
I am also impacted with this issue.

Kernel 5.4.48 and virtualbox 6.0.22.
Comment 32 Morton Pellung 2020-08-18 20:06:40 UTC
I guess this is the correct bug - guest additions still don't work?

I have
5.4.57/misc/vboxnetflt.ko
5.4.57/misc/vboxdrv.ko
5.4.57/misc/vboxnetadp.ko
5.4.57/kernel/drivers/virt/vboxguest/vboxguest.ko.xz
5.4.57/kernel/drivers/gpu/drm/vboxvideo/vboxvideo.ko.xz
...the *.ko.xz provided by kernel, the *.ko provided by virtualbox-modules

successfully installed are
virtualbox-6.1.12a
virtualbox-modules-6.1.12-r1

now trying to install virtualbox-guest-additions-6.1.12a-r1:

1) depends on x11-drivers/xf86-video-vboxvideo-1.0.0 - but this is not needed as it is already provided by kernel? Ok, don't install that package.

2) trys to build vboxvideo and fails with:
ERROR: "drm_gem_prime_export" [/var/tmp/portage/app-emulation/virtualbox-guest-additions-6.1.12a-r1/work/VirtualBox-6.1.12/out/linux.amd64/release/bin/additions/src/vboxvideo/vboxvideo.ko               ] undefined!
...and an endless stream of more drm_* stuff missing

3) does not even get to vboxsf?

Please advice... :-/
Comment 33 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2020-08-21 10:13:11 UTC
(This happens with every new kernel release. Not a blocker for stabilisation.)
Comment 34 Morton Pellung 2020-08-21 12:44:42 UTC
(In reply to Sam James from comment #33)
> (This happens with every new kernel release. Not a blocker for
> stabilisation.)

I'm not quite sure what you mean by "this", but yes virtualbox support of new kernels usually lag a bit, but in my example kernel 5.7 is supported since 6.1.10 (accroding to vbox changelog) and this is 6.1.12?
Comment 35 Viorel Munteanu gentoo-dev 2022-08-19 06:25:46 UTC
Does this bug still happen with current versions of virtualbox and kernel?
Comment 36 Michal G 2022-08-22 18:40:42 UTC
Nowadays I'm using virtualbox-guest-additions 6.1.36 with kernel 5.18 - compiles without problems. Haven't tried kernel 5.19 yet. I don't know how about stable versions.

I guess this bug can be closed, now or in near future.