Page 1 of 1

[WORKAROUND FOUND] Guest screen auto-resize not working since 6.1.0

Posted: 10. Jan 2020, 12:02
by JannisSEA
Hi, I'm using a Gentoo Linux VM on a Windows 10 64-bit host.
Up to (and including) VirtualBox 6.0.14 it was all good: The VM used the "VBoxVGA" graphics, 3D acceleration and auto-resize worked without a problem.

With VirtualBox 6.1.0 and the deprecation of the "VBoxVGA" driver in favor of the "VMSVGA" driver (and of course switching to that one), the auto-resize stopped to work. Even after updating the guest additions to 6.1.0. I also removed the "vboxvideo" kernel module from being loaded and added the VMware grahics driver to the guest's kernel config. The current state is that the graphical environment (KDE running atop X) starts up and is stuck at 800x600px. If I use KDE's System Settings to change the resolution, this is executed but the VM is immediatelly reset to 800x600. If I full-screen the VM or resize the VM's window, the guest doesn't adapt to the new screen size as well.

All other VM "features" (shared clipboard, shared folder with auto-mounting, 3D acceleration) are working perfectly fine.

On the host's VirtualBox, the "File -> Preferences -> Display -> Maximum Guest Screen Size" is set to "Automatic" and the scale factor for "All Monitors" is set to 100%.
The host machine is running Windows 10 Pro 1909 64-bit. The internal Intel Graphics card has been disabled in the BIOS, the nVidia Quadro M2200 with nVidia driver 441.66 is driving three screens: the laptop's own screen at 1920x1080 and two external ones at 1920x1200 each.
Extension Pack is installed.

