Linux Xorg command
On Unix-like operating systems, Xorg is the executable of the X Window System server, developed by the X.org foundation.
Description
Xorg is a full-featured X server that was originally designed for Unix and Unix-like operating systems, such as Linux, running on Intel x86 hardware. It now runs on a wider range of platforms.
Syntax
Xorg [:display] [option ...]
Options
vtXX | XX specifies the Virtual Terminal device number which Xorg will use. Without this option, Xorg will pick the first available Virtual Terminal that it can locate. This option applies only to platforms that have virtual terminal support, such as Linux, BSD, OpenSolaris, SVR3, and SVR4. |
-allowMouseOpenFail | Allow the server to start up even if the mouse device can't be opened or initialized. This is equivalent to the AllowMouseOpenFail file option in the configuration file, xorg.conf. |
-allowNonLocalXvidtune | Make the VidMode extension available to remote clients. This allows the xvidtune client to connect from another host. This is equivalent to the AllowNonLocalXvidtune file option in xorg.conf. By default, non-local connections are not allowed. |
-bgamma value | Set the blue gamma correction. The value must be between 0.1 and 10. The default is 1.0. Not all drivers support this. See also the -gamma, -rgamma, and -ggamma options. |
-bpp n | No longer supported. Use -depth to set the color depth, and use -fbbpp if you really need to force a non-default framebuffer (hardware) pixel format. |
-config file | Read the server configuration from file. This option will work for any file when the server is run as root (i.e., with real-uid 0), or for files relative to a directory in the config search path for all other users. |
-configdir directory | Read the server configuration files from directory. This option will work for any directory when the server is run as root (i.e, with real-uid 0), or for directories relative to a directory in the config directory search path for all other users. |
-configure | When this option is specified, the Xorg server loads all video driver modules, probes for available hardware, and writes out an initial xorg.conf file based on what was detected. This option currently has some problems on some platforms, but in most cases it is a good way to bootstrap the configuration process. This option is only available when the server is run as root (i.e, with real-uid 0). |
-depth n | Sets the default color depth. Legal values are 1, 4, 8, 15, 16, and 24. Not all drivers support all values. |
-disableVidMode | Disable the parts of the VidMode extension (used by the xvidtune client) that can be used to change the video modes. This is equivalent to the DisableVidModeExtension file option in xorg.conf. |
-fbbpp n | Sets the number of framebuffer bits per pixel. You should only set this if you're sure it's necessary; normally the server can deduce the correct value from -depth, above. Useful if you want to run a depth 24 configuration with a 24 bpp framebuffer rather than the (possibly default) 32 bpp framebuffer (or vice versa). Legal values are 1, 8, 16, 24, 32. Not all drivers support all values. |
-flipPixels | Swap the default values for the black and white pixels. |
-gamma value | Set the gamma correction. The value must be between 0.1 and 10. The default is 1.0. This value is applied equally to the R, G and B values. Those values can be set independently with the -rgamma, -bgamma, and -ggamma options. Not all drivers support this. |
-ggamma value | Set the green gamma correction. The value must be between 0.1 and 10. The default is 1.0. Not all drivers support this. See also the -gamma, -rgamma, and -bgamma options. |
-ignoreABI | The Xorg server checks the ABI revision levels of each module that it loads. It will normally refuse to load modules with ABI revisions that are newer than the server's. This is because such modules might use interfaces that the server does not have. When this option is specified, mismatches like this are downgraded from fatal errors to warnings. This option should be used with care. |
-isolateDevice bus-id | Restrict device resets to the device at bus-id. The bus-id string has the form bustype:bus:device:function (e.g., "PCI:1:0:0"). At present, only isolation of PCI devices is supported; i.e., this option is ignored if bustype is anything other than "PCI". |
-keeptty | Prevent the server from detaching its initial controlling terminal. This option is only useful when debugging the server. Not all platforms support (or can use) this option. |
-keyboard keyboard-name | Use the xorg.conf file InputDevice section (see below) called keyboard-name as the core keyboard. This option is ignored when the Layout section specifies a core keyboard. In the absence of both a Layout section and this option, the first relevant InputDevice section is used for the core keyboard. |
-layout layout-name | Use the xorg.conf file Layout section called layout-name. By default, the first Layout section is used. |
-logfile filename | Use the file called filename as the Xorg server log file. The default log file is /var/log/Xorg.n.log on most platforms, where n is the display number of the Xorg server. The default may be in a different directory on some platforms. This option is only available when the server is run as root (i.e, with real-uid 0). |
-logverbose [n] | Sets the verbosity level for information printed to the Xorg server log file. If the n value isn't supplied, each occurrence of this option increments the log file verbosity level. When the n value is supplied, the log file verbosity level is set to that value. The default log file verbosity level is 3. |
-modulepath searchpath | Set the module search path to searchpath. The searchpath is a comma separated list of directories to search for Xorg server modules. This option is only available when the server is run as root (i.e, with real-uid 0). |
-nosilk | Disable Silken Mouse (smooth mouse movement) support. |
-novtswitch | Disable the automatic switching on X server reset and shutdown to the VT that was active when the server started, if supported by the OS. |
-pixmap24 | Set the internal pixmap format for depth 24 pixmaps to 24 bits per pixel. The default is usually 32 bits per pixel. There is normally little reason to use this option. Some client applications don't like this pixmap format, even though it is a perfectly legal format. This is equivalent to the Pixmap xorg.conf file option. |
-pixmap32 | Set the internal pixmap format for depth 24 pixmaps to 32 bits per pixel. This is usually the default. This is equivalent to the Pixmap xorg.conf file option. |
-pointer pointer-name | Use the xorg.conf file InputDevice section called pointer-name as the core pointer. This option is ignored when the Layout section specifies a core pointer. In the absence of both a Layout section and this option, the first relevant InputDevice section is used for the core pointer. |
-quiet | Suppress most informational messages at startup. The verbosity level is set to zero. |
-rgamma value | Set the red gamma correction. The value must be between 0.1 and 10. The default is 1.0. Not all drivers support this. See also the -gamma, -bgamma, and -ggamma options. |
-sharevts | Share virtual terminals with another X server, if supported by the OS. |
-screen screen-name | Use the xorg.conf file Screen section called screen-name. By default, the screens referenced by the default Layout section are used, or the first Screen section when there are no Layout sections. |
-showconfig | This is the same as the -version option, and is included for compatibility reasons. It may be removed in a future release, so the -version option should be used instead. |
-showDefaultModulePath | Print out the default module path the server was compiled with. |
-showDefaultLibPath | Print out the path libraries should be installed to. |
-showopts | For each driver module installed, print out the list of options and their argument types. |
-weight nnn | Set RGB weighting at 16 bpp. The default is 565. This applies only to those drivers which support 16 bpp. |
-verbose [n] | Sets the verbosity level for information printed on stderr. If the n value isn't supplied, each occurrence of this option increments the verbosity level. When the n value is supplied, the verbosity level is set to that value. The default verbosity level is 0. |
-version | Print out the server version, patchlevel, release date, the operating system/platform it was built on, and whether it includes module loader support. |
Keyboard
The Xorg server is normally configured to recognize various special combinations of key presses that instruct the server to perform some action, rather than just sending the key press event to a client application. These actions depend on the XKB keymap loaded by a particular keyboard device and may or may not be available on a given configuration.
The following key combinations are commonly part of the default XKEYBOARD keymap.
Ctrl+Alt+Backspace | Immediately kills the server, no questions asked. It can be disabled by setting the DontZap xorg.conf file option to a TRUE value. It should be noted that zapping is triggered by the Terminate_Server action in the keyboard map. This action is not part of the default keymaps but can be enabled with the XKB option "terminate:ctrl_alt_bksp". |
Ctrl+Alt+Keypad-Plus | Change video mode to next one specified in the configuration file. This can be disabled with the DontZoom xorg.conf file option. |
Ctrl+Alt+Keypad-Minus | Change video mode to previous one specified in the configuration file. This can be disabled with the DontZoom xorg.conf file option. |
Ctrl+Alt+F1...F12 | For systems with virtual terminal support, these keystroke combinations are used to switch to virtual terminals 1 through 12, respectively. This can be disabled with the DontVTSwitch xorg.conf file option. |
Configuration
Xorg typically uses a configuration file called xorg.conf and configuration files with the suffix .conf in a directory called xorg.conf.d for its initial setup. Refer to the xorg.conf section below for information about the format of this file.
Xorg has a mechanism for automatically generating a built-in configuration at run time when no xorg.conf file or xorg.conf.d files are present. The current version of this automatic configuration mechanism works in two ways.
The first is via enhancements that have made many components of the xorg.conf file optional. This means that information that can be probed or reasonably deduced doesn't need to be specified explicitly, greatly reducing the amount of built-in configuration information that needs to be generated at run time.
The second is to have "safe" fallbacks for most configuration information. This maximises the likelihood that the Xorg server will start up in some usable configuration even when information about the specific hardware is not available.
The automatic configuration support for Xorg is work in progress. It is currently aimed at the most popular hardware and software platforms supported by Xorg. Enhancements are planned for future releases.
Files used by xorg
/etc/X11/xorg.conf | Server configuration file. |
/etc/X11/xorg.conf-4 | Server configuration file. |
/etc/xorg.conf | Server configuration file. |
/usr/etc/xorg.conf | Server configuration file. |
/usr/lib/X11/xorg.conf | Server configuration file. |
/etc/X11/xorg.conf.d | Server configuration directory. |
/etc/X11/xorg.conf.d-4 | Server configuration directory. |
/etc/xorg.conf.d | Server configuration directory. |
/usr/etc/xorg.conf.d | Server configuration directory. |
/usr/lib/X11/xorg.conf.d | Server configuration directory. |
/var/log/Xorg.n.log | Server log file for display n. |
/usr/bin/* | Client binaries. |
/usr/include/* | Header files. |
/usr/lib/* | Libraries. |
/usr/share/fonts/X11/* | Fonts. |
/usr/share/X11/XErrorDB | Client error message database. |
/usr/lib/X11/app-defaults/* | Client resource specifications. |
/usr/share/man/man?/* | Manual pages. |
/etc/Xn.hosts | Initial access control list for display n. |
Xorg configuration
Xorg supports several mechanisms for supplying/obtaining configuration and run time parameters: command line options, environment variables, the xorg.conf and xorg.conf.d configuration files, auto-detection, and fallback defaults. When the same information is supplied in more than one way, the highest precedence mechanism is used. The list of mechanisms is ordered from highest precedence to lowest. Note that not all parameters can be supplied via all methods. Most configuration file parameters, with their defaults, are described here. Xorg uses a configuration file called xorg.conf and files ending in the suffix .conf from the directory xorg.conf.d for its initial setup. The xorg.conf configuration file is searched for in the following places when the server is started as a normal user:
/etc/X11/<cmdline>
/usr/etc/X11/<cmdline>
/etc/X11/$XORGCONFIG
/usr/etc/X11/$XORGCONFIG
/etc/X11/xorg.conf
/etc/xorg.conf
/usr/etc/X11/xorg.conf.<hostname>
/usr/etc/X11/xorg.conf
/usr/lib/X11/xorg.conf.<hostname>
/usr/lib/X11/xorg.conf
where <cmdline> is a relative path (with no ".." components) specified with the -config command line option, $XORGCONFIG is the relative path (with no ".." components) specified by that environment variable, and <hostname> is the machine's hostname as reported by gethostname.
When the Xorg server is started by the root user, the config file search locations are as follows:
<cmdline>
/etc/X11/<cmdline>
/usr/etc/X11/<cmdline>
$XORGCONFIG
/etc/X11/$XORGCONFIG
/usr/etc/X11/$XORGCONFIG
/etc/X11/xorg.conf
/etc/xorg.conf
/usr/etc/X11/xorg.conf.<hostname>
/usr/etc/X11/xorg.conf
/usr/lib/X11/xorg.conf.<hostname>
/usr/lib/X11/xorg.conf
where <cmdline> is the path specified with the -config command line option (which may be absolute or relative), $XORGCONFIG is the path specified by that environment variable (absolute or relative), $HOME is the path specified by that environment variable (usually the home directory), and <hostname> is the machine's hostname as reported by gethostname.
Additional configuration files are searched for in the following directories when the server is started as a normal user:
/etc/X11/<cmdline>
/etc/X11/<cmdline>
/etc/X11/xorg.conf.d
/etc/X11/xorg.conf.d
where <cmdline> is a relative path (with no ".." components) specified with the -configdir command line option.
When the Xorg server is started by the root user, the config directory search locations are as follows:
<cmdline>
/etc/X11/<cmdline>
/etc/X11/<cmdline>
/etc/X11/xorg.conf.d
/etc/X11/xorg.conf.d
where <cmdline> is the path specified with the -configdir command line option (which may be absolute or relative).
Finally, configuration files will also be searched for in directories reserved for system use. These are to separate configuration files from the vendor or 3rd party packages from those of local administration. These files are found in the following directories:
/usr/share/X11/xorg.conf.d
/usr/share/X11/xorg.conf.d
The xorg.conf and xorg.conf.d files are composed of many sections which may be present in any order, or omitted to use default configuration values. Each section has the form:
Section "SectionName" SectionEntry ... EndSection
The section names are:
Files | File path names. |
ServerFlags | Server flags. |
Module | Dynamic module loading. |
Extensions | Extension enabling. |
InputDevice | Input device description. |
InputClass | Input class description. |
Device | Graphics device description. |
VideoAdaptor | Xv video adaptor description. |
Monitor | Monitor description. |
Modes | Video modes descriptions. |
Screen | Screen configuration. |
ServerLayout | Overall layout. |
DRI | DRI-specific configuration. |
Vendor | Vendor-specific configuration. |
The following obsolete section names are still recognised for compatibility purposes. In new config files, the InputDevice section should be used instead.
Keyboard | Keyboard configuration. |
Pointer | Pointer/mouse configuration. |
(The old XInput section from previous versions is no longer recognized.)
The ServerLayout sections are at the highest level. They bind together the input and output devices that will be used in a session. The input devices are described in the InputDevice sections. Output devices usually consist of multiple independent components (e.g., a graphics board and a monitor). These multiple components are bound together in the Screen sections, and it is these that are referenced by the ServerLayout section. Each Screen section binds together a graphics board and a monitor. The graphics boards are described in the Device sections, and the monitors are described in the Monitor sections.
Config file keywords are case-insensitive, and "_" characters are ignored. Most strings (including Option names) are also case-insensitive, and insensitive to white space and "_" characters.
Each config file entry usually takes up a single line in the file. They consist of a keyword, which is possibly followed by one or more arguments, with the number and types of the arguments depending on the keyword. The argument types are:
Integer | An integer number in decimal, hex or octal. |
Real | A floating point number. |
String | A string enclosed in double quote marks ("). |
Note: hex integer values must be prefixed with "0x", and octal values with "0".
A special keyword called Option may be used to provide free-form data to various components of the server. The Option keyword takes either one or two string arguments. The first is the option name, and the optional second argument is the option value. Some commonly used option value types include:
Integer | An integer number in decimal, hex or octal. |
Real | A floating point number. |
String | A sequence of characters. |
Boolean | A boolean value (see below). |
Frequency | A frequency value (see below). |
Note that all Option values, not just strings, must be enclosed in quotes.
Boolean options may optionally have a value specified. When no value is specified, the option's value is TRUE. The following boolean option values are recognised as TRUE:
1
on
true
yes
and the following boolean option values are recognised as FALSE:
0
off
false
no
If an option name is prefixed with "No", then the option value is negated.
Example: the following option entries are equivalent:
Option "Accel" "Off"
Option "NoAccel"
Option "NoAccel" "On"
Option "Accel" "false"
Option "Accel" "no"
Frequency option values consist of a real number that is optionally followed by one of the following frequency units:
Hz
k
kHz
M
MHz
When the unit name is omitted, the correct units will be determined from the value and the expectations of the appropriate range of the value. It is recommended that the units always be specified when using frequency option values to avoid any errors in determining the value.
The files section
The Files section is used to specify some path names required by the server. Some of these paths can also be set from the command line. The command line settings override the values specified in the config file. The Files section is optional, as are all of the entries that may appear in it.
The entries that can appear in this section are:
FontPath "path" | Sets the search path for fonts. This path is a comma separated list of font path elements which the Xorg server searches for font databases. Multiple FontPath entries may be specified, and they will be concatenated to build up the fontpath used by the server. Font path elements can be absolute directory paths, catalogue directories or a font server identifier. The formats of the later two are explained below: Catalogue directories can be specified using the prefix catalogue: before the directory name. The directory can then be populated with symlinks pointing to the real font directories, using the following syntax in the symlink name: <identifier>:[attribute]:pri=<priority> Where <identifier> is an alphanumeric identifier, [attribute] is an attribute which will be passed to the underlying FPE and <priority> is a number used to order the fontfile FPEs. Examples: 75dpi:unscaled:pri=20 -> /usr/share/X11/fonts/75dpi gscript:pri=60 -> /usr/share/fonts/default/ghostscript misc:unscaled:pri=10 -> /usr/share/X11/fonts/misc Font server identifiers have the form: <trans>/<hostname>:<port-number> Where <trans> is the transport type to use to connect to the font server (e.g., unix for UNIX-domain sockets or tcp for a TCP/IP connection), <hostname> is the hostname of the machine running the font server, and <port-number> is the port number that the font server is listening on (usually 7100). When this entry is not specified in the config file, the server falls back to the compiled-in default font path, which contains the following font path elements (which can be set inside a catalogue directory): /usr/share/fonts/X11/misc/ /usr/share/fonts/X11/TTF/ /usr/share/fonts/X11/OTF/ /usr/share/fonts/X11/Type1/ /usr/share/fonts/X11/100dpi/ /usr/share/fonts/X11/75dpi/ Font path elements that are found to be invalid are removed from the font path when the server starts up. |
ModulePath "path" | Sets the search path for loadable Xorg server modules. This path is a comma separated list of directories which the Xorg server searches for loadable modules loading in the order specified. Multiple ModulePath entries may be specified, and they will be concatenated to build the module search path used by the server. The default module path is /usr/lib/xorg/modules. |
XkbDir "path" | Sets the base directory for keyboard layout files. The -xkbdir command line option can be used to override this. The default directory is /usr/share/X11/xkb. |
The ServerFlags section
In addition to options specific to this section (described below), the ServerFlags section is used to specify some global Xorg server options. All of the entries in this section are Options, although for compatibility purposes some of the old style entries are still recognized. Those old style entries are not documented here, and using them is discouraged. The ServerFlags section is optional, as are the entries that may be specified in it.
Options specified in this section (except for the "DefaultServerLayout" Option) may be overridden by Options specified in the active ServerLayout section. Options with command line equivalents are overridden when their command line equivalent is used. The options recognized by this section are:
Option "DefaultServerLayout" "layout-id" | This specifies the default ServerLayout section to use in the absence of the -layout command line option. |
Option "NoTrapSignals" "boolean" | This prevents the Xorg server from trapping a range of unexpected fatal signals and exiting cleanly. Instead, the Xorg server will die and drop core where the fault occurred. The default behaviour is for the Xorg server to exit cleanly, but still drop a core file. In general, you never want to use this option unless you are debugging an Xorg server problem and know how to deal with the consequences. |
Option "UseSIGIO" "boolean" | This controls whether the Xorg server requests that events from input devices be reported via a SIGIO signal handler (also known as SIGPOLL on some platforms), or only reported via the standard select loop. The default behaviour is platform specific. In general, you do not want to use this option unless you are debugging the Xorg server, or working around a specific bug until it is fixed, and understand the consequences. |
Option "DontVTSwitch" "boolean" | This disallows the use of the Ctrl+Alt+Fn sequence (where Fn refers to one of the numbered function keys). That sequence is normally used to switch to another "virtual terminal" on operating systems that have this feature. When this option is enabled, that key sequence has no special meaning and is passed to clients. Default: off. |
Option "DontZap" "boolean" | This disallows the use of the Terminate_Server XKB action (usually on Ctrl+Alt+Backspace, depending on XKB options). This action is normally used to terminate the Xorg server. When this option is enabled, the action has no effect. Default: off. |
Option "DontZoom" "boolean" | This disallows the use of the Ctrl+Alt+Keypad-Plus and Ctrl+Alt+Keypad-Minus sequences. These sequences allows you to switch between video modes. When this option is enabled, those key sequences have no special meaning and are passed to clients. Default: off. |
Option "DisableVidModeExtension" "boolean" | This disables the parts of the VidMode extension used by the xvidtune client that can be used to change the video modes. Default: the VidMode extension is enabled. |
Option "AllowNonLocalXvidtune" "boolean" | This allows the xvidtune client (and other clients that use the VidMode extension) to connect from another host. Default: off. |
Option "AllowMouseOpenFail" "boolean" | This tells the "mousedrv" and "vmmouse" drivers to not report failure if the mouse device can't be opened/initialised. It has no effect on the "evdev" or other drivers. Default: false. |
Option "BlankTime" "time" | Sets the inactivity timeout for the blank phase of the screen saver. The time is in minutes. This is equivalent to the Xorg server's -s flag, and the value can be changed at run time with xset. Default: 10 minutes. |
Option "StandbyTime" "time" | Sets the inactivity timeout for the standby phase of DPMS mode. The time is in minutes, and the value can be changed at run time with xset. Default: 10 minutes. This is only suitable for VESA DPMS (Energy Star) compatible monitors, and may not be supported by all video drivers. It is only enabled for screens that have the "DPMS" option set. |
Option "SuspendTime" "time" | Sets the inactivity timeout for the suspend phase of DPMS mode. The time is in minutes, and the value can be changed at run time with xset. Default: 10 minutes. This is only suitable for VESA DPMS compatible monitors, and may not be suauto-detectionpported by all video drivers. It is only enabled for screens that have the "DPMS" option set. |
Option "OffTime" "time" | Sets the inactivity timeout for the off phase of DPMS mode. The time is in minutes, and the value can be changed at run time with xset. Default: 10 minutes. This is only suitable for VESA DPMS compatible monitors, and may not be supported by all video drivers. It is only enabled for screens that have the "DPMS" option set. |
Option "Pixmap" "bpp" | This sets the pixmap format to use for depth 24. Allowed values for bpp are 24 and 32. Default: 32 unless driver constraints don't allow this (which is rare). Note: some clients don't behave well when this value is set to 24. |
Option "NoPM" "boolean" | Disables something to do with power management events. Default: PM enabled on platforms that support it. |
Option "Xinerama" "boolean" | Enable or disable XINERAMA extension. Default is disabled. |
Option "AIGLX" "boolean" | Enable or disable AIGLX. AIGLX is enabled by default. |
Option "DRI2" "boolean" | Enable or disable DRI2. DRI2 is disabled by default. |
Option "GlxVisuals" "string" | This option controls how many GLX visuals the GLX modules sets up. The default value is typical, which will setup up a typical subset of the GLXFBConfigs provided by the driver as GLX visuals. Other options are minimal, which will set up the minimal set allowed by the GLX specification and all which will setup GLX visuals for all GLXFBConfigs. |
Option "UseDefaultFontPath" "boolean" | Include the default font path even if other paths are specified in xorg.conf. If enabled, other font paths are included as well. Enabled by default. |
Option "IgnoreABI" "boolean" | Allow modules built for a different, potentially incompatible version of the X server to load. Disabled by default. |
Option "AutoAddDevices" "boolean" | If this option is disabled, then no devices will be added from the HAL or udev backends. Enabled by default. |
Option "AutoEnableDevices" "boolean" | If this option is disabled, then the devices will be added (and the DevicePresenceNotify event sent), but not enabled, thus leaving policy up to the client. Enabled by default. |
Option "Log" "string" | This option controls whether the log is flushed and/or synced to disk after each message. Possible values are flush or sync. Unset by default. |
The Module section
The Module section is used to specify which Xorg server modules should be loaded. This section is ignored when the Xorg server is built in static form. The type of modules normally loaded in this section are Xorg server extension modules. Most other module types are loaded automatically when they are needed via other mechanisms. The Module section is optional, as are all of the entries that may be specified in it.
Entries in this section may be in two forms. The first and most commonly used form is an entry that uses the Load keyword, as described here:
Load "modulename" | This instructs the server to load the module called modulename. The module name given should be the module's standard name, not the module file name. The standard name is case-sensitive, and does not include the "lib" or "cyg" prefixes, or the ".so" or ".dll" suffixes. Example: the DRI extension module can be loaded with the following entry: Load "dri" |
Disable "modulename" | This instructs the server not to load the module called modulename. Some modules are loaded by default in the server, and this overrides that default. If a Load instruction is given for the same module, it overrides the Disable instruction and the module is loaded. The module name given should be the module's standard name, not the module file name. As with the Load instruction, the standard name is case-sensitive, and does not include the "lib" prefix, or the ".a", ".o", or ".so" suffixes. |
The second form of entry is a SubSection, with the subsection name being the module name, and the contents of the SubSection being Options that are passed to the module when it is loaded.
Example: the extmod module (which contains a miscellaneous group of server extensions) can be loaded, with the XFree86-DGA extension disabled, using the following entry:
SubSection "extmod" Option "omit XFree86-DGA" EndSubSection
Modules are searched for in each directory specified in the ModulePath search path, and in the drivers, extensions, input, internal, and multimedia subdirectories of each of those directories. In addition to this, operating system specific subdirectories of all the above are searched first if they exist.
To see what extension modules are available, check the extensions subdirectory under /usr/lib/xorg/modules.
The "extmod", "dbe", "dri", "dri2", "glx", and "record" extension modules are loaded automatically, if they are present, unless disabled with "Disable" entries. It is recommended that at very least the "extmod" extension module be loaded. If it isn't, some commonly used server extensions (like the SHAPE extension) will not be available.
Extensions section
The Extensions section is used to specify which X11 protocol extensions should be enabled or disabled. The Extensions section is optional, as are all of the entries that may be specified in it.
Entries in this section are listed as Option statements with the name of the extension as the first argument, and a boolean value as the second. The extension name is case-sensitive, and matches the form shown in the output of "Xorg -extension ?".
Example: the MIT-SHM extension can be disabled with the following entry:
Section "Extensions" Option "MIT-SHM" "Disable" EndSection
The InputDevice section
The config file may have multiple InputDevice sections. Recent X servers employ HAL or udev backends for input device enumeration and input hotplugging. It is usually not necessary to provide InputDevice sections in the xorg.conf if hotplugging is in use (i.e., AutoAddDevices is enabled). If hotplugging is enabled, InputDevice sections using the mouse, kbd and vmmouse driver will be ignored.
If hotplugging is disabled, there will normally be at least two: one for the core (primary) keyboard and one for the core pointer. If either of these two is missing, a default configuration for the missing ones will be used. In the absence of an explicitly specified core input device, the first InputDevice marked as CorePointer (or CoreKeyboard) is used. If there is no match there, the first InputDevice that uses the "mouse" (or "kbd") driver is used. The final fallback is to use built-in default configurations. Currently the default configuration may not work as expected on all platforms. InputDevice sections have the following format:
Section "InputDevice" Identifier "name" Driver "inputdriver" options ... EndSection
The Identifier and Driver entries are required in all InputDevice sections. All other entries are optional.
The Identifier entry specifies the unique name for this input device. The Driver entry specifies the name of the driver to use for this input device. When using the loadable server, the input driver module "inputdriver" will be loaded for each active InputDevice section. An InputDevice section is considered active if it is referenced by an active ServerLayout section, if it is referenced by the -keyboard or -pointer command line options, or if it is selected implicitly as the core pointer or keyboard device in the absence of such explicit references. The most commonly used input drivers are evdev on Linux systems, and kbd and mousedrv on other platforms.
InputDevice sections recognise some driver-independent Options, which are described here.
Option "AutoServerLayout" "boolean" | Always add the device to the ServerLayout section used by this instance of the server. This affects implied layouts as well as explicit layouts specified in the configuration and/or on the command line. |
Option "CorePointer" | Deprecated, see Floating. |
Option "CoreKeyboard" | Deprecated, see Floating. |
Option "AlwaysCore" "boolean" | Deprecated, see Floating. |
Option "SendCoreEvents" "boolean" | Deprecated, see Floating. |
Option "Floating" "boolean" | When enabled, the input device is set up floating and does not report events through any master device or control a cursor. The device is only available to clients using the X Input Extension API. This option is disabled by default. The options CorePointer, CoreKeyboard, AlwaysCore, and SendCoreEvents, are the inverse of option Floating (i.e., SendCoreEvents "on" is equivalent to Floating "off"). This option controls the startup behavior only, a device may be reattached or set floating at runtime. |
Option "TransformationMatrix" "a b c d e f g h i" | Specifies the 3x3 transformation matrix for absolute input devices. The input device will be bound to the area given in the matrix. In most configurations, "a" and "e" specify the width and height of the area the device is bound to, and "c" and "f" specify the x and y offset of the area. The value range is 0 to 1, where 1 represents the width or height of all root windows together, 0.5 represents half the area, etc. The values represent a 3x3 matrix, with the first, second and third group of three values representing the first, second and third row of the matrix, respectively. The identity matrix is "1 0 0 0 1 0 0 0 1". |
Pointer acceleration options
For pointing devices, the following options control how the pointer is accelerated or decelerated with respect to physical device motion. Most of these can be adjusted at runtime with xinput. Only the most important acceleration options are discussed here.
Option "AccelerationProfile" "integer" | Select the profile. Essentially, the profile constitutes the "feeling" of the acceleration. More formally, it defines how the transfer function (actual acceleration as a function of current device velocity and acceleration controls) is constructed. This is mainly a matter of personal preference.
|
||||||||||||||||||
Option "ConstantDeceleration" "real" | Makes the pointer go deceleration times slower than normal. Most useful for high-resolution devices. | ||||||||||||||||||
Option "AdaptiveDeceleration" "real" | Allows to actually decelerate the pointer when going slow. At most, it will be adaptive deceleration times slower. Enables precise pointer placement without sacrificing speed. | ||||||||||||||||||
Option "AccelerationScheme" "string" | Selects the scheme, which is the underlying algorithm.
|
||||||||||||||||||
Option "AccelerationNumerator" "integer" Option "AccelerationDenominator" "integer" |
Set numerator and denominator of the acceleration factor. The acceleration factor is a rational which, together with threshold, can be used to tweak profiles to suit the users needs. The simple and limited profiles use it directly (i.e., they accelerate by the factor), for other profiles it should hold that a higher acceleration factor leads to a faster pointer. Typically, 1 is unaccelerated and values up to 5 are sensible. | ||||||||||||||||||
Option "AccelerationThreshold" "integer" | Set the threshold, which is roughly the velocity (usually device units per 10 ms) required for acceleration to become effective. The precise effect varies with the profile however. |
The InputClass section
The config file may have multiple InputClass sections. These sections are optional and are used to provide configuration for a class of input devices as they are automatically added. An input device can match more than one InputClass section. Each class can override settings from a previous class, so it is best to arrange the sections with the most generic matches first.
InputClass sections have the following format:
Section "InputClass" Identifier "name" entries ... options ... EndSection
The Identifier entry is required in all InputClass sections. All other entries are optional.
The Identifier entry specifies the unique name for this input class. The Driver entry specifies the name of the driver to use for this input device. After all classes have been examined, the "inputdriver" module from the first Driver entry will be enabled when using the loadable server.
When an input device is automatically added, its characteristics are checked against all InputClass sections. Each section can contain optional entries to narrow the match of the class. If none of the optional entries appear, the InputClass section is generic and will match any input device. If more than one of these entries appear, they all must match for the configuration to apply.
There are two types of match entries used in InputClass sections. The first allows various tokens to be matched against attributes of the device. An entry can be constructed to match attributes from different devices by separating arguments with a '|' character. Multiple entries of the same type may be supplied to add multiple matching conditions on the same attribute. For example:
Section "InputClass" Identifier "My Class" # product string must contain example and # either gizmo or gadget MatchProduct "example" MatchProduct "gizmo|gadget" ... EndSection
MatchProduct "matchproduct" | This entry can be used to check if the substring "matchproduct" occurs in the device's product name. |
MatchVendor "matchvendor" | This entry can be used to check if the substring "matchvendor" occurs in the device's vendor name. |
MatchDevicePath "matchdevice" | This entry can be used to check if the device file matches the "matchdevice" pathname pattern. |
MatchOS "matchos" | This entry can be used to check if the operating system matches the case-insensitive "matchos" string. This entry is only supported on platforms providing the uname system call. |
MatchPnPID "matchpnp" | The device's PnP (plug and play) ID can be checked against the "matchpnp" shell wildcard pattern. |
MatchUSBID "matchusb" | The device's USB ID can be checked against the "matchusb" shell wildcard pattern. The ID is constructed as lowercase hexadecimal numbers separated by a ':'. This is the same format as the lsusb program. |
MatchDriver "matchdriver" | Check the case-sensitive string "matchdriver" against the currently configured driver of the device. Ordering of sections using this entry is important since it will not match unless the driver has been set by the config backend or a previous InputClass section. |
MatchTag "matchtag" | This entry can be used to check if tags assigned by the config backend matches the "matchtag" pattern. A match is found if at least one of the tags given in "matchtag" matches at least one of the tags assigned by the backend. |
MatchLayout "matchlayout" | Check the case-sensitive string "matchlayout" against the currently active ServerLayout section. The empty string "" matches an implicit layout which appears if no named ServerLayout sections have been found. |
The second type of entry is used to match device types. These entries take a boolean argument similar to Option entries.
MatchIsKeyboard "bool"
MatchIsPointer "bool"
MatchIsJoystick "bool"
MatchIsTablet "bool"
MatchIsTouchpad "bool"
MatchIsTouchscreen "bool"
When an input device has been matched to the InputClass section, any Option entries are applied to the device. One InputClass specific Option is recognized. See the InputDevice section above for a description of the remaining Option entries.
Option "Ignore" "boolean" | This optional entry specifies that the device should be ignored entirely, and not added to the server. This can be useful when the device is handled by another program and no X events should be generated. |
The Device section
The config file may have multiple Device sections. There must be at least one, for the video card being used.
Device sections have the following format:
Section "Device" Identifier "name" Driver "driver" entries ... EndSection
The Identifier and Driver entries are required in all Device sections. All other entries are optional.
The Identifier entry specifies the unique name for this graphics device. The Driver entry specifies the name of the driver to use for this graphics device. When using the loadable server, the driver module "driver" will be loaded for each active Device section. A Device section is considered active if it is referenced by an active Screen section.
Device sections recognise some driver-independent entries and Options, which are described here. Not all drivers make use of these driver-independent entries, and many of those that do don't require them to be specified because the information is auto-detected. See the individual graphics driver manual pages for further information about this, and for a description of the device-specific options. Note that most of the Options listed here (but not the other entries) may be specified in the Screen section instead of here in the Device section.
BusID "bus-id" | This specifies the bus location of the graphics card. For PCI/AGP cards, the bus-id string has the form PCI:bus:device:function (e.g., "PCI:1:0:0" might be appropriate for an AGP card). This field is usually optional in single-head configurations when using the primary graphics card. In multi-head configurations, or when using a secondary graphics card in a single-head configuration, this entry is mandatory. Its main purpose is to make an unambiguous connection between the device section and the hardware it is representing. This information can usually be found by running the pciaccess tool scanpci. |
Screen number | This option is mandatory for cards where a single PCI entity can drive more than one display (i.e., multiple CRTCs sharing a single graphics accelerator and video memory). One Device section is required for each head, and this parameter determines which head each of the Device sections applies to. The legal values of number range from 0 to one less than the total number of heads per entity. Most drivers require that the primary screen (0) be present. |
Chipset "chipset" | This usually optional entry specifies the chipset used on the graphics board. In most cases this entry is not required because the drivers will probe the hardware to determine the chipset type. Don't specify it unless the driver-specific documentation recommends that you do. |
Ramdac "ramdac-type" | This optional entry specifies the type of RAMDAC used on the graphics board. This is only used by a few of the drivers, and in most cases it is not required because the drivers will probe the hardware to determine the RAMDAC type where possible. Don't specify it unless the driver-specific documentation recommends that you do. |
DacSpeed speed DacSpeed speed-8 speed-16 speed-24 speed-32 |
This optional entry specifies the RAMDAC speed rating (which is usually printed on the RAMDAC chip). The speed is in MHz. When one value is given, it applies to all framebuffer pixel sizes. When multiple values are given, they apply to the framebuffer pixel sizes 8, 16, 24 and 32 respectively. This is not used by many drivers, and only needs to be specified when the speed rating of the RAMDAC is different from the defaults built in to driver, or when the driver can't auto-detect the correct defaults. Don't specify it unless the driver-specific documentation recommends that you do. |
Clocks clock ... | Specifies the pixel that are on your graphics board. The clocks are in MHz, and may be specified as a floating point number. The value is stored internally to the nearest kHz. The ordering of the clocks is important. It must match the order in which they are selected on the graphics board. Multiple Clocks lines may be specified, and each is concatenated to form the list. Most drivers do not use this entry, and it is only required for some older boards with non-programmable clocks. Don't specify this entry unless the driver-specific documentation explicitly recommends that you do. |
ClockChip "clockchip-type" | This optional entry is used to specify the clock chip type on graphics boards which have a programmable clock generator. Only a few Xorg drivers support programmable clock chips. For details, see the appropriate driver manual page. |
VideoRam mem | This optional entry specifies the amount of video ram that is installed on the graphics board. This is measured in kBytes. In most cases this is not required because the Xorg server probes the graphics board to determine this quantity. The driver-specific documentation should indicate when it might be needed. |
BiosBase baseaddress | This optional entry specifies the base address of the video BIOS for the VGA board. This address is normally auto-detected, and should only be specified if the driver-specific documentation recommends it. |
MemBase baseaddress | This optional entry specifies the memory base address of a graphics board's linear frame buffer. This entry is not used by many drivers, and it should only be specified if the driver-specific documentation recommends it. |
IOBase baseaddress | This optional entry specifies the IO base address. This entry is not used by many drivers, and it should only be specified if the driver-specific documentation recommends it. |
ChipID id | This optional entry specifies a numerical ID representing the chip type. For PCI cards, it is usually the device ID. This can be used to override the auto-detection, but that should only be done when the driver-specific documentation recommends it. |
ChipRev rev | This optional entry specifies the chip revision number. This can be used to override the auto-detection, but that should only be done when the driver-specific documentation recommends it. |
TextClockFreq freq | This optional entry specifies the pixel clock frequency that is used for the regular text mode. The frequency is specified in MHz. This is rarely used. |
Option "ModeDebug" "boolean" | Enable printing of additional debugging information about modesetting to the server log. |
Options | Option flags may be specified in the Device sections. These include driver-specific options and driver-independent options. The former are described in the driver-specific documentation. Some of the latter are described below in the section about the Screen section, and they may also be included here. |
The VideoAdapter section
Either nobody knows how this section works, or no one will divulge the information. This section is a complete mystery to the entire world. Therefore, this section can safely be ignored.
The Monitor section
The config file may have multiple Monitor sections. There should normally be at least one, for the monitor being used, but a default configuration will be created when one isn't specified.
Monitor sections have the following format:
Section "Monitor" Identifier "name" entries ... EndSection
The only mandatory entry in a Monitor section is the Identifier entry.
The Identifier entry specifies the unique name for this monitor. The Monitor section may be used to provide information about the specifications of the monitor, monitor-specific Options, and information about the video modes to use with the monitor.
With RandR 1.2-enabled drivers, monitor sections may be tied to specific outputs of the video card. Using the name of the output defined by the video driver plus the identifier of a monitor section, one associates a monitor section with an output by adding an option to the Device section in the following format:
Option "Monitor-outputname" "monitorsection"
(for example, Option "Monitor-VGA" "VGA monitor" for a VGA output)
In the absence of specific association of monitor sections to outputs, if a monitor section is present the server will associate it with an output to preserve compatibility for previous single-head configurations.
Specifying video modes is optional because the server will use the DDC or other information provided by the monitor to automatically configure the list of modes available. When modes are specified explicitly in the Monitor section (with the Mode, ModeLine, or UseModes keywords), built-in modes with the same names are not included. Built-in modes with different names are, however, still implicitly included, when they meet the requirements of the monitor.
The entries that may be used in Monitor sections are described below.
VendorName "vendor" | This optional entry specifies the monitor's manufacturer. | ||||||||||||
ModelName "model" | This optional entry specifies the monitor's model. | ||||||||||||
HorizSync horizsync-range | Gives the range(s) of horizontal sync frequencies supported by the monitor. The horizsync-range may be a comma separated list of either discrete values or ranges of values. A range of values is two values separated by a dash. By default, the values are in units of kHz. They may be specified in MHz or Hz if MHz or Hz is added to the end of the line. The data given here is used by the Xorg server to determine if video modes are in the specifications of the monitor. This information should be available in the monitor's handbook. If this entry is omitted, a default range of 28-33kHz is used. | ||||||||||||
VertRefresh vertrefresh-range | Gives the range(s) of vertical refresh frequencies supported by the monitor. The vertrefresh-range may be a comma separated list of either discrete values or ranges of values. A range of values is two values separated by a dash. By default, the values are in units of Hz. They may be specified in MHz or kHz if MHz or kHz is added to the end of the line. The data given here is used by the Xorg server to determine if video modes are in the specifications of the monitor. This information should be available in the monitor's handbook. If this entry is omitted, a default range of 43-72Hz is used. | ||||||||||||
DisplaySize width height | This optional entry gives the width and height, in millimetres, of the picture area of the monitor. If given this is used to calculate the horizontal and vertical pitch (DPI) of the screen. | ||||||||||||
Gamma gamma-value Gamma red-gamma green-gamma blue-gamma |
This is an optional entry that can be used to specify the gamma correction for the monitor. It may be specified as either a single value or as three separate RGB values. The values should be in the range 0.1 to 10.0, and the default is 1.0. Not all drivers are capable of using this information. | ||||||||||||
UseModes "modesection-id" | Include the set of modes listed in the Modes section called modesection-id. This makes all of the modes defined in that section available for use by this monitor. | ||||||||||||
Mode "name" | This is an optional multi-line entry that can be used to provide definitions for video modes for the monitor. In most cases this isn't necessary because the built-in set of VESA standard modes will be sufficient. The Mode keyword indicates the start of a multi-line video mode description. The mode description is terminated with the EndMode keyword. The mode description consists of the following entries:
|
||||||||||||
ModeLine "name" mode-description | This entry is a more compact version of the Mode entry, and it also can be used to specify video modes for the monitor. This is a single line format for specifying video modes. In most cases this isn't necessary because the built-in set of VESA standard modes will be sufficient. The mode-description is in four sections, the first three of that are mandatory. The first is the dot (pixel) clock. This is a single number specifying the pixel clock rate for the mode in MHz. The second section is a list of four numbers specifying the horizontal timings. These numbers are the hdisp, hsyncstart, hsyncend, and htotal values. The third section is a list of four numbers specifying the vertical timings. These numbers are the vdisp, vsyncstart, vsyncend, and vtotal values. The final section is a list of flags specifying other characteristics of the mode. Interlace indicates that the mode is interlaced. DoubleScan indicates a mode where each scanline is doubled. +HSync and -HSync can be used to select the polarity of the HSync signal. +VSync and -VSync can be used to select the polarity of the VSync signal. Composite can be used to specify composite sync on hardware where this is supported. Additionally, on some hardware, +CSync and -CSync may be used to select the composite sync polarity. The HSkew and VScan options mentioned above in the Mode entry description can also be used here. |
||||||||||||
Option "DPMS" "bool" | This option controls whether the server should enable the DPMS extension for power management for this screen. The default is to enable the extension. | ||||||||||||
Option "SyncOnGreen" "bool" | This option controls whether the video card should drive the sync signal on the green color pin. Not all cards support this option, and most monitors do not require it. The default is off. | ||||||||||||
Option "Primary" "bool" | This optional entry specifies that the monitor should be treated as the primary monitor. (RandR 1.2-supporting drivers only). | ||||||||||||
Option "PreferredMode" "name" | This optional entry specifies a mode to be marked as the preferred initial mode of the monitor. (RandR 1.2-supporting drivers only). | ||||||||||||
Option "Position" "x y" | This optional entry specifies the position of the monitor in the X screen. (RandR 1.2-supporting drivers only). | ||||||||||||
Option "LeftOf" "output" | This optional entry specifies that the monitor should be positioned to the left of the output (not monitor) of the given name. (RandR 1.2-supporting drivers only). | ||||||||||||
Option "RightOf" "output" | This optional entry specifies that the monitor should be positioned to the right of the output (not monitor) of the given name. (RandR 1.2-supporting drivers only). | ||||||||||||
Option "Above" "output" | This optional entry specifies that the monitor should be positioned above the output (not monitor) of the given name. (RandR 1.2-supporting drivers only). | ||||||||||||
Option "Below" "output" | This optional entry specifies that the monitor should be positioned below the output (not monitor) of the given name. (RandR 1.2-supporting drivers only). | ||||||||||||
Option "Enable" "bool" | This optional entry specifies whether the monitor should be turned on at startup. By default, the server will attempt to enable all connected monitors. (RandR 1.2-supporting drivers only). | ||||||||||||
Option "DefaultModes" "bool" | This optional entry specifies whether the server should add supported default modes to the list of modes offered on this monitor. By default, the server will add default modes; you should only disable this if you can guarantee that EDID will be available at all times, or if you have added custom modelines which the server can use. (RandR 1.2-supporting drivers only). | ||||||||||||
Option "MinClock" "frequency" | This optional entry specifies the minimum dot clock, in kHz, that is supported by the monitor. | ||||||||||||
Option "MaxClock" "frequency" | This optional entry specifies the maximum dot clock, in kHz, that is supported by the monitor. | ||||||||||||
Option "Ignore" "bool" | This optional entry specifies that the monitor should be ignored entirely, and not reported through RandR. This is useful if the hardware reports the presence of outputs that don't exist. (RandR 1.2-supporting drivers only). | ||||||||||||
Option "Rotate" "rotation" | This optional entry specifies the initial rotation of the given monitor. Valid values for rotation are "normal", "left", "right", and "inverted". (RandR 1.2-supporting drivers only). |
The Modes section
The config file may have multiple Modes sections, or none. These sections provide a way of defining sets of video modes independently of the Monitor sections. Monitor sections may include the definitions provided in these sections using the UseModes keyword. In most cases, the Modes sections are not necessary because the built-in set of VESA standard modes are sufficient.
Modes sections have the following format:
Section "Modes" Identifier "name" entries ... EndSection
The Identifier entry specifies the unique name for this set of mode descriptions. The other entries permitted in Modes sections are the Mode and ModeLine entries that are described above in the Monitor section.
The Screen section
The config file may have multiple Screen sections. There must be at least one, for the "screen" being used. A "screen" represents the binding of a graphics device (Device section) and a monitor (Monitor section). A Screen section is considered "active" if it is referenced by an active ServerLayout section or by the -screen command line option. If neither of those is present, the first Screen section found in the config file is considered the active one.
Screen sections have the following format:
Section "Screen" Identifier "name" Device "devid" Monitor "monid" entries ... SubSection "Display" entries ... EndSubSection ... EndSection
The Identifier entry is mandatory. All others are optional.
The Identifier entry specifies the unique name for this screen. The Screen section provides information specific to the whole screen, including screen-specific Options. In multi-head configurations, there will be multiple active Screen sections, one for each head. The entries available for this section are:
Device "device-id" | This entry specifies the Device section to be used for this screen. When multiple graphics cards are present, this is what ties a specific card to a screen. The device-id must match the Identifier of a Device section in the config file. |
Monitor "monitor-id" | Specifies which monitor description is to be used for this screen. If a Monitor name is not specified, a default configuration is used. Currently the default configuration may not function as expected on all platforms. |
VideoAdaptor "xv-id" | Specifies an optional Xv video adaptor description to be used with this screen. |
DefaultDepth depth | Specifies which color depth the server should use by default. The -depth command line option can be used to override this. If neither is specified, the default depth is driver-specific, but in most cases is 8. |
DefaultFbBpp bpp | Specifies which framebuffer layout to use by default. The -fbbpp command line option can be used to override this. In most cases the driver will chose the best default value for this. The only case where there is even a choice in this value is for depth 24, where some hardware supports both a packed 24 bit framebuffer layout and a sparse 32 bit framebuffer layout. |
Option "Accel" | Enables 2D hardware acceleration. This option is on by default, but it may be necessary to turn it off if there are bugs in the driver. There are many options to disable specific accelerated operations, listed below. Note that disabling an operation will have no effect if the operation is not accelerated (whether due to lack of support in the hardware or in the driver). |
Option "InitPrimary" "boolean" | Use the Int10 module to initialize the primary graphics card. Normally, only secondary cards are soft-booted using the Int10 module, as the primary card has already been initialized by the BIOS at boot time. Default: false. |
Option "NoInt10" "boolean" | Disables the Int10 module, a module that uses the int10 call to the BIOS of the graphics card to initialize it. Default: false. |
Option "NoMTRR" | Disables MTRR (Memory Type Range Register) support, a feature of modern processors which can improve video performance by a factor of up to 2.5. Some hardware has buggy MTRR support, and some video drivers have been known to exhibit problems when MTRR's are used. |
Each Screen section may optionally contain one or more Display subsections. Those subsections provide depth/fbbpp specific configuration information, and the one chosen depends on the depth and/or fbbpp that is being used for the screen. The Display subsection format is described in the section below.
The Display subsection
Each Screen section may have multiple Display subsections. The "active" Display subsection is the first that matches the depth and/or fbbpp values being used, or failing that, the first that has neither a depth or fbbpp value specified. The Display subsections are optional. When there isn't one that matches the depth and/or fbbpp values being used, all the parameters that can be specified here fall back to their defaults.
Display subsections have the following format:
SubSection "Display" Depth depth entries ... EndSubSection
Depth depth | This entry specifies what colour depth the Display subsection is to be used for. This entry is usually specified, but it may be omitted to create a match-all Display subsection or when wishing to match only against the FbBpp parameter. The range of depth values that are allowed depends on the driver. Most drivers support 8, 15, 16 and 24. Some also support 1 and/or 4, and some may support other values (like 30). Note: depth means the number of bits in a pixel that are actually used to determine the pixel colour. 32 is not a valid depth value. Most hardware that uses 32 bits per pixel only uses 24 of them to hold the colour information, which means that the colour depth is 24, not 32. |
FbBpp bpp | This entry specifies the framebuffer format this Display subsection is to be used for. This entry is only needed when providing depth 24 configurations that allow a choice between a 24 bpp packed framebuffer format and a 32bpp sparse framebuffer format. In most cases this entry should not be used. |
Weight red-weight green-weight blue-weight | This optional entry specifies the relative RGB weighting to be used for a screen is being used at depth 16 for drivers that allow multiple formats. This may also be specified from the command line with the -weight option. |
Virtual xdim ydim | This optional entry specifies the virtual screen resolution to be used. The xdim must be a multiple of either 8 or 16 for most drivers, and a multiple of 32 when running in monochrome mode. The given value will be rounded down if this is not the case. Video modes that are too large for the specified virtual size will be rejected. If this entry is not present, the virtual screen resolution will be set to accommodate all the valid video modes given in the Modes entry. Some drivers/hardware combinations do not support virtual screens. Refer to the appropriate driver-specific documentation for details. |
ViewPort x0 y0 | This optional entry sets the upper left corner of the initial display. This is only relevant when the virtual screen resolution is different from the resolution of the initial video mode. If this entry is not given, then the initial display will be centered in the virtual display area. |
Modes "mode-name" ... | This optional entry specifies the list of video modes to use. Each mode-name specified must be in double quotes. They must correspond to those specified or referenced in the appropriate Monitor section (including implicitly referenced built-in VESA standard modes). The server will delete modes from this list which don't satisfy various requirements. The first valid mode in this list will be the default display mode for startup. The list of valid modes is converted internally into a circular list. It is possible to switch to the next mode with Ctrl+Alt+Keypad-Plus and to the previous mode with Ctrl+Alt+Keypad-Minus. When this entry is omitted, the valid modes referenced by the appropriate Monitor section will be used. If the Monitor section contains no modes, then the selection will be taken from the built-in VESA standard modes. |
Visual "visual-name" | This optional entry sets the default root visual type. This may also be specified from the command line. The visual types available for depth 8 are (default is PseudoColor): StaticGray The visual type available for the depths 15, 16 and 24 are (default is TrueColor): TrueColor Not all drivers support DirectColor at these depths. The visual types available for the depth 4 are (default is StaticColor): StaticGray The visual type available for the depth 1 (monochrome) is StaticGray. |
Black red green blue | This optional entry allows the "black" colour to be specified. This is only supported at depth 1. The default is black. |
White red green blue | This optional entry allows the "white" colour to be specified. This is only supported at depth 1. The default is white. |
Options | Option flags may be specified in the Display subsections. These may include driver-specific options and driver-independent options. The former are described in the driver-specific documentation. Some of the latter are described above in the section about the Screen section, and they may also be included here. |
The ServerLayout section
The config file may have multiple ServerLayout sections. A "server layout" represents the binding of one or more screens (Screen sections) and one or more input devices (InputDevice sections) to form a complete configuration. In multi-head configurations, it also specifies the relative layout of the heads. A ServerLayout section is considered "active" if it is referenced by the -layout command line option or by an Option "DefaultServerLayout" entry in the ServerFlags section (the former takes precedence over the latter). If those options are not used, the first ServerLayout section found in the config file is considered the active one. If no ServerLayout sections are present, the single active screen and two active (core) input devices are selected as described in the relevant sections above.
ServerLayout sections have the following format:
Section "ServerLayout" Identifier "name" Screen "screen-id" ... InputDevice "idev-id" ... options ... EndSection
Each ServerLayout section must have an Identifier entry and at least one Screen entry.
The Identifier entry specifies the unique name for this server layout. The ServerLayout section provides information specific to the whole session, including session-specific Options. The ServerFlags options (described above) may be specified here, and ones given here override those given in the ServerFlags section.
The entries that may be used in this section are described here.
Screen screen-num "screen-id" position-information | One of these entries must be given for each screen being used in a session. The screen-id field is mandatory, and specifies the Screen section being referenced. The screen-num field is optional, and may be used to specify the screen number in multi-head configurations. When this field is omitted, the screens will be numbered in the order that they are listed in. The numbering starts from 0, and must be consecutive. The position-information field describes the way multiple screens are positioned. There are many different ways that this information can be provided:
|
||||
InputDevice "idev-id" "option" ... | One of these entries should be given for each input device being used in a session. Normally at least two are required, one each for the core pointer and keyboard devices. If either of those is missing, suitable InputDevice entries are searched for using the method described above in the InputDevice section. The idev-id field is mandatory, and specifies the name of the InputDevice section being referenced. Multiple option fields may be specified, each in double quotes. The options permitted here are any that may also be given in the InputDevice sections. Normally only session-specific input device options would be used here. The most commonly used options are: "CorePointer" "CoreKeyboard" "SendCoreEvents" and the first two should normally be used to indicate the core pointer and core keyboard devices respectively. |
||||
Option "IsolateDevice" "bus-id" | Restrict device resets to the specified bus-id. See the BusID option (described in Device section, above) for the format of the bus-id parameter. This option overrides SingleCard, if specified. At present, only PCI devices can be isolated in this manner. | ||||
Option "SingleCard" "boolean" | As IsolateDevice, except that the bus ID of the first device in the layout is used. |
Here is an example of a ServerLayout section for a dual headed configuration with two mice:
Section "ServerLayout" Identifier "Layout 1" Screen "MGA 1" Screen "MGA 2" RightOf "MGA 1" InputDevice "Keyboard 1" "CoreKeyboard" InputDevice "Mouse 1" "CorePointer" InputDevice "Mouse 2" "SendCoreEvents" Option "BlankTime" "5" EndSection
Sample xorg.conf file
The following is an example xorg.conf file, standard for many Linux systems:
# /etc/X11/xorg.conf (xorg X Window System server configuration file) # # Super hand tuned Xorg file by DMc # # Currently runs triple display on two dual head nvidia cards # # Copyright 2008 McPond Software # # This file is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This file is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # 1.0 Start from base file, rip out wacom tablet stuff, I dont have one # Reorder sections, add dual head setup # >>> Gives # Fatal server error: # Requested Entity already in use! # 1.1 Reading further... TwinView mode on nv open source driver # 1.2 After Feisty upgrade will not start on nVidia, change back to nv # until can get it running, then recheck with tools # and of course nv doesnt support Twinview? # 1.3 Add more button support for Razor Copperhead # 1.4 Envy for Fiesty with help from nvidia-xconfig # 1.5 Enable dual head again # 1.6 Change to 20" Viewsonic # 1.7 Kernel update to 2.6.20 breaks nvidia again. # Change to nv to get started # Run envy, then change back to unaltered xorg file # 1.8 New nVidia 8600GT graphics card with dual DVI output # Required latest nVidia drivers 100.41.100 # 1.9 New Samsung SyncMaster 226BW 22" wide screen LCD # 2.0 Hardy Heron 8.04 major upgrade. New envyng 1.1.1 # New nvidia installer 173 version # 2.1 Kernel update 2.6.24-18 Wont start after # Disabled two empty font paths, disabled type1 as it wasnt loading # Ran envy but boot crashes with Fatal server error Caught signal 4 # server aborting libGLcore.so.1 # Envy only reporting installer v169. It wont do 173 as thats beta # Yes, installed 173 manually. Seems 169 does not work on this system # Run NVIDIA(blah).run to setup # 2.2 Add Asus Geforce 7200GS card in second PCI-E 16x slot # Needed help from nvidia-xconfig to get both to run # The screen IDs are not accumulative, that means, for each physical # card, the screen ID starts with 0 again. # It treats the 7200 as 'primary' probably because it has a lower bus number # meaning you have to login to that screen. Tool panel can be moved to any screen. # 2.3 Attempting to get Compiz to run # Composite extension not found # You must use XOrg >= 6.8 for translucency and shadows to work # # Index: # ServerLayout # Vendor # InputDevice - Keyboard # InputDevice - Mouse # Device - Left # Device - Right # Monitor - Left # Monitor - Right # Screen - Left # Screen - Right # Files # Module # Extensions # # # Notes: # Server Flags must go before Server Layout # Server layout ties it all together Section "ServerLayout" Identifier "TripleHeadLayout" Screen 0 "CentreScreen" 0 0 # was rightof, now changed to leftof Screen 1 "RightScreen" RightOf "CentreScreen" # Dont use LeftOf Same twice, you get two screens doing the same thing. Screen 2 "LeftScreen" LeftOf "CentreScreen" # Changed this from 0 to 2 Option "Xinerama" "On" InputDevice "Ergonomic4000" InputDevice "Razer Copperhead" EndSection # Microsoft Ergonomic 4000 Keyboard Section "InputDevice" Identifier "Ergonomic4000" Driver "kbd" Option "CoreKeyboard" Option "XkbRules" "xorg" Option "XkbModel" "pc105" Option "XkbLayout" "us" Option "XkbOptions" "lv3:ralt_switch" # Would be nice if the top ribbon web buttons worked # and the Zoom slider in the centre # and back/forward buttons EndSection # Razer Copperhead and KVM based PS2 Section "InputDevice" Identifier "Razer Copperhead" Driver "mouse" Option "CorePointer" Option "Device" "/dev/input/mice" Option "Protocol" "ExplorerPS/2" Option "ZAxisMapping" "4 5" # ZAxis mapping is the scrolling. Exclude from list below Option "Emulate3Buttons" "true" Option "Buttons" "9" Option "ButtonMapping" "1 2 3 6 7 8 9" # 3 is the wheel click # 6 & 7 and 8 & 9 are on the sides of the mouse - and hard to press EndSection # Graphics device description # nVidia GeForce 8600GT # Device section is for the video card # One section per head Section "Device" Identifier "Left nVidia 8600GT" Driver "nvidia" # For use after kernel upgrades kills nVidia proprietory # Also turn off RightScreen # Driver "nv" VendorName "NVIDIA Corporation" BoardName "GeForce 8600 GT" # PCI-Express 16x bus BusID "PCI:7:0:0" # Appears as PCI:4 on other machines # BusID "PCI:1:0:0" this is AGP Screen 0 # Options... EndSection Section "Device" Identifier "Right nVidia 8600GT" Driver "nvidia" VendorName "NVIDIA Corporation" BoardName "GeForce 8600 GT" BusID "PCI:7:0:0" Screen 1 # # Options... EndSection Section "Device" Identifier "Left nVidia 7200" Driver "nvidia" VendorName "NVIDIA Corporation" BoardName "GeForce 7200 GS" # Outer PCI-Express 16x Bus BusID "PCI:2:0:0" Screen 0 # # Options... EndSection # Samsung SyncMaster 226BW - Right Section "Monitor" Identifier "SyncMaster-226BW" VendorName "Samsung" HorizSync 30.0 - 81.0 VertRefresh 56.0 - 75.0 Option "DPMS" # More Options... EndSection # Sony SDM-HS95P - Moved to another machine #Section "Monitor" # Identifier "SDM-HS95P" # VendorName "Sony" # HorizSync 28.0 - 65.0 # VertRefresh 57.0 - 63.0 # Option "DPMS" # More Options... #EndSection Section "Monitor" Identifier "VG2021m" Option "DPMS" HorizSync 28-65 VertRefresh 57-63 VendorName "Viewsonic" # More Options... EndSection Section "Monitor" Identifier "SyncMaster-245B" Option "DPMS" HorizSync 30-81 VertRefresh 56-75 VendorName "Samsung" # More Options... EndSection Section "Screen" Identifier "CentreScreen" Device "Left nVidia 8600GT" Monitor "VG2021m" # Compositing manager Option "RenderAccel" "true" Option "TripleBuffer" "true" # Not needed on modern X servers Option "AllowGLXWithComposite" Option "DPMS" "true" DefaultDepth 24 SubSection "Display" Depth 24 Modes "1400x1050" EndSubSection EndSection Section "Screen" Identifier "RightScreen" Device "Right nVidia 8600GT" Monitor "SyncMaster-226BW" # Compositing manager Option "RenderAccel" "true" Option "TripleBuffer" "true" Option "AllowGLXWithComposite" Option "DPMS" "true" DefaultDepth 24 SubSection "Display" Depth 24 Modes "1680x1050" EndSubSection # Even though the SyncMaster and the Viewsonic are 1050, the # Viewsonic is 10mm taller. Syncmaster has a finer dot pitch, # but less physical real estate EndSection Section "Screen" Identifier "LeftScreen" Device "Left nVidia 7200" Monitor "SyncMaster-245B" # Compositing manager Option "RenderAccel" "true" Option "TripleBuffer" "true" Option "AllowGLXWithComposite" Option "DPMS" "true" DefaultDepth 24 SubSection "Display" Depth 24 Modes "1920x1200" EndSubSection EndSection # File path names Section "Files" # These folders do not exist FontPath "/usr/share/fonts/X11/misc" FontPath "/usr/share/fonts/X11/100dpi" # No files in here FontPath "/usr/share/X11/fonts/75dpi" # removed this tail /:unscaled" # No files here either FontPath "/usr/share/X11/fonts/Type1" # path to defoma fonts FontPath "/var/lib/defoma/x-ttcidfont-conf.d/dirs/TrueType" RgbPath "/usr/X11R6/lib/X11/rgb" EndSection # Dynamic module loading Section "Module" Load "bitmap" Load "dbe" Load "ddc" Load "extmod" Load "freetype" Load "glx" Load "int10" # Module does not exist on disk Load "type1" Load "vbe" EndSection Section "ServerFlags" Option "Xinerama" "1" EndSection Section "Extensions" # Compositing manager for xcompmgr Option "Composite" "Enable" EndSection
Examples
Xorg -configure
This command will instruct Xorg to probe all current devices and write an xorg.conf configuration file appropriate for the system.
Related commands
startx — Start an X Window System session.