Xorg.conf

From Wikipedia, the free encyclopedia

The file xorg.conf is used for configuring the X.Org Server. While typically located in /etc/X11/xorg.conf, its location may vary across operating systems.

The X.Org Server project has attempted to make the server automatically configure itself as far as possible, and deprecates the use of xorg.conf unless absolutely unavoidable.

A documented xorg.conf is provided below:

# xorg.conf (xorg X Window System server configuration file)
#
# This file was generated by dexconf, the Debian X Configuration tool, using
# values from the debconf database.
#
# Edit this file with caution, and see the xorg.conf manual page.
# (Type "man xorg.conf" at the shell prompt.)
#
# This file is automatically updated on xserver-xorg package upgrades *only*
# if it has not been modified since the last upgrade of the xserver-xorg
# package.
#
# If you have edited this file but would like it to be automatically updated
# again, run the following command:
#   sudo dpkg-reconfigure -phigh xserver-xorg


# Card: 1 NVidia Quadro FX 2500 with 512 mb vram

Section "Files"
EndSection

Section "InputDevice"
        Identifier      "Generic Keyboard"
        Driver          "kbd"
        Option          "CoreKeyboard"
        Option          "XkbRules"      "xorg"
        Option          "XkbModel"      "pc105"
        Option          "XkbLayout"     "us"
EndSection

Section "InputDevice"
        Identifier      "Configured Mouse"
        Driver          "mouse"
        Option          "CorePointer"
        Option          "Device"        "/dev/input/mice"
        Option          "Protocol"      "ImPS/2"
        Option          "ZAxisMapping"  "4 5"
        Option          "Emulate3Buttons"       "true"
EndSection

Section "InputDevice"
        Identifier      "Synaptics Touchpad"
        Driver          "synaptics"
        Option          "SendCoreEvents"        "true"
        Option          "Device"        "/dev/psaux"
        Option          "Protocol"      "auto-dev"
        Option          "HorizEdgeScroll"       "0"
EndSection

Section "InputDevice"
        Driver          "wacom"
        Identifier      "stylus"
        Option          "Device"        "/dev/input/wacom"
        Option          "Type"  "stylus"
        Option          "ForceDevice"   "ISDV4"# Tablet PC ONLY
EndSection

Section "InputDevice"
        Driver          "wacom"
        Identifier      "eraser"
        Option          "Device"        "/dev/input/wacom"
        Option          "Type"  "eraser"
        Option          "ForceDevice"   "ISDV4"# Tablet PC ONLY
EndSection

Section "InputDevice"
        Driver          "wacom"
        Identifier      "cursor"
        Option          "Device"        "/dev/input/wacom"
        Option          "Type"  "cursor"
        Option          "ForceDevice"   "ISDV4"# Tablet PC ONLY
EndSection

