VirtualBox 6 - Display Resolution

Discussions related to using VirtualBox on Mac OS X hosts.

VirtualBox 6 - Display Resolution

Postby granada29 » 21. Dec 2018, 23:36

I have a 2017 iMac 5K 27. The display resolution is set to 'Default' in System Preferences. This gives an effective display size of 2560x1440.

VirtualBox 6 seems to be ignoring this setting and displaying the VM window as tho the display was set to its maximum resolution, i.e. 3200x1800, yielding very small windows and content (for my eyes anyway).

On VirtualBox 5 this is not a problem - the windows are scaled according to the System Preferences setting.
Attachments
VBox.log.zip
(32.73 KiB) Downloaded 28 times
granada29
 
Posts: 71
Joined: 3. Mar 2015, 07:27

Re: VirtualBox 6 - Display Resolution

Postby granada29 » 22. Dec 2018, 05:39

... and I have since figured out that I need to set the Display Scale-factor to 200% to restore the pre-6.0.0 behaviour. Should have read the manual - sigh.
granada29
 
Posts: 71
Joined: 3. Mar 2015, 07:27

Re: VirtualBox 6 - Display Resolution

Postby socratis » 22. Dec 2018, 12:17

Or you can go to the VirtualBox Preferences and adjust the "Global" scale factor under Display, and avoid doing that on a per VM basis.
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: 24233
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: VirtualBox 6 - Display Resolution

Postby granada29 » 23. Dec 2018, 21:11

socratis wrote:Or you can go to the VirtualBox Preferences and adjust the "Global" scale factor under Display, and avoid doing that on a per VM basis.


Nice idea in in theory. In practice, it does not work. The global setting seems to be ignored
Attachments
VBox.log.zip
(28.8 KiB) Downloaded 11 times
Windows-10.vbox.zip
(2.22 KiB) Downloaded 16 times
granada29
 
Posts: 71
Joined: 3. Mar 2015, 07:27

Re: VirtualBox 6 - Display Resolution

Postby socratis » 23. Dec 2018, 21:31

granada29 wrote:The global setting seems to be ignored

That's because you've already edited/changed the per VM option:
Windows-10.vbox wrote:
<ExtraDataItem name="GUI/ScaleFactor" value="1"/>

I'm not sure how this is handled at this point. In theory, if the per-VM matches the global, the per-VM setting should get removed from the .vbox file. Not sure if it does or not.

The way I do it is to close all VirtualBox processes and search my VM folder recursively for all "ScaleFactor" instances, for all .vbox files, with a text editor that can actually do such a thing (TextWrangler on OSX). I then remove all instances of the "ScaleFactor" from the vbox files, thus "resetting" the per-VM settings to its global setting.
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: 24233
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: VirtualBox 6 - Display Resolution

Postby granada29 » 23. Dec 2018, 22:09

socratis wrote:That's because you've already edited/changed the per VM option:
Windows-10.vbox wrote:
<ExtraDataItem name="GUI/ScaleFactor" value="1"/>

I'm not sure how this is handled at this point. In theory, if the per-VM matches the global, the per-VM setting should get removed from the .vbox file. Not sure if it does or not.


Oh well - I think it has to be a GUI bug then. I would expect that resetting the local scale factor to "1" should just remove that <ExtraDataItem>. I am pretty sure the developers don't really want us to be attacking their xml with a text editor.

Thanks for the help.
granada29
 
Posts: 71
Joined: 3. Mar 2015, 07:27

Re: VirtualBox 6 - Display Resolution

Postby socratis » 23. Dec 2018, 22:33

Do you know how complicated getting the logic right is? Multiple real monitors, each one with its own scale factor. Some HiDPI some not. Multiple virtual screens per VM, each one with its own scale factor. Some actually being moved between real monitors (HiDPI and not) and respecting all the scaling. Convoluted? An understatement!

Plus, it's really the first release that really has tried to tackle the problem, I expect that such issues will be ironed out over time.

The fact is that there is no easy way right now to remove the per-VM scale factor, if it has been set at least once. Maybe a "Reset to defaults" button in the VM Settings » Display could do just that. BTW, the default is not always a scale factor of "1", if I set mine to "1", the effective screen size is half of what I'd expect it to be, for me the default general scale factor is "2"...
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: 24233
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: VirtualBox 6 - Display Resolution

Postby socratis » 12. Jan 2019, 12:23

Just as "macandroid" reminded me in a similar thread, I've opened a ticket for this, #18303: No way in the GUI to reset the per-VM scale factor to follow the global one. Subscribe to the ticket (by adding a simple comment) if you want to see its progress.
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: 24233
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: VirtualBox 6 - Display Resolution

Postby TGOS » 25. Jun 2019, 10:47

Removing this line

Code: Select all   Expand viewCollapse view
<ExtraDataItem name="GUI/ScaleFactor" value="1"/>

doesn't change anything in my tests. The global scale factor still has no effect, the window is equally scaled on either monitor, which means it is tiny on the retina display, despite having it set to 200% in the global preferences.

Further if you ever open the settings of a VM and leave them with OK (no need to change anything!), the setting re-appears. So you need to remove that line again every time you make a change to the config or just have a look at it, unless you leave them with Cancel.

It also re-appears if you ever move the VM window between monitors, which is the most prominent case while you want the global setting to apply as if you always only use it one specific monitor, then you can as well change the VM setting, which at least does apply.
TGOS
 
Posts: 8
Joined: 14. Jan 2019, 17:04

Re: VirtualBox 6 - Display Resolution

Postby socratis » 25. Jun 2019, 16:58

TGOS wrote:if you ever open the settings of a VM and leave them with OK (no need to change anything!), the setting re-appears

You haven't shut down VirtualBox and its related processes, that's why. If VirtualBox is open, you can't be editing the .vbox files live, they're ignored, and they're reverted back once you close VirtualBox. If you want to remove that scaling factor, you do it from the CLI, preferably when VirtualBox isn't running:

    VBoxManage setextradata global GUI/ScaleFactor
    VBoxManage setextradata "<YourVM>" GUI/ScaleFactor
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: 24233
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


Return to VirtualBox on Mac OS X Hosts

Who is online

Users browsing this forum: No registered users and 10 guests