VirtualBox introduced a new graphics card for guests to use (VMSVGA, using the VMware driver in the guest OS) and deprecated the older solution (VBoxVGA and VBoxSVGA) with version 6.1.0.
However, using the new driver in my Gentoo guest makes the "automatic resizing" fail. After some debugging (see in their forum at https://forums.virtualbox.org/viewtopic.php?f=3&t=96361 and Gentoo Forum at https://forums.gentoo.org/viewtopic-p-8408964.html) revealed in their source code, that the "VBoxClient --vmsvga" user-space daemon should run as root. For this to work on Gentoo Linux, the init scripts / XDG autostart files need to be changed.
Steps to Reproduce:
1. Install Gentoo Linux in a VirtualBox 6.1.0 VM with VMSVGA graphics card configured
2. Run X server
3. Resize the guest window size
Resolution of guest OS is not automatically adjusted
Resolution of guest OS is automatically adjusted
thanks for your work!
Where do you run the proposed script? I've the same problem and wanna use it.
Do you add the script in init.d?
(In reply to Vyacheslav from comment #1)
> Where do you run the proposed script? I've the same problem and wanna use it.
> Do you add the script in init.d?
Thanks Vyachselav. Me as an OpenRC-user created a *.start-script inside /etc/local.d: https://wiki.gentoo.org/wiki//etc/local.d
(In reply to jannis from comment #2)
> Thanks Vyachselav. Me as an OpenRC-user created a *.start-script inside
> /etc/local.d: https://wiki.gentoo.org/wiki//etc/local.d
Thx! And second question. Do you have bidirectional clipboard in VB 6.1? I can't do it for Gentoo guest on Gentoo host. Fortunately, shared directories work.
After upgrade virtualbox-guest-additions from 6.1.4 to 6.1.6 I can use bidirectional clipboard. But for resize, I should turn off and turn on it by hands in menu :) In 6.1.4, your script worked very good without additional manipulation.
/Copying relevant info from bug 707082, comment 29/
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] from bug 707082 to make it compile with kernel 5.6, save as 6.1.8) + VBox 6.1.8 on a Win10 host and the autoresize finally started working as expected.
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.)
The "disable and enable again in the menu" hack is also not needed any more. (I also had to do it that way when using 6.1.6 and maybe earlier.)
So, it seems like upgrade to 6.1.8 may be enough to fix the autoresize issues on VMSVGA adapter :)