Section "Device"
        Identifier      "nVidia Corporation GeForce Go 7900 GS"

        # Enabling the nvidia drivers means that all acceleration processing is done internally
        # NVidia provide's its own GLX module
        # NVidia does not use the X server's DRI stack. 
        #       Instead, it uses a proprietary method to route call directly to the hardware and provide drect rendering
        # Though the only possible driver is nvidia, it is also possible to override NVidia's methods:
        #       by force-enabling AIGLX in "ServerLayout", loading dri, and enabling DRI in "Device"
        #       by enabling XGL (which is a bad idea anyway)
        Driver          "nvidia"
        # lspci | grep -i nv            <- To find device
        Busid           "PCI:1:0:0"

        # Adds support for 32-bit rendering on ARGB colorspace windows and pixmaps
        # ARGB = alpha, red, green, blue
        # AKA you should enable this on the new NVidia driver
        Option          "AddARGBVisuals"        "True"
        Option          "AddARGBGLXVisuals"     "True"
        Option          "NoLogo"                "True"

        # Experimental : enable hardware acceleration of the X render extension
        # Enabled by default in newer drivers however
        Option          "RenderAccel"           "True"

        # Enable RGB overlay. (Not available with X composite)
        # Also slow with virtual desktops larger than 2046x2047
        # Requires depth of 24 or higher
        # Requires an NVidia quadro
        Option          "Overlay"               "True"

        # Improves performance by using OS to notify X to update direct-rendered visuals instead of running through the hardware.
        # Enabled by default in newer drivers
        Option          "DamageEvents"          "True"

        # Disable clipping OpenGL rendering to the root window
        Option          "DisableGLXRootClipping"        "True"

        # An X server option to disable accel. writes into offscreen video memory
        # Might be needed if using AIGLX instead of proprietary NVidia interface
        # Probably ignored if using the NVidia method
        #Option         "XaaNoOffscreenPixmaps"

        # Might cause crashes in older NVidia drivers.
        # Forces the driver to allow GLX when composite on the X server is enabled.
        # Not necessary on modern X servers; might decrease stability
        #Option         "AllowGLXWithComposite"         "True"

        # An X server option to allow occluded window pixel data to be remembered
        # Caution in enabling. It might be faster to redraw the information than to fetch it
        # BackingStore is implemented in a very hackish but memory-efficient way. Therefore, it tends to be slow
        Option          "BackingStore"                  "True"

        # Use below in conjuction with v-sync (see nvidia-settings)
        # v-sync will however cap framerate to a max of 60 fps on most monitors

        # Only use with plenty of vram
        # Allows the X server to render into the third buffer without waiting for the other two buffers to be cleared
        # (buffer swapping happens every fps, for example every 60 times per second)
        # This can possibly avoid screen tearing and sudden low fps
        # Touchy on 256-MB vram (if you play games with 4x AA), probably ok on 512
        Option          "TripleBuffer"                  "True"

EndSection

Section "Monitor"
        Identifier      "Generic Monitor"
        # Power saving mode
        Option          "DPMS"
        # at start X will automatically probe EDID information of the monitor.
        # This can be overridden, but not recommended.
        Horizsync       28-96
        Vertrefresh     43-60
EndSection

Section "Screen"
        Identifier      "Default Screen"
        Device          "nVidia Corporation GeForce Go 7900 GS"
        Monitor         "Generic Monitor"
        Defaultdepth    24
        SubSection "Display"
                Modes           "1920x1200"
        EndSubSection
EndSection

Section "ServerLayout"
        Identifier      "Default Layout"
        screen          "Default Screen"
        Inputdevice     "Generic Keyboard"
        Inputdevice     "Configured Mouse"

        # Uncomment if you have a wacom tablet
        #       InputDevice     "stylus"        "SendCoreEvents"
        #       InputDevice     "cursor"        "SendCoreEvents"
        #       InputDevice     "eraser"        "SendCoreEvents"
        Inputdevice     "Synaptics Touchpad"
EndSection

Section "Module"
        # To understand these comments, understand that there are three methods of running acceleration:
        #       XGL, AIGLX, NVidia

        # The GLX module provides the hardware OpenGL extensions to the X server
        # Through AIGLX, this loads the open source GLX
        # Through NVidia, this loads NVidia's GLX modules (closed source)
        Load            "glx"
        Load            "dbe"
        Load            "extmod"
        # The freetype module completely replaces the "type1" module
        Load            "freetype"
        Load            "i2c"
        Load            "bitmap"
        Load            "ddc"
        Load            "int10"
        Load            "vbe"
        # DRI = Direct Rendering Infrastructure
        # DRI is an X server extensions that allows "3d" acceleration calls to bypass the X server.
        #       This leads the term "Direct Rendering" as the calls are routed directly to the hardware
        #       This also leads to dramatic speed improvements/increases
        # DRI is AIGLX's response to XGL. However, DRI provides the benefit that the entire screen is compositing as well.
        # Loading this module is harmless unless it is enabled in the "Device" section.
        # NVidia will not use this module as it's direct rendering calls are processed internally
        Load            "dri"
        # Load the mesa software acceleration libraries
        #Load           "GLcore"

EndSection

# Specific only to the DRI module.
Section "DRI"
        # Allows all users to access DRI
        Mode 0666
EndSection

# Transparency = compositing
# Fancy Effects = GLX
# Using compositing with NVidia or AIGLX should incur no performance penalties
# Therefore:
# Disabling composite will disallow compiz, transparency, etc...
# This may also lead to high cpu usage on nautilus
Section "Extensions"
        Option          "Composite"     "Enable"
EndSection

[edit] See also