VMware Communities
allquixotic
Enthusiast
Enthusiast

[Linux guests] vmwgfx Testing

vmwgfx is the name of the next generation 2d and 3d acceleration architecture for Linux guests running under VMware. vmwgfx consists of a kernel module (currently in the mainline Linux kernel in the staging area); libdrm (the userland direct rendering manager interface) changes; and userspace components of the Gallium3D architecture providing GLX, X11, and OpenGL support, as well as 2D acceleration.

As far as I can tell, the actual components of Gallium3D that vmwgfx consists of are: `vmware' winsys, and `svga' driver. It would appear that EGL provides GLX (and OpenGL 2.1), but a lot of the state tracker stuff is not specifically tied to vmwgfx.

vmwgfx is still in development, but it is possible to test it today, and get some interesting results. By "interesting" I mean, not fully functional, but definitely showing signs of progress.

I am making this post to get the community interested in / excited about vmwgfx, and to install it and test it with various hardware and Linux distributions. The more mindshare this has, the more likely that it will be included in the likes of Fedora 14 and Ubuntu 10.10. Unless it is included by default in the distributions, the install for users will be too arduous for most to attempt.

I am not going to provide a step by step for installing it, because it depends on your distro; but I will give high level instructions for people who know how to roll their own graphics stack:

1. Compile a 2.6.34 or 2.6.35 kernel with CONFIG_DRM_VMWGFX=m

2. Compile libdrm from git://anongit.freedesktop.org/mesa/drm either the 2.4.20 release or anything later (although master may be broken, so try a release first)

3. Compile mesa from git://anongit.freedesktop.org/mesa/mesa with --enable-gallium-svga passed to configure. I couldn't get it to work with master as of this writing, so once you clone the repo, switch to the 7.8 branch: git checkout 7.8

4. Modify your xorg.conf to look something like this:

Section "ServerLayout"

Identifier "X.org Configured"

Screen 0 "Screen0" 0 0

InputDevice "Mouse0" "CorePointer"

InputDevice "Keyboard0" "CoreKeyboard"

EndSection

Section "Files"

ModulePath "/usr/lib/xorg/modules"

FontPath "/usr/share/fonts/X11/misc"

FontPath "/usr/share/fonts/X11/cyrillic"

FontPath "/usr/share/fonts/X11/100dpi/:unscaled"

FontPath "/usr/share/fonts/X11/75dpi/:unscaled"

FontPath "/usr/share/fonts/X11/Type1"

FontPath "/usr/share/fonts/X11/100dpi"

FontPath "/usr/share/fonts/X11/75dpi"

FontPath "/var/lib/defoma/x-ttcidfont-conf.d/dirs/TrueType"

FontPath "built-ins"

EndSection

Section "Module"

Load "glx"

Load "dbe"

Load "record"

Load "dri2"

Load "extmod"

Load "dri"

EndSection

Section "InputDevice"

Identifier "Keyboard0"

Driver "kbd"

EndSection

Section "InputDevice"

Identifier "Mouse0"

Driver "vmmouse"

  1. Option "Protocol" "auto"

  2. Option "Device" "/dev/input/mice"

  3. Option "ZAxisMapping" "4 5 6 7"

EndSection

Section "Monitor"

Identifier "Monitor0"

VendorName "Monitor Vendor"

ModelName "Monitor Model"

EndSection

Section "Device"

      1. Available Driver options are:-

      1. Values: <i>: integer, <f>: float, <bool>: "True"/"False",

      1. <string>: "String", <freq>: "<f> Hz/kHz/MHz"

      1. : arg optional

Option "SWcursor" "False" #

Option "2DAccel" "True" #

Option "DebugFallback" "False" #

Identifier "Card1"

Driver "vmwgfx"

VendorName "VMware"

BoardName "Virtual Machine Communication Interface"

BusID "PCI:0:7:7"

EndSection

Section "Screen"

Identifier "Screen0"

Device "Card0"

Monitor "Monitor0"

SubSection "Display"

Viewport 0 0

Depth 15

EndSubSection

SubSection "Display"

Viewport 0 0

Depth 16

EndSubSection

SubSection "Display"

Viewport 0 0

Depth 24

EndSubSection

EndSection

If you're lucky, you'll reboot with 2d acceleration partially or fully working (maybe you'll have better luck than me), and 3d stuff (such as compiz / GNOME desktop effects) should run flawlessly if you have fast enough hardware.

Please dedicate this post to reporting your findings when you test this out. Note that compiling gallium and libdrm requires rather new versions of Xorg components and other parts of the system, so please use a very recent distro like Ubuntu 10.04 or Fedora 13.

0 Kudos
21 Replies
EdP2
Enthusiast
Enthusiast

I have a 32 bit Mint guest, using the Ubuntu Oneiric base, and I am trying to build the mesa Gallium driver using the instructions given at the mesa site:

http://www.mesa3d.org/vmware-guest.html

However when 'making' the Mesa and the vmwgfx_dri.so driver using the make command after using:

./autogen.sh --prefix=/usr --with-gallium-drivers=svga 
                              --with-dri-drivers= --enable-xa
(which completed with no apparent errors and gave the usual 'use make to build' message.)

It runs for over 12 hours and just appears to be looping, with the following at the end of every 'loop'

make[2]: Leaving directory `/home/foo/mesa/src/glsl'
make[2]: Entering directory `/home/foo/mesa/src/glsl'
: --nounistd -oglcpp/glcpp-lex.c  glcpp/glcpp-lex.l
: --nounistd -oglsl_lexer.cpp  glsl_lexer.ll
rm -f depend
touch depend

Is this expected behavior?

[EDIT] Answered my own question - there were a bunch of unhighlighted missing dependencies, chief among which
was llvm and bison and maybe clang
It still will not compile however due to a missing header. (Possible gallium issue?).
0 Kudos
ruymbeke
Enthusiast
Enthusiast

Hello,

Thanks to the previous posts, I finally got "vmwgfx" (the new VMWare kernel module supporting

3D graphics hardware acceleration) working on Knoppix 6.7.1 DVD using the following script

and after having installed the latest VMWare Tools on a 8.0.2 Workstation.

#! /bin/sh                                                                                                
apt-get update
apt-get -y -t experimental --reinstall install git-core xutils-dev
apt-get -y -t experimental --reinstall install automake libtool libpthread-stubs0-dev
apt-get -y -t experimental --reinstall install xserver-xorg-dev x11proto-xinerama-dev
apt-get -y -t experimental --reinstall install libgl1-mesa-dri libxcb-glx0-dev

git clone git://anongit.freedesktop.org/git/xorg/driver/xf86-video-vmware

pushd xf86-video-vmware
make clean
./autogen.sh --prefix=/usr #--libdir=/usr/lib64
make -j4
make install
popd

rm -f /lib/modules/`uname -r`/kernel/drivers/gpu/drm/vmwgfx.ko*

git clone git://anongit.freedesktop.org/git/mesa/vmwgfx
pushd vmwgfx
make clean
make -j4
make install
busybox cp -f 00-vmwgfx.rules /etc/udev/rules.d
depmod -ae
depmod -a
popd


rmmod vmw_balloon
rmmod vmwgfx
modprobe vmwgfx

dmesg | grep vmwgfx

glxinfo | grep Open | grep VM
glxinfo | grep Open | grep Mesa

echo Please restart X

At this point it is definitively still experimental but it is quite nice to see the Compiz Desktop

running on a Linux Guest. I can't wait to see that code polished & show up in the "stable" Debian release.

Best Regards,

Gilles

0 Kudos