xorg.conf(5)

โœจ NAME โœจ

xorg.conf, xorg.conf.d โ€” the configuration files for the Xorg X server. yep bestie, this is the xorg.conf(5) file-formats-manual moment, and itโ€™s giving โ€œthe files that tell Xorg how to actโ€ ๐Ÿ’…

๐Ÿ’– INTRODUCTION ๐Ÿ’–

okay so Xorg is super flexible about how it gets 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 info shows up in more than one way, the highest precedence mechanism wins. the list of mechanisms is ordered from highest precedence to lowest. note that not all parameters can be supplied via all methods. the available command line options and environment variables (and some defaults) are described in the Xserver(1) and Xorg(1) manual pages. most configuration file parameters, with their defaults, are described below. driver and module specific configuration parameters are described in the relevant driver or module manual page.

๐ŸŒˆ DESCRIPTION ๐ŸŒˆ

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(3).

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(3).

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 a directory reserved for system use. this is to separate configuration files from the vendor or 3rd party packages from those of local administration. these files are found in the following directory:

/usr/share/X11/xorg.conf.d

the xorg.conf and xorg.conf.d files are composed of a number of 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 pathnames
  • ServerFlags โ€” Server flags
  • Module โ€” Dynamic module loading
  • Extensions โ€” Extension enabling
  • InputDevice โ€” Input device description
  • InputClass โ€” Input class description
  • OutputClass โ€” Output 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 is no longer recognised.

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.

๐ŸŒธ FILES SECTION ๐ŸŒธ

okay so the Files section is where you tell the server about some path names it needs. lowkey important. some of these paths can also be set from the command line โ€” peep Xserver(1) and Xorg(1) โ€” and heads up: command line settings override the values in the config file. the Files section is optional, and so is literally every entry that can appear in it. very chill of it. ๐Ÿซถ

here's what can go in there:

  • FontPath "path" โ€” sets the search path for fonts. this path is a comma separated list of font path elements that the Xorg server searches for font databases. you can drop multiple FontPath entries and they all get concatenated to build up the fontpath the server uses. font path elements can be absolute directory paths, catalogue directories, or a font server identifier โ€” and the formats of the last two are explained right below:

๐Ÿ“‚ Catalogue directories

catalogue directories get specified with the prefix catalogue: in front of the directory name. then you populate that directory with symlinks pointing at the real font directories, using this syntax in the symlink name:

<identifier>:[attribute]:pri=<priority>

where <identifier> is an alphanumeric identifier, [attribute] is an attribute that gets passed to the underlying FPE, and <priority> is a number used to order the fontfile FPEs. examples, bestie:

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

font server identifiers have the form:

<trans>/<hostname>:<port-number>

where <trans> is the transport type used 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 the font server is listening on (usually 7100).

so when this entry isn't specified in the config file, the server falls back to the compiled-in default font path, which contains these font path elements (and yes, these 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 turn out to be invalid get removed from the font path when the server starts up. gone, reduced to atoms, no cap.
  • ModulePath "path" โ€” sets the search path for loadable Xorg server modules. this path is a comma separated list of directories that the Xorg server searches for loadable modules, loading them in the order specified. you can specify multiple ModulePath entries and they get concatenated to build the module search path the server uses. the default module path is
lib/xorg/modules
  • XkbDir "path" โ€” sets the base directory for keyboard layout files. the -xkbdir command line option can override this. the default directory is
/usr/share/X11/xkb

โœจ SERVERFLAGS SECTION โœจ

besides the options specific to this section (which we're getting to, don't worry), the ServerFlags section is used to specify some global Xorg server options. every entry in this section is an Option, although for compatibility purposes some of the old style entries are still recognised โ€” but those old style entries are not documented here and using them is discouraged. ๐Ÿ™…โ€โ™€๏ธ the ServerFlags section is optional, and so are the entries you can put in it.

