home | O'Reilly's CD bookshelfs | FreeBSD | Linux | Cisco | Cisco Exam    

Book HomeRunning LinuxSearch this book

10.5. Filling in Video Card Information

Your XF86Config file is now ready to go with the exception of complete information on the video card. What we're going to do is use the X server to probe for the rest of this information and fill it into XF86Config.

Instead of probing for this information with the X server, you can find the XF86Config values for many cards in the files modeDB.txt, AccelCards, and Devices. These files are all in /usr/X11R6/lib/X11/doc. In addition, there are various README files for certain chipsets. You should look in these files for information on your video card, and use that information (the clock values, chipset type, and any options) in the XF86Config file. Unfortunately, some manufacturers put out a graphics board with a new chipset without changing the board's name. If any information is missing, you can probe for it as described here.

In these examples, we will demonstrate configuration for a #9 GXE 64 video card, which uses the XF86_S3 chipset. This card happens to be the one that used by one of the authors, but the discussion here applies to any video card.

The first thing to do is to determine the video chipset used on the card. Running SuperProbe (found in /usr/X11R6/bin) will tell you this information, but you need to know the chipset name as it is known to the X server.

To do this, run the command:

# X -showconfig
This lists the chipset names known to your X server. (The manual pages for each X server list these as well.) For example, with the accelerated XF86_S3 server, we obtain:
XFree86 Version 3.3.3.1 / X Window System
(protocol Version 11, revision 0, vendor release 6000)
Release Date: March 2 1998
        If the server is older than 6-12 months, or if your card is newer
        than the above date, look for a newer version before reporting
        problems.  (see http://www.XFree86.Org/FAQ)
Operating System: Linux 2.0.33 i686 [ELF]
Configured drivers:
  S3: accelerated server for S3 graphics adaptors (Patchlevel 0)
      newmmio, mmio_928, s3_generic

The valid chipset names for this server are newmmio, mmio_928, and s3_generic. The XF86_S3 manual page describes these chipsets and which video cards use them. In the case of the #9 GXE 64 video card, mmio_928 is appropriate.

If you don't know which chipset to use, the X server can probe it for you. To do this, run the command:

# X -probeonly > /tmp/x.out 2>&1
if you use bash as your shell. If you use csh, try:
% X -probeonly >& /tmp/x.out

You should run this command while the system is unloaded, that is, while no other activity is occurring on the system. This command also probes for your video-card dot clocks (as seen later), and system load can throw off this calculation.

The output from this command (in /tmp/x.out) should contain lines such as the following:

XFree86 Version 3.3.3.1 / X Window System 
(protocol Version 11, revision 0, vendor release 6000) 
Operating System: Linux  

Configured drivers: 
  S3: accelerated server for S3 graphics adaptors (Patchlevel 0) 
      newmmio, mmio_928, s3_generic 
         .
         .
         .
(- -) S3: card type: 386/486 localbus 
(- -) S3: chipset:   864 rev. 0 
(- -) S3: chipset driver: mmio_928
Here, we see that the three valid chipsets for this server (XF86_S3) are newmmio, mmio_928 and s3_generic. The server probed for and found a video card using the mmio_928 chipset driver.

In the Device section of the XF86Config file, add a Chipset line containing the name of the chipset you determined earlier. For example:

Section "Device" 
        # We already had Identifier here...
        Identifier "#9 GXE 64"  
        # Add this line:
        Chipset "mmio_928"
EndSection

Now we need to determine which dot clocks are made available by the video card. First, you should look into the files (modeDB.txt and so forth) mentioned at the beginning of this section and see if your card's clocks are listed there. The dot clocks will usually be a list of 8 or 16 values, all of which are in MHz. For example, when looking at mode-DB.txt, we see an entry for the Cardinal ET4000 video board, which looks like this:

# chip    RAM   virtual   clocks   default-mode  flags
 ET4000   1024  1024 768   25  28  38  36  40  45  32   0  "1024x768"
As we can see, the dot clocks for this card are 25, 28, 38, 36, 40, 45, 32, and 0 MHz.

In the Devices section of the XF86Config file, you should add a Clocks line containing the list of dot clocks for your card. For example, for the clocks in this example, we would add the line:

         Clocks 25 28 38 36 40 45 32 0
to the Devices section of the file, after Chipset. The order of the clocks is important! Don't re-sort the list of clocks or remove duplicates.

If you cannot find the dot clocks associated with your card, the X server can probe for these as well. Using the X -probeonly command described earlier, the output should contain lines that look like the following:

(- -) S3: clocks:  25.18  28.32  38.02  36.15  40.33  45.32  32.00  00.00
We could then add a Clocks line containing all of these values, as printed. You can use more than one Clocks line in XF86Config if all the values (sometimes there are more than eight clock values printed) don't fit onto one line. Again, be sure to keep the list of clocks in the order that they are printed.

Be sure there is no Clocks line (or that it is commented out) in the Devices section of the file when using X -probeonly to probe for the clocks. If there is a Clocks line present, the server will not probe for the clocks; it will use the values given in XF86Config.

Note that some accelerated video boards use a programmable clock chip. (See the XF86_Accel manual page for details; this generally applies to S3, AGX, and XGA-2 boards.) This chip essentially allows the X server to tell the card which dot clocks to use. If this is the case, you may not find a list of dot clocks for the card in any of the files mentioned earlier. Or the list of dot clocks printed when using X -probeonly will contain only one or two discrete clock values, with the rest being duplicates or zero.

For boards that use a programmable clock chip, you would use a ClockChip line, instead of a Clocks line, in your XF86Config file. ClockChip gives the name of the clock chip as used by the video card. But in most cases, the X server can detect your clock chip automatically and find the correct entry itself.

If you are not so lucky, the manual pages for each server describe the possible values for your server. For example, in the file README.S3, we see that several S3-864 video cards use an ICD2061A clock chip, and that we should use the line:

ClockChip "icd2061a"
instead of Clocks in the XF86Config file. As with Clocks, this line should go in the Devices section after Chipset.

Similarly, some accelerated cards require you to specify the RAMDAC chip type in the XF86Config file, using a Ramdac line. The XF86_Accel manual page describes this option. Usually, the X server will correctly probe for the RAMDAC.

Some video card types require you to specify several options in the Devices section of XF86Config. These options will be described in the manual page for your server, as well as in the various files (such as README.cirrus or README.S3). These options are enabled using the Option line. For example, the #9 GXE 64 card requires the option:

Option "number_nine"
Usually, the X server works without these options, but they are necessary to obtain the best performance. There are too many such options to list here, and they each depend on the particular video card being used. If you must use one of these options, fear not: the X server manual pages and various files in /usr/X11R6/lib/X11/doc will tell you what they are.

So when you're finished, you should end up with a Devices section that looks something like this:

Section "Device"  
        # Device section for the #9 GXE 64 only !
        Identifier "#9 GXE 64" 
        Chipset "mmio_928" 
        ClockChip "icd2061a" 
        Option "number_nine" 
EndSection
This Device entry is valid only for a particular video card, the #9 GXE 64; it is given here only as an example. Most video cards require a Clocks line, instead of ClockChip.

There are other options you can include in the Devices entry. Check the X server manual pages for the gritty details, but the explanation in this section should suffice for most systems.



Library Navigation Links

Copyright © 2001 O'Reilly & Associates. All rights reserved.











??????????????@Mail.ru