5. XFree86 and You

If you're going to game under X, it's crucial that you know a bit about X. I think the "X Window User HOWTO", and especially "man XF86Config" should be *required* reading. Don't short change yourself. Read them. They have an extremely high "information to space" ratio. Many problems can be fixed easily if you know your way around the XF86Config (or XF86Config-4) file.

5.1. Getting information about your X system

5.1.1. Probeonly

There are many ways to get information about your X system. A popular method is using probeonly. From a console (and without X already running), type:

    X -probeonly 2> X.out
                        

Yes, that's a single dash; so much for standards. The output of X goes to stderr, so we have to redirect stderr with "2>" to a file named X.out. This file pretty much has everything there is to know about X. Go ahead and look at it. It's chock full of useful information. It's crucial that you know the difference between the different the various markers:

    (--) probed              (**) from config file    (==) default setting
    (++) from command line   (!!) notice              (II) informational
    (WW) warning             (EE) error               (??) unknown.
                        

Here's an example of what useful information I can glean from my output:

I'm running at 16 bpp color:

    (**) TDFX(0): Depth 16, (--) framebuffer bpp 16
                        

X has detected what my videocard chipset and videoram are:

    (--) Chipset 3dfx Voodoo5 found
    (--) TDFX(0): VideoRAM: 32768 kByte Mapping 65536 kByte
                        

As I said, it's all here. Sometimes it's hard to find what you're looking for. Also, if X is already running, you'll have to kill it first, and sometimes you don't want to have to do this. There are other ways of getting information about X, but I don't think any of them have the wealth of knowledge that this method gives. We'll cover them shortly.

On Debian (and perhaps other distros?) the output of startx goes to the file /var/log/Xfree86.0.log, so you don't have to do the "-probeonly" business.

5.1.2. Getting info about your setup: xvidtune

xvidtune is your friend when your X screen is shifted a little bit too far to the right, or if the vertical length is too small to fit on your monitor. However, it's a great diagnostic tool also. It'll give you:

  • the hsync/vsync range specified in your XF86Config file

  • the 4 horizontal and 4 vertical numbers which defines your videomode (the 1st horizontal/vertical numbers gives the screen resolution). These 8 numbers will tell you which modeline your X uses. See the XFree86 Video Modetiming Howto for more information.

  • the "dot clock" your videocard is running at.

5.1.3. Getting info about your setup: xwininfo

xwininfo tells you all sorts of information about X windows. And actually, your "background" or "root" window is considered a window too. So when xwininfo asks you to click on the window you want the information on, click on your background. It'll tell you things like:

: Screen resolution

: Width and Height

: color bpp

: Depth

and a few other things which are interesting but not immediately relevent to our subject, like "Window Gravity State" which tells where new windows tend to be placed by the window manager.

5.1.4. Other sources of information

xdpyinfo gives cool stuff, like X version and loaded extensions (invaluable when trying to see what's missing, like GLX, DRI, XFree86-VidMode, etc.).

5.1.5. Getting information about your 3D system

glxinfo gives lots of useful information about OpenGL (whether direct rendering is being used or not, the currently installed versions of glx and mesa), vendor/renderer strings, the GL library files being used and more.