Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 24 Sep 2014 15:26:43 +1000
From:      thunder@ahhyes.net
To:        freebsd-x11@freebsd.org
Subject:   Enabling accelerated video in the vmware video driver
Message-ID:  <6cf9dd7abfa991475465c349daefe052@ahhyes.net>

next in thread | raw e-mail | index | archive | help
Hi Guys,

Battling with trying to get video acceleration enabled in this driver... 
The driver refuses to enable it during building and I discovered why.. 
Someone has added a patch into the xf86-video-vmmware port that 
deliberately disables 3d support in the driver by messing with the 
configure script... I removed this patch and got a bit further:

--- snippet ---
checking whether XSERVER_LIBPCIACCESS is declared... yes
checking for PCIACCESS... yes
checking for LIBDRM... yes
checking for XATRACKER... no
configure: error: Package requirements (xatracker >= 0.4.0) were not 
met:

Package xatracker was not found in the pkg-config search path.
Perhaps you should add the directory containing `xatracker.pc'
to the PKG_CONFIG_PATH environment variable
Package 'xatracker', required by 'world', not found
--- snippet ---

Looks like it uses pkgconfig to find libraries and is missing xatracker 
(for which there is no specific port or package for on freebsd). One 
must modify the "graphics/dri" port Makefile and add --enable-xa to the 
configure arguments and issue a "make reinstall" to rebuild it, this 
allows the building of the xatracker libraries to occur however the 
libraries and header files are not included into the final installation 
(probably because the creation of the install package does not know 
about these extra files), one must install them manually.

I found the relevant xatracker.pc file under 
/usr/ports/graphics/dri/work/Mesa-9.1.7/src/gallium/targets/xa-vmwgfx/xatracker.pc, 
put it in the right place  along with the xa header files under 
/usr/local/include. The vmware driver build completes and 3d support is 
enabled in the driver itself. But now the plot thickens. There is no DRM 
kernel module:

 From the Xorg log:

-- snippet --
[104703.219] drmOpenDevice: node name is /dev/dri/card0
[104703.219] Failed to change owner or group for file /dev/dri! 2: No 
such file or directory
[104703.219] Failed to change owner or group for file /dev/dri/card0! 2: 
No such file or directory
[104703.219] drmOpenDevice: open result is -1, (No such file or 
directory)
[104703.219] Failed to change owner or group for file /dev/dri/card0! 2: 
No such file or directory
[104703.219] drmOpenDevice: open result is -1, (No such file or 
directory)
[104703.219] drmOpenDevice: Open failed
[104703.235] [drm] failed to load kernel module "vmwgfx"
[104703.235] (EE) vmware(0): Failed to open drm.
[104703.235] (WW) vmware(0): Disabling 3D support.
[104703.235] (WW) vmware(0): Disabling Render Acceleration.
[104703.235] (WW) vmware(0): Disabling RandR12+ support.
-- snippet --

There's no vmwgfx.ko included with the FreeBSD kernel it seems - A quick 
check of /usr/src/sys/amd64/conf/NOTES shows the following drm options:

# Direct Rendering modules for 3D acceleration.
device          drm             # DRM core module required by DRM 
drivers
device          i915drm         # Intel i830 through i915
device          mach64drm       # ATI Rage Pro, Rage Mobility P/M, Rage 
XL
device          mgadrm          # AGP Matrox G200, G400, G450, G550
device          r128drm         # ATI Rage 128
device          radeondrm       # ATI Radeon
device          savagedrm       # S3 Savage3D, Savage4
device          sisdrm          # SiS 300/305, 540, 630
device          tdfxdrm         # 3dfx Voodoo 3/4/5 and Banshee
device          viadrm          # VIA
options         DRM_DEBUG       # Include debug printfs (slow)

And that's all there is....  The open-vm-tools doesn't build one either:

root@desktop:/usr/ports/emulators/open-vm-tools/work/open-vm-tools-9.4.0-1280544 
# find . -name "*.ko"                                                    
                                                      
./modules/freebsd/vmmemctl.ko
./modules/freebsd/vmblock.ko
./modules/freebsd/vmxnet.ko
./modules/freebsd/vmhgfs.ko

The vmwaretools package from vmware doesn't have the kernel module 
either.

Is there a happy ending to this??????????????? I think I have hit a dead 
end here..

:/

Cheers,
Alex.




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?6cf9dd7abfa991475465c349daefe052>