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

Discussions related to using VirtualBox on Windows hosts.

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

Postby infinityronin » 25. May 2017, 07:37


[ModEdit; related ticket: #17345]

Been working on this a couple days, and unable to find a work solution.

Using windows 10 host on a laptop with 3840 x 2160 resolution screen, and scaling set to 200% (fonts and such are two small otherwise).

After installing Guest Additions on any linux guest (Fedora, Mint, or Ubuntu), the guest display only uses 1/4 of the screen, located in the upper left hand quarter. The mouse however acts as if the entire screen is being used.

I've verified the correct version of guest additions is installed on the guest via the following commands (on Mint):
Code: Select all   Expand viewCollapse view
dpkg -l | grep virtualbox-guest
lsmod | grep vboxguest


I've tried tried going to Settings > Display > Scale and increasing the scale to 200% to match my scaling in Windows. This does increase the size of the guest display, but not to the full screen and the mouse is still acting as if the entire screen is being used.

If I disable 3d acceleration, then the guest display uses the full screen, using software rendering.

If I lower the scaling in the windows host to 100%, then the guest display uses the full screen, but this won't work for me as all fonts, buttons etc are too small in the host.

I tried setting
Code: Select all   Expand viewCollapse view
.\VBoxManage.exe setextradata "Mint" "CustomVideoMode1" "3840x2160x32"
but I didn't see it available in the guest "Mint".

It seems like I could hard set the resolution for the guest, but I'd like to avoid that as I sometimes move the guest to a second monitor that is only 1080p.

I've run out of things I can think to try. Any help would be greatly appreciated.
Last edited by socratis on 5. Dec 2017, 02:03, edited 1 time in total.
Reason: Added ticket related information.
infinityronin
 
Posts: 13
Joined: 25. May 2017, 07:10

Re: 4k resolution scaling issues on linux guests

Postby socratis » 25. May 2017, 09:03

infinityronin wrote:the guest display only uses 1/4 of the screen, located in the upper left hand quarter
Would that mean a resolution of (3840x2160)/2 = 1920x1080 for the guest? Can you change the resolution from within the guest? What options do you have available when you try that?

infinityronin wrote:The mouse however acts as if the entire screen is being used.
I'm not sure what to make of this. Do you mean that the mouse is "free" to move through the whole 3840x2160 area of your host and it doesn't stay within the guest window? That's the default behavior and it is to be expected.

infinityronin wrote:I've verified the correct version of guest additions
Funny that you mentioned "version", because there's one thing that's completely missing from your post; versions:
  • What's your host version? "OSX" isn't enough, "OSX 10.9.5 build 13f1911" is much better.
  • What's your guest version? "Win10" isn't enough, "Win10 1607, build 14393.969" is much better.
  • What's your VirtualBox version? "The latest" is not enough, "VirtualBox 5.1.18 r140002" is much better.
For future reference, "current version", "latest version", "previous version" don't (generally speaking) provide accurate information. In a couple of months the "current" will definitely be different. It's better if you use the complete version numbers (including the build numbers) to identify software.

infinityronin wrote:If I disable 3d acceleration, then the guest display uses the full screen, using software rendering.
So, on top of the previous state, you're saying that you can't go FullScreen (FS) if 3D is enabled? And you can go FS if 3D acceleration is disabled? That's ... strange.

infinityronin wrote:the guest display uses the full screen, but this won't work for me as all fonts, buttons etc are too small in the host.
I can help a brother out! I will send you my 12-year old Eizo monitor with 1280x1024 (mint condition) and you can send me your 4K display. Would that work? The fonts are BIG on that monitor. And shiny!!! :D

infinityronin wrote:as I sometimes move the guest to a second monitor that is only 1080p.
Well of course you're going to be having issues like that. On a real computer! Imagine on virtual one...

Pick one guest of yours, like Mint (I like that one). Follow a "start the VM from cold-boot"/"observe error"/"shutdown the VM" cycle. With the VM shut down completely (not paused or saved), right-click on the VM in the VirtualBox Manager and select "Show Log". Save only the first "VBox.log", ZIP it and attach it to your response (see the "Upload attachment" tab below the reply form).
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
socratis
Site Moderator
 
Posts: 12746
Joined: 22. Oct 2010, 11:03
Location: Greece
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5

Re: 4k resolution scaling issues on linux guests

Postby infinityronin » 25. May 2017, 19:21

socratis wrote:Funny that you mentioned "version", because there's one thing that's completely missing from your post; versions:

Host: Win10 Enterprise Version:1607, Build:14393.1198
Guest: Linux Mint 18.1
VirtualBox: Version 5.1.22 r115126 (Qt5.6.2)
GuestAdditions:

socratis wrote:Would that mean a resolution of (3840x2160)/2 = 1920x1080 for the guest? Can you change the resolution from within the guest? What options do you have available when you try that?

Yes, that is a better way to put it, the resolution seems to be halved. I can change the resolution from within the guest, the resolution when opening up the display settings is set at 1920 x 975, and the maximum available is 2560 x 1600. I have included a picture of what this looks like.


socratis wrote:I'm not sure what to make of this. Do you mean that the mouse is "free" to move through the whole 3840x2160 area of your host and it doesn't stay within the guest window? That's the default behavior and it is to be expected.

Yes, but I forgot to include that the mouse isn't able to select anything in the guest display. The mouse pointer responds as if the resolution is 3840x2160, but the guest display is shown like 1920x1080, and so when I use the mouse to click something in the guest display, nothing happens. I have to use the keyboard to shutdown the guest.


socratis wrote:So, on top of the previous state, you're saying that you can't go FullScreen (FS) if 3D is enabled? And you can go FS if 3D acceleration is disabled? That's ... strange.

No, the above state where the resolution of the guest appears to be halved to 1920x1080, only happens when 3d acceleration is enabled. If the 3d acceleration is disabled, then the guest display uses the entire screen, as if the resolution is 3840x2160. In both cases Fullscreen (FS) works.


socratis wrote:Pick one guest of yours, like Mint (I like that one). Follow a "start the VM from cold-boot"/"observe error"/"shutdown the VM" cycle. With the VM shut down completely (not paused or saved), right-click on the VM in the VirtualBox Manager and select "Show Log". Save only the first "VBox.log", ZIP it and attach it to your response (see the "Upload attachment" tab below the reply form).

Attached, along with a picture of the issue.
Attachments
Log.zip
Log and Picture zip file
(104.37 KiB) Downloaded 10 times
infinityronin
 
Posts: 13
Joined: 25. May 2017, 07:10

Re: 4k resolution scaling issues on linux guests

Postby socratis » 25. May 2017, 21:52

I couldn't really find anything other than the following:
00:00:03.938683 GUI: UIMachineViewNormal::resendSizeHint: \
Restoring guest size-hint for screen 0 to 1920x975
00:00:03.938741 VMMDev: SetVideoModeHint: Got a video mode hint (1920x975x32)@(0x0),(1;0) at 0
which isn't even 1/2 your width * height, but it sounds more like 1/2*width x 1/2 (height-taskbar).

Maybe the Windows is sending the wrong information to the guest, based on the zoom factor that you have in your host? Some weird interaction? Let's see if anyone else has any ideas...
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
socratis
Site Moderator
 
Posts: 12746
Joined: 22. Oct 2010, 11:03
Location: Greece
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5

Re: 4k resolution scaling issues on linux guests

Postby infinityronin » 25. May 2017, 22:17

Thanks for looking I really appreciate it.

socratis wrote:Maybe the Windows is sending the wrong information to the guest, based on the zoom factor that you have in your host? Some weird interaction? Let's see if anyone else has any ideas...


I think that is at least part of the problem. As I mentioned before, if I lower the scaling of the Windows 10 host to 100%, then the guest display uses the full screen as expected. And inside the guest itself, I can scale the display to 200% (Mint calls it Hi-DPI, under General). But then I have the problem of using the Windows 10 host with 100% scaling, which is just really unusable for me, everything is way too small. Is there a way to have VirtualBox not pass on the Windows 10 Host scaling?
infinityronin
 
Posts: 13
Joined: 25. May 2017, 07:10

Re: 4k resolution scaling issues on linux guests

Postby socratis » 25. May 2017, 22:25

I should have asked you that from the get go, but have you tried toggling the HiDPI setting? Under VM Settings » Display » Use Unscaled HiDPI Output? It may or may not be there, that's the problem...
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
socratis
Site Moderator
 
Posts: 12746
Joined: 22. Oct 2010, 11:03
Location: Greece
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5

Re: 4k resolution scaling issues on linux guests

Postby infinityronin » 25. May 2017, 22:57

Under VM Settings » Display, there is no "Use Unscaled HiDPI Output" toggle, just "Enable 3D Acceleration" and "Enable 2D Acceleration".
infinityronin
 
Posts: 13
Joined: 25. May 2017, 07:10

Re: 4k resolution scaling issues on linux guests

Postby socratis » 25. May 2017, 23:14

I have a Mac and I wasn't sure if this feature had been implemented cross-platform yet, that's why I said "It may or may not be there". Maybe they'll implement it sooner rather than later...
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
socratis
Site Moderator
 
Posts: 12746
Joined: 22. Oct 2010, 11:03
Location: Greece
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5

Re: 4k resolution scaling issues on linux guests

Postby infinityronin » 26. May 2017, 00:22

Mac really does get all the cool stuff first. Thank you for looking at this. Is there a public road-map for Virtualbox?
infinityronin
 
Posts: 13
Joined: 25. May 2017, 07:10

Re: 4k resolution scaling issues on linux guests

Postby socratis » 26. May 2017, 00:25

infinityronin wrote:Mac really does get all the cool stuff first.
No, it doesn't. In a lot of software areas, VirtualBox included.

infinityronin wrote: Is there a public road-map for Virtualbox?
No. The developers don't even disclose the next version release date.

But the thing is I don't remember this being a HiDPI problem before, what you're seeing is not usual.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
socratis
Site Moderator
 
Posts: 12746
Joined: 22. Oct 2010, 11:03
Location: Greece
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5

Re: 4k resolution scaling issues on linux guests

Postby infinityronin » 26. May 2017, 02:05

It seems like having that toggle would fix the problem through. Thanks again for looking at it.
infinityronin
 
Posts: 13
Joined: 25. May 2017, 07:10

Re: 4k resolution scaling issues on linux guests

Postby infinityronin » 27. May 2017, 00:09

I am fairly convinced the issue is with Windows 10 host scaling being passed to the guest. While the guest is running, if I make any changes to scaling (either by starting at 100% and increasing the scaling or by starting at 200% and decreasing), it is instantly reflected in the guest display. Increasing the scaling in Windows 10 host causes the resolution of the guest to shrink.
infinityronin
 
Posts: 13
Joined: 25. May 2017, 07:10

Re: 4k resolution scaling issues on linux guests

Postby infinityronin » 27. May 2017, 01:06

To add more information I have tried the following additional steps, but the issue still exists:

* Right click on Oracle VM VirtualBox icon > Properties > Compatibility > checkmark "Disable display scaling on high DPI settings"

* Right click on Oracle VM VirtualBox icon > Properties > Compatibility > checkmark "Run this program in compatibility mode for:" > Select Windows 7

* Hard set the resolution for the guest host via command prompt on Windows 10 Host (note below in this case <vmname> = Ubuntu):
VBoxManage setextradata global GUI/MaxGuestResolution any
VBoxManage setextradata "<vmname>" "CustomVideoMode1" "3840 x 2160 x 32"
VBoxManage controlvm "<vmname>" setvideomodehint 3840 x 2160 x 32

However, on the last command I get an error:
Code: Select all   Expand viewCollapse view
Syntax error: Either "yes" or "no" is expected


I've looked at the manual, but it's vague as to what the exact syntax problem was. I tried additional permutations of adding "yes" or other parameters, but the end result was either
Code: Select all   Expand viewCollapse view
Syntax error: Either "yes" or "no" is expected
or
Code: Select all   Expand viewCollapse view
Syntax error: Incorrect number of parameters


Anyone know what the command is supposed to actually be?
infinityronin
 
Posts: 13
Joined: 25. May 2017, 07:10

Re: 4k resolution scaling issues on linux guests

Postby socratis » 27. May 2017, 01:17

infinityronin wrote:Anyone know what the command is supposed to actually be?
Yes. The User Manual, have you tried it? ;)
setvideomodehint <xres> <yres> <bpp>

as in:
    VBoxManage controlvm "<vmname>" setvideomodehint 3840 2160 32
Also note that the "controlvm" sub-command is only effective when the VM is actually running, the GAs are installed, and not with all guests. From the User Manual, again:
setvideomodehint requests that the guest system change to a particular video mode. This requires that the Guest Additions be installed, and will not work for all guest systems.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
socratis
Site Moderator
 
Posts: 12746
Joined: 22. Oct 2010, 11:03
Location: Greece
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5

Re: 4k resolution scaling issues on linux guests

Postby infinityronin » 27. May 2017, 01:37

socratis wrote:Yes. The User Manual, have you tried it? ;)


Did you actually read my post?
infinityronin wrote:I've looked at the manual, but it's vague as to what the exact syntax problem was
infinityronin
 
Posts: 13
Joined: 25. May 2017, 07:10

Next

Return to VirtualBox on Windows Hosts

Who is online

Users browsing this forum: Google [Bot] and 22 guests