The XFree86 configuration file is usually found in
/etc/X11/XF86Config
.
This section describes the parts which must be specially set for
the DRI.
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" EndSection
Next, the DRI section can be used to restrict access to direct
rendering.
A client can only use direct rendering if it has permission to
open the /dev/dri/card?
file(s).
The permissions on these DRI device files is controlled by the "DRI"
section in the XF86Config file.
If you want all of the users on your system to be able to use direct-rendering, then use a simple DRI section like this:
Section "DRI" Mode 0666 EndSection
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
:
xf86dri:x:8000:fred,janeYou 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 EndSectionThis 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.]
Finally, the XF86Config file needs Device
and
Screen
sections specific to your hardware.
Look in section 10: Hardware-Specific Information and
Troubleshooting for details.