Attempts to Auto-Resize Guest Window Fail

Discussions about using Linux guests in VirtualBox.
Flin
Posts: 2
Joined: 30. Jul 2015, 22:47

Attempts to Auto-Resize Guest Window Fail

Post by Flin »

The Setup:

VirtualBox 5.0.0
Guest Additions 5.0.0 (installed via the GUI)

Host: OS X 10.9.5, 64-bit, 8 Gb memory
Guest: Ubuntu 14.04.2, 64-bit, 1 Gb memory

The Problem:

Guest window auto-resize is not working. Any/all attemtps to resize the guest window (either larger or smaller) result in the guest window snapping back to its size before the resize attempt, with the guest window resolution unchanged. "Auto resize Guest Display" is enabled in the guest. Increasing the amount of video memory for the VM (often suggested to address resizing problems) has no effect.

Guest Additions 5.0.0 appear to have been installed correctly: shared folders, etc. appear to work, and the usual modules (vboxguest, vboxsf, and vboxvideo) appear to be running.

After installing Guest Additions 4.3.30 via the GUI, but making no other changes, the behavior is the same.

After installing Guest Additions 4.3.28 via the GUI, but making no other changes, auto-resizing works again.

Any help would be appreciated. If this is a known issue, and my search of the forum, bug reports, FAQ's, and manual was inadequate, I promise to be properly contrite.

Attachments:

(a) a log of starting the VM and then unsuccessfully resizing the guest window with Guest Additions 5.0.0 installed
(b) a log of the Guest Additions 5.0.0 installation
(c) a log of starting the VM and then successfully resizing the guest window with Guest Additions 4.3.28 installed
Attachments
VBox.log.UsingGueastAdditions4.3.28.zip
(22.98 KiB) Downloaded 51 times
vboxadd-install.log.zip
(573 Bytes) Downloaded 17 times
VBox.log.UsingGuestAdditions5.0.0.zip
(23.54 KiB) Downloaded 116 times
finnzk
Posts: 13
Joined: 3. May 2014, 19:08

Re: Attempts to Auto-Resize Guest Window Fail

Post by finnzk »

Just adding a quick backup note to confirm this - I've experienced the same issue using VirtualBox 5.0 on OS X 10.10.4 and a Ubuntu 14.04.2 guest.

EDIT:

There is a specific, repeatable way to see resizing working, and then not working with this setup. When I install a fresh Ubuntu guest from the Ubuntu 14.04.2 64-bit ISO, and install dkms and the VirtualBox extensions, and reboot - and do nothing else - auto-resizing works OK. But if I go into the system settings within Ubuntu and explicitly set the resolution to some value (say, 1024x768), mouse-drag auto-resizing immediately stops working, and attempts to resize eventually cause Compiz to crash.
Flin
Posts: 2
Joined: 30. Jul 2015, 22:47

Re: Attempts to Auto-Resize Guest Window Fail

Post by Flin »

I've discovered that after deleting the ~UUU/.config/monitors.xml file for user UUU (a fix posted for other display-related issues) on the guest machine, auto-resize once again works when logged in to the guest as user UUU. While this gets things working again, it's only a band-aid (and maybe causes other problems?), and it's certainly not optimal to have to do this for each different user of the guest machine.
finnzk
Posts: 13
Joined: 3. May 2014, 19:08

Re: Attempts to Auto-Resize Guest Window Fail

Post by finnzk »

Hi Flin, that's good to know. It works for me, too. The Ubuntu wiki even says you can delete this file (presumably without other consequence) if you accidentally set a bad resolution (https://wiki.ubuntu.com/X/Config/Resolution).

However, if you go into the Ubuntu settings panel and set a resolution again, the monitors.xml file is once again written out, and resizing *again* stops working. So this is pretty interesting. Presumably there's some process running that's reading this file and preventing the resizing when it exists.

This hasn't been a problem for many, may versions of VirtualBox. Maybe I'll put in a proper bug report, unless someone else already has...
finnzk
Posts: 13
Joined: 3. May 2014, 19:08

