Quantcast
Channel: VMware Communities : All Content - Workstation Pro
Viewing all articles
Browse latest Browse all 18268

3D hardware acceleration in Linux. Hello GNOME 3

$
0
0

I'm sure many if you have been waiting for this for a while and its finally here, 3D Hardware acceleration in Linux!

 

I just got openSUSE 12.1 working with GNOME 3 experience and wanted to share it here with you. This is experimental so I would recommend you make a new VM if you want to try it.

 

I started with opensuse 12.1 32bit liveCD

 

 

 

Don't forget to turn on 3D acceleration

VM > Settings > Display > Accelerate 3D graphics

 

 

 

Start the liveCD and Install opensuse under

Applications > System Tools > Live Installer

 

 

You need to fully update by running:

 

      sudo zypper update

 

Reboot after updating

 

Install the following dependencies that are needed to build:

 

      sudo zypper install gcc-c++ bison flex automake make gcc libtool kernel-devel
      sudo zypper install git-core xorg-x11-proto-devel libpciaccess0-devel xorg-x11-util-devel
      sudo zypper install xorg-x11-libX11-devel xorg-x11-server-sdk libexpat-devel

 

 

Getting the Latest Source Code

 

Mesa/Gallium master branch. This code is used to build libGL, and the direct rendering svga driver for libGL, vmwgfx_dri.so, and the X acceleration library libxatracker.so.x.x.x.

 

      git clone git://anongit.freedesktop.org/git/mesa/mesa

 

 

VMware Linux guest kernel module. Note that this repo contains the complete DRM and TTM code. The vmware-specific driver is really only the files prefixed with vmwgfx.

 

      git clone git://anongit.freedesktop.org/git/mesa/vmwgfx

 

 

libdrm, A user-space library that interfaces with drm. Most distros ship with this driver. Safest bet is really to replace the system one. Optionally you can point LIBDRM_CFLAGS and LIBDRM_LIBS to the libdrm-2.4.22 package in toolchain. But here, we replace:

 

      git clone git://anongit.freedesktop.org/git/mesa/drm

 

 

xf86-video-vmware. The chainloading driver, vmware_drv.so, the legacy driver vmwlegacy_drv.so, and the vmwgfx driver vmwgfx_drv.so.

 

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

 

 

Building the Code

 

Build libdrm: If you're on a 32-bit system, you should skip the --libdir configure option. Note also the comment about toolchain libdrm above.

 

      cd drm

      ./autogen.sh --prefix=/usr --enable-vmwgfx-experimental-api --libdir=/usr/lib64

      make

      sudo make install

      cd ..

 

 

Build Mesa and the vmwgfx_dri.so driver, the vmwgfx_drv.so xorg driver, the X acceleration library libxatracker. The vmwgfx_dri.so is used by the OpenGL libraries during direct rendering, and by the Xorg server during accelerated indirect GL rendering. The libxatracker library is used exclusively by the X server to do render, copy and video acceleration: The following configure options doesn't build the EGL system. As before, if you're on a 32-bit system, you should skip the --libdir configure option.

 

      cd mesa

      ./autogen.sh --prefix=/usr --libdir=/usr/lib64 --with-gallium-drivers=svga --with-dri-drivers= --enable-xa

      gmake

      sudo make install

      cd ..

 

Build xf86-video-vmware: Now, once libxatracker is installed, we proceed with building and replacing the current Xorg driver. First check if your system is 32- or 64-bit. If you're building for a 32-bit system, you will not be needing the --libdir=/usr/lib64 option to autogen.

 

      cd xf86-video-vmware

      ./autogen.sh --prefix=/usr --libdir=/usr/lib64

      make

      sudo make install

      cd ..

 

 

Build vmwgfx kernel module. First make sure that any old version of this kernel module is removed from the system by issuing

 

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

 

then build

 

 

      cd vmwgfx

      make

      sudo make install

      sudo cp 00-vmwgfx.rules /etc/udev/rules.d

 

