VirtualBox

Opened 8 years ago

Last modified 8 years ago

#15132 new defect

Problems getting native resolution on Windows 10

Reported by: Mikael Djurfeldt Owned by:
Component: other Version: VirtualBox 5.0.14
Keywords: frontend resolution monitor switch Cc: mikael@…
Guest type: Linux Host type: Windows

Description

This ticket concerns how to get native resolution in the Virtualbox graphical frontend when running under a Windows 10 host.

By "native resolution", I mean a 1-1 mapping between pixels on the display and pixels in the frontend fullscreen window.

My setup is a laptop with a 2736x1824 screen. Connected to this, I have an external monitor with a 2560x1440 resolution.

The behavior I expect from the frontend is that I always get native resolution when I select a scale factor of 100% in the View menu.

The behavior I get is somewhat complicated. It seems like there are two states: I either get native resolution on the laptop monitor or the external monitor. The switch between these two states goes through Windows display settings:

Assume that we have everything working as expected on the laptop display, with native resolution in the Virtualbox frontend.

Now we connect the external monitor and choose to use only that monitor. When we now select fullscreen in the frontend we only get some scrambled rectangles on the screen. However, if we go from a scale factor of 100% to 125%, we get a screen with proper content, but with a high resolution (higher than the display) from the point of view of the guest, scaled down to fit the display.

Going now to Windows display settings, there is a red sentence saying that we need to sign out in order for all apps to adjust to the new scaling (resolution?). Doing that and restarting the guest and the graphical frontend, we now get (for a 100% frontend scale factor) native resolution.

The same thing happens again when going back to the laptop display.

This is clearly a bug since one shouldn't have to save the machine state, sign out and in again, and restart the vm for every monitor switch. I wish there was a way for Virtualbox to ignore the Windows weirdness and simply have a hard mapping between 100% scale factor and native resolution.

I attach a log from a run where I fail to get native resolution on my laptop display (but do get it on the external monitor).

Attachments (1)

Linux-2016-02-08-14-30-53.zip (29.6 KB ) - added by Mikael Djurfeldt 8 years ago.
VBox.log

Download all attachments as: .zip

Change History (4)

by Mikael Djurfeldt, 8 years ago

VBox.log

comment:1 by Mikael Djurfeldt, 8 years ago

I have now noticed that the problem I describe disappears if I set custom scaling to 100% in Windows display settings. This, however, has the effect that all Windows GUI elements become very small. It also says in the Windows display settings that it is not recommended to set custom scaling.

Apparently there are two layers of "scaling" here: First there is the Windows scaling, then the scale factor of the Virtualbox frontend.

In my mind, the goal should be that things work "out-of-the box". My first experience on the external monitor was that fullscreen mode did not work at all---the screen showed bizarre rectangles and no user interaction was possible. It took some time for me to realize that I could get proper screen contents by increasing the scale factor to 125% and even further time to realize that by signing out and in again in Windows, the Windows scaling would adapt to the external monitor.

I think the most intuitive behaviour would be that your fullscreen mode bypasses the Windows scaling such that a scale factor (yours) of 100% always means native resolution. That way, I could still have the recommended scaling setting in Windows (no custom scaling) which gives me natural looking Windows GUI elements.

Last edited 8 years ago by Mikael Djurfeldt (previous) (diff)

comment:2 by Mikael Djurfeldt, 8 years ago

The following link is probably relevant to solving this problem:

https://msdn.microsoft.com/en-us/library/windows/desktop/dn469266(v=vs.85).aspx

comment:3 by Mikael Djurfeldt, 8 years ago

I had a similar problem in another program---a VNC client called Thinlinc. Their support suggested that I right-click on the executable and select "Properties" and the tab "Compatibility". When I there selected "Disable display scaling on high DPI settings", the problems disappeared for that program.

When I tried to do the same with Virtualbox, it doesn't work: When I have disabled custom scaling in the Windows settings for my external display and restarted, Virtualbox still shows the same behavior as described above: For a Virtualbox graphical frontend scaling factor of 100%, fullscreen mode gives a scrambled display (the "bizarre boxes" above) and a factor >100% gives a downscaling from a resolution higher than that of the screen (2560x1440).

Note: See TracTickets for help on using tickets.

© 2023 Oracle
ContactPrivacy policyTerms of Use