VirtualBox

Opened 15 years ago

Last modified 21 months ago

#2942 reopened defect

Save state -> Start/resume does not restore window size

Reported by: joseph_ Owned by:
Component: GUI Version: VirtualBox 2.1.0
Keywords: window size Cc:
Guest type: Windows Host type: other

Description (last modified by aeichner)

Problem: When "auto-resize guest display" is enabled, a save state -> start/resume will not restore the window size but instead use a too small window.

This is a regression from 1.x to 2.1.

How to reproduce:

  1. Start VM
  1. Enable "auto-resize guest display"
  1. Close VM window choosing "save machine state"
  1. Start the VM again
  1. While restoring, the VM window has a certain small size (640x480 or so)
  1. When the VM is fully restored, the VM window HEIGHT is restored but the

WIDTH is unchanged from restore operation. In the next moment, the guest OS changes its screen size to adopt to the new size.

Result: Saving the state at a window size of 1600x1200 results in a restored window of 640x1200.

WM is fvwm2. WM is unlikely to cause the problem because when "auto-resize guest display" is not active, restoring the vM will resize the window corretly to the same size it had when saving the state.

Change History (10)

comment:1 by joseph_, 15 years ago

Additional info: System is a true 64bit Linux, guest is a 32bit Windows.

comment:2 by joseph_, 15 years ago

The bug is still present in version 2.1.4-OSE.

comment:3 by Jan Peterson, 15 years ago

I am also seeing this problem with version 3.0.2.

Host is 32bit Ubuntu 8.10, guests are 32bit Ubuntu 9.04 and Windows XP. WM on the host is also fvwm2. Guest has version 1.4 of the guest additions installed.

The host has a xinerama dual-screen display with geometry of 2560x1024 pixels. The geometry of the VirtualBox window as reported by fvwmident is 771x774+244+11 when I suspend the guest. After restoring it, the guest's geometry as reported by fvwmident is 387x774+244+22 (looks like the width is about half of what it was before).

It looks like there is something up with the size hints given to the window manager by VirtualBox.

comment:4 by Jos de Kloe, 15 years ago

I can confirm this bug with version 3.08 (VirtualBox-3.0.8_53138_fedora9-1.x86_64.rpm) installed on Fedora 10, using fvwm (version 2.5.26-2.fc10) as window manager. To me the problem seems to be the interaction between fvwm and VirtualBox. If I run VirtualBox on the same machine and OS, using the gnome desktop, then everything works just fine. Therefore it could as well be a fvwm bug.

Note also that if I disable "auto-resize guest display" then the windows desktop size is saved correctly between 2 sessions, but the horizontal dimension used by the actual VirtualBox window shrinks considerably for the restored session.

Jos.

comment:5 by tschultze, 12 years ago

As of a move from 4.1.x to 4.2.2, I have seen a similar thing happen consistently. In a Win7 64bit host, I run a Windows 7 64bit guest in one VM and a Windows 2003 Server 32bit in another. In either case, the VM is in a window (not maximized) and the VM is set to autosize. Autosizing works just fine if I grab the corner of the VM window and move in any direction. I can close the session (Machine->Close... and then continue with "Save the machine state" radio button selected). When I start the session back up, the VM windows has both a vertical and a horizontal scroll bar. The amount of play in the scroll bar appears to be very close the amount the orothogonal scroll bar consumes (i.e., is it possibly a rounding error and window size is off by only a pixel?). If I grab the corner and move it slightly, autosize functionality kicks in and the scroll bars disappear (correctly). Behavior is reproducible regardless of the window size relative to my desktop (running at 1920x1080).

comment:6 by aeichner, 8 years ago

Description: modified (diff)
Resolution: obsolete
Status: newclosed

Please reopen if still relevant with a recent VirtualBox release.

comment:7 by TGP1994, 3 years ago

This issue is occurring for me, on Virtualbox 6.1.16. There are a few key differences on my end from the original bug report:

  • This issue only seems to be affecting one of my virtual machines (verified by starting up another one and the window size restored correctly)
  • The virtual machine that is affected is a Windows 7 x64 guest. A key difference here I think is the fact that the virtual hard disk is encrypted.
  • I've tried resuming with Auto-resize guest display enabled and disabled. Both result in this issue.

When I hit resume, the guest window opens and it goes through the process of loading the machine state. After that, the dialog appears to enter my encryption password. Once I do so, the guest window resizes its self (setting the guest resolution to 640 x 480). I wonder if this has something to do with the decryption password dialog.

Host OS is Windows 10 Pro 64-bit.

Last edited 3 years ago by TGP1994 (previous) (diff)

comment:8 by TGP1994, 3 years ago

Resolution: obsolete
Status: closedreopened

comment:9 by tburba, 23 months ago

This began a month ago when I updated 5.x to 6.1.34. Main difference from the original report: both dimensions are wrong, not only height.

The problem always occurs when restoring the machine state of any Win7 64bit guest (VBoxSVGA with fresh Guest Extensions installed) on a Win10 21H2 host. Before restoring, the .vbox file contains the expected window size, for example,

      <ExtraDataItem name="GUI/LastCloseAction" value="SaveState"/>
      <ExtraDataItem name="GUI/LastGuestSizeHint" value="1152,864"/>

Immediately after the "Restoring virtual machine" message box closes, the VM window resizes to an empty one of size approx. 250x70, then to a Win7 GUI at 640x480 and contents flicker for some half second.

The size is restored correctly when using VBoxVGA instead. But, VirtualBox then gives a nasty warning about a non-recommended graphics controller, which I apparently didn't like after the update, followed the recommendation and forgot about it. The best is the enemy of the good, eh?

After turning "Auto-Resize Guest Display" off, the final size is correct, however that temporary ~250x70 empty window is still there for almost 2 seconds. Only VBoxVGA is restored seamlessly.

comment:10 by Kraut, 21 months ago

What is almost more annoying than the small size of the overall guest window is that Windows 10 running as the guest then forces all contained client windows to fit into this small size. Every time I need to restore from a saved state, I need to resize dozens of Windows.

Are there any real downsides to using VBoxVGA, or should this become the recommendation until this bug is fixed?

In my case I usually don't restore from saved states intentionally, but somehow I keep hitting a keyboard shortcut, which closes all my virtual machines to a saved state. I have not been able to find a way to disable this shortcut, nor even to figure out which key combination I accidentally type. This is with RHEL 8 as the host.

Last edited 21 months ago by Kraut (previous) (diff)
Note: See TracTickets for help on using tickets.

© 2023 Oracle
ContactPrivacy policyTerms of Use