Re: Attempts to Auto-Resize Guest Window Fail

Post by finnzk »

Of note: this remains an issue after the VirtualBox 5.0.2 update. Fresh VMs of 64-bit Ubuntu 14.04LTS and 64-bit Ubuntu 15.04 continue to exhibit the undesired no-resize behavior. Resizing becomes possible in both cases again when that monitors.xml file is removed.
UncleSlug
Posts: 6
Joined: 9. Oct 2013, 00:36
Primary OS: MS Windows 7
VBox Version: PUEL
Guest OSses: Archlinux 64Bit

Re: Attempts to Auto-Resize Guest Window Fail

Post by UncleSlug »

I have the same issue on win7 host with an Arch guest on vbox 5.0.2. All modules are built with dkms for the current kernel and all modules are loaded. Xorg 1.17.2.
  1. Resizing the window does nothing, choosing the resolution from the icon on the bar does nothing.
  2. Resolution starts at 800x600.
  3. Manually changing the resolution with xrandr works fine.
  4. Using xrandr with auto changes to 800x600.
Looking at VBox.log trying a standard size sets the hint and does nothing, trying a custom size (resizing a window) sets the hint and says it's sending the hint to the screen but nothing happens :cry:

In grub it's set to use 1024x768 and keep gfx payload is set to make the kernel use it when it takes over but still goes back to 800x600. Weird.

Edit: This was with Awesome as the window manager. I updated another arch guest with gnome3 and it sort of works, the login screen seems to be stuck at 800x600 but after logging in the buttons seem to work as well as auto resize. I might have to retreat to the arch forums to find out what the difference is.
Attachments
VBox.log
(95.95 KiB) Downloaded 28 times
UncleSlug
Posts: 6
Joined: 9. Oct 2013, 00:36
Primary OS: MS Windows 7
VBox Version: PUEL
Guest OSses: Archlinux 64Bit

Re: Attempts to Auto-Resize Guest Window Fail

Post by UncleSlug »

I have mostly been able to fix my problems, turns out /usr/bin/VBoxClient-all has to run to allow the resizing this is normally done via autostart (/etc/xdg/autostart/vboxclient.desktop). AwesomeWM doesn't do autostart, so i added this to my lightdm.conf:

Code: Select all

display-setup-script=/usr/bin/VBoxClient-all && xrandr --output VGA-0 --auto

Magic works, Lightdm and Awesome fill the window and the vbox buttons work too.

I also have a centos 7 vm with gnome and it autosizes before/as gdm appears which on arch only does after logging in. I suspect this is something to do with the vboxadd-x11.service which runs /opt/VBoxGuestAdditions-5.0.2/init/vboxadd-x11 on startup?
Gil56
Posts: 1
Joined: 18. Feb 2013, 01:04

Re: Attempts to Auto-Resize Guest Window Fail

Post by Gil56 »

I see the same behavior on a Windows 7 host as the others did on an OS X host. In my case it is an Ubuntu 14.04.3 guest on VirtualBox version 5.0.2. After I set a resolution using Settings->Displays in Ubuntu, any attempt to re-size the guest window (with auto-resize enabled) results in it snapping back to the resolution set in Settings->Displays. The workaround in my case is also to delete ~/.config/monitors.xml, but as with the others, that only works until I set a resolution again using Settings->Displays.
finnzk
Posts: 13
Joined: 3. May 2014, 19:08

Re: Attempts to Auto-Resize Guest Window Fail

Post by finnzk »

A quick update for anyone following this thread: this problem still exists in the latest release, VirtualBox 5.0.4.
loukingjr
Volunteer
Posts: 8851
Joined: 30. Apr 2009, 09:45
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: just about all that run

Re: Attempts to Auto-Resize Guest Window Fail

Post by loukingjr »