You need to enter root to run depmod and modprobe, sudo wont work

 

      su

      depmod -ae

 

Now try to load the kernel module by issuing:

 

      modprobe vmwgfx

      exit

 

Then type dmesg and look at the output. you should see:

[    7.010541] [vmwgfx] Initialized drm 1.1.0 20060810
[    7.010777] vmwgfx 0000:00:0f.0: PCI INT A -> GSI 16 (level, low) -> IRQ 16
[    7.012555] [vmwgfx] Capabilities:
[    7.012558] [vmwgfx]   Rect copy.
[    7.012560] [vmwgfx]   Cursor.
[    7.012561] [vmwgfx]   Cursor bypass.
[    7.012562] [vmwgfx]   Cursor bypass 2.
[    7.012564] [vmwgfx]   8bit emulation.
[    7.012565] [vmwgfx]   Alpha cursor.
[    7.012567] [vmwgfx]   3D.
[    7.012568] [vmwgfx]   Extended Fifo.
[    7.012569] [vmwgfx]   Multimon.
[    7.012571] [vmwgfx]   Pitchlock.
[    7.012572] [vmwgfx]   Irq mask.
[    7.012573] [vmwgfx]   Display Topology.
[    7.012575] [vmwgfx]   GMR.
[    7.012576] [vmwgfx]   Traces.
[    7.012577] [vmwgfx]   GMR2.
[    7.012579] [vmwgfx]   Screen Object 2.
[    7.012580] [vmwgfx] Max GMR ids is 64
[    7.012582] [vmwgfx] Max GMR descriptors is 4096
[    7.012583] [vmwgfx] Max number of GMR pages is 196608
[    7.012588] [vmwgfx] Max dedicated hypervisor surface memory is 786432 kiB
[    7.012590] [vmwgfx] VRAM at 0xd0000000 size is 131072 kiB
[    7.012591] [vmwgfx] MMIO at 0xc8800000 size is 2048 kiB
[    7.012594] [vmwgfx] global init.
[    7.012635] [TTM] Zone  kernel: Available graphics memory: 435208 kiB.
[    7.012637] [TTM] Zone highmem: Available graphics memory: 1031148 kiB.
[    7.012638] [TTM] Initializing pool allocator.
[    7.012925] [vmwgfx] width 1280
[    7.012943] [vmwgfx] height 768
[    7.012961] [vmwgfx] bpp 32
[    7.014912] [vmwgfx] Fifo max 0x00200000 min 0x00001000 cap 0x0000077f
[    7.022205] [vmwgfx] Supports vblank timestamp caching Rev 1 (10.10.2010).
[    7.022208] [vmwgfx] No driver support for vblank timestamp query.
[    7.022257] [vmwgfx] Screen objects system initialized
[    7.022261] [vmwgfx] Detected device 3D availability.
[    7.024639] [vmwgfx] Initialized vmwgfx 2.3.0 20111025 for 0000:00:0f.0 on mi
Now reboot and enjoy GNOME 3!
If you run glxinfo you should see the following:
OpenGL vendor string: VMware, Inc.
OpenGL renderer string: Gallium 0.4 on llvmpipe
OpenGL version string: 2.1 Mesa 7.11.2
OpenGL shading language version string: 1.20
Check out the attached screen shots
gnome3.png

 

gnome 3_2.png

 

 

If you run into any problems post the errors you get here and I will try to help but this is pretty new to me. In 64bit you probably need to get some different dependencies. I went though the guide again and made some adjustments so it should work now if you were having any problems.

 

made corrections to guide:

-added make to dependencies

-run gmake instead of make for mesa

-removed  xorg-x11-devel from dependencies (it gets installed by another package anyways)

-added info about su for depmod and modprobe

 

Message was edited by: khogan made corrections to guide -added make to dependencies -run gmake instead of make for mesa -removed  xorg-x11-devel from dependencies (it gets installed by another package anyways) -added info about su for depmod and modprobe


Viewing all articles
Browse latest Browse all 18268

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>