355 lines
6.4 KiB
HTML
355 lines
6.4 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
|
<HTML
|
|
><HEAD
|
|
><TITLE
|
|
>Miscellaneous Problems</TITLE
|
|
><META
|
|
NAME="GENERATOR"
|
|
CONTENT="Modular DocBook HTML Stylesheet Version 1.7"><LINK
|
|
REL="HOME"
|
|
TITLE="The Linux Gamers' HOWTO"
|
|
HREF="index.html"><LINK
|
|
REL="PREVIOUS"
|
|
TITLE="Sound"
|
|
HREF="x696.html"><LINK
|
|
REL="NEXT"
|
|
TITLE="Emulation and Virtual Machines"
|
|
HREF="x809.html"></HEAD
|
|
><BODY
|
|
CLASS="SECT1"
|
|
BGCOLOR="#FFFFFF"
|
|
TEXT="#000000"
|
|
LINK="#0000FF"
|
|
VLINK="#840084"
|
|
ALINK="#0000FF"
|
|
><DIV
|
|
CLASS="NAVHEADER"
|
|
><TABLE
|
|
SUMMARY="Header navigation table"
|
|
WIDTH="100%"
|
|
BORDER="0"
|
|
CELLPADDING="0"
|
|
CELLSPACING="0"
|
|
><TR
|
|
><TH
|
|
COLSPAN="3"
|
|
ALIGN="center"
|
|
>The Linux Gamers' HOWTO</TH
|
|
></TR
|
|
><TR
|
|
><TD
|
|
WIDTH="10%"
|
|
ALIGN="left"
|
|
VALIGN="bottom"
|
|
><A
|
|
HREF="x696.html"
|
|
ACCESSKEY="P"
|
|
>Prev</A
|
|
></TD
|
|
><TD
|
|
WIDTH="80%"
|
|
ALIGN="center"
|
|
VALIGN="bottom"
|
|
></TD
|
|
><TD
|
|
WIDTH="10%"
|
|
ALIGN="right"
|
|
VALIGN="bottom"
|
|
><A
|
|
HREF="x809.html"
|
|
ACCESSKEY="N"
|
|
>Next</A
|
|
></TD
|
|
></TR
|
|
></TABLE
|
|
><HR
|
|
ALIGN="LEFT"
|
|
WIDTH="100%"></DIV
|
|
><DIV
|
|
CLASS="SECT1"
|
|
><H1
|
|
CLASS="SECT1"
|
|
><A
|
|
NAME="AEN762"
|
|
></A
|
|
>9. Miscellaneous Problems</H1
|
|
><DIV
|
|
CLASS="SECT2"
|
|
><H2
|
|
CLASS="SECT2"
|
|
><A
|
|
NAME="AEN764"
|
|
></A
|
|
>9.1. Hardware Acceleration Problems</H2
|
|
><P
|
|
>XFree86 4.x provides a more centralized and self-contained approach to video. Much of
|
|
the funkyness like kernel modules for non-root access of video boards is, thankfully,
|
|
gone.</P
|
|
><DIV
|
|
CLASS="SECT3"
|
|
><H3
|
|
CLASS="SECT3"
|
|
><A
|
|
NAME="AEN767"
|
|
></A
|
|
>9.1.1. Hardware acceleration isn't working at all</H3
|
|
><P
|
|
>If you're getting like 1 fps, then your system isn't using hardware 3D acceleration.
|
|
There's one of two things that can be going on.</P
|
|
><P
|
|
></P
|
|
><OL
|
|
TYPE="1"
|
|
><LI
|
|
><P
|
|
>Your 3D system is misconfigured (more likely)</P
|
|
></LI
|
|
><LI
|
|
><P
|
|
>Game X is misconfigured (less likely)</P
|
|
></LI
|
|
></OL
|
|
><P
|
|
>The first step is to figure out which one is happening.</P
|
|
><P
|
|
></P
|
|
><OL
|
|
TYPE="1"
|
|
><LI
|
|
><P
|
|
>If you have X 4.0 (X 3.* users procede to step 2), look at the output of
|
|
<TT
|
|
CLASS="USERINPUT"
|
|
><B
|
|
>X -probeonly</B
|
|
></TT
|
|
>. You'll see:</P
|
|
><TABLE
|
|
BORDER="1"
|
|
BGCOLOR="#E0E0E0"
|
|
WIDTH="90%"
|
|
><TR
|
|
><TD
|
|
><FONT
|
|
COLOR="#000000"
|
|
><PRE
|
|
CLASS="SCREEN"
|
|
>(II) XXXXXX: direct rendering enabled</PRE
|
|
></FONT
|
|
></TD
|
|
></TR
|
|
></TABLE
|
|
><P
|
|
>or</P
|
|
><TABLE
|
|
BORDER="1"
|
|
BGCOLOR="#E0E0E0"
|
|
WIDTH="90%"
|
|
><TR
|
|
><TD
|
|
><FONT
|
|
COLOR="#000000"
|
|
><PRE
|
|
CLASS="SCREEN"
|
|
>(II) XXXXXX: direct rendering disabled</PRE
|
|
></FONT
|
|
></TD
|
|
></TR
|
|
></TABLE
|
|
><P
|
|
>where XXXXXXX depends on which video card you have. If direct rendering is
|
|
disabled, then your X configuration is definitely faulty. Your game is not at fault.
|
|
You need to figure out why DRI is disabled. The most important tool for you to use at
|
|
this point is the `DRI Users Guide'. It is an excellently written document that gives
|
|
you step by step information on how to get DRI set up correctly on your machine. A copy
|
|
is kept at <A
|
|
HREF="http://www.xfree86.org/4.0/DRI.html"
|
|
TARGET="_top"
|
|
>http://www.xfree86.org/4.0/DRI.html</A
|
|
>.</P
|
|
><P
|
|
>Note that if you pass this test, your system is CAPABLE of direct rendering. Your
|
|
libraries can still be wrong. So procede to step 2.</P
|
|
></LI
|
|
><LI
|
|
><P
|
|
>There is a program called glxgears which comes with the "mesademos"
|
|
package. You can get mesademos with Debian (<B
|
|
CLASS="COMMAND"
|
|
> apt-get install
|
|
mesademos</B
|
|
>) or you can hunt for the rpm on <A
|
|
HREF="http://www.rpmfind.net"
|
|
TARGET="_top"
|
|
>http://www.rpmfind.net</A
|
|
>. You can also download and compile the source
|
|
yourself from the mesa homepage.</P
|
|
><P
|
|
>Running glxgears will show some gears turning. The xterm from which you run
|
|
glxgears will display "X frames in Y seconds = X/Y FPS". You can compare your system to
|
|
the list of benchmarks below.</P
|
|
><TABLE
|
|
BORDER="1"
|
|
BGCOLOR="#E0E0E0"
|
|
WIDTH="90%"
|
|
><TR
|
|
><TD
|
|
><FONT
|
|
COLOR="#000000"
|
|
><PRE
|
|
CLASS="SCREEN"
|
|
> CPU TYPE VIDEO CARD X VERSION AVERAGE FPS
|
|
</PRE
|
|
></FONT
|
|
></TD
|
|
></TR
|
|
></TABLE
|
|
><P
|
|
>Compiling Mesa and DRI modules yourself can increase your FPS by 15 FPS; quite a
|
|
performance boost! So if your number is, say, about 20 FPS slower than a comparable
|
|
machine, chances are that glxgears is falling back on software rendering. In other
|
|
words, your graphics card isn't 3D accelerating graphics.</P
|
|
><P
|
|
>More important than FPS is having a constant FPS for small and large windows. If
|
|
hardware acceleration is working, the FPS for glxgears should be nearly independent of
|
|
window size. If it's not, then you're not getting hardware
|
|
acceleration.</P
|
|
></LI
|
|
></OL
|
|
></DIV
|
|
></DIV
|
|
><DIV
|
|
CLASS="SECT2"
|
|
><H2
|
|
CLASS="SECT2"
|
|
><A
|
|
NAME="AEN794"
|
|
></A
|
|
>9.2. Hardware acceleration works only for the root user</H2
|
|
><DIV
|
|
CLASS="SECT3"
|
|
><H3
|
|
CLASS="SECT3"
|
|
><A
|
|
NAME="AEN796"
|
|
></A
|
|
>9.2.1. XFree86 4.x</H3
|
|
><P
|
|
>If the following lines aren't present in your XF86Config-4 file, put them in:</P
|
|
><TABLE
|
|
BORDER="1"
|
|
BGCOLOR="#E0E0E0"
|
|
WIDTH="100%"
|
|
><TR
|
|
><TD
|
|
><FONT
|
|
COLOR="#000000"
|
|
><PRE
|
|
CLASS="SCREEN"
|
|
> Section "DRI"
|
|
Mode 0666
|
|
EndSection
|
|
</PRE
|
|
></FONT
|
|
></TD
|
|
></TR
|
|
></TABLE
|
|
><P
|
|
>This allows all non-root users to use DRI. For the paranoid, it's possible to
|
|
restrict DRI to only a few non-root users. See the DRI User Guide.</P
|
|
></DIV
|
|
><DIV
|
|
CLASS="SECT3"
|
|
><H3
|
|
CLASS="SECT3"
|
|
><A
|
|
NAME="AEN801"
|
|
></A
|
|
>9.2.2. XFree86 3.x</H3
|
|
><DIV
|
|
CLASS="SECT4"
|
|
><H4
|
|
CLASS="SECT4"
|
|
><A
|
|
NAME="AEN803"
|
|
></A
|
|
>9.2.2.1. Voodoo cards</H4
|
|
><P
|
|
>Voodoo card hardware acceleration only takes place ONLY at 16bpp color and
|
|
fails silently when starting X in another color depth.</P
|
|
><P
|
|
>Also, Voodoo cards need the <TT
|
|
CLASS="FILENAME"
|
|
>3dfx.o</TT
|
|
> kernel module and a
|
|
<TT
|
|
CLASS="FILENAME"
|
|
>/dev/3dfx</TT
|
|
> device file (major 107, minor 0)
|
|
for non-root hardware acceleration. Neither the module nor the device file are used
|
|
under XFree86 4.x.</P
|
|
></DIV
|
|
></DIV
|
|
></DIV
|
|
></DIV
|
|
><DIV
|
|
CLASS="NAVFOOTER"
|
|
><HR
|
|
ALIGN="LEFT"
|
|
WIDTH="100%"><TABLE
|
|
SUMMARY="Footer navigation table"
|
|
WIDTH="100%"
|
|
BORDER="0"
|
|
CELLPADDING="0"
|
|
CELLSPACING="0"
|
|
><TR
|
|
><TD
|
|
WIDTH="33%"
|
|
ALIGN="left"
|
|
VALIGN="top"
|
|
><A
|
|
HREF="x696.html"
|
|
ACCESSKEY="P"
|
|
>Prev</A
|
|
></TD
|
|
><TD
|
|
WIDTH="34%"
|
|
ALIGN="center"
|
|
VALIGN="top"
|
|
><A
|
|
HREF="index.html"
|
|
ACCESSKEY="H"
|
|
>Home</A
|
|
></TD
|
|
><TD
|
|
WIDTH="33%"
|
|
ALIGN="right"
|
|
VALIGN="top"
|
|
><A
|
|
HREF="x809.html"
|
|
ACCESSKEY="N"
|
|
>Next</A
|
|
></TD
|
|
></TR
|
|
><TR
|
|
><TD
|
|
WIDTH="33%"
|
|
ALIGN="left"
|
|
VALIGN="top"
|
|
>Sound</TD
|
|
><TD
|
|
WIDTH="34%"
|
|
ALIGN="center"
|
|
VALIGN="top"
|
|
> </TD
|
|
><TD
|
|
WIDTH="33%"
|
|
ALIGN="right"
|
|
VALIGN="top"
|
|
>Emulation and Virtual Machines</TD
|
|
></TR
|
|
></TABLE
|
|
></DIV
|
|
></BODY
|
|
></HTML
|
|
> |