Wrong resolution and distorted fonts on 4k display (#17627)

Discussions related to using VirtualBox on Linux hosts.
Post Reply
MrOSE
Posts: 5
Joined: 1. Feb 2011, 01:05
Primary OS: Fedora other
VBox Version: OSE Fedora
Guest OSses: linux, windows

Wrong resolution and distorted fonts on 4k display (#17627)

Post by MrOSE »


[ModEdit; related ticket: #17627: Unconditional upscaling of display on HIDPI systems]
Hi,

I am using Virtualbox on a linux system equipped with a 4k display running KDE (with a scaling-factor of 1.4).
Everything works well, except for VirtualBox - which somehow tries to scale the emulated display and even reports wrong resolution to the guest OS (despite scaling is set to 100% in the VM's preferences).
Please see the attached screenshot - this was a maximized VirtualBox window on the 3840x2160 display, yet the guest OS reports only a fraction of that.

Any hints about how to solve this issue are highly appreciated.

best regards, Clemens
Attachments
virtualbox_wrong_resolution.png
virtualbox_wrong_resolution.png (56.55 KiB) Viewed 3984 times
Last edited by socratis on 20. Apr 2018, 02:18, edited 1 time in total.
Reason: Added ticket related information.
socratis
Site Moderator
Posts: 27330
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Wrong resolution and distorted fonts on 4k display

Post by socratis »

MrOSE wrote:with a scaling-factor of 1.4 ... 3840x2160 display
With a scaling factor of 1.4, your display becomes:
  • 3840 / 1.4 = 2743
    2160 / 1.4 = 1542
And if you take out ~100 px for taskbar/menubar/window decorations, that should be ~ 1442.
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
MrOSE
Posts: 5
Joined: 1. Feb 2011, 01:05
Primary OS: Fedora other
VBox Version: OSE Fedora
Guest OSses: linux, windows

Re: Wrong resolution and distorted fonts on 4k display

Post by MrOSE »

With a scaling factor of 1.4, your display becomes
Sure, but the question is - how can I avoid image upscaling by VirtualBox, as the OS I run is already high-dpi capable.
The "scale factor" setting in VM settings is already at 100% - the lowest possible value the GUI allows.

Furthermore I don't understand why VirtualBox is upscaling the display using simple image upscaling - this way it is almost guaranteed to destroy text in a way to be almost unreadable (just take a look at the screenshot).

Best regards, Clemens
MrOSE
Posts: 5
Joined: 1. Feb 2011, 01:05
Primary OS: Fedora other
VBox Version: OSE Fedora
Guest OSses: linux, windows

Re: Wrong resolution and distorted fonts on 4k display

Post by MrOSE »

I am rather sure this is a bug in VirtualBox. It unconditionally applies bitmap-scaling to the virtual display (and limiting the slider in the VM preferences to 100% artificially removes the possibility to counteract that behaviour): https://www.virtualbox.org/ticket/17627

As this one is really bothersome I wonder - do VirtualBox devs accept pull requests?

Br, Clemens
HansComps
Posts: 1
Joined: 4. Apr 2018, 21:02

Re: Wrong resolution and distorted fonts on 4k display

Post by HansComps »

Had the same issue on Arch with Plasma; but included some other Qt application artefacts.
Update and reboot later and everything is back to normal. I suspect a Qt libs and VirtualBox version mismatch.
MrOSE
Posts: 5
Joined: 1. Feb 2011, 01:05
Primary OS: Fedora other
VBox Version: OSE Fedora
Guest OSses: linux, windows

Re: Wrong resolution and distorted fonts on 4k display

Post by MrOSE »

HansComps wrote:Had the same issue on Arch with Plasma; but included some other Qt application artefacts.
Update and reboot later and everything is back to normal. I suspect a Qt libs and VirtualBox version mismatch.
Thanks for the hint! On my Fedora-27 system the issue is not fixed - but indeed after updating less worse.
Now the pixel-based scaleup of the display seems to be performed with at least billinear scaling - so fonts stay at least readable (but blurry).
Post Reply