3D under SuSE Linux

Support knowledgebase (wessels_3d)
Applies to

SuSE Linux: Versions since 7.1
XFree86: Versions since 4.0.1

Situation

You want to use the 3D support of your graphics card with SuSE Linux to start several applications that use this functionality.

Procedure

3D support is basically provided through the modules DRI, GLX, and the modules fireGL for the FireGL chipsets. A list of graphics card types and their required 3D modules follows:

Manufacturer Graphics Card Type Requirement (package) Module Script
3dfx
  • Voodoo Graphics
  • Voodoo2
  • Voodoo Banshee
  • Voodoo 3/4/5
  • xf86_glx
  • mesa3dfx
  • glide_vg
    (voodoo graphics)
  • glide_vg2 (voodoo2)
dri / glx switch2xf86_glx
ATI
  • Rage128er Serie
  • Radeon Serie
xf86_glx dri / glx
dri / glx
fglr200 / dri / glx
switch2xf86_glx
FireGL
  • FireGL 1
  • FireGL 2/3/4
  • FireGL 8700/8800
  • xf86_glx

  • xfiregl23 for
    Diamond FireGL cards

  • xfglr200(!)
    für 8700/8800
    (x series)
dri / glx
fgl1 / dri / glx
fgl23 / dri / glx
switch2xf86_glx
Intel
  • i810
  • i815
  • i830
xf86_glx dri / glx switch2xf86_glx
Matrox
  • G200
  • G400
  • G450
  • G550
xf86_glx dri / glx switch2xf86_glx
NVIDIA NVIDIA_kernel(!)
NVIDIA_GLX(!)
glx switch2nvidia_glx
PowerVR
  • Kyro
  • Kyro2
powervr(!) dri / glx switch2xf86_glx

(!) = proprietary drivers

The 3D feature may be a source of problems under Linux and could even lead to a system crash. If you determine that the system's instability is caused by 3D, we recommend you stop using 3D and instead use MESA software rendering.

Problems and Support

Nowadays, many manufacturers already provide comprehensive documentation along with the driver, which not only describes the various error messages but also troubleshooting. In addition, there are several help forums about 3D on the Internet.

We cannot provide any free-of-charge support for queries regarding 3D configuration or how to solve a problem resulting from it. However, you are welcome to use our Advanced Support Services in those cases.

Hardware Verification with 3Ddiag (from SuSE Linux 7.3 on)

Use the command 3Ddiag to check your hardware's 3D support. The output provides the following information:

Example for 3Ddiag with a NV6 (NVIDIA TNT2 M64 Vanta). Single sections will be commented on:


Verifying 3D configuration based on XFree86 4 for 3D board
"nVidia Coorporation Vanta [NV6] (10de@002d)":

Card information


Tests for package "NVIDIA_glx":
  package ... done.
  package files ... done.
Tests for package "NVIDIA_kernel":
  package ... done.
  package files ... done.

Package information: 3Ddiag checks if the specific drivers required by the NVIDIA cards are already installed. In the case of NVIDIA cards, you must bear in mind that the drivers installed during the installation are merely dummy drivers without 3D support. We cannot include the original drivers on our CDs due to copyright restrictions. The drivers can be downloaded from:

http://www.nvidia.com/content/drivers/drivers.asp

The necessary packages are NVIDIA_kernel*.rpm and NVIDIA_GLX*.rpm.


Tests for correct OpenGL libraries/glx extensions:
  Symbolic Links ... done.
  /etc/sysconfig/3ddiag (SCRIPT_3D=switch2nvidia_glx) ... done.

Testing the links to the OpenGL libraries


Test for correct XFree86 version ... done.

Test of the XFree86 version


Tests for XFree86 configuration:
  Config File /etc/X11/XF86Config ... done.
  Driver ... failed!
================================================================
3D Hardware acceleration is not used. To use 3D
Hardware acceleration please specify the entry

  Driver "nvidia"

in the Section "Device" of your /etc/X11/XF86Config.

Testing the XF86Config. In the case of the NV6, the specific NVIDIA driver has not been inserted, which 3Ddiag also notices and reports accordingly.


================================================================
  Color Depth ... done.
  Extensions ... failed!
================================================================
3D Hardware acceleration is not used. To use 3D
Hardware acceleration please specify these entries