FWIW, make sure Maximum Guest Screen Size in the VirtualBox Preferences under the Display tab is set to Automatic.
OSX, Linux and Windows Hosts & Guests
There are three groups of people. Those that can count and those that can't.
finnzk
Posts: 13
Joined: 3. May 2014, 19:08

Re: Attempts to Auto-Resize Guest Window Fail

Post by finnzk »

loukingjr - my comments all assume a "fresh" install of both VirtualBox and a Ubuntu 14.04.3 disk image. The maximum display size in VirtualBox preferences is *always* set to "Automatic" on a fresh install, as far as I can tell.

The problem persists and seems (per the previous parts of the discussion) to be related to the VirtualBox Guest Extensions not being able to handle the presence of a "monitors.xml" file when the resolution is set to anything other than the default (800x600) in Ubuntu.
loukingjr
Volunteer
Posts: 8851
Joined: 30. Apr 2009, 09:45
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: just about all that run

Re: Attempts to Auto-Resize Guest Window Fail

Post by loukingjr »

I couldn't say. I've had VirtualBox installed on 5 Macs, A Windows 8.1 and Windows 10 host and a Ubuntu 14.04 (now 15.04) and a Linux Mint 17 host, installed literally hundreds of guests and I've never had the problem mentioned here. I do know few people over the last couple of years where the setting was set to "None" and switching it to "Automatic" fixed theirs. Also people who used setextradata to change their resolution and I think that overrides the preference setting but I'm not positive.

It's not just Ubuntu guests or certain hosts where the problem shows up. There are other posts in the forum related to auto resize issues. It could be many things I suppose.
OSX, Linux and Windows Hosts & Guests
There are three groups of people. Those that can count and those that can't.
finnzk
Posts: 13
Joined: 3. May 2014, 19:08

Re: Attempts to Auto-Resize Guest Window Fail

Post by finnzk »

loukingjr - I appreciate your response, but I'm afraid I'm not clear on whether you're telling me that you have not encountered this behavior, are unable to replicate it, or are simply discussing related stuff.

The specific problem we're talking about here should be easy to replicate:

Install VirtualBox 5.0.4 in Mac OS 10.10.5, Windows 8.1, or Windows 10. Create a new Ubuntu VM with 14.04.3. Boot the VM, install dkms and install the VirtualBox extensions in the Ubuntu VM. Reboot, and set the resolution to anything other than the default using the Settings panel in Ubuntu. The drag-to-resize functionality - which should have been working when you rebooted - stops working.

If you can do this, and drag-to-resize *still* works for you, I'd be interested in knowing more.
loukingjr
Volunteer
Posts: 8851
Joined: 30. Apr 2009, 09:45
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: just about all that run

Re: Attempts to Auto-Resize Guest Window Fail

Post by loukingjr »

Actually I've never used a guest's display panel to set the display size. Didn't seem to be any reason to with the GAs installed. I'll give it a try though.

Update: When you use Ubuntu's display settings it does write a Monitor.xml file to /.config which overrides the VB setting. I was wondering why I had no Monitor.xml file in any of my guests. At any rate, there are 12 preset sizes (see screen shot) in the VirtualBox View>Virtual Screen 1 Menu + Full Screen which sets the display to whatever your host's monitor resolution is. if none of those are suitable I suppose you are stuck dragging the window to the approximate size you want.

You can set a fixed size using setextraadata if you prefer.
Attachments
menu.jpg
menu.jpg (95.34 KiB) Viewed 17043 times
OSX, Linux and Windows Hosts & Guests
There are three groups of people. Those that can count and those that can't.
Cassandra
Posts: 1
Joined: 27. Nov 2015, 14:26

Re: Attempts to Auto-Resize Guest Window Fail

Post by Cassandra »

OK, fixed it for me.

This problem of auto-resize not working and (getting scroll bars instead) only appeared after I upgraded from precise to trusty ubuntu in the guest VM

I removed the monitors.xml file (obvs created during the upgrade) and normal service has now been resumed - I can resize as desired.
Post Reply