okay so here's the hierarchy tea: options specified in this section (with the exception of the "DefaultServerLayout" Option) can be overridden by Options specified in the active ServerLayout section. and options with command line equivalents get overridden when their command line equivalent is used. the options recognised by this section are:

  • Option "Debug" "string" โ€” this comma-separated list is a way to control various debugging switches from the config file. rn the only defined value is dmabuf_capable, which instructs glamor to enable some unstable buffer management code. ๐Ÿซฃ
  • Option "DefaultServerLayout" "layout-id" โ€” specifies the default ServerLayout section to use in the absence of the -layout command line option.
  • Option "DontVTSwitch" "boolean" โ€” disallows the use of the Ctrl+Alt+Fn sequence (where Fn refers to one of the numbered function keys). that sequence is normally how you 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 gets passed to clients. Default: off.
  • Option "DontZap" "boolean" โ€” 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" โ€” disallows the use of the Ctrl+Alt+Keypad-Plus and Ctrl+Alt+Keypad-Minus sequences. those sequences let you switch between video modes. when this option is enabled, those key sequences have no special meaning and get passed to clients. Default: off.
  • Option "DisableVidModeExtension" "boolean" โ€” disables the parts of the VidMode extension used by the xvidtune client that can change the video modes. Default: the VidMode extension is enabled.
  • Option "AllowNonLocalXvidtune" "boolean" โ€” lets the xvidtune client (and other clients that use the VidMode extension) connect from another host. Default: off.
  • Option "AllowMouseOpenFail" "boolean" โ€” tells the mousedrv(4) and vmmouse(4) drivers not to report failure if the mouse device can't be opened/initialised. it has no effect on the evdev(4) or other drivers. Default: false.
  • Option "BlankTime" "time" โ€” sets the inactivity timeout for the blank phase of the screensaver. 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(1). Default: 10 minutes.
  • Option "StandbyTime" "time" โ€” sets the inactivity timeout for the standby phase of DPMS mode. time is in minutes, and the value can be changed at run-time with xset(1). Default: 10 minutes. this is only suitable for VESA DPMS compatible monitors, and may not be supported by all video drivers. it's only enabled for screens that have the "DPMS" option set (see the MONITOR section below).
  • Option "SuspendTime" "time" โ€” sets the inactivity timeout for the suspend phase of DPMS mode. time is in minutes, and the value can be changed at run-time with xset(1). Default: 10 minutes. this is only suitable for VESA DPMS compatible monitors, and may not be supported by all video drivers. it's only enabled for screens that have the "DPMS" option set (see the MONITOR section below).
  • Option "OffTime" "time" โ€” sets the inactivity timeout for the off phase of DPMS mode. time is in minutes, and the value can be changed at run-time with xset(1). Default: 10 minutes. this is only suitable for VESA DPMS compatible monitors, and may not be supported by all video drivers. it's only enabled for screens that have the "DPMS" option set (see the MONITOR section below).
  • Option "MaxClients" "integer" โ€” sets the maximum number of clients allowed to connect to the X server. acceptable values are 64, 128, 256 or 512. no in-between, bestie, pick one of the four. ๐ŸŽฏ
  • Option "NoPM" "boolean" โ€” disables something to do with power management events. Default: PM enabled on platforms that support it. (yes, the manpage literally says "something to do with". iconic honestly. ๐Ÿ˜ญ)
  • Option "Xinerama" "boolean" โ€” enable or disable the XINERAMA extension. Default is disabled.
  • Option "IndirectGLX" "boolean" โ€” enable or disable indirect GLX contexts. Indirect GLX contexts are disabled by default.
  • Option "DRI2" "boolean" โ€” enable or disable DRI2. DRI2 is disabled by default.
  • Option "GlxVisuals" "string" โ€” controls how many GLX visuals the GLX modules sets up. the default value is typical, which will set up a typical subset of the GLXFBConfigs provided by the driver as GLX visuals. other options are minimal, which sets up the minimal set allowed by the GLX specification, and all, which sets up 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 disabled, then no devices will be added from the HAL or udev backends. Enabled by default.
  • Option "AutoEnableDevices" "boolean" โ€” if 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 "AutoAddGPU" "boolean" โ€” if disabled, then no GPU devices will be added from the udev backend. Enabled by default. (may need to be disabled to setup Xinerama). ๐ŸŽ€
  • Option "AutoBindGPU" "boolean" โ€” if enabled, then secondary GPUs get automatically set up as output-sinks and offload-sources. that makes e.g. laptop outputs connected only to the secondary GPU directly available for use without needing to run "xrandr --setprovideroutputsource". Enabled by default. slay.
  • Option "Log" "string" โ€” controls whether the log is flushed and/or synced to disk after each message. possible values are flush or sync. Unset by default.
  • Option "AllowByteSwappedClients" "boolean" โ€” allow clients with a different byte-order than the server. Enabled by default. ๐Ÿ’–