Load "glx"

in the Section "Module" of your /etc/X11/XF86Config.
================================================================
  Options ... done.

As described above, the modules glx, dri (or both), or the module fireGL must be entered to activate 3D. NVIDIA cards work with the glx module only, which must be installed with the package NVIDIA_GLX*.rpm. 3Ddiag reports that glx is not listed in XF86Config.


----------------------- NOTE -----------------------------------
If 3D hardware OpenGL configuration is not stable enough, you
should switch back to 'Mesa Software Rendering'. You can
verify this configuration with the command "3Ddiag --mesasoft".
----------------------- NOTE -----------------------------------

Checking GLU/glut runtime configuration:
  GLU  ... done (package mesaglu)
  glut ... done (package mesaglut)

Reference to Mesasoft: If you detect that your system does not run stable with 3D, it is recommended to change to the software rendering. To do this, remove all entries concerning specific drivers or 3D modules from the file /etc/X11/XF86Config and execute the following commands as described above


3Ddiag --mesasoft

If no card with 3D support is detected, the following message will be displayed:


================================================================
No 3D capable graphic chipset found! You should consider to use
Mesa Software Rendering'. You can verify this configuration
with the command 3Ddiag --mesasoft\
================================================================

Entries in XF86Config

All entries concerning the 3D feature are included in two sections of /etc/X11/XF86Config:

  1. Section "Module"
  2. Section "Device"

These sections look like this:


Section "Module"
  Load         "type1"
  Load         "speedo"
  Load         "extmod"
  Load         "freetype"
EndSection

In this section, you can insert additional modules required to operate your graphics card. After inserting the modules, the section might look like this:


Section "Module"
  Load         "type1"
  Load         "speedo"
  Load         "extmod"
  Load         "freetype"
  Load         "glx"
EndSection

As for the section "Device":


Section "Device"
  BoardName    "RIVA TNT2 Model 64"
  BusID        "1:0:0"
  Driver       "nv"
  Identifier   "Device[0]"
  Screen       0
  VendorName   "NVidia"
EndSection

NVIDIA drivers offer multiple configuration possibilities, all of them explained in the README. In any case, it is advisable to read the README and activate and disable different functions for test purposes. An example for a Section "Device":


Section "Device"
  BoardName    "RIVA TNT2 Model 64"	# Card type
  BusID        "1:0:0"
  Driver       "nvidia"			# 3D driver
  Identifier   "Device[0]"
  Option       "SWCursor"		# For problems with the
					# representation of the mouse cursor
  Screen       0
  VendorName   "NVidia"
  Option       "NvAGP" "3"		# Loads NvAGP before loading
					# agpgart.
					# Then it is necessary to reboot
					# Refer to the README for more
					# information

  Option       "NoLogo"			# No NVIDIA logo when X
					# starts

  Option       "CursorShadow"		# Simply nice
EndSection

