VMware Communities
neilsteiner
Contributor
Contributor
Jump to solution

Truncated VRAM framebuffer size in Ubuntu 16.04.0 LTS under VMware Fusion 8

VMware Fusion 8.0.0 or 8.5.0 running Ubuntu 16.04.0 LTS 64-bit incorrectly restricts the Linux framebuffer to 4 MB of VRAM.  This results in a maximum resolution of 1176 x 885 and a few other problems.

The same code running on non-virtualized Ubuntu 16.04.0 LTS 64-bit has no framebuffer issues.

The same code under Fusion 8.0.0 running Ubuntu 14.04.0 LTS 64-bit or Lubuntu 15.04 64-bit has no framebuffer issues.

The vmware.log file for the Ubuntu 16.04.0 LTS 64-bit virtual machine shows the following (with emphasis added):

vmx | I125: SVGA-GFB: Initial gfbSize=4194304

vmx | I125: SVGA: Number of displays 1

vmx | I125: SVGA: Maximum display topology 2560x1600.

vmx | I125: SVGA: Truncated maximum resolution to VRAM size: 4194304 bytes VRAM, 1176x885 Max Resolution

And later:

vmx| I125: SVGA-GFB: Allocated fgbSize=4194304

vmx| A100: ConfigDB: Setting vmotion.checkpointFBSize = "4194304"

vmx| A100: ConfigDB: Setting vmotion.checkpointSVGAPrimarySize = "67108864"

vmx| I125: SVGA-PCI: BAR gfbSize=134217728, fifoSize=3888608

vmx| I125: SVGA: SVGA_REG_MEMORY_SIZE=4194304

vmx| I125: SVGA: SVGA_REG_VRAM_SIZE=4194304

Adding the following to the .vmx file did not make any difference:

svga.vramSize = "67108864"

svga.gfbSize = "67108864"

svga.autodetect = "FALSE"

The following code demonstrates the error:

#include <linux/fb.h>

#include <stdio.h>

#include <fcntl.h>

#include <errno.h>

int main() {

    struct fb_var_screeninfo vinfo;

    int result = 0;

    int fd = open("/dev/fb0",  O_RDWR);

    if(fd < 0) return -1;

    result = ioctl(fd, FBIOGET_VSCREENINFO, &vinfo);

    if(result) return -1;

    vinfo.xres = 1920;

    vinfo.yres = 1080;

    result = ioctl(fd, FBIOPUT_VSCREENINFO, &vinfo);

    if(result) {

        fprintf(stderr, "DEBUG: result=%d, errno=%d.\n", result, errno);

        return -1;

    }

    return 0;

}

What can be done to prevent truncation of the VRAM and framebuffer memory?

The host is an iMac (Retina 5K, 27-inch, 3.3 GHz Intel Core i5, 32 GB 1600 MHz DDR3, AME Radeon R9 M290 2040 MB) running OS X 10.10.2.

1 Solution

Accepted Solutions
banackm
VMware Employee
VMware Employee
Jump to solution

Okay, sorry for the delay...

I've looked into this, and we've apparently got two config options to work-around this, but some of them only work on some product versions.

So try setting both of these options in your VM, and then doing a clean boot of the guest:

svga.minVRAMSize=8388608

svga.minVRAM8MB=TRUE

And that should hopefully fix your problem, and keep it fixed if the VM migrates to other VMware products, or future versions of Fusion.

View solution in original post

12 Replies
banackm
VMware Employee
VMware Employee
Jump to solution

