Starting from VirtualBox 5.1.0 resizing of linux guests doesn't work well anymore. Sometimes it works, sometimes it takes a few seconds to resize and sometimes the screen doesn't resize at all (that happens on the same running instance of a VM, without restarting it). We observed this problem on VirtualBox 5.1.0, 5.1.2 and 5.1.4 (with the corresponding version of guest additions installed). The problem occurred both for the Ubuntu 15.04 guest and for a Debian 8 guest.

After every (!) restart of the VM I see the following messages in the system log:

Please provide more information about the resizing problem, including how to reproduce it. Generally, we changed the way we report size changes in the guest to be more standard. So now desktop environments which handle resize events (i.e. monitor hot-plug) like GNOME and KDE should work more reliably. To take care of environments which still do not do this right (i.e. LXDE and XFCE if I remember correctly) we do a resize of the desktop ourselves after about three seconds if the environment does not do it when we report the change.

So if you are using a desktop environment other than GNOME or KDE a three second delay is most likely expected, and this is something that the environment should fix (you will probably find "resize and rotate handling" on the to do list on their web site). However, the delayed resize should still happen consistently.

Ok, thanks for the information about those changes. I will do more tests in the next few days there to see if the resize after a 3 second delay really happens consistently or not (my feeling was that sometimes it doesn't happen) and for what desktop environments this happens. Doesn't look like a good change to me though. Could you also maybe clarify starting from what version of VirtualBox/GAs this change takes place? VBox 5.1.4 + GAs 5.0.12 seem to work fine for me, but VBox 5.1.4 + GAs 5.0.20 under some conditions have this 3 second delay and under others don't. While with VBox 5.1.4 + GAs 5.1.4 it never resizes immediately.

I think it was starting with the 5.0.16 Additions (the host version should not be very relevant). Any desktop environment which properly handles resize events (which were added in X.Org Server 1.3 in April 2007, so they have had enough time to look into it) should not suffer from the delay.

By the way, I will probably fix the log messages you mentioned, but not in 5.1 releases as I don't want to make unnecessary changes to the set-up scripts there.

with GAs 5.1.0 all works great. With GAs 5.1.4 sometimes it works, but usually doesn't resize at all (even after a 3 sec delay). If I run "xrandr" after a failed resize - it resizes fine. I can also see the resize events if I run "udevadm monitor".

resizing happens with a 3 sec delay. But it happens consistently. I guess that's expected for openbox. But, I cannot see any resize
events at all if I run "udevadm monitor". Is this expected in such a case?

Same debian with stable gnome: resizing works fine. But I still don't see any events if I run "udevadm monitor".

If that Debian is using a version of X.Org Server older than 1.17 then no udev events are expected, as everything is done in user space. So the problem here is not so much Linux guests as Ubuntu guests with Unity?

yes. the problem with Debian was some misconfiguration on my side. With a clean install I get the udev events as expected. So the real problem that I could reproduce thus far is the one for Ubuntu guests with unity and with GAs 5.1.4.

well, actually with Debian it also works a bit strange. I could get the event from "udevadm monitor" on a Debian 8.2 with openbox and GAs 5.1.2, but this only worked until I rebooted the VM. After that "udevadm monitor" didn't show anything anymore and the custom "udev" script which I added didn't trigger anymore. With GAs 5.1.4 it didn't show any events at all. This could be again a problem of my configuration though, since it was not a completely clean install. So, I did now a clean install of Debian 8.5 with the default Gnome (1:3.14+3) and GAs 5.1.4. And there resizing worked fine without a delay, but again, I could not see any events from "udevadm monitor" and I was getting a stack of warning messages in the systemlog after every resize:

yeah, sorry, I've used a wrong version. With r110588 Ubuntu works perfectly fine. On Debian I still get those messages in the systemlog and don't see any events via "udevadm monitor". But the resizing itself also works perfectly fine there, so it cannot be considered as a bug. Thanks for a fix.