Page 1 of 1

Guest windows rearranged after power save

Posted: 13. Dec 2019, 02:06
by Winston Smith
Summary

When I wake my screens back up from power save, VirtualBox' windows are rearranged/resized.

Display layout

I have four monitors arranged horizontally, number 1-4 from left to right:

#1 is a DisplayPort 4K display in portrait
#2 is a DisplayPort 4K display in landscape
#3 is a DisplayPort 4K display in landscape [primary, contains the panel]
#4 is a DVI-D 1920x1200 display in landscape

Symptoms

When the screens wake back up, all of VirtualBox' guest VM windows have been relocated to #1, near the bottom of the screen, and have been resized (i.e. based on their current position they should extend off the bottom of the screen but the window has been resized to fit on the screen). This does not (usually?) happen with VirtualBox' management window, just the actual VM consoles. It's the power save that does it; just kicking off the screensaver/locker doesn't cause the problem.

Other windows don't exhibit this behaviour; for example, Firefox' windows, my terminal windows, etc. all stay put.

Steps to reproduce

1. Be using the computer in pursuit of evil world domination (various methods)
2. Take a break from evil to make a sandwich, long enough for the screensaver/power save to kick in
3. Come back and wake the screens up to resume pursuit of world domination to find my evil VirtualBox VM windows rearranged

Observed result

The VirtualBox VM consoles have had a party in my absence.

Expected result

I expect my windows to conduct themselves more sensibly; when I come back, they should have the same location/dimensions as they did before the power save.

Software/OS versions

(To confirm, these are all "...as packaged by Kubuntu 18.04 LTS" and I'm up to date on system updates.)

- VirtualBox versions (the grep is just to filter the output to installed packages):

Code: Select all

$ dpkg -l 'virtualbox*' | grep '^ii '
ii  virtualbox                     5.2.34-dfsg-0~ubuntu18.04.1 amd64        x86 virtualization solution - base binaries
ii  virtualbox-dkms                5.2.34-dfsg-0~ubuntu18.04.1 all          x86 virtualization solution - kernel module sources for dkms
ii  virtualbox-ext-pack            5.2.34-1~ubuntu18.04.1      all          extra capabilities for VirtualBox, downloader.
ii  virtualbox-qt                  5.2.34-dfsg-0~ubuntu18.04.1 amd64        x86 virtualization solution - Qt based user interface
- Linux/KDE Plasma: Kubuntu 18.04
- KDE Plasma Version: 5.12.9
- KDE Frameworks Version: 5.44.0
- Qt Version: 5.9.5

Re: Guest windows rearranged after power save

Posted: 17. Dec 2019, 22:56
by socratis
We need to see a complete VBox.log, from a complete VM run, where the problem occurs:
  • Start the VM from cold-boot (not from a paused or saved state) / Observe or recreate the problem / Shutdown the VM (force close it if you have to).
  • With the VM completely shut down (not paused or saved), right-click on the VM in the VirtualBox Manager and select "Show Log".
  • Save only the first "VBox.log", ZIP it and attach it to your response. See the "Upload attachment" tab below the reply form.
Image

Re: Guest windows rearranged after power save

Posted: 3. Jan 2020, 01:50
by Winston Smith
Sorry for the late reply; I lost track of the link. :) Anyway, here's the log file; to me, it looks like any relevant bits are probably between line 1043 (which looks like where the system failed to boot from the non-existent hard disk, which was definitely before the host display power save):
00:00:06.232121 VMMDev: Guest Log: Could not read from the boot medium! System halted.
...and line 1152 (which looks like the beginning of the shutdown process):
00:17:25.090538 Changing the VM state from 'SUSPENDED' to 'POWERING_OFF'
What I did to generate this log was:
  • Click "New" to create a new VM with the following properties (the asterisks indicate existing pre-filled defaults that I didn't change):
  • ==========
  • Name: "Testing"
  • Type*: Microsoft Windows
  • Version*: Windows 7 (64-bit)
  • Memory size*: 2048 MB
  • Hard disk: Do not add a virtual hard disk
  • ==========
  • Click "Create"
  • Click "Start"
  • In the "Select start-up disk" dialog, click "Cancel"
  • Observe that the VM fails to boot (due to missing boot medium); this is fine because it's not the activity "inside" the VM that we're concerned with
  • Move VM guest/console window to primary display (it was originally opened on the leftmost display, which is the same one it moves itself to when the power save happens)
  • Resize console window so it's much larger (although the actual console part still stays the same, whereas my established VMs will update the desktop resolution to fit the new size). This is presumably unnecessary to show the window's being moved but I wanted to demonstrate that the window also gets resized
  • Wait for power save to kick in
  • I happened to be watching right when I happened, so I immediately woke the screens back up (about 10 seconds after I saw the monitors go into standby), observed that the window had been both moved and resized
  • Closed the VM by clicking the window manager's close button and answering the "what do you want to do?" dialog with "Power off the machine"
  • Went back to the manager app and exported the log as indicated.