HOWTO write an X server configuration file

Installation and Configuration HOWTOs for the unofficial drivers

HOWTO write an X server configuration file

Postby tuxx-home.at » Fri Jun 08, 2007 9:50 am

This HOWTO should get you an idea of about what needs to be done when
trying to manually build your xorg.conf file.

Why it is necessary to modify/build your own xorg.conf file:
As with most proprietary hard- and software, most Linux distributions are not
interested in automatically configuring proprietary hardware along with the
fact that they may not ship proprietary drivers on their installation medias
making the autoconfiguration of such hardware impossible.

Therefore, if you are using a Matrox graphics card on your Linux system, you
will always have to modify the xorg.conf file on your own.

Location of the X server configuration file:

Xorg uses a configuration file called "xorg.conf" which is located at /etc/X11/xorg.conf.
XFree86's configuration file resides in "/etc/X11/XF86Config-4" (for recent
versions, e.g. >= XFree86 4.0) or even "/etc/X11/XF86Config" for older versions.

The configuration syntax of Xorg and XFree86 is the same so for all other
points in here, I won't make a difference between them.

Structure of the X server configuration file:

The X server configuration file contains several sections that group together
which belong together, e.g. the "Files" section contains information about
where to find all necessary files for your X server, etc.
The order of the sections inside of the X configuration file does not matter.
Each section begins with the keyword Section "SectionName" and ends
with the keyword EndSection. Formatting doesn't matter, a pound
symbol ("#") is used for making comments.
  • Section "Files"
    This section usually looks like this:

    Code: Select all
    Section "Files"
            # if the local font server has problems, we can fall back on these
            FontPath        "/var/lib/defoma/x-ttcidfont-conf.d/dirs/CID"
            FontPath        "/var/lib/defoma/x-ttcidfont-conf.d/dirs/TrueType"
            FontPath        "/usr/share/fonts/X11/misc"
            FontPath        "/usr/share/fonts/X11/misc"
            FontPath        "/usr/lib/X11/fonts/misc"
            FontPath        "/usr/lib/X11/fonts/100dpi/:unscaled"
            FontPath        "/usr/share/fonts/X11/Type1"
            FontPath        "/usr/share/fonts/X11/Type1"
            FontPath        "/usr/lib/X11/fonts/Type1"
            FontPath        "/usr/lib/X11/fonts/Speedo"
            FontPath        "/usr/share/fonts/X11/100dpi"
            FontPath        "/usr/share/fonts/X11/100dpi"
            FontPath        "/usr/lib/X11/fonts/100dpi"
            RGBPath         "/etc/X11/rgb"
    EndSection

    The "Files" section allows three different configuration options:
    • FontPath "Path" - specifies the path to a precompiled font directory
      (can be used multiple times, one line for each desired font directory)
    • RGBPath "Path" - the path to your "rgb.txt" file, usually located in /etc/X11/rgb.txt
    • ModulesPath "Path" - The path to your X Server modules (usually, you don't need to set this option as it is compiled into your X server correctly)
  • Section "Modules"
    Usually looks like this:
    Code: Select all
    Section "Module"
        Load    "GLcore"    # OpenGL core functionality
        Load    "bitmap"    # bitmap support
        Load    "dbe"       # double buffer extension
        Load    "ddc"       # Display Data Channel (automatic configuration of your display)
        Load    "dri"       # Direct rendering infrastructure (3D Acceleration)
        Load    "extmod"    # miscellaneous X server extensions
        Load    "freetype"  # Freetype Font support
        Load    "glx"       # OpenGL extension to the X window system
        Load    "int10"     # BIOS video services
        Load    "record"    # ???
        Load    "speedo"    # Speedo Font support
        Load    "type1"     # Type1 Font support
        Load    "v4l"       # The Video 4 Linux extension
        Load    "vbe"       # Vesa BIOS Extensions
    #    Load    "dga"      # Direct graphic access (not used anymore)
    EndSection

    Possible options in this section:
    • Load "Modulename" - Loads the specified module
    • Disable "Modulename" - Disables the specified module
  • Section "InputDevice"
    Defines an input device (can occur multiple times in your X configuration file,
    one section for each input device):

    Example for a keyboard with german keyboard layout:
    Code: Select all
    Section "InputDevice"
            Identifier      "Generic Keyboard"
            Driver          "keyboard"
            Option          "CoreKeyboard"
            Option          "XkbRules"      "xfree86"
            Option          "XkbModel"      "pc105"
            Option          "XkbLayout"     "de"
    EndSection


    Example for an USB mouse:
    Code: Select all
    Section "InputDevice"
            Identifier      "Generic Mouse"
            Driver          "mouse"
            Option          "SendCoreEvents"        "true"
            Option          "Device"                "/dev/input/mice"
            Option          "Protocol"              "ImPS/2"
            Option          "ZAxisMapping"          "4 5"
    EndSection

    Possible options are:
    • Identifier "Name" - The name of this section used to reference to it
    • Driver "DriverName" - The driver for this inputdevice ("mouse", "keyboard", "kbd", "evdev", ...)
    • Option "SendCoreEvents" "True/False" - Specifies wheter this device should act as primary input device
    • Option "Device" "Path" - The unix path to the device
    • For all other possible options, please have a look at man xorg.conf
  • Section "Device"
    Defines the graphics device(s) to use - one Device section per head:

    Code: Select all
    Section "Device"
            Identifier      "Matrox P750 1"
            Driver          "mtx"
            BusID           "PCI:1:0:0"
            Screen 0
    EndSection


    Possible options are:
    • Identifier "Name" - The name of this section for referencing to it
    • Driver "DriverName" - The driver to use for this videocard (Matrox G-Series: "mga", Matrox P-Series: "mtx")
    • BusID "Location" - The bus location of your videocard; have a look
      at your lspci output to get the BusID, e.g.:
      Code: Select all
      $ lspci | grep -i matrox
      01:00.0 VGA compatible controller: Matrox Graphics, Inc. Millenium P650 PCIe (rev 02)


      would translate to "PCI:1:0:0".
    • Screen ID - Denotes the virtual output of the graphics card to be used on mutlihead cards that use the same PCI BusID (older G-Series MMS
      cards f.ex. show up in lspci as four different devices with four different
      BusIDs and therefore this option is not used by them)
    • Driver specific options - please have a look at your driver's documentation
      for additional options
  • Section "Monitor"
    One section per physical display device:

    Code: Select all
    Section "Monitor"
            Identifier      "Philips 190B 1"
            VendorName      "PHL"
            Option          "DPMS"
            HorizSync    30.0 - 82.0
            VertRefresh  56.0 - 76.0
    EndSection


    Possible options are:
    • Identifier "Name" - Name which can be referred to by other sections
    • Option "DPMS" - Enables the Powersaving capabilities of your monitor
    • HorizSync SyncLow - SyncHigh - Defines the manufacturer provided range of horizontal sync frequencies. Please check your monitors manual
      for correct timing values as they are vital for setting up proper resolutions
    • VertRefresh SyncLow - SyncHigh - Defines the manufacturer provided
      range of vertical refresh rates. Please check your monitors manual for correct
      timing values as they are vital for setting up proper resolutions.
  • Section "Screen"
    Defines the logical screen (groups a physical display device and a monitor
    together); one Section per logical output:
    Code: Select all
    Section "Screen"
            Identifier      "Display 1"
            Device          "Matrox P750 1"
            Monitor         "Philips 190B 1"
            DefaultDepth    24
            SubSection "Display"
                    Depth           16
                    Modes           "1280x1024" "1024x768" "800x600"
            EndSubSection
            SubSection "Display"
                    Depth           24
                    Modes           "1280x1024" "1024x768" "800x600"
            EndSubSection
    EndSection

    Possible options are:
    • Identifier "Name" - Name to which can be referred to
    • Device "Identifier" - The Device Identifier used for this logical screen
    • Monitor "Identifier" - The Monitor Identifier used for this logical screen
    • DefaultDepth Depth - The default colour depth, can be 8, 16, 24, 32 (according to your driver's capabilities)
    • SubSection "Display" - Each Display Subsection contains information
      about available modes for the defined colour depth, therefore it is possible
      to have multiple Display subsections, one per colour depth. Multiple Modes can be concatenated like in the example above. With the help of the X
      Server keybindings "CTRL ALT +" resp. "CTRL ALT -" you can
      cycle through the available modes instantly without restarting your X server.

      Which display subsection gets used is defined by the DefaultDepth
      option mentioned above.
  • Section "ServerLayout"
    Defines the physical arrangement of your logical screens as well as the
    input devices to be used and allows ServerFlags to be specified here too.
    Code: Select all
    Section "ServerLayout"
            Identifier      "Default Layout"
            Screen          0 "Display 1" 0 0
            Screen          "Display 3" RightOf "Display 1"
            Screen          "Display 2" RightOf "Display 3"
            InputDevice     "Generic Keyboard"
            InputDevice     "Configured Mouse"
            InputDevice     "Generic Mouse"
            Option          "xinerama" "on"
    EndSection

    Possible options are:
    • Identifier "Name" - Name of the ServerLayout section (used when referring
      to it with the command line option -layout of the X server)
    • Screen ID "Identifier" PositionInfo - Defines one logical screen and its position relative to other available screens.
      PositionInfo can be either one of RightOf, LeftOf, Above, Below, Relative or Absolute.
      Please see the manual page man xorg.conf for detailed information
      about the use of these options.
    • InputDevice "Identifier" - Specifies which previously defined input
      devices shall be used by this layout

Matrox specific configuration options, tunings and example configuration
files and links to them will follow.
User avatar
tuxx-home.at
Supreme Commander
Supreme Commander
 
Posts: 2199
Joined: Mon Jan 01, 2007 12:51 pm
Location: Vassach - Austria - Europe

Return to HOWTOs

Who is online

Users browsing this forum: No registered users and 1 guest

cron