Page 1 of 1

Guest window contents scale when I move guest window between monitors (#19049)

PostPosted: 7. Sep 2019, 22:16
by lmh

ModEdit; related ticket: #19049: Guest resolution changes when moving window between built in Retina and external displays
On my MBP running 10.14.6, when I move the guest VirtualBox VM window from the native LCD screen, 2880 x 1800, to the external monitor, 1920 x 1200, the fonts and borders, etc., in the guest OS increase size by at least 200% in a step change, so that I see individual pixels and I can't fit the original contents in the VM window without scrolling both horizontally and vertically. When I return the VirtualBox VM window to the LCD screen, the appearance returns to the original setting. The size of the guest window appears to stay the same when I move from one monitor to the other. The desired behavior is to have the guest scaling retain the same appearance between the two monitors. The LCD is a retina display at 15" diagonal, and the external monitor is 24". This didn't seem to be an issue with VirtualBox version 5.

Things I've tried without any noticeable changes:
Turn on and off Auto-resize Guest Display
Changing Scale Factor (guests VMs are boht only using one monitor)

One guest VM is LinuxMint 19 with Scale Factor set to 100%, 3D Acceleration on.
The other guest VM is WIndows 2000 with Scale Factor set to 200%, 3D Acceleration off.
Behavior is the same in both.

Other settings:
- Graphics controller: VBoxVGA

VirtualBox version 6.0.10 r132072 (Qt5.6.3).

Am I missing a setting somewhere?

Re: Guest window contents scale when I move guest window between monitors

PostPosted: 7. Sep 2019, 23:18
by socratis
lmh wrote:native LCD screen, 2880 x 1800, to the external monitor, 1920 x 1200
The first one sounds like a Retina (HiDPI) one, while the second sounds like a normal one.

What you need to do is to go to the VirtualBox Preferences » Display » Scale Factor » Monitor1=200%, Monitor2=100%. If you've already modified ScaleFactor on a per-VM basis, the Global setting from the Preferences will not be honored. You can reset the per-VM ScaleFactor setting by issuing the following command:

    VBoxManage setextradata "<VM name>" "GUI/ScaleFactor"
And avoid moving the window around, the whole procedure not 100% proof, it's still glitchy...

Re: Guest window contents scale when I move guest window between monitors

PostPosted: 8. Sep 2019, 00:30
by lmh
socratis wrote:
lmh wrote:native LCD screen, 2880 x 1800, to the external monitor, 1920 x 1200
The first one sounds like a Retina (HiDPI) one, while the second sounds like a normal one.

Correct.

socratis wrote:What you need to do is to go to the VirtualBox Preferences » Display » Scale Factor » Monitor1=200%, Monitor2=100%. If you've already modified ScaleFactor on a per-VM basis, the Global setting from the Preferences will not be honored. You can reset the per-VM ScaleFactor setting by issuing the following command:

    VBoxManage setextradata "<VM name>" "GUI/ScaleFactor"
And avoid moving the window around, the whole procedure not 100% proof, it's still glitchy...

Did this, including the VBoxManage setextradata. Same result: Moving the window to the external monitor caused the guest to rescale. Again, the guest window stays the same apparent size even though I moved it to a non-retina display; the guest OS doubles or more the size of panels, icons, fonts, etc. Just tried Win10 guest: happens there as well.

I don't recall seeing this with VirtualBox 5. I just noticed VirtualBox-5.2.32 is available, so if there's no working solution in a couple days, I'll uninstall 6 and try it with 5. I really need the ability to move VMs to either display.

Thanks for your help, socratis!

Re: Guest window contents scale when I move guest window between monitors

PostPosted: 8. Sep 2019, 01:19
by socratis
Just out of curiosity, can you ZIP and post the "<VM>.vbox" and your "~/Library/VirtualBox/VirtualBox.xml" files?

Re: Guest window contents scale when I move guest window between monitors

PostPosted: 12. Sep 2019, 17:33
by flamecycle
I'm going to follow this thread with some interest, as I've had similar problem (except opposite). On my 2015 MPB on 10.14.6, updated to VB6.0.10. on my external monitors my W10 box looks the same as it always did. But when I move to the laptop native display, everything scales down as if the entire screen is shrunk to 1/4 the original size. this makes the icon really small, font are crazy small, and its difficult to read.

I just rolled back to 5.2.32, and everything is back to what I'd call normal. Icons and fonts are similar size when moving between native display and external displays. Not sure what v6 is doing differently but its not good. I played around with the display settings for the VBox, but it didn't matter. Moving to the native display shrinks everything to 1/4th.

Re: Guest window contents scale when I move guest window between monitors

PostPosted: 13. Sep 2019, 18:59
by socratis
flamecycle wrote:I'm going to follow this thread with some interest, as I've had similar problem (except opposite)

Wasn't my previous post clear enough? ;)
socratis wrote:can you ZIP and post the "<VM>.vbox" and your "~/Library/VirtualBox/VirtualBox.xml" files?

Re: Guest window contents scale when I move guest window between monitors

PostPosted: 11. Dec 2019, 17:36
by amk
I am using an Ubuntu guest with 2 screens on a MacBook Pro with Retina display and an external monitor. Everything was smooth for years, incuding disconnect of the external monitor, guests pausing, host sleeping, moving windows around.

After host HW upgrade I also took a chance to upgrade VirtualBox to version 6. Luckily I do not disconnect the monitor or move windows around, otherwise I would need to take the "kind suggestion" from viewtopic.php?f=8&t=91223#p445545 to downgrade.

While it is totally fine that version 6 provides the guests with access to native HW screen resolution, the way it is done possibly missed some use cases. Ideally the default operation should follow previous behaviour from version 5 - guests see only resolution as set by OSX display settings. This way of operation is not selectable, it seems.

There are plenty of users in this forum reporting the resolution troubles, and most were addressed by setting the scaling. For the users with one display this could be perfectly acceptable. In this thread I am glad to see other users sharing my troubles:

After moving VM window from one screen to the other, I always need to update scaling. During the process the guest additions change desktop resolution, once during move, then during scaling update. When going down the app windows move around and resize to fit, when going up they do not return back. In the VM with multiple virtual screens the windows also move to the other screen. Similar happens when the external display is disconnected. OSX moves the VM window to MacBook screen and guest additions ensure a mess. Another sort of mess happens after pausing the VM, rebooting host and starting again, even without changes in display setup.

I do see a request for sharing "<VM>.vbox" and your "~/Library/VirtualBox/VirtualBox.xml" files, but I do not understand it. The issues happen to any VM with this kind of hardware. I would rather prefer to find an explanation what is expected to happen when user moves a VM window between physical screens with different scaling factors. How can I make VirtualBox to resize the window and update scaling factor accordingly, so that the operation is completely transparent to the guest with installed GA? How can I prevent GA to resize windows during this manoeuvre? I tried to disable auto-resize guest display but it did not help.

Re: Guest window contents scale when I move guest window between monitors

PostPosted: 17. Dec 2019, 17:12
by amk

Re: Guest window contents scale when I move guest window between monitors (#19049)

PostPosted: 17. Dec 2019, 20:42
by socratis
Thanks for posting the ticket number. Tying the ticket and the thread...

Re: Guest window contents scale when I move guest window between monitors (#19049)

PostPosted: 26. Dec 2019, 09:34
by amk
Since the original ticket remains an enhancement, I have created also https://www.virtualbox.org/ticket/19186 to report/handle the most problematic issue related to this. If the user could manually control when guest additions will adjust window sizes, that would help a lot in prevention of the mess. And with manual setting of scaling factor first, the guest shall not notice any change.

Re: Guest window contents scale when I move guest window between monitors (#19049)

PostPosted: 27. Dec 2019, 09:56
by socratis
Your ticket #19186 was closed as a duplicate of ticket #19049. You don't have to open a new ticket just to change it from "Enhancement" to "Defect", you could have simply asked... ;)

Re: Guest window contents scale when I move guest window between monitors (#19049)

PostPosted: 15. Jun 2021, 16:01
by fhpetrone
Hi everyone, I'm new to these forums and I'm having the same issue described here. I don't know if this issue is being addressed by the developers... Is this something that happens "only" to retina display Macs? I'm also assuming there is no work around to "automaticallly change scale" if I want to move the guest OS window from one screen to another... is it?

Thanks.

Re: Guest window contents scale when I move guest window between monitors (#19049)

PostPosted: 22. Jun 2021, 09:51
by mpack
@fhpretrone: The above discussion concerns a 2019 version of VirtualBox. If you have a similar problem with a new version of VirtualBox then create a new topic and provide a zipped VM log.

Windows have to be re-composed when you drag them from one monitor to another, if those monitors have radically different DPIs. E.g. one is HiDPI and the other not. I'm not a Mac user, but on Win10 the OS takes automatic action if the application doesn't tell it not to - which it won't if it doesn't know that such a problem exists. Back in 2019 was when 4K monitors started to become more affordable, so that's when the problem become more known about, and it would typically affect a laptop user whose laptop display was 96dpi but who also had a >200 dpi 4k monitor.

I would not expect the problem to be the same in a recent (2021) VirtualBox release.

Locking this topic: As mentioned in the first paragraph, create a new topic to discuss current problems, and be sure to provide a zipped VM log otherwise you risk being ignored.