Problems getting native resolution on Windows 10
|Reported by:||Mikael Djurfeldt||Owned by:|
|Keywords:||frontend resolution monitor switch||Cc:||mikael@…|
|Guest type:||Linux||Host type:||Windows|
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).