No announcement yet.

I wanted to try the new vmwgfx stuff, but...

  • Filter
  • Time
  • Show
Clear All
new posts

  • I wanted to try the new vmwgfx stuff, but...

    So today I wanted to see how the vmwgfx graphics stuff was doing. Naturally I compiled libdrm with the --enable-vmwgfx-experimental-api and mesa with the svga state tracker.
    Unfortunately with the stable xf86-video-vmwgfx only the fallback on the vmwgfx legacy driver works and that doesn't have any 3d...

    So I tried to compile xf86-video-vmwgfx-git...
    First thing I noticed that I need to do this:
    --- a/vmwgfx/vmwgfx_driver.c
    +++ b/vmwgfx/vmwgfx_driver.c
    @@ -76,7 +76,7 @@ typedef uint16_t uint16;
     typedef int8_t int8;
     typedef uint8_t uint8;
    -#include "./src/svga_reg.h"
    +#include "../src/svga_reg.h"
    This code with the missing dot was commited on Jun 16... Has nobody compiled that driver with the state tracker since June??

    But this would be too easy to fix, the makefile also needs to be broken!
    make[1]: *** No rule to make target `../../xf86-video-vmware-git/saa/', needed by `'.  Stop.
    So my question: Is vmwgfx to be supposed to be actually kind of usable or is this quest ultimatively useless at this time?

  • #2
    Please disregard the first post.
    The build script I was using was not very good.

    So now I have a recent kernel, libdrm, mesa and xorg driver. But apparently my mesa git from today is not recent enaugh?
    [   600.989] (II) vmware(0): Gallium3D XA version: 1.0.0.
    [   600.989] (WW) vmware(0): Expecting 1.6.x >= XA version < 2.0.0.
    So still, no 3D.

    Also, it again messed up the screen resolutions. Before I had set the maximum resolution to 1600x900 in order to be able to set my X to 1600x900, but now again I get quite a list of resolutions but not 1600x900...
    Virtual1 connected 1440x900+0+0 (normal left inverted right x axis y axis) 0mm x 0mm
       800x600        60.0 +   60.3  
       2560x1600      60.0  
       1920x1440      60.0  
       1856x1392      60.0  
       1792x1344      60.0  
       1920x1200      59.9  
       1600x1200      60.0  
       1680x1050      60.0  
       1400x1050      60.0  
       1280x1024      60.0  
       1440x900       59.9* 
       1280x960       60.0  
       1360x768       60.0  
       1280x800       59.8  
       1152x864       75.0  
       1280x768       59.9  
       1024x768       60.0  
       640x480        59.9
    Also, windows 7 on this laptop will drive me crazy: It is shutting down the hard drive all the time. And with all the time I mean, about every 15-30 seconds. Even though I told it to spin down after 999 minutes. The same hard disk will not spin down when told so by hdparm. How do this windows people put up with that that mess?


    • #3
      Aaaand, after again my edit-time is over I today rebuilt mesa git and xf86-video-vmware git and it just works now.

      So it seems I just got in on a bad time.

      OpenGL renderer string: Gallium 0.4 on SVGA3D; build: RELEASE;
      $ glxgears
      11346 frames in 5.0 seconds = 2269.061 FPS
      12227 frames in 5.0 seconds = 2445.197 FPS


      • #4
        I had similar issues. When I checked out their code, I had to edit the MAJOR and MINOR numbers for XA and xf86-video-vmware to actually get it to work.

        It doesn't help that there's no real information anywhere on how to compile it (and that you need the latest everything).

        But I also got it working. Seems to work fine here with Ubuntu.

        I'm hoping that by the next release of Ubuntu they enable it by default. At this point I'd consider it stable.


        • #5
          Yesterday in mesa:
          commit 27915708ed4519cc5606e81fb789e8427501f355
          Author: Brian Paul <>
          Date:   Fri Jan 13 10:54:22 2012 -0700
              docs: new page describing how to build, install VMware SVGA3D guest driver
           docs/contents.html     |    1 +
           docs/vmware-guest.html |  185 ++++++++++++++++++++++++++++++++++++++++++++++++
           2 files changed, 186 insertions(+), 0 deletions(-)
           create mode 100644 docs/vmware-guest.html
          Also yesterday in xf86-video-vmware (I believe this was the commit that fixed the xa version number problem):
          commit e6d03aceb1195de0b490f39024f34a33b1a8f6fc
          Author: Thomas Hellstrom <>
          Date:   Thu Jan 12 14:00:41 2012 +0100
              vmwgfx: Adapt to new XA version number v2
              Signed-off-by: Thomas Hellstrom <>
              Reviewed-by: Jakob Bornecrantz <>
           vmwgfx/vmwgfx_driver.c |   27 ++++++++++-----------------
           1 files changed, 10 insertions(+), 17 deletions(-)
          And with the new vmware driver even modelines work (didn't work with vmwlegacy):
          xrandr --newmode "1600x900_60.00"  119.00  1600 1696 1864 2128  900 901 904 932  -HSync +Vsync
          xrandr --addmode Virtual1 1600x900_60.00
          xrandr --output Virtual1 --mode 1600x900_60.00
          xrandr -s 1600x900
          Last edited by ChrisXY; 01-14-2012, 04:07 AM.


          • #6
            I try to compile this on gentoo
            new page describing how to build, install VMware SVGA3D guest driver

            At this point:
            cd $TOP/vmwgfx
            I get the following error:
            thunder vmwgfx # make
            make -C /lib/modules/3.1.6-gentoo/source  SUBDIRS=`/bin/pwd` DRMSRCDIR=`/bin/pwd` modules
            make[1]: Entering directory `/usr/src/linux-3.1.6-gentoo'
              CC [M]  /root/vmwgfx/vmwgfx_defio.o
            /root/vmwgfx/vmwgfx_defio.c: In function ‚vmw_fb_deferred_io_fsync‚:
            /root/vmwgfx/vmwgfx_defio.c:193:2: error: implicit declaration of function ‚cancel_rearming_delayed_work‚
            /root/vmwgfx/vmwgfx_defio.c: In function ‚fb_deferred_io_mmap‚:
            /root/vmwgfx/vmwgfx_defio.c:222:27: warning: assignment from incompatible pointer type
            make[2]: *** [/root/vmwgfx/vmwgfx_defio.o] Error 1
            make[1]: *** [_module_/root/vmwgfx] Error 2
            make[1]: Leaving directory `/usr/src/linux-3.1.6-gentoo'
            make: *** [modules] Error 2
            thunder vmwgfx #
            Do you notice the strange caracters "‚"? Do you have any clue what may be going on?



            • #7
              I don't know what's going on with these characters, maybe you don't use UTF8?
              should tell...

              I did not need to build the kernel module because it was already enabled in the default archlinux kernel and still is in latest mainline:
              Maybe check your kernel, if you need to compile the kernel module at all?
               ~ % modinfo vmwgfx
              filename:       /lib/modules/3.3.0-1-mainline/kernel/drivers/gpu/drm/vmwgfx/vmwgfx.ko.gz
              license:        GPL and additional rights
              description:    Standalone drm driver for the VMware SVGA device
              author:         VMware Inc. and others
              srcversion:     B1CA40BADF84DE393DD6B10
              depends:        ttm,drm
              intree:         Y
              vermagic:       3.3.0-1-mainline SMP preempt mod_unload modversions 
              parm:           enable_fbdev:Enable vmwgfx fbdev (int)
               ~ % LC_ALL=C pacman -Qo /lib/modules/3.3.0-1-mainline/kernel/drivers/gpu/drm/vmwgfx/vmwgfx.ko.gz
              /lib/modules/3.3.0-1-mainline/kernel/drivers/gpu/drm/vmwgfx/vmwgfx.ko.gz is owned by linux-mainline 3.3rc1-1
              All I needed was libdrm git with vmware experimental api, mesa git with svga state tracker and the xf86-video-vmware git. Even xorg uses the driver without xorg.conf now.

              Also, it's not very good practice compiling as root.
              Last edited by ChrisXY; 01-24-2012, 08:28 AM.


              • #8
                Hi Chris XY,

                Thanks for your reply - I didn't see it when I posted this so I edit.

                I deleted this from vmwgfx_defio.c and it finished compiling while I am not so sur it is safe..
                	/* Kill off the delayed work */
                [vmwgfx] Initialized drm 1.1.0 20060810
                vmwgfx 0000:00:0f.0: PCI INT A -> GSI 16 (level, low) -> IRQ 16
                [vmwgfx] Capabilities:
                [vmwgfx]   Rect copy.
                [vmwgfx]   Cursor.
                [vmwgfx]   Cursor bypass.
                [vmwgfx]   Cursor bypass 2.
                [vmwgfx]   8bit emulation.
                [vmwgfx]   Alpha cursor.
                [vmwgfx]   Extended Fifo.
                [vmwgfx]   Multimon.
                [vmwgfx]   Pitchlock.
                [vmwgfx]   Irq mask.
                [vmwgfx]   Display Topology.
                [vmwgfx]   GMR.
                [vmwgfx]   Traces.
                [vmwgfx]   GMR2.
                [vmwgfx]   Screen Object 2.
                [vmwgfx] Max GMR ids is 64
                [vmwgfx] Max GMR descriptors is 4096
                [vmwgfx] Max number of GMR pages is 196608
                [vmwgfx] Max dedicated hypervisor surface memory is 786432 kiB
                [vmwgfx] VRAM at 0xd0000000 size is 32768 kiB
                [vmwgfx] MMIO at 0xc8800000 size is 2048 kiB
                [vmwgfx] global init.
                [TTM] Zone  kernel: Available graphics memory: 1027392 kiB.
                [TTM] Initializing pool allocator.
                [vmwgfx] width 1024
                [vmwgfx] height 768
                [vmwgfx] bpp 32
                [vmwgfx] Fifo max 0x00200000 min 0x00001000 cap 0x0000077f
                [vmwgfx] Supports vblank timestamp caching Rev 1 (10.10.2010).
                [vmwgfx] No driver support for vblank timestamp query.
                [vmwgfx] Screen objects system initialized
                [vmwgfx] Detected no device 3D availability.
                [vmwgfx] Initialized vmwgfx 2.3.0 20111025 for 0000:00:0f.0 on minor 0
                thunder rules.d # lsmod | grep vmwgfx
                vmwgfx                226064  2
                cfbcopyarea             2840  1 vmwgfx
                cfbimgblt               1816  1 vmwgfx
                cfbfillrect             2712  1 vmwgfx
                i2c_core               12752  2 vmwgfx,i2c_piix4
                thunder rules.d #
                But my xorg does not use it:

                thunder ~ # cat /var/log/Xorg.0.log | grep vmwgfx
                thunder ~ # cat /var/log/Xorg.0.log | grep vmware
                [  1029.269] (==) Matched vmware as autoconfigured driver 0
                [  1029.269] (II) LoadModule: "vmware"
                thunder ~ # modinfo vmwgfx
                filename:       /lib/modules/3.1.6-gentoo/extra/vmwgfx.ko
                license:        GPL and additional rights
                description:    DRM shared core routines
                author:         Gareth Hughes, Leif Delgass, José Fonseca, Jon Smirl
                license:        GPL and additional rights
                description:    Standalone drm driver for the VMware SVGA device
                author:         VMware Inc. and others
                srcversion:     BFE045AE1C61B56A5AD92AC
                depends:        i2c-core,cfbfillrect,cfbimgblt,cfbcopyarea
                vermagic:       3.1.6-gentoo SMP mod_unload modversions
                parm:           enable_fbdev:Enable vmwgfx fbdev (int)
                parm:           force_stealth:Force stealth mode (int)
                parm:           force_no_3d:Force no 3D (int)
                parm:           debug:Enable debug output (int)
                parm:           vblankoffdelay:Delay until vblank irq auto-disable [msecs] (int)
                parm:           timestamp_precision_usec:Max. error on timestamps [usecs] (int)
                thunder ~ #
                Any clue why Xorg does not load it?
                Last edited by dafttitan; 01-24-2012, 08:52 AM.


                • #9
                  First, this doesn't seem good:
                  Originally posted by dafttitan View Post
                  [vmwgfx] Detected no device 3D availability.
                  Originally posted by dafttitan View Post
                  [code]But my xorg does not use it:

                  thunder ~ # cat /var/log/Xorg.0.log | grep vmwgfx
                  thunder ~ # cat /var/log/Xorg.0.log | grep vmware
                  [  1029.269] (==) Matched vmware as autoconfigured driver 0
                  [  1029.269] (II) LoadModule: "vmware"
                  I think, vmware is the right xorg driver. I think the kernel side of the driver is called vmwgfx while the xorg driver is called vmware.
                  glxinfo | grep render
                  But maybe it doesn't work because of the message before that 3D isn't available? I can't really help with that because I actually don't know much about the whole stuff.

                  But maybe there is a clue in the complete Xorg.0.log..


                  • #10
                    I activated 3D in the VM settings and I think it looks not bad in the Xorg log =)
                    Let's install gnome3 and see how it goes..

                    [   697.843] (II) vmware(0): Initialized VMWARE_CTRL extension version 0.2
                    [   697.859] (II) vmware(0): Gallium3D XA version: 1.0.0.
                    [   697.860] (II) vmware(0): Path of drm device is "/dev/dri/card0".
                    [   697.860] (II) vmware(0): [DRI2] Setup complete
                    [   697.860] (II) vmware(0): [DRI2]   DRI driver: vmwgfx
                    [   697.860] (--) vmware(0): Render acceleration is enabled.
                    [   697.860] (==) vmware(0): Rendercheck mode is disabled.
                    [   697.860] (--) vmware(0): Direct rendering (3D) is enabled.
                    [   697.860] (==) vmware(0): Direct presents are disabled.
                    [   697.860] (==) vmware(0): Hardware only presents are disabled.
                    [   697.860] (==) vmware(0): Backing store disabled
                    [   697.860] (==) vmware(0): Silken mouse enabled
                    [   697.860] (II) vmware(0): RandR 1.2 enabled, ignore the following RandR disabled message.
                    [   697.860] (==) vmware(0): DPMS enabled
                    [   697.894] (II) vmware(0): Setting screen physical size to 338 x 203