4k resolution scaling issues on linux guests (#17345)

Discussions related to using VirtualBox on Windows hosts.
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: 4k resolution scaling issues on linux guests

Post by socratis »

Yes, I did, and that's exactly why I quoted straight from the manual so that we're on the same page. I do not see the vagueness. It looks crystal clear to me. What's the part that got you confused? Your mistake was adding the "x" in between the numerical parameters. There is no "x" in the command syntax.
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.
infinityronin
Posts: 13
Joined: 25. May 2017, 07:10

Re: 4k resolution scaling issues on linux guests

Post by infinityronin »

I completely missing the "x" in the third command, thank you for pointing that out.

Unfortunately, this didn't work either.

This caused the virtualbox window displaying the guest to double in size, but the issue is the same, the guest host display is still half the resolution of the virtualbox window, with the mouse following the size of the virtualbox window, rather than the guest.
Tibor
Posts: 3
Joined: 29. Aug 2017, 08:53

Re: 4k resolution scaling issues on linux guests

Post by Tibor »

virtualbox-5.1.26-dfsg-2

Hi guys,

I know I'm late to the party, but was there any followup on this? I am having exactly the same problem, only with the opposite OS situation (host is Ubuntu, guest is a Win 8.1).

The host is in full screen with a very low resolution until windows starts, then it scales to the top left corner, while the mouse still takes input from the complete screen (so input and rendering do not correspond anymore).

When I change the resolution in the guest it essentially only changes the size of the guest's screen, keeping the rendering at the old resolution (hence the guest screen then is larger than the host's "window" and hence parts of the guest's screen are hidden).

I noticed that deinstalling the guest additions leads to a situation where the guest's screen does not scale back to the top left corner, but everything remains in low resolution on the full screen.
I also noticed that trying to install the guest additions causes a lot of messages in the guest additions installation window mentioning a return code 2 (it then asks me to reboot the guest and windows tells me that guest additions are an installed program, so may be that's not really an issue).

When I boot an iso of an ubuntu as a novel VM it uses the full screen but at a horrific resolution (my display is 4k but I get something like 1900x1080), and again, when I change the resolution in the guest then only a part of the screen is rendered at the previous resolution.

It seems as if VirtualBox didn't understand the actual natural resolution of the screen I'm using when running without guest additions and as if the guest additions helped it understand the natural resolution, but failed to handle the screen accordingly...
infinityronin
Posts: 13
Joined: 25. May 2017, 07:10

Re: 4k resolution scaling issues on linux guests

Post by infinityronin »

I don't know if this was ever resolved. I just switched to a Mac and Parallels. If I remember correctly though I did see a couple of solutions for windows guests both on this forum and via google. These threads might be helpful, but they are for previous versions of Virtualbox:

viewtopic.php?f=2&t=69620

viewtopic.php?f=2&t=67869&p=332213&hili ... ol#p332213
heheman3000
Posts: 12
Joined: 1. Feb 2011, 04:02
Primary OS: Linux other
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: 4k resolution scaling issues on linux guests

Post by heheman3000 »

I just ran into this issue after updating from 5.1.22. Several versions I tried from 5.1.24 to 5.2.2 have the same problem, so I think some change in 5.1.24 broke it.

The guest displays over 1/2 x 1/2 (a quarter) of the top left of the total screen area, while the mouse responds over the whole area. If I want to click the system menu in the top right of the screen, for example, I have to click at the top right of the black space, and the menu responds as shown (see attached image).
Display bug
Display bug
vbox-resized.png (122.93 KiB) Viewed 7449 times
This is definitely a HiDPI issue. As you can also see in the picture, the title bar is half the size it should be, the menu bar is twice the size it should be (like the scaling was applied twice), and the icons at the bottom are also twice as large. Scaling is at 200%, so I think the title bar is at 100% and the title bar is at 400%.

I confirm that disabling 3D acceleration fixes the issue, but it just makes everything a whole lot laggier to use.
heheman3000
Posts: 12
Joined: 1. Feb 2011, 04:02
Primary OS: Linux other
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: 4k resolution scaling issues on linux guests

Post by heheman3000 »

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: 4k resolution scaling issues on linux guests (#17345)

Post by socratis »

Thank you for posting the ticket, and for referencing the discussion thread in the ticket. Added ticket information in the first post and the title.
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.
ziplock9000
Posts: 1
Joined: 12. Dec 2017, 08:16

Re: 4k resolution scaling issues on linux guests (#17345)

Post by ziplock9000 »

I'm having the same issue. W10 Host, W7 client. I have a 4k display, 1080p, display and a 720p plasma. I usually have the scaling on my main monitor set to 150%.

Nothing works, changing scaling to 100% in W10, in the display options of the client, running it on the 1080p monitor.. Nothing works. I'm Getting 400% scaling of the client machine and 200% of the VirtualBox GUI
scribe
Posts: 1
Joined: 7. May 2018, 18:37

Re: 4k resolution scaling issues on linux guests (#17345)

Post by scribe »

Earlier in this thread, the suggestion to use:

VM Settings -> Display -> Enable 3D Acceleration (uncheck)

Works for me.

The problem started for me when I turned on autodetect HiDPI on my host machine (Fedora 27, MATE Desktop) and only shows up on Windows 10 guest. In fact, the Windows 10 startup screen looks fine (uses the full VirtualBox window), but when Windows 10 loads all its display drivers and switches resolution and shows login screen, it is then only 1/4 of the VirtualBox window (1/2 height, 1/2 width). The mouse ratio is across the full VirtualBox window though, so to find a buttons in the lower right of the 1/4 small display, I need to move my mouse to the lower right of the VirtualBox window.

Turning off 3D acceleration fixed the problem.
xeata_james
Posts: 1
Joined: 4. Jul 2018, 04:41

Re: 4k resolution scaling issues on linux guests (#17345)

Post by xeata_james »

I am having exactly the same issue on a fresh install of Mint on a LG 2560 x 1080 monitor on an NVidia 840m GeForce. Mint looks great, but Virtualbox app is huge (like a childs app) and Windows 10 guest only uses 25% of the screen for video (but 100% of the screen for mouse).

Of note: the LG monitor is HDMI connected to my Asus Zenbook which is at 1600 x 900 (scaled down from 3200 x 1800). If I drag the Virtualbox App from the LG to the Laptop screen, it looks fine over there. However Windows client still does the 25% screen thing.

Update: With 3D turned off, Windows runs, and scales perfectly on the laptop monitor. the problem is that it scales absolutely wrong on my main monitor. Since this is exactly the same behaviour as the Virtualbox app. So two problems here: Java app is not understanding that scaling is different between monitors - and 3D settings are not working in hidpi.
Zavan.Ryder
Posts: 1
Joined: 18. Jul 2018, 20:03

Re: 4k resolution scaling issues on linux guests (#17345)

Post by Zavan.Ryder »

I ran into the same issue most of you are seeing:

- Brand new hi-res Lenovo thinkpad
- Windows10
- Latest virtualbox (5.2.16 in this case)
- Latest version of Kali (2018.2)
- Tiny guest window or incorrect scaling
- Trouble with fullscreen mode

I noticed the problem right away during installation - a tiny window made that experience a constant eye test. But I figured if I installed virtualbox guest additions, the problem would resolve. It did not, of course.

I tried all the suggestions you've seen here and more. No luck.

I think I get it to work by changing guest's resolution to max (3840x2160) and then scaling to 200% in full screen mode. It worked! Sorta...

Applications launched by Java (i.e., Burp, ZAP, etc.) were not scaling properly and still displayed in tiny windows with tiny font. Almost totally useless.

So I poked around settings for the VM again and noticed a 'Scale Factor' setting under Display. I changed it to 200%, started the Kali guest and it works!!! Finally. Burp and ZAP look fine and everything seems to be functioning correctly at this point. I hope this can help other frustrated folks out there.

Zavan
Last edited by socratis on 27. Jul 2018, 23:21, edited 1 time in total.
Reason: Removed unnecessary verbatim quote of the whole previous message.
zonender
Posts: 8
Joined: 12. Dec 2018, 05:12

Re: 4k resolution scaling issues on linux guests (#17345)

Post by zonender »

This issue happened to me when I bought a 4K resolution laptop (3840X2160), the solution is simple.

Turn on your virtual machine and then go to View >> Scale Factor >> set it to 200%.

I hope that addresses your issue, good luck.
kode54
Posts: 1
Joined: 20. Jan 2019, 05:03
Primary OS: Linux other
VBox Version: OSE other
Guest OSses: Windows 10

Re: 4k resolution scaling issues on linux guests (#17345)

Post by kode54 »

I'm having an entirely different issue with a 4k Linux desktop, under Gnome 3.30.2 Wayland session, with the primary 3840x2160 display set to 200% scaling, and my secondary 1920x1080 display set to 100% scaling. Running Virtualbox OSE from Arch's distribution repository, which is at 6.0.2-1.

Virtualbox itself starts on the 4k display, its UI scaled to 400%. The guest virtual machine boots defaulting scaled to 100%. I haven't tested scaling the guest up, as I don't know if I can fit the guest at 200% with the UI parts scaled to 400%.

EDIT: I found the solution, sort of. It appears that Virtualbox does not like QT_AUTO_SCREEN_SCALE_FACTOR environment being set to 1, as is the default in my Desktop Environment. Setting it to 0 forces Virtualbox to scale to 200% on both displays. Setting it to 1 causes auto scaling to activate, but then Virtualbox scales itself to 200% on top of that, so I get 400% on my primary display and 200% on my secondary display.
Post Reply