Ticket #10860 (reopened enhancement)

Opened 3 years ago

Last modified 3 weeks ago

Full resolution not exposed to Linux guest

Reported by: dsvensson Owned by:
Priority: major Component: GUI
Version: VirtualBox 4.1.20 Keywords: retina hidpi
Cc: Guest type: Linux
Host type: Mac OS X


When using VirtualBox on a MacBook Pro Retina, only half the resolution is exposed to, at least, Linux guests. This causes the fonts to be blurry in the guest OS.

To verify this, install Linux, and go to fullscreen, type xrandr and notice the resolution is set to 1440x900.

To compare with VMWare, full Retina mode is supported:

This exposes the current full resolution to the guest, which in the default host retina mode would mean the guest sees 2880x1800 resolution and has to deal with it on its own accordingly.


VBox.log Download (58.5 KB) - added by tdy 16 months ago.
VBox_log_fullscreen_on_2560x1600mbp.log Download (61.7 KB) - added by GabrielCox 15 months ago.
VB 4.3.4 Win XP Guest Full Screen @ 1280x800 on 2560x1600 Mac
rmbp13_vbox.log Download (113.6 KB) - added by chrisb 13 months ago.
VBox.2.log Download (69.9 KB) - added by pippijn 11 months ago.
VirtualBox VM 4.3.10 r93012
VBox.3.log Download (87.9 KB) - added by user1024 5 months ago.
VBox 4.3.18, Fedora 20

Change History

comment:1 Changed 3 years ago by dsvensson

The VirtualBox version is actually the 4.2 beta but it couldn't be selected.

comment:2 Changed 3 years ago by frank

Right, and the RC page asked to report Beta / RC bugs in the forum!

comment:3 Changed 3 years ago by frank

  • Status changed from new to closed
  • Resolution set to duplicate

And actually this problem was already reported before, see #10848.

comment:4 Changed 3 years ago by dsvensson

I've seen #10848 but that only describes the host UI issues which have been fixed (at least the hidpi-flag in Info.plist) in the 4.2 beta. This issue is about exposing the 1-1 resolution to the guest OS.

Version 0, edited 3 years ago by dsvensson (next)

comment:5 Changed 3 years ago by dsvensson

  • Status changed from closed to reopened
  • Resolution duplicate deleted

comment:6 Changed 2 years ago by tdy

Any update on this? I'm still getting 1440x900 res in Linux with the guest additions installed.

comment:7 Changed 16 months ago by frank

  • Status changed from reopened to closed
  • Resolution set to fixed

If this is still a problem with VBox 4.3.2, please reopen this ticket. In that case, please attach a VBox.log file of a VM session running on VBox 4.3.2 with 4.3.2 Guest Additions installed.

Changed 16 months ago by tdy

comment:8 Changed 16 months ago by tdy

  • Status changed from closed to reopened
  • Resolution fixed deleted

VBox.log is attached for VBox 4.3.2 with 4.3.2 Guest Additions installed, vboxguest/vboxsf/vboxvideo modules loaded, and VBoxClient-all executed.

The highest exposed resolution from xrandr is still 1440x900.

Last edited 16 months ago by tdy (previous) (diff)

comment:9 Changed 15 months ago by stevenleeg

Same issue for me, I'm only able to set the resolution to 1440x900 on the 15" Retina MBP.

comment:10 Changed 15 months ago by demmeln

It would be great to see if this is being worked on, or what exactly the issue is.

comment:11 Changed 15 months ago by frank

I would like to see more VBox.log files from VM sessions where this problem manifests. So far we are unable to reproduce it.

comment:12 Changed 15 months ago by GabrielCox

Same here VBox 4.3.4 on a 13" Macbook Pro Retina with 2560x1600 resolution.
Guest (Win 7 w/128MB VRAM) shows up as 1280x800 when full screen.
Info.plist has the following key set: <key>NSHighResolutionCapable</key> <true/>
Additional Log Attached.

Last edited 15 months ago by GabrielCox (previous) (diff)

Changed 15 months ago by GabrielCox

VB 4.3.4 Win XP Guest Full Screen @ 1280x800 on 2560x1600 Mac

comment:13 Changed 15 months ago by GabrielCox

Correction on last attachment labeled VBox_log_fullscreen_on_2560x1600mbp.log: The Guest OS is Win7-64, not WinXP

Changed 13 months ago by chrisb

comment:14 Changed 13 months ago by chrisb

rmbp13_vbox.log shows a 13" MBPR with Virtualbox reporting a fullscreen max resolution of 1280x800 - possible guilty line:

01:05:03.646244 VMMDev::SetVideoModeHint: got a video mode hint (1280x800x0)@(0x0),(1;0) at 0

