DRI Users Guide : X Server Start-up
Previous: Prerequisite Software
Next: Using 3D Acceleration

5. X Server Start-up

This section describes the steps needed to start the X server with 3D acceleration support.

5.1. Kernel module

Before starting the X server you must install the correct kernel module for your hardware.

This can be done by executing the following as root:

        insmod XXX/drivername.o

For example, on 3dfx hardware, the kernel module is called tdfx.o so you you would type insmod XXX/tdfx.o

Verify that the kernel module was installed by checking that /proc/dri/0 exists.

5.2. XF86Config file

First, the XF86Config file must load the GLX and DRI modules:

	Section "Module"
	# This loads the GLX module
	    Load       "glx"
	# This loads the DRI module
	    Load       "dri"

Next, the DRI section can be used to restrict access to direct rendering.

If you want all of the users on your system to be able to use direct-rendering, then use a simple DRI section:

	Section "DRI"
	     Mode 0666

This section will allow any user with a current connection to the X server to use direct rendering.

If you want to restrict the use of direct-rendering to a certain group of users, then create a group for those users by editing the /etc/group file on your system. For example, you may want to create a group called xf86dri and place two users (e.g., fred and jane) in that group. To do that, you might add the following line to /etc/group:


You have to be careful that the group id (8000 in this example) is unique.

Then you would use the following DRI section:

        Section "DRI"
             Group "xf86dri"
             Mode 0660

This would limit access to direct-rendering to those users in the xf86dri group (fred and jane in this example). When other users tried to use direct rendering, they would fall back to unaccelerated indirect rendering.

[Note that there is a known bug in XFree86 4.0 that prevents some changes to the DRI section from taking effect. Until this bug is fixed, if you change the DRI section, please also remove the /dev/dri directory with the rm -rf /dev/dri command.]

Next, the Device section of the XF86Config file must describe your particular hardware. For example, here's the Device section for a 3dfx Voodoo3 card:

        Section "Device"
            Identifier  "Voodoo3"
            VendorName  "3dfx"
            Driver      "tdfx"

Finally, the Screen section of the XF86Config file may have to be specially configured as well. For example, Voodoo3 hardware acceleration is only available in 16bpp mode.

	Section "Screen"
	    Identifier  "Screen 1"
	    Device      "Voodoo3"
	    Monitor     "High Res Monitor"
	    DefaultDepth 16
	    Subsection "Display"
		Depth       16
		Modes       "1280x1024" "1024x768" "800x600" "640x480"
		ViewPort    0 0

If there are errors in the XF86Config file, the X server will log errors to the file /var/log/XFree86.0.log

5.3. Memory usage

Using the 3D features of a graphics card requires more memory than when it's just used as a 2D device. Double buffering, depth buffering, stencil buffers, textures, etc. all require extra graphics memory. These features may require four times the memory used for a simple 2D display.

If your graphics card doesn't have a lot of memory (less than 16MB, for example), you may have to reduce your screen size and/or color depth in order to use 3D features.

The documentation included with your card should have information about maximum screen size when using 3D.

DRI Users Guide : X Server Start-up
Previous: Prerequisite Software
Next: Using 3D Acceleration