Unlocking Windows causes host-screen count change

Discussions related to using VirtualBox on Windows hosts.
Post Reply
richardcrossley
Posts: 2
Joined: 8. May 2016, 16:13

Unlocking Windows causes host-screen count change

Post by richardcrossley »

Hi,

Whenever I leave my PC locked for a long period of time, the number of virtual screens on the VM resets to 1, instead of 2. Selecting "View->Virtual Screen 2->Enable" doesn't change anything. The only way to restore the second virtual screen is shutdown and then restart. A reboot of the virtual machine is insufficient.

I have looked into the log file from this morning and I see the following lines:

Code: Select all

44:29:47.846095 GUI: UIMachineLogic: Guest-screen count changed
44:29:48.040260 GUI: UIMachineLogic: Host-screen count changed
Which makes me think that Virtual Box thinks the number of physical screens has changed the number of virtual screens is changed accordingly. After I have logged in there are 3 physical screens and only 1 virtual screen on the VM. The virtual screens are shown in "Windowed" mode rather than "Full Screen" or "Seamless" modes.

I have looked into the source code I see the following method in:
src/VBox/Frontends/VirtualBox/src/runtime/UIMachineLogic.cpp

Code: Select all

void UIMachineLogic::sltHostScreenCountChange()
{
    LogRel(("GUI: UIMachineLogic: Host-screen count changed\n"));

    /* Make sure all machine-window(s) have proper geometry: */
    foreach (UIMachineWindow *pMachineWindow, machineWindows())
        pMachineWindow->showInNecessaryMode();
}
It seems this iterates over the (virtual?) machine windows and resizes/repositions them accordingly. I suspect at this point VirtualBox decides I have only one physical screen and disables the multiple virtual screens functionality on my VM.

I have attached the virtual machine configuration (vbox file) and a portion of the log file when this occurred.

Host:
Windows 10, 64 bit, 1903 / (Build 18362.175)
3 Physical Screens each 1920x1200, rotated so they are 1200x1920 (width x height)

Virtual Box:
Version 6.0.10 r132072 (Qt5.6.2)

Guest:
Ubuntu 18.04 64 bit
2 Virtual Screens in windowed mode

Many thanks for taking the time to look at this, any advice would be welcome.
Attachments
Development.vbox.txt
VirtualBox configuration file for VM - .txt because forum would not allow .vbox extension
(8.51 KiB) Downloaded 27 times
vbox.log
VirtualBox log file
(3.91 KiB) Downloaded 24 times
Post Reply