"IgnoreEDID" is an additional option that may prove very useful sometimes. After having installed the NVIDIA packages, you can find the driver documentation at /usr/share/doc/packages/nv_glx/README. For Kyro graphics cards, refer to the article "Support for Graphics Cards with Kyro Chipsets" (http://sdb.suse.de/en/sdb/html/wessels_kyro2.html).

Setting the Links for the OpenGL Libraries

When installing the NVIDIA drivers with YaST Online Update (YOU), the links to the respective libraries will be automatically set, since 3Ddiag is also implemented in SuSEconfig. If, on the other hand, the drivers are installed with the RPM command and the XF86Config is edited manually, the links must be set manually or 3Ddiag must be executed.

The switch commands enable you to set the links correctly. These commands must be executed as the root user. There are several switch commands in the system, but the ones responsible for 3D are:


switch2mesasoft
switch2nvidia_glx
switch2xf86_glx

As the default setting after the installation, the links for the 3D acceleration are set to Software Rendering. All the applications that deploy this function use the link /usr/lib/libGL.so.1, which points to the right OpenGL library at /usr/lib/GL/. (The representation might deviate from the original due to the HTML display):


linux:~ # ll /usr/lib/libGL*
lrwxrwxrwx    1 root root  /usr/lib/libGL.so.1 

                     -> GL/libGL.so.1.3.mesasoft

lrwxrwxrwx    1 root root  /usr/lib/libGLU.so.1 

		     -> libGLU.so.1.3

-rwxr-xr-x    1 root root  /usr/lib/libGLU.so.1.3

After executing the corresponding scripts switch2xf86_glx or switch2nvidia_glx, the files will be changed as follows:


linux:/usr/lib/GL # switch2nvidia_glx 
linux:/usr/lib/GL # ll /usr/lib/libGL*
lrwxrwxrwx    1 root root  /usr/lib/libGL.so.1 

			-> GL/libGL.so.1.0.2960.nv_glx

lrwxrwxrwx    1 root root  /usr/lib/libGLU.so.1 

			-> libGLU.so.1.3

-rwxr-xr-x    1 root root  /usr/lib/libGLU.so.1.3

lrwxrwxrwx    1 root root  /usr/lib/libGLcore.so.1 

			-> libGLcore.so.1.0.2960.nv_glx

-rwxr-xr-x    1 root root  /usr/lib/libGLcore.so.1.0.2960.nv_glx


linux:/usr/lib/GL # switch2xf86_glx   
linux:/usr/lib/GL # ll /usr/lib/libGL*
lrwxrwxrwx    1 root root  /usr/lib/libGL.so.1 

			   -> GL/libGL.so.1.2.xf86_glx

lrwxrwxrwx    1 root root  /usr/lib/libGLU.so.1 

			   -> libGLU.so.1.3

-rwxr-xr-x    1 root root  /usr/lib/libGLU.so.1.3
-rwxr-xr-x    1 root root  /usr/lib/libGLcore.so.1.0.2960.nv_glx

In case of problems with 3D, execute switch2mesasoft to switch all libraries back to software rendering and reset XF86Config to its original state.

User Permissions

When activating the 3D support, make sure that all the users allowed to use 3D on the system belong to the group video. Only these users have the right permissions to access the relevant devices (for example, /dev/nvidia*, /dev/3dfx, /dev/dri/card0).

To add a user to the group video, insert the user name in the respective group in the file /etc/group.

Testing the 3D Feature

There are several programs to test your configuration regarding the 3D feature:

You can use the command


glxinfo | grep rendering

to test if 3D is activated. The output in this case should be:


direct rendering: Yes

to be able to start programs requiring 3D.

The following applications can also be used as test programs:

Procedure with Gears: Start gears from a terminal window (ALT+F2 -> xterm -> Run). A small window with three rotating gear-wheels will open. The fps (frames per second) values will be displayed in the terminal window. Hardware with a value below 150 fps cannot be considered as accelerated hardware. If the acceleration is disabled, the following message will be displayed:


GLUT: Fatal Error in gears: OpenGL GLX extension not supported by 
      display: :0.0

Documentation

Package Documentation available under Download/series
nVidia NVIDIA_kernel*.rpm
NVIDIA_GLX*.rpm
/usr/share/doc/packages/nv_glx/README http://www.nvidia.com/content/drivers/drivers.asp
DRI xf86*.rpm /usr/X11R6/lib/X11/doc/README.DRI
http://dri.sf.net
series x
Mesa/Glide mesa3dfx /usr/share/doc/packages/mesa3dfx/README.SuSE
/usr/share/doc/packages/mesa/README.3DFX
x3d
Kyro powervr /usr/share/doc/powervr/README http://www.powervr.com/Downloads.asp

Sample Values

For sample values concerning 3D accelerated graphics cards, refer to the article "Sample Values for 3D Accelerated Graphics Cards" (http://sdb.suse.de/en/sdb/html/wessels_3d_results.html) from our support database.


See also:
o X Server Configuration with SaX2
o X Server Configuration with SaX2 (8.1 or higher)
o Support for Graphics Cards with Kyro Chipsets

Keywords: 3D, GLX, DRI, FIREGL, NVIDIA, 3DFX, VOODOO, GEFORCE, BANSHEE, RADEON, KYRO, ATI, RADEON, ALLINWONDER, MATROX

Categories: XFree86 , Graphic cards , Window Manager

SDB-wessels_3d, Copyright SuSE Linux AG, Nürnberg, Germany - Version: 07. Nov 2002
SuSE Linux AG - Last generated: 03. Feb 2003 by ip (sdb_gen 1.40.0)