I attached a zip-file with the following log files (Booting the VM, then using System Settings to resize to 1280x1024, then resizing the VM's window by mouse dragging, then powering off the VM):
VBox.log Log file from VirtualBox itself
dmesg.log Log file from the guest's kernel. Note the two lines saying "[drm:vmw_host_log] *ERROR* Failed to send host log message."
config.gz Kernel configuration of the kernel running
Xorg.0.log Log file from the guest's X server
virtualbox-guest-additions.log Log file of the "emerge" process when installing the virtualbox-guest-additions package (to see configuration options and files being installed)
GuestProperties.txt Output of "VBoxControl guestproperty enumerate" ran in the guest machine

Also note that the "VMMDev: Guest Additions capability report" always says "graphics: no. When the "vboxvideo" module was loaded, it changed to "yes".

If there's any information you might need in addition, please ask ;)

P.S.: IMHO it was a bad decision to deprecate the VBoxVGA driver, just now that the "vboxvideo" was getting part of mainline Linux and made using VirtualBox-based Linux guests easier. Now we have to tell the guests: Yes, I need VMware's graphics driver but don't install the other VMware-guest-tools, it's not a VMware guest after all. Nevertheless, I'm still a happy user of VirtualBox and really appreciate all your work!

Re: Guest screen auto-resize not working since 6.1.0

Posted: 10. Jan 2020, 12:16
by JannisSEA
Additional information:
If I now switch back to "VBoxVGA" (since VBoxSVGA seems to be recommended for Windows guests only) (and disable the 3D acceleration since I am forced to), the vboxvideo driver is being loaded and I can manually select other resolutions. These are applied and the VM does NOT switch back to 800x600.

When using VMVGA, the menu item "View -> Auto-resize guest Display" is grayed out. When I use VBoxVGA, it is activated but seems not to be working.

Re: Guest screen auto-resize not working since 6.1.0

Posted: 10. Jan 2020, 14:56
by JannisSEA
Progress: When I run

Code: Select all

VBoxClient -vf --vmsvga
as root inside the VM, the resizing is working. When I run it as my regular user, to get permission errors:
Head 31: 0x0, (1634, 0)
Failure updating layout, rc=VERR_ACCESS_DENIED
Head 0: 1538x1007, (0, 0)
Failure updating layout, rc=VERR_ACCESS_DENIED

Re: Guest screen auto-resize not working since 6.1.0

Posted: 10. Jan 2020, 15:05
by JannisSEA
I still don't understand the root cause... Running strace on the VBoxClient gives:
...
openat(AT_FDCWD, "/dev/dri/renderD128", O_RDWR|O_CLOEXEC) = 5
ioctl(5, DRM_IOCTL_VERSION, 0x7ffe23e4a770) = 0
....
ioctl(3, _IOC(_IOC_READ|_IOC_WRITE, 0x56, 0x2, 0x3a0), 0x56113c809870) = 0
write(1, "Head 0: 1779x1059, (0, 0)\n", 26Head 0: 1779x1059, (0, 0)) = 26
ioctl(5, _IOC(_IOC_WRITE, 0x64, 0x54, 0x10), 0x7ffe23e4a560) = -1 EACCES (Permission denied)
ioctl(3, VT_RESIZE, 0x56113c80a030) = 0
The device node in question is owned by root:video
jachstet@GentooVM ~ $ ls -lha /dev/dri/renderD128
crw-rw-rw-+ 1 root video 226, 128 Jan 10 13:52 /dev/dri/renderD128
and my user is part of the "video" group:
jachstet@GentooVM ~ $ id
uid=1000(jachstet) gid=1000(jachstet) groups=1000(jachstet),10(wheel),14(uucp),27(video),85(usb),104(vboxsf),105(vboxguest),243(plugdev),250(portage),995(scanner)
So why would executing the ioctl on that device node fail?

Re: Guest screen auto-resize not working since 6.1.0

Posted: 10. Jan 2020, 15:31
by JannisSEA
Mh, as a workaround I've created a custom startup-script that runs

Code: Select all

VBoxClient -vf --vmsvga
as root. This seems to work even when it is started before X is fully running.

Still wondering though why my everday-user gets EACCES errors ...

Re: [WORKAROUND FOUND] Guest screen auto-resize not working since 6.1.0

Posted: 10. Jan 2020, 16:47
by mpack
JannisSEA wrote:P.S.: IMHO it was a bad decision to deprecate the VBoxVGA driver, just now that the "vboxvideo" was getting part of mainline Linux
In the VirtualBox forums we only support code included in the standard VirtualBox distribution. So even if your Linux kernel comes with modules which bear the name "VirtualBox", we expect you to delete those and replace them with official GAs. If you don't want to do that then by all means get your support from the Ubuntu forums.

Re: [WORKAROUND FOUND] Guest screen auto-resize not working since 6.1.0

Posted: 10. Jan 2020, 20:08
by JannisSEA
Hi mpack, thanks for you quick reply. Unfortunately it seems that you didn't read my post correctly. The in-kernel vboxvideo driver is working without any problems. However, I'm unable to use it any more since the VirtualBox development team has decided to abandon it in favor of the VMSVGA driver.
Furthermore, I'm not using Ubuntu (see first line of first post). However, I do understand that you do not want to support the case where the distribution developers packaged VirtualBox in a format suitable for that distribution and I will discuss this case in the Gentoo forums to check if someone there has an idea why this permission problem exists.

Re: [WORKAROUND FOUND] Guest screen auto-resize not working since 6.1.0

Posted: 13. Jan 2020, 10:53
by JannisSEA
For reference: Gentoo Forum post: https://forums.gentoo.org/viewtopic-p-8408964.html

Re: [WORKAROUND FOUND] Guest screen auto-resize not working since 6.1.0

Posted: 21. Jan 2020, 17:19
by JannisSEA
Since this seems to be fixable (i.e. run "VBoxClient --vmsvga" as hinted to by a source code comment) by the Gentoo maintainers, I've created a bug entry: https://bugs.gentoo.org/705832

Re: [WORKAROUND FOUND] Guest screen auto-resize not working since 6.1.0

Posted: 21. Jan 2020, 19:34
by mpack
The Gentoo post is incorrect. Two new graphics controller emulations was added: VMSVGA (intended for Linux guests) and VBoxSVGA (intended for Windows guests). Only one controller has been deprecated, i.e. the old VBoxVGA.

Re: [WORKAROUND FOUND] Guest screen auto-resize not working since 6.1.0

Posted: 21. Jan 2020, 21:37
by JannisSEA
Thanks for the hint, I'll correct that.
However, since VBoxSVGA i sonly inteded for Windows guests that leaves only VMSVGA for Linux guests when wanting 3D acceleration.