Guest thinks resolution is 2x actual resolution? [SOLVED]

Discussions related to using VirtualBox on Windows hosts.
Post Reply
stingray17
Posts: 2
Joined: 6. Feb 2015, 19:29

Guest thinks resolution is 2x actual resolution? [SOLVED]

Post by stingray17 »

I have a really weird problem here regarding the guest screen resolution not being set correctly and scaling the image by 50% in full screen or windowed mode. I have searched high and low and been unable to find others here with the same problem, but I do have a coworker who has the same issue as me (using the same equipment). Based on the logs etc that I am seeing, I am pretty sure this is a Windows host problem where the wrong window size hint is being sent to the guest, but I can't figure out how to fix it.

Running VirtualBox 4.3.20 on Windows 8.1 Pro host. My laptop, the host, is a ThinkPad X1 Carbon Touch with built-in 2560x1440 display, and it is connected to an external monitor (via Lenovo docking station -> DisplayPort) and the external monitor is also 2560x1440. Guest is 64 bit Fedora 20 or Fedora 21 (tried both), with guest additions 4.3.20 installed. It is configured with 3GB RAM and 128MB video RAM. 2D and 3D acceleration are turned off. VirtualBox extensions are not installed, and in VirtualBox host preferences, "Display/Maximum Guest Screen Size" is set to "Automatic".

Everything works fine if I am using the laptop's screen, however, I usually want to run my VM (where I do most of my real work) in either Windowed, Seamless or Full-screen mode on the larger external monitor. But if I move the guest to the external display, all of a sudden everything gets tiny. The display properties of the guest indicate that it thinks it is running on a 5120x2880 display! This is exactly twice the actual resolution of the display. In Windowed mode, the problem is the same (i.e. it now thinks it is at 5120x2765). The image is visibly scaled down by 50%, font is really small, etc.

If I try to set the resolution in the guest manually to 2560x1440, I'm left with a small window in the middle of the screen surrounded by blank space - it is still being scaled down by 50%. If I manually set the resolution in the guest and then switch to scaled mode, I can get closer to a proper image, but performance suffers greatly in this mode (lag) so I do not want to use it. I would also prefer to avoid using Remote Display if possible.

VM log is attached. VBoxControl in the guest reports the following when running in full-screen mode, and similarly high value running in windowed maximized mode: "Name: /VirtualBox/GuestAdd/Vbgl/Video/SavedMode, value: 5120x2880x32, timestamp: 1423244532224890600, flags: <NULL>"

Can anyone help me with this?
Attachments
Fedora21-2015-02-06-10-10-18.log
(63.42 KiB) Downloaded 4 times
Last edited by stingray17 on 6. Feb 2015, 23:27, edited 1 time in total.
loukingjr
Volunteer
Posts: 8851
Joined: 30. Apr 2009, 09:45
Primary OS: Mac OS X other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: just about all that run

Re: Guest thinks resolution is 2x actual resolution?

Post by loukingjr »

FWIW, your problem is because of the HiDPI monitor. AFAIK, VirtualBox does not support HiDPI just yet, The same thing happens with Apple Retina displays. Your only option I would think is to scale down the resolution of your external monitor from the host.
OSX, Linux and Windows Hosts & Guests
There are three groups of people. Those that can count and those that can't.
stingray17
Posts: 2
Joined: 6. Feb 2015, 19:29

Re: Guest thinks resolution is 2x actual resolution?

Post by stingray17 »

loukingjr, your hint about HiDPI being the problem was helpful. That was indeed the issue. Although it is unfortunate that VirtualBox 4.3.20 is not "per-monitor HiDPI aware" just yet, with the information (and keywords) you provided I was able to find a satisfactory workaround.

Since I really only use the external display for running my VM, I configured Windows 8.1 to use the same DPI for all displays. (Control Panel / Display / "Let me choose one scaling level for all my displays"). Then, I manually set 200% scaling. This means everything is still the right size on the laptop's built in HiDPI display, although the Windows UI appears enormous on the external display. But I don't care much about that, and the correct resolution is reported to the VM guest which runs full-screen on that display.

Good enough for me. Thanks again for quick reply.
loukingjr
Volunteer
Posts: 8851
Joined: 30. Apr 2009, 09:45
Primary OS: Mac OS X other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: just about all that run

Re: Guest thinks resolution is 2x actual resolution?

Post by loukingjr »

YVW. Glad it worked out.
OSX, Linux and Windows Hosts & Guests
There are three groups of people. Those that can count and those that can't.
Post Reply