With newer hardware versions (HWv11 and above), the SVGA device is no longer limited by the PCI bar memory when setting modes.  (The term "VRAM' is unfortunately a little ambiguous in our stack, but here it's referring to the PCI bar memory.)

If you have our VMware SVGA driver properly installed in your Linux guest, you should still be able to set larger modes in your X windows session.

However, the PCI bar memory is still needed for modes set using the standard VESA driver (ie without our SVGA driver), which might be what you're running into.  Linux guests are normally only in this mode before the system has finished booting (such as the boot-loader, or sometimes the VT consoles).  I'm not familiar with what the particular ioctls you're calling, but it's possible that you somehow found yourself using the VESA driver instead of our SVGA driver.

To bump up the PCI bar memory, you can set the config option "svga.minVRAM8MB=TRUE" in your vmx file, which will probably resolve this issue for you.  (Although you'll get better performance if the VM is using our SVGA driver instead.)

0 Kudos
neilsteiner
Contributor
Contributor
Jump to solution

I'm not sure if the VRAM in this case is actually the same as the PCI bar memory, but I did try setting svga.minVRAM8MB = "TRUE", and the truncation message still appears in the log file.  As for X or the SVGA versus VESA driver, I'm actually using the Linux framebuffer directly, so there should be no drivers that come into play on the guest side other than what is built into the kernel.  Would you concur with that?  I certainly am not loading any drivers when I run this on Ubuntu 15.04 or 14.04.0 LTS.


Note also that I opened a support request with VMware, and was told that they had confirmed the issue on a lab machine and would be filling a problem report with their engineering team.

0 Kudos
banackm
VMware Employee
VMware Employee
Jump to solution

The VESA driver ships with the BIOS/firmware (normally as part of the ROM on the motherboard, although in our case it's virtualized)  and is what allows any operating system to get basic display functionality before a driver is installed.  So yeah, if you're using the built-in Linux framebuffer, it's internally using the BIOS support driver that we ship.

We have a bug filed internally that I'm looking at.  If you could work with the support team to send me a new vmware.log file (with that "svga.minVRAM8MB" option applied), we'll try and figure out what's going on.

0 Kudos
neilsteiner
Contributor
Contributor
Jump to solution

In response to Support Request 16266426910, I was informed that the problem had been fixed and would be available in an upcoming version of Fusion, though my support person didn't know what version that would be.

SR 16266426910 is now closed, but I can request that it be reopened if that would help.  In any case, I'm happy to try to help resolve this issue, but I don't currently know what version to expect the fix in.

0 Kudos
banackm
VMware Employee
VMware Employee
Jump to solution

Yeah, I think there may have been some confusion there.

I would expect that config option to solve the problem for you after a clean PowerOff/PowerOn.  If it doesn't, then we need to take another look at it with your log and see what's going on.

(So if you can re-open the support ticket, that's a good way to get back in our tracking system and get information back and forth.  Alternatively, if you can just post the log here or send it to me a private message that works too.  I'll take a look either way.)

JakobL
Contributor
Contributor
Jump to solution

0 Kudos
neilsteiner
Contributor
Contributor
Jump to solution

I don't know if your problem stems from the same issue as mine, but I see that you have the same truncated VRAM size as I do.  From your log entries, with emphasis added:

2016-12-08T15:22:12.667+01:00| vmx| I125: SVGA: Truncated maximum resolution to VRAM size: 4194304 bytes VRAM, 1176x885 Max Resolution

0 Kudos
JakobL
Contributor
Contributor
Jump to solution

Look in my thread, maybe my solution works for you.

0 Kudos
neilsteiner
Contributor
Contributor
Jump to solution

Thanks JacobL.  Your solution does work for me temporarily.  Unfortunately, the vmotion.checkpointFBSize setting does not persist across restarts, and the svga.guestBackedPrimaryAware setting is restored each time.

More troubling still is that after I open the framebuffer, certain operations (haven't determine exactly which ones, but things as simple as ssh'ing in or changing to a different virtual console) cause hard locks, sometimes preceded by a kernel panic.  My test code is pretty basic, so I don't think it is causing the crashes.

0 Kudos
banackm
VMware Employee
VMware Employee
Jump to solution

Okay, sorry for the delay...

I've looked into this, and we've apparently got two config options to work-around this, but some of them only work on some product versions.

So try setting both of these options in your VM, and then doing a clean boot of the guest:

svga.minVRAMSize=8388608

svga.minVRAM8MB=TRUE

And that should hopefully fix your problem, and keep it fixed if the VM migrates to other VMware products, or future versions of Fusion.

neilsteiner
Contributor
Contributor
Jump to solution

This solves my problem.  The svga.minVRAM8MB setting is not accepted by Fusion 8.0.0 (2985594), but setting svga.minVRAMSize=16777216 (I had to make it a little larger to get 1920x1080) works beautifully.

0 Kudos
neilsteiner
Contributor
Contributor
Jump to solution

I take back my comment about svga.minVRAM8MB not being accepted.  Not sure what I had done to convince myself of that, but I am indeed using both of the settings recommended by bm.

0 Kudos