It ought to be easy to reproduce - this is a completely clean install of debian-7.4.0-amd64-xfce-CD-1.iso with guest additions installed following  the instructions.

comment:15 Changed 12 months ago by Armada651

@frank I think you may be misunderstanding the issue because you should have no trouble reproducing it.

On Mac OS X retina displays 1 pixel is normally scaled up to 4 pixels for application which do not support high dpi. Qt has a nice article explaining the problem:

VirtualBox already supports high-dpi for much of the UI, but not for the guest display. It seems it uses the device-indepedent pixels (1px = 4px) instead of the physical pixels (1px = 1px). This results in much lower image quality as everything is scaled by a factor of 4.

Changed 11 months ago by pippijn

VirtualBox VM 4.3.10 r93012

comment:16 Changed 11 months ago by pippijn

I can confirm this happens on the latest VirtualBox 4.3.10 r93012. I attached another VBox.log.

comment:17 Changed 8 months ago by pippijn

Update: it also still doesn't work on 4.3.14.

comment:18 Changed 5 months ago by ejan

Same issue in the latest release: 4.3.18. Is this issue being worked on at all?

Changed 5 months ago by user1024

VBox 4.3.18, Fedora 20

comment:19 Changed 5 months ago by user1024

Same issue. The VirtualBox guest sees the MacBook's resolution (in my case) as 1280x800 when it is actually 2500x1600.

Steps to notice/reproduce on MacBook Pro Retina 13", as mentioned in the original bug:

  • Install any Linux version with graphics (e.g. Fedora or Ubuntu). Install Guest Additions.
  • Start the VM and log in.
  • Go to View->Switch to Fullscreen if not there already. You can also try maximizing the window and going to View -> Auto-resize Guest Display.
  • in a terminal, run xrandr.

Output for me says the current resolution is 1178x735. (In the past I've gotten more usually 1280x800).

I attached a VBox.log with Fedora 20 where I followed the above steps, except I was already in fullscreen mode from bootup. I also had my VirtualBox Display Preferences set to Hint, Width=2500, Height=1600. You can see in the log that VBox thinks it's switching to the native fullscreen resolution, which it thinks is only 1200x800 or thereabouts.

comment:20 Changed 5 months ago by user1024

Has anyone tried rebuilding from source after changing the Info.plist files to enable high-dpi mode, as in the link posted above by Armada?

comment:21 Changed 4 months ago by pt__

This is very easy to reproduce.

You need a Retina MacBook Pro running e.g. OS X Yosemite. Do not plug into an external monitor -- use only the built in LCD. Go to "System Preferences -> Displays" and choose "Best for display".

Start a virtual machine (e.g. Ubuntu 14.10) and set it to full screen. Look carefully at some text in the guest. It is scaled at 2x (and therefore slightly blurry).

The issue is explained in comment 15.

The developer guidelines for fixing this are probably somewhere in here:

Last edited 4 months ago by pt__ (previous) (diff)

comment:22 follow-up: ↓ 24 Changed 4 months ago by klaus

  • Type changed from defect to enhancement

Sorry, but you're essentially complaining that VirtualBox follows Apple's guidelines (with the mentioned "Best for display" setting the logical screen resolution is half of the physical screen resolution in both directions). It assumes that the guest OS has no HiDPI support, which is true for the vast majority of the candidates. If it would do 1:1 pixel representation then everything would be displaying many VMs in an unusably tiny way.

VirtualBox really listens to the OSX settings. If you want to try: pick "Scaled / More Space", then you'll get a much smaller VM window (simulating full HD resolution). For my eyes the default font size in a Windows 7 VM is already too small. 1:1 pixels are not offered by Apple, you need 3rd party tools to do that, and then everything becomes super tiny.

What you're asking for is a new feature: allowing customizable, additional scaling.

comment:23 Changed 4 months ago by pt__

Sure, let's say it is a feature.

I don't think the current behaviour is "correct" though. I would say it is *very* bad behaviour to not have an option. Windows, Ubuntu and OS X *all* provide HiDPI support. It is not possible to make use of this support using VirtualBox (without making OS X unusable, which is obviously not a real fix). VMWare and Parallels both provide support for this (obviously). Until then, I would say that VirtualBox simply does not have support for HiDPI. The only real option for VirtualBox on OS X is to have blurry guests *or* 1:1 tiny pixels on OS X (i.e. make OS X unusable, despite OS X having good support for HiDPI) and normal (HiDPI) guests (as you said).

Since many popular guest OS's support HiDPI, I would say that VirtualBox is *not* following the Apple guidelines -- the scaling approach is a last resort when there is no better option, but there clearly is a better option for the majority of guest OS's.

comment:24 in reply to: ↑ 22 Changed 4 months ago by user1024

Replying to klaus:

What you're asking for is a new feature: allowing customizable, additional scaling.

Happy to call it a feature request rather than bug fix, but a very important one on this platform in my opinion. The blurry experience is not ideal. As originally stated other VM applications have this feature, so it would be really nice to add.

Thanks for the attention to the issue.

comment:25 Changed 3 months ago by iamthealex

I will start out by saying that VirtualBox is a wonderful piece of s/w. Thank you. However, I believe it can be made even better by taking full advantage of a MacBook Pro retina display like VMWare does.

I see lots of technical back and forth in this ticket, and I don't care if it's a feature request or a bug report or whether or not VirtualBox is following the spec properly or not. I just want the same resolution in my Linux guest as I see on my MacBookPro Host which has a retina display. For example, a shell on my MBP has much better resolution than a shell on my VirtualBox Linux guest.

comment:26 Changed 2 months ago by SpacemanSpiff

I have recently upgraded my VBox installation, but it has not fixed the low-resolution problem with my Retina MBP.

Here are the details of what I've tried:

Host: Early 2013 MBP Retina; OSX 10.9.5 (Mavericks); VBox

Guest: Windows 7 Ultimate (fully updated); VBox Guest Additions;

I have played around with various installation and host configurations, with no success. This includes: Simple upgrade of VBox (from 4.2.x to 4.3.19) w/ Guest Additions Installation on host. Complete removal of VBox via AppCleaner, then install 4.3.20 & import Win7 guest. Install VBox Guest Additions 4.3.20 with & without 3D support. Win7 with & without Aero mode active. Guest in Windowed/Scaled/FullScreen/Seamless Mode.

I should note that I am trying to avoid installing a resolution switcher, or accessing the guest via RDP.

Other than what is listed here, I haven't specialized my VBox installation in any way. Nothing seems to get me past 1440x900.

Is there some other procedure or configuration that I have missed?


Last edited 2 months ago by SpacemanSpiff (previous) (diff)

comment:27 Changed 7 weeks ago by MJD

I have the exact same experience that SpacemanSpiff has. My system specs are exactly the same too. I am trying to avoid installing a resolution switcher as a separate application should not be required to utilize a VM in fullscreen at full resolution or with HiDPI.

I also share the same opinion as iamthealex.

So my question is:

Has the Guest HiDPI Support "feature" been added to the road map? Will it be available in the next release?

This has my vote! +1


comment:28 Changed 6 weeks ago by pt__

This issue is still present. VirtualBox is blurry on retina displays.

comment:29 Changed 6 weeks ago by pt__

Actually, it looks like the code to support this is already in trunk. Could a developer review this code (using (only) their built-in Retina display)? And perhaps step through it with a debugger.

In particular, could you check whether the "dBackingScaleFactor" value is > 1.0? And whether the if statements take the expected branches? (looks a bit contradictory)

// ..

void UIFrameBuffer::eraseImageRect(QPainter &painter, const QRect &rect,
                                   bool fUseUnscaledHiDPIOutput,
                                   HiDPIOptimizationType hiDPIOptimizationType,
                                   double dBackingScaleFactor)
    /* Prepare sub-pixmap: */
    QPixmap subPixmap = QPixmap(rect.width(), rect.height());

    /* If HiDPI 'backing-scale-factor' defined: */
    if (dBackingScaleFactor > 1.0)
        /* Should we
         * perform logical HiDPI scaling and optimize it for performance? */
        if (!fUseUnscaledHiDPIOutput && hiDPIOptimizationType == HiDPIOptimizationType_Performance)
            /* Adjust sub-pixmap: */
            subPixmap = QPixmap(rect.width() * dBackingScaleFactor,
                                rect.height() * dBackingScaleFactor);

#ifdef Q_WS_MAC
        /* Should we
         * do not perform logical HiDPI scaling or
         * perform logical HiDPI scaling and optimize it for performance? */
        if (fUseUnscaledHiDPIOutput || hiDPIOptimizationType == HiDPIOptimizationType_Performance)
            /* Mark sub-pixmap as HiDPI: */
# endif /* VBOX_GUI_WITH_HIDPI */
#endif /* Q_WS_MAC */

    /* Which point we should draw corresponding sub-pixmap? */
    QPointF paintPoint = rect.topLeft();

    /* Take the backing-scale-factor into account: */
    if (fUseUnscaledHiDPIOutput && dBackingScaleFactor > 1.0)
        paintPoint /= dBackingScaleFactor;

    /* Draw sub-pixmap: */
    painter.drawPixmap(paintPoint, subPixmap);

comment:30 Changed 3 weeks ago by samuelparks

+1 - would love to see this supported soon

Note: See TracTickets for help on using tickets.
ContactPrivacy policyTerms of Use