โœจ MODULE SECTION โœจ

okay so the Module section is literally just where you tell the Xorg server which modules to load up. bestie, real talk: this whole section gets ignored when the Xorg server is built in static form. rude but true.

The kind of modules that normally get loaded here are Xorg server extension modules. Most other module types just load themselves automatically when they're needed through other mechanisms โ€” they don't need you micromanaging them ๐Ÿ’….

Also? The Module section is optional, and so is every single entry you could put in it. no pressure.

Entries here come in two forms. The first and most common one uses the Load keyword:

  • Load "modulename" โ€” tells the server to load the module called modulename. The name you give should be the module's standard name, not the module file name. That standard name is case-sensitive, and it does not include the lib or cyg prefixes, or the .so or .dll suffixes. (like, the name is the vibe, not the filename, k?)

Example โ€” the DRI extension module gets loaded with this entry:

Load "dri"
  • Disable "modulename" โ€” tells the server to not load the module called modulename. Some modules get loaded by default in the server, and this overrides that default. But heads up: if a Load instruction is given for the same module, it overrides the Disable instruction and the module is loaded. Same rules on the name โ€” standard name, not file name, case-sensitive, and no lib prefix, and no .a, .o, or .so suffixes.

The second form of entry is a SubSection, where the subsection name is the module name, and the contents of the SubSection are Options that get passed to the module when it's loaded.

Example โ€” the extmod module (which contains a miscellaneous group of server extensions) can be loaded with the XFree86-DGA extension disabled, like this:

SubSection "extmod"
    Option  "omit XFree86-DGA"
EndSubSection

Modules get searched for in every directory listed in the ModulePath search path, and in the drivers, extensions, input, internal, and multimedia subdirectories of each of those directories. On top of that, operating system specific subdirectories of all the above get searched first if they exist ๐Ÿซถ.

Wanna see which extension modules are actually available? Check the extensions subdirectory under:

lib/xorg/modules

The extmod, dbe, dri, dri2, glx, and record extension modules load automatically if they're present โ€” unless you disabled them with "Disable" entries. And ngl, it's recommended that at the 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. so like... load it ๐Ÿ˜ญ


๐Ÿฆ‹ EXTENSIONS SECTION ๐Ÿฆ‹

The Extensions section is where you say which X11 protocol extensions should be enabled or disabled. Also optional, also every entry inside it optional. we love a low-stakes section ๐Ÿ’œ

Entries here 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 it matches the form shown in the output of Xorg -extension ?.

Example: the MIT-SHM extension can be disabled with this entry:
Section "Extensions"
    Option "MIT-SHM" "Disable"
EndSection

๐ŸŒธ INPUTDEVICE SECTION ๐ŸŒธ

Your config file can have multiple InputDevice sections. Recent X servers use HAL or udev backends for input device enumeration and input hotplugging, so it's usually not necessary to provide InputDevice sections in the xorg.conf if hotplugging is in use (i.e. AutoAddDevices is enabled). And if hotplugging is enabled, InputDevice sections using the mouse, kbd and vmmouse driver will just be ignored. bye ๐Ÿ’€

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 those two is missing, a default configuration for the missing one(s) gets used. In the absence of an explicitly specified core input device, the first InputDevice marked as CorePointer (or CoreKeyboard) is used. If there's 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 โ€” though currently that default configuration may not work as expected on all platforms ๐Ÿ™ˆ.

InputDevice sections have this format:

Section "InputDevice"
    Identifier "name"
    Driver     "inputdriver"
    options
    ...
EndSection

The Identifier and Driver entries are required in all InputDevice sections. Everything else is 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" gets loaded for each active InputDevice section. A section counts as active if it's referenced by an active ServerLayout section, if it's referenced by the -keyboard or -pointer command line options, or if it's selected implicitly as the core pointer or keyboard device when there are no such explicit references. The most commonly used input drivers are evdev(4) on Linux systems, and kbd(4) and mousedrv(4) on other platforms ๐Ÿ‘‘

InputDevice sections also recognise some driver-independent Options, described right here. For device-specific options, go check the individual input driver manual pages, iykyk.

  • 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. It's 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 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 gets 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 that 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 ๐ŸŽ€

For pointing devices, these options control how the pointer gets accelerated or decelerated with respect to physical device motion. Most of them can be adjusted at runtime โ€” see the xinput(1) man page for the deets. Only the most important acceleration options are discussed here, bc we're keeping it cute and not overwhelming you ๐Ÿ’–

  • Option "AccelerationProfile" "integer" โ€” select the profile. In layman's terms, the profile is basically 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) gets constructed. This is mainly a matter of personal preference, so like... pick your vibe:
    • 0 โ€” classic (mostly compatible)
    • -1 โ€” none (only constant deceleration is applied)
    • 1 โ€” device-dependent
    • 2 โ€” polynomial (polynomial function)
    • 3 โ€” smooth linear (soft knee, then linear)
    • 4 โ€” simple (normal when slow, otherwise accelerated)
    • 5 โ€” power (power function)
    • 6 โ€” linear (more speed, more acceleration)
    • 7 โ€” limited (like linear, but maxes out at threshold)
  • Option "ConstantDeceleration" "real" โ€” makes the pointer go deceleration times slower than normal. Most useful for high-resolution devices. A value between 0 and 1 will actually speed up the pointer, fun little plot twist ๐ŸŒˆ
  • Option "AdaptiveDeceleration" "real" โ€” lets you actually decelerate the pointer when it's going slow. At most, it'll be adaptive deceleration times slower. This enables precise pointer placement without sacrificing speed. iconic combo tbh.
  • Option "AccelerationScheme" "string" โ€” selects the scheme, which is the underlying algorithm:
    • predictable โ€” default algorithm (behaving more predictable)
    • lightweight โ€” old acceleration code (as specified in the X protocol spec)
    • none โ€” no acceleration or deceleration
  • Option "AccelerationNumerator" "integer"
  • Option "AccelerationDenominator" "integer"

These two set the 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 user's 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" โ€” sets 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 though, so like... don't come for me if it feels different on profile 4 ๐Ÿ’…

๐Ÿฆ‹ INPUTCLASS SECTION ๐Ÿฆ‹

Okay so your config file can have multiple InputClass sections, and they're totally optional โ€” they exist so you can hand-configure a whole class of input devices as they get auto-added. And here's the tea: one single input device can match more than one InputClass section. Each class can override the settings from a previous class, so bestie, arrange your sections with the most generic matches first. ๐Ÿ’…

InputClass sections look like this:

Section "InputClass"
    Identifier  "name"
    entries
    ...
    options
    ...
EndSection

The Identifier entry is required in all InputClass sections โ€” literally non-negotiable. Every other entry is 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 get 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 appears, they all must match for the configuration to apply. ๐Ÿ‘‘


There are two types of match entries used in InputClass sections. The first one lets various tokens 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"
    NoMatchDriver "drivername"
    ...
EndSection
  • MatchProduct "matchproduct" โ€” checks if the substring "matchproduct" occurs in the device's product name. ๐Ÿ”
  • MatchVendor "matchvendor" โ€” checks if the substring "matchvendor" occurs in the device's vendor name.
  • MatchDevicePath "matchdevice" โ€” checks if the device file matches the "matchdevice" pathname pattern.
  • MatchOS "matchos" โ€” checks if the operating system matches the case-insensitive "matchos" string. Heads up: this entry is only supported on platforms providing the uname(2) system call. ๐Ÿซถ
  • MatchPnPID "matchpnp" โ€” the device's Plug and Play (PnP) 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 ':'. Same format as the lsusb(8) program, iykyk. ๐Ÿ”Œ
  • MatchDriver "matchdriver" โ€” checks the case-sensitive string "matchdriver" against the currently configured driver of the device. Ordering of sections using this entry is important โ€” it won't match unless the driver has already been set by the config backend or a previous InputClass section. ๐Ÿ˜ญ
  • MatchTag "matchtag" โ€” checks if tags assigned by the config backend match 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" โ€” checks 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. โœจ

All the above directives have equivalents for negative matching: NoMatchProduct, NoMatchVendor, NoMatchDevicePath, NoMatchOS, NoMatchPnPID, NoMatchUSBID, NoMatchDriver, NoMatchTag, and NoMatchLayout. These NoMatch directives match if the subsequent match is not met by the device. Reverse uno card, basically. ๐Ÿ™ˆ


The second type of entry matches device types. These entries take a boolean argument, similar to Option entries:

  • MatchIsKeyboard "bool"
  • MatchIsPointer "bool"
  • MatchIsJoystick "bool"
  • MatchIsTablet "bool"
  • MatchIsTabletPad "bool"
  • MatchIsTouchpad "bool"
  • MatchIsTouchscreen "bool"

When an input device has been matched to the InputClass section, any Option entries get 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. Super useful when the device is handled by another program and no X events should be generated. Bye bestie, you're not invited. ๐Ÿ’€

๐ŸŒˆ OUTPUTCLASS SECTION ๐ŸŒˆ

Same energy, but for output devices this time. The config file may have multiple OutputClass sections. These sections are optional and are used to provide configuration for a class of output devices as they are automatically added. An output device can match more than one OutputClass section. Each class can override settings from a previous class, so again โ€” arrange the sections with the most generic matches first. ๐ŸŽ€

OutputClass sections have the following format:

Section "OutputClass"
    Identifier  "name"
    entries
    ...
EndSection

The Identifier entry is required in all OutputClass sections. All other entries are optional.

The Identifier entry specifies the unique name for this output class. The Driver entry specifies the name of the driver to use for this output device. After all classes have been examined, the "outputdriver" module from the first Driver entry will be enabled when using the loadable server.

When an output device is automatically added, its characteristics get checked against all OutputClass sections. Each section can contain optional entries to narrow the match of the class. If none of the optional entries appear, the OutputClass section is generic and will match any output device. If more than one of these entries appear, they all must match for the configuration to apply. ๐Ÿ’–


The following list of tokens can be matched against attributes of the device. An entry can be constructed to match attributes from different devices by separating arguments with a '|' character.

For example:

Section "OutputClass"
    Identifier   "My Class"
    # kernel driver must be either foo or bar
    MatchDriver "foo|bar"
    ...
EndSection
  • MatchDriver "matchdriver" โ€” checks the case-sensitive string "matchdriver" against the kernel driver of the device. ๐Ÿ”ฅ

When an output device has been matched to the OutputClass section, any Option entries get applied to the device. One OutputClass-specific Option is recognized (see the Device section below for a description of the remaining Option entries):

  • Option "PrimaryGPU" "boolean" โ€” this option specifies that the matched device should be treated as the primary GPU, replacing the selection of the GPU used as output by the firmware. If multiple output devices match an OutputClass section with the PrimaryGPU option set, the first one enumerated becomes the primary GPU. Main character energy only for the first one, sorry. ๐Ÿ‘‘

An OutputClass Section may contain ModulePath entries. When an output device matches an OutputClass section, any ModulePath entries in that OutputClass are pre-pended to the search path for loadable Xorg server modules. See ModulePath in the Files section for more info. ๐Ÿงš

๐Ÿ’… DEVICE SECTION ๐Ÿ’…

okay so the config file can have multiple Device sections, and there must be at least one for the video card you're using. no cap.

Device sections have this exact format:

Section "Device"
    Identifier "name"
    Driver     "driver"
    entries
    ...
EndSection

The Identifier and Driver entries are required in all Device sections. all the other entries are optional, bestie.

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. periodt.

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. iykyk.

  • 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@domain:device:function (e.g., "PCI:1@0:0:0" might be appropriate for an AGP card). The "@domain" part can be left out for PCI domain 0. 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. ๐Ÿงฎ
  • 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. ๐Ÿ”
  • MatchSeat seat-id โ€” only apply this Device section if X server was started with -seat seat-id option. ๐Ÿ’บ
  • Option "ModeDebug" "boolean" โ€” enable printing of additional debugging information about modesetting to the server log. ๐Ÿ›
  • Option "NoOutputInitialSize" "width height" โ€” normally, the X server infers the initial screen size based on any connected outputs. However, if no outputs are connected, the X server picks a default screen size of 1024 x 768. This option overrides the default screen size to use when no outputs are connected. In contrast to the "Virtual" Display SubSection entry, which applies unconditionally, "NoOutputInitialSize" is only used if no outputs are detected when the X server starts. ๐Ÿ–ผ๏ธ
  • Option "PreferCloneMode" "boolean" โ€” if enabled, bring up monitors of a screen in clone mode instead of horizontal extended layout by default. (Defaults to off; the video driver can change the default value, but this option can always override it) ๐Ÿชž

๐ŸŒˆ 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. ๐Ÿ’–


๐Ÿ•ณ๏ธ VIDEOADAPTOR SECTION ๐Ÿ•ณ๏ธ

Nobody wants to say how this works. Maybe nobody knows ... ๐Ÿ’€โœจ


๐Ÿ–ฅ๏ธ 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 this exact 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. 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 within 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 โ€” bestie, this gives the range(s) of vertical refresh frequencies supported by the monitor. 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 Xorg server uses this data to determine if video modes are within 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 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 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:
    • DotClock clock โ€” is the dot (pixel) clock rate to be used for the mode.
    • HTimings hdisp hsyncstart hsyncend htotal โ€” specifies the horizontal timings for the mode.
    • VTimings vdisp vsyncstart vsyncend vtotal โ€” specifies the vertical timings for the mode.
    • Flags "flag" ... โ€” specifies an optional set of mode flags, each of which is a separate string in double quotes. "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.
    • HSkew hskew โ€” specifies the number of pixels (towards the right edge of the screen) by which the display enable signal is to be skewed. Not all drivers use this information. This option might become necessary to override the default value supplied by the server (if any). "Roving" horizontal lines indicate this value needs to be increased. If the last few pixels on a scan line appear on the left of the screen, this value should be decreased.
    • VScan vscan โ€” specifies the number of times each scanline is painted on the screen. Not all drivers use this information. Values less than 1 are treated as 1, which is the default. Generally, the "DoubleScan" Flag mentioned above doubles this value.
  • 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 which 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 "ZoomModes" "name name ..." โ€” this optional entry specifies modes to be marked as zoom modes. It is possible to switch to the next and previous mode via Ctrl+Alt+Keypad-Plus and Ctrl+Alt+Keypad-Minus. All these keypad available modes are selected from the screen mode list. This list is a copy of the compatibility output monitor mode list. Since this output is the output connected to the lowest dot-area monitor, as determined from its largest size mode, that monitor defines the available zoom modes. (RandR 1.2-supporting drivers only)
  • Option "Position" "x y" โ€” this optional entry specifies the position of the monitor within 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 "Disable" "bool" โ€” this optional entry specifies whether the monitor should be turned off 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)

๐Ÿฆ‹ 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 by using the UseModes keyword. In most cases the Modes sections are not necessary because the built-in set of VESA standard modes will be 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.

๐Ÿ–ฅ๏ธโœจ SCREEN SECTION โœจ๐Ÿ–ฅ๏ธ

okay so the config file can have multiple Screen sections, and there must be at least one for the โ€œscreenโ€ you're actually using. A โ€œscreenโ€ is literally the binding of a graphics device (a Device section) and a monitor (a Monitor section). A Screen section is considered โ€œactiveโ€ if it's 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. slay ๐Ÿ’…

Screen sections have this format:

           Section "Screen"
               Identifier "name"
               Device     "devid"
               GPUDevice  "devid"
               Monitor    "monid"
               entries
               ...
               SubSection "Display"
                  entries
                  ...
               EndSubSection
               ...
           EndSection

The Identifier entry is mandatory. All others are optional. periodt.

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.
  • GPUDevice "device-id" โ€” this entry specifies the Device section to be used as a secondary GPU device for this screen. When multiple graphics cards are present, this is what ties a specific secondary card to a screen. The device-id must match the Identifier of a Device section in the config file. This can be specified up to 4 times for a single screen.
  • 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. bestie, consider yourself warned ๐Ÿ’€
  • 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 pick 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.
  • MatchSeat seat-id โ€” only apply this Screen section if the X server was started with the -seat seat-id option.
  • Options โ€” various Option flags may be specified in the Screen section. Some are driver-specific and are described in the driver documentation. Others are driver-independent, and will eventually be described here.
    • 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). no cap, this one matters ๐Ÿซถ
    • Option "GlxVendorLibrary" "string" โ€” this option specifies a space-separated list of OpenGL vendor libraries to use for the screen. This may be used to select an alternate implementation for development, debugging, or alternate feature sets. Default: mesa.
    • Option "RenderingAPI" "string" โ€” this option specifies a rendering API for use in conjunction with the Glamor accel method. You can specify OpenGL with a value "gl" and OpenGL ES with a value "es", and the default is both, when Glamor fallbacks to GLES if GL 2.1 is not available. This may be useful for embedded and old cards, where the GL ES feature set works faster than the GL feature set. Default: gl.
    • 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.

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 โ€” keep scrolling bestie, we're not done yet ๐Ÿ‘€๐Ÿ’–

๐Ÿ’– DISPLAY SUBSECTION ๐Ÿ’–

okay so, bestie โ€” each Screen section can have multiple Display subsections. the โ€œactiveโ€ Display subsection is the first one that matches the depth and/or fbbpp values being used, or, if none of them do, the first one that has neither a depth nor an fbbpp value specified. these Display subsections are optional, btw. when there isnโ€™t one that matches the depth and/or fbbpp values being used, all the parameters that can be specified here just fall back to their defaults. no drama. ๐Ÿซถ

Display subsections have this format:

SubSection "Display"
    Depth  depth
    entries
    ...
EndSubSection
  • Depth depth โ€” this entry says what colour depth the Display subsection is for. itโ€™s usually specified, but it can be omitted to create a match-all Display subsection or when you only want to match against the FbBpp parameter. the allowed range of depth values 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 the colour depth is 24, not 32. ๐Ÿ’…
  • FbBpp bpp โ€” this entry specifies the framebuffer format this Display subsection is to be used for. itโ€™s only needed when youโ€™re 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 when itโ€™s being used at depth 16, for drivers that allow multiple formats. this may also be specified from the command line with the -weight option (see Xorg(1)). โญ
  • Virtual xdim ydim โ€” this optional entry specifies the virtual screen resolution to be used. 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 which 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 (see the Xserver(1) man page). the visual types available for depth 8 are (default is PseudoColor):
    • StaticGray
    • GrayScale
    • StaticColor
    • PseudoColor
    • TrueColor
    • DirectColor

the visual types available for the depths 15, 16 and 24 are (default is TrueColor):

  • TrueColor
  • DirectColor

not all drivers support DirectColor at these depths.

the visual types available for the depth 4 are (default is StaticColor):

  • StaticGray
  • GrayScale
  • StaticColor
  • PseudoColor

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. ๐Ÿ˜ญ

๐Ÿซถ SERVERLAYOUT SECTION ๐Ÿซถ

okay so bestie, you can have multiple ServerLayout sections in one config file. a "server layout" is literally the binding of one or more screens (Screen sections) plus one or more input devices (InputDevice sections) into one whole complete configuration. and in multi-head setups? it also tells you the relative layout of the heads. main character energy, honestly.

a ServerLayout section is considered "active" if it's referenced by the -layout command line option, or by an Option "DefaultServerLayout" entry in the ServerFlags section โ€” and heads up, the former takes precedence over the latter. if neither of those is used, the first ServerLayout section found in the config file is the active one. and if there are no ServerLayout sections at all? then the single active screen and the two active (core) input devices get selected as described in the relevant sections above. slay.

ServerLayout sections are formatted like this:

Section "ServerLayout"
    Identifier   "name"
    Screen       "screen-id"
    ...
    InputDevice  "idev-id"
    ...
    options
    ...
EndSection

every ServerLayout section must have an Identifier entry and at least one Screen entry. no exceptions, periodt.

the Identifier entry gives this server layout its unique name. the ServerLayout section is where you put info that's specific to the whole session, including session-specific Options. the ServerFlags options (described above) may be specified here too, and any given here override the ones in the ServerFlags section. highkey powerful.

the entries you can use in this section are described right here ๐Ÿ‘‡

  • Screen screen-num "screen-id" position-information โ€” you must give one of these for each screen being used in a session. the screen-id field is mandatory and specifies which Screen section is being referenced. the screen-num field is optional and can specify the screen number in multi-head configurations โ€” when you omit it, the screens get numbered in the order they're listed. numbering starts from 0 and must be consecutive. the position-information field describes how multiple screens are positioned, and there are a bunch of different ways to give it:
    • x y
    • Absolute x y โ€” both of these say the upper left corner's coordinates are (x,y). the Absolute keyword is optional. some older versions of XFree86 (4.2 and earlier) don't recognise the Absolute keyword, so it's safest to just specify the coordinates without it. ngl, just skip the keyword.
    • RightOf "screen-id"
    • LeftOf "screen-id"
    • Above "screen-id"
    • Below "screen-id"
    • Relative "screen-id" x y โ€” these give the screen's location relative to another screen. the first four position the screen immediately to the right, left, above or below the other screen. when positioning to the right or left, the top edges are aligned; when positioning above or below, the left edges are aligned. the Relative form specifies the offset of the screen's origin (upper left corner) relative to the origin of another screen.
  • InputDevice "idev-id" "option" ... โ€” you should give one of these 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 you'd only use session-specific input device options 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. classic duo ๐Ÿ’…

  • MatchSeat seat-id โ€” only apply this ServerLayout section if the X server was started with the -seat seat-id option.

Options

in addition to the following, any option permitted in the ServerFlags section may also be specified here. when the same option shows up in both places, the value given here overrides the one in the ServerFlags section. your local word wins, iykyk.

  • 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. soz to everything else ๐Ÿ˜ญ
  • Option "SingleCard" "boolean" โ€” same as IsolateDevice, except that the bus ID of the first device in the layout is used.

here's an example of a ServerLayout section for a dual headed configuration with two mice โ€” iconic behavior, truly:

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

๐Ÿ’– DRI SECTION ๐Ÿ’–

this optional section is used to provide some info for the Direct Rendering Infrastructure. the details about the format of this section live on-line at <https://dri.freedesktop.org/>. go read the docs bestie, they're right there ๐Ÿฆ‹


๐ŸŽ€ VENDOR SECTION ๐ŸŽ€

the optional Vendor section may be used to provide vendor-specific configuration information. multiple Vendor sections may be present, and they may contain an Identifier entry and multiple Option flags. the data therein is not used in this release โ€” so it's giving decorative, honestly. ๐Ÿ’€


๐ŸŒˆ SEE ALSO ๐ŸŒˆ

General: X(7), Xserver(1), Xorg(1), cvt(1), gtf(1).

not all modules or interfaces are available on all platforms. just so you know ๐Ÿซถ

Display drivers: apm(4), ati(4), chips(4), cirrus(4), cyrix(4), fbdev(4), glide(4), glint(4), i128(4), i740(4), imstt(4), intel(4), mga(4), neomagic(4), nv(4), openchrome(4), r128(4), radeon(4), rendition(4), savage(4), s3virge(4), siliconmotion(4), sis(4), sisusb(4), sunbw2(4), suncg14(4), suncg3(4), suncg6(4), sunffb(4), sunleo(4), suntcx(4), tdfx(4), trident(4), tseng(4), vesa(4), vmware(4), voodoo(4), wsfb(4), xgi(4), xgixp(4).

Input drivers: acecad(4), citron(4), elographics(4), evdev(4), fpit(4), joystick(4), kbd(4), libinput(4), mousedrv(4), mutouch(4), penmount(4), synaptics(4), vmmouse(4), void(4), wacom(4).

Other modules and interfaces: exa(4), fbdevhw(4), v4l(4).


๐Ÿ‘‘ AUTHORS ๐Ÿ‘‘

this manual page was largely rewritten by David Dawes <dawes@xfree86.org>. thank you king ๐Ÿ™


and that's the whole page bestie, you made it to the end!! ๐ŸŽ‰ the source said xorg-server 21.1.25, X Version 11, xorg.conf(5) โ€” so that's version 11 of the X man pages, xorg-server release 21.1.25, and the xorg.conf(5) page itself. go forth and configure, you absolute icon ๐Ÿ’…โœจ

๐Ÿ“ฆ where this page comes from
  • alpine 3.24: xorg-server-doc 21.1.25-r0 ยท MIT
  • arch rolling: xorg-server 21.1.25-2 ยท LicenseRef-Adobe-Display-PostScript AND BSD-3-Clause AND LicenseRef-DEC-3-Clause AND HPND AND LicenseRef-HPND-sell-MIT-disclaimer-xserver AND HPND-sell-variant AND ICU AND ISC AND MIT AND MIT-open-group AND NTP AND SGI-B-2.0 AND SMLNJ AND X11 AND X11-distribute-modifications-variant
  • ๐Ÿ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms