xorgconf.cpp revision 4642e01f
1XCOMM $XdotOrg$ 2XCOMM 3XCOMM Copyright (c) 1994-1998 by The XFree86 Project, Inc. 4XCOMM 5XCOMM Permission is hereby granted, free of charge, to any person obtaining a 6XCOMM copy of this software and associated documentation files (the "Software"), 7XCOMM to deal in the Software without restriction, including without limitation 8XCOMM the rights to use, copy, modify, merge, publish, distribute, sublicense, 9XCOMM and/or sell copies of the Software, and to permit persons to whom the 10XCOMM Software is furnished to do so, subject to the following conditions: 11XCOMM 12XCOMM The above copyright notice and this permission notice shall be included in 13XCOMM all copies or substantial portions of the Software. 14XCOMM 15XCOMM THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16XCOMM IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17XCOMM FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 18XCOMM THE XFREE86 PROJECT BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 19XCOMM WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF 20XCOMM OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21XCOMM SOFTWARE. 22XCOMM 23XCOMM Except as contained in this notice, the name of the XFree86 Project shall 24XCOMM not be used in advertising or otherwise to promote the sale, use or other 25XCOMM dealings in this Software without prior written authorization from the 26XCOMM XFree86 Project. 27XCOMM 28XCOMM $XConsortium: XF86Conf.cpp /main/22 1996/10/23 11:43:51 kaleb $ 29 30XCOMM ********************************************************************** 31XCOMM This is a sample configuration file only, intended to illustrate 32XCOMM what a config file might look like. Refer to the XF86Config(4/5) 33XCOMM man page for details about the format of this file. This man page 34XCOMM is installed as MANPAGE 35XCOMM ********************************************************************** 36 37XCOMM The ordering of sections is not important in version 4.0 and later. 38 39XCOMM ********************************************************************** 40XCOMM Files section. This allows default font and rgb paths to be set 41XCOMM ********************************************************************** 42 43Section "Files" 44 45XCOMM Multiple FontPath entries are allowed (which are concatenated together), 46XCOMM as well as specifying multiple comma-separated entries in one FontPath 47XCOMM command (or a combination of both methods) 48 49 FontPath LOCALFONTPATH 50 FontPath MISCFONTPATH 51 FontPath T1FONTPATH 52 FontPath TRUETYPEFONTPATH 53 FontPath DPI75FONTPATH 54 FontPath DPI100FONTPATH 55 56XCOMM ModulePath can be used to set a search path for the X server modules. 57XCOMM The default path is shown here. 58 59XCOMM ModulePath MODULEPATH 60 61EndSection 62 63XCOMM ********************************************************************** 64XCOMM Module section -- this is an optional section which is used to specify 65XCOMM which run-time loadable modules to load when the X server starts up. 66XCOMM ********************************************************************** 67 68Section "Module" 69 70XCOMM This loads the DBE extension module. 71 72 Load "dbe" 73 74XCOMM This loads the miscellaneous extensions module, and disables 75XCOMM initialisation of the XFree86-DGA extension within that module. 76 77 SubSection "extmod" 78 Option "omit xfree86-dga" 79 EndSubSection 80 81XCOMM This loads the Type1 and FreeType font modules 82 83 Load "type1" 84 Load "freetype" 85 86EndSection 87 88 89XCOMM ********************************************************************** 90XCOMM Server flags section. This contains various server-wide Options. 91XCOMM ********************************************************************** 92 93Section "ServerFlags" 94 95XCOMM Uncomment this to cause a core dump at the spot where a signal is 96XCOMM received. This may leave the console in an unusable state, but may 97XCOMM provide a better stack trace in the core dump to aid in debugging 98 99XCOMM Option "NoTrapSignals" 100 101XCOMM Uncomment this to disable the <Crtl><Alt><Fn> VT switch sequence 102XCOMM (where n is 1 through 12). This allows clients to receive these key 103XCOMM events. 104 105XCOMM Option "DontVTSwitch" 106 107XCOMM Uncomment this to disable the <Crtl><Alt><BS> server abort sequence 108XCOMM This allows clients to receive this key event. 109 110XCOMM Option "DontZap" 111 112XCOMM Uncomment this to disable the <Crtl><Alt><KP_+>/<KP_-> mode switching 113XCOMM sequences. This allows clients to receive these key events. 114 115XCOMM Option "DontZoom" 116 117XCOMM Uncomment this to disable tuning with the xvidtune client. With 118XCOMM it the client can still run and fetch card and monitor attributes, 119XCOMM but it will not be allowed to change them. If it tries it will 120XCOMM receive a protocol error. 121 122XCOMM Option "DisableVidModeExtension" 123 124XCOMM Uncomment this to enable the use of a non-local xvidtune client. 125 126XCOMM Option "AllowNonLocalXvidtune" 127 128XCOMM Uncomment this to disable dynamically modifying the input device 129XCOMM (mouse and keyboard) settings. 130 131XCOMM Option "DisableModInDev" 132 133XCOMM Uncomment this to enable the use of a non-local client to 134XCOMM change the keyboard or mouse settings (currently only xset). 135 136XCOMM Option "AllowNonLocalModInDev" 137 138XCOMM Set the basic blanking screen saver timeout. 139 140 Option "blank time" "10" # 10 minutes 141 142XCOMM Set the DPMS timeouts. These are set here because they are global 143XCOMM rather than screen-specific. These settings alone don't enable DPMS. 144XCOMM It is enabled per-screen (or per-monitor), and even then only when 145XCOMM the driver supports it. 146 147 Option "standby time" "20" 148 Option "suspend time" "30" 149 Option "off time" "60" 150 151XCOMM On some platform the server needs to estimate the sizes of PCI 152XCOMM memory and pio ranges. This is done by assuming that PCI ranges 153XCOMM don't overlap. Some broken BIOSes tend to set ranges of inactive 154XCOMM devices wrong. Here one can adjust how aggressive the assumptions 155XCOMM should be. Default is 0. 156 157XCOMM Option "EstimateSizesAggresively" "0" 158 159EndSection 160 161XCOMM ********************************************************************** 162XCOMM Input devices 163XCOMM ********************************************************************** 164 165XCOMM ********************************************************************** 166XCOMM Core keyboard's InputDevice section 167XCOMM ********************************************************************** 168 169Section "InputDevice" 170 171 Identifier "Keyboard1" 172 Driver "kbd" 173 174XCOMM Set the keyboard auto repeat parameters. Not all platforms implement 175XCOMM this. 176 177 Option "AutoRepeat" "500 5" 178 179XCOMM Specifiy which keyboard LEDs can be user-controlled (eg, with xset(1)). 180 181XCOMM Option "Xleds" "1 2 3" 182 183XCOMM To disable the XKEYBOARD extension, uncomment XkbDisable. 184 185XCOMM Option "XkbDisable" 186 187XCOMM To customise the XKB settings to suit your keyboard, modify the 188XCOMM lines below (which are the defaults). For example, for a European 189XCOMM keyboard, you will probably want to use one of: 190XCOMM 191XCOMM Option "XkbModel" "pc102" 192XCOMM Option "XkbModel" "pc105" 193XCOMM 194XCOMM If you have a Microsoft Natural keyboard, you can use: 195XCOMM 196XCOMM Option "XkbModel" "microsoft" 197XCOMM 198XCOMM If you have a US "windows" keyboard you will want: 199XCOMM 200XCOMM Option "XkbModel" "pc104" 201XCOMM 202XCOMM Then to change the language, change the Layout setting. 203XCOMM For example, a german layout can be obtained with: 204XCOMM 205XCOMM Option "XkbLayout" "de" 206XCOMM 207XCOMM or: 208XCOMM 209XCOMM Option "XkbLayout" "de" 210XCOMM Option "XkbVariant" "nodeadkeys" 211XCOMM 212XCOMM If you'd like to switch the positions of your capslock and 213XCOMM control keys, use: 214XCOMM 215XCOMM Option "XkbOptions" "ctrl:swapcaps" 216 217 218XCOMM These are the default XKB settings for xorg 219XCOMM 220XCOMM Option "XkbRules" "xorg" 221XCOMM Option "XkbModel" "pc101" 222XCOMM Option "XkbLayout" "us" 223XCOMM Option "XkbVariant" "" 224XCOMM Option "XkbOptions" "" 225 226EndSection 227 228 229XCOMM ********************************************************************** 230XCOMM Core Pointer's InputDevice section 231XCOMM ********************************************************************** 232 233Section "InputDevice" 234 235XCOMM Identifier and driver 236 237 Identifier "Mouse1" 238 Driver "mouse" 239 240XCOMM The mouse protocol and device. The device is normally set to /dev/mouse, 241XCOMM which is usually a symbolic link to the real device. 242 243 Option "Protocol" "Microsoft" 244 Option "Device" "/dev/mouse" 245 246XCOMM On platforms where PnP mouse detection is supported the following 247XCOMM protocol setting can be used when using a newer PnP mouse: 248 249XCOMM Option "Protocol" "Auto" 250 251XCOMM When using mouse connected to a PS/2 port (aka "MousePort"), set the 252XCOMM the protocol as follows. On some platforms some other settings may 253XCOMM be available. 254 255XCOMM Option "Protocol" "PS/2" 256 257XCOMM Baudrate and SampleRate are only for some older Logitech mice. In 258XCOMM almost every case these lines should be omitted. 259 260XCOMM Option "BaudRate" "9600" 261XCOMM Option "SampleRate" "150" 262 263XCOMM Emulate3Buttons is an option for 2-button mice 264XCOMM Emulate3Timeout is the timeout in milliseconds (default is 50ms) 265 266XCOMM Option "Emulate3Buttons" 267XCOMM Option "Emulate3Timeout" "50" 268 269XCOMM ChordMiddle is an option for some 3-button Logitech mice, or any 270XCOMM 3-button mouse where the middle button generates left+right button 271XCOMM events. 272 273XCOMM Option "ChordMiddle" 274 275EndSection 276 277Section "InputDevice" 278 Identifier "Mouse2" 279 Driver "mouse" 280 Option "Protocol" "MouseMan" 281 Option "Device" "/dev/mouse2" 282EndSection 283 284XCOMM Some examples of extended input devices 285 286XCOMM Section "InputDevice" 287XCOMM Identifier "spaceball" 288XCOMM Driver "magellan" 289XCOMM Option "Device" "/dev/cua0" 290XCOMM EndSection 291XCOMM 292XCOMM Section "InputDevice" 293XCOMM Identifier "spaceball2" 294XCOMM Driver "spaceorb" 295XCOMM Option "Device" "/dev/cua0" 296XCOMM EndSection 297XCOMM 298XCOMM Section "InputDevice" 299XCOMM Identifier "touchscreen0" 300XCOMM Driver "microtouch" 301XCOMM Option "Device" "/dev/ttyS0" 302XCOMM Option "MinX" "1412" 303XCOMM Option "MaxX" "15184" 304XCOMM Option "MinY" "15372" 305XCOMM Option "MaxY" "1230" 306XCOMM Option "ScreenNumber" "0" 307XCOMM Option "ReportingMode" "Scaled" 308XCOMM Option "ButtonNumber" "1" 309XCOMM Option "SendCoreEvents" 310XCOMM EndSection 311XCOMM 312XCOMM Section "InputDevice" 313XCOMM Identifier "touchscreen1" 314XCOMM Driver "elo2300" 315XCOMM Option "Device" "/dev/ttyS0" 316XCOMM Option "MinX" "231" 317XCOMM Option "MaxX" "3868" 318XCOMM Option "MinY" "3858" 319XCOMM Option "MaxY" "272" 320XCOMM Option "ScreenNumber" "0" 321XCOMM Option "ReportingMode" "Scaled" 322XCOMM Option "ButtonThreshold" "17" 323XCOMM Option "ButtonNumber" "1" 324XCOMM Option "SendCoreEvents" 325XCOMM EndSection 326 327XCOMM ********************************************************************** 328XCOMM Monitor section 329XCOMM ********************************************************************** 330 331XCOMM Any number of monitor sections may be present 332 333Section "Monitor" 334 335XCOMM The identifier line must be present. 336 337 Identifier "Generic Monitor" 338 339XCOMM HorizSync is in kHz unless units are specified. 340XCOMM HorizSync may be a comma separated list of discrete values, or a 341XCOMM comma separated list of ranges of values. 342XCOMM NOTE: THE VALUES HERE ARE EXAMPLES ONLY. REFER TO YOUR MONITOR'S 343XCOMM USER MANUAL FOR THE CORRECT NUMBERS. 344 345XCOMM HorizSync 31.5 # typical for a single frequency fixed-sync monitor 346XCOMM HorizSync 30-64 # multisync 347XCOMM HorizSync 31.5, 35.2 # multiple fixed sync frequencies 348XCOMM HorizSync 15-25, 30-50 # multiple ranges of sync frequencies 349 350XCOMM VertRefresh is in Hz unless units are specified. 351XCOMM VertRefresh may be a comma separated list of discrete values, or a 352XCOMM comma separated list of ranges of values. 353XCOMM NOTE: THE VALUES HERE ARE EXAMPLES ONLY. REFER TO YOUR MONITOR'S 354XCOMM USER MANUAL FOR THE CORRECT NUMBERS. 355 356XCOMM VertRefresh 60 # typical for a single frequency fixed-sync monitor 357 358XCOMM VertRefresh 50-100 # multisync 359XCOMM VertRefresh 60, 65 # multiple fixed sync frequencies 360XCOMM VertRefresh 40-50, 80-100 # multiple ranges of sync frequencies 361 362XCOMM Modes can be specified in two formats. A compact one-line format, or 363XCOMM a multi-line format. 364 365XCOMM A generic VGA 640x480 mode (hsync = 31.5kHz, refresh = 60Hz) 366XCOMM These two are equivalent 367 368XCOMM ModeLine "640x480" 25.175 640 664 760 800 480 491 493 525 369 370 Mode "640x480" 371 DotClock 25.175 372 HTimings 640 664 760 800 373 VTimings 480 491 493 525 374 EndMode 375 376XCOMM These two are equivalent 377 378XCOMM ModeLine "1024x768i" 45 1024 1048 1208 1264 768 776 784 817 Interlace 379 380XCOMM Mode "1024x768i" 381XCOMM DotClock 45 382XCOMM HTimings 1024 1048 1208 1264 383XCOMM VTimings 768 776 784 817 384XCOMM Flags "Interlace" 385XCOMM EndMode 386 387XCOMM If a monitor has DPMS support, that can be indicated here. This will 388XCOMM enable DPMS when the monitor is used with drivers that support it. 389 390XCOMM Option "dpms" 391 392XCOMM If a monitor requires that the sync signals be superimposed on the 393XCOMM green signal, the following option will enable this when used with 394XCOMM drivers that support it. Only a relatively small range of hardware 395XCOMM (and drivers) actually support this. 396 397XCOMM Option "sync on green" 398 399EndSection 400 401XCOMM ********************************************************************** 402XCOMM Graphics device section 403XCOMM ********************************************************************** 404 405XCOMM Any number of graphics device sections may be present 406 407Section "Device" 408 409XCOMM The Identifier must be present. 410 411 Identifier "Generic VGA" 412 413XCOMM The Driver line must be present. When using run-time loadable driver 414XCOMM modules, this line instructs the server to load the specified driver 415XCOMM module. Even when not using loadable driver modules, this line 416XCOMM indicates which driver should interpret the information in this section. 417 418 Driver "vga" 419 420XCOMM The chipset line is optional in most cases. It can be used to override 421XCOMM the driver's chipset detection, and should not normally be specified. 422 423XCOMM Chipset "generic" 424 425XCOMM Various other lines can be specified to override the driver's automatic 426XCOMM detection code. In most cases they are not needed. 427 428XCOMM VideoRam 256 429XCOMM Clocks 25.2 28.3 430 431XCOMM The BusID line is used to specify which of possibly multiple devices 432XCOMM this section is intended for. When this line isn't present, a device 433XCOMM section can only match up with the primary video device. For PCI 434XCOMM devices a line like the following could be used. This line should not 435XCOMM normally be included unless there is more than one video device 436XCOMM intalled. 437 438XCOMM BusID "PCI:0:10:0" 439 440XCOMM Various option lines can be added here as required. Some options 441XCOMM are more appropriate in Screen sections, Display subsections or even 442XCOMM Monitor sections. 443 444XCOMM Option "hw cursor" "off" 445 446EndSection 447 448Section "Device" 449 Identifier "any supported Trident chip" 450 Driver "trident" 451EndSection 452 453Section "Device" 454 Identifier "MGA Millennium I" 455 Driver "mga" 456 Option "hw cursor" "off" 457 BusID "PCI:0:10:0" 458EndSection 459 460Section "Device" 461 Identifier "MGA G200 AGP" 462 Driver "mga" 463 BusID "PCI:1:0:0" 464 Option "pci retry" 465EndSection 466 467 468XCOMM ********************************************************************** 469XCOMM Screen sections. 470XCOMM ********************************************************************** 471 472XCOMM Any number of screen sections may be present. Each describes 473XCOMM the configuration of a single screen. A single specific screen section 474XCOMM may be specified from the X server command line with the "-screen" 475XCOMM option. 476 477Section "Screen" 478 479XCOMM The Identifier, Device and Monitor lines must be present 480 481 Identifier "Screen 1" 482 Device "Generic VGA" 483 Monitor "Generic Monitor" 484 485XCOMM The favoured Depth and/or Bpp may be specified here 486 487 DefaultDepth 8 488 489 SubSection "Display" 490 Depth 8 491 Modes "640x480" 492 ViewPort 0 0 493 Virtual 800 600 494 EndSubsection 495 496 SubSection "Display" 497 Depth 4 498 Modes "640x480" 499 EndSubSection 500 501 SubSection "Display" 502 Depth 1 503 Modes "640x480" 504 EndSubSection 505 506EndSection 507 508 509Section "Screen" 510 Identifier "Screen MGA1" 511 Device "MGA Millennium I" 512 Monitor "Generic Monitor" 513 Option "no accel" 514 DefaultDepth 16 515XCOMM DefaultDepth 24 516 517 SubSection "Display" 518 Depth 8 519 Modes "1280x1024" 520 Option "rgb bits" "8" 521 Visual "StaticColor" 522 EndSubSection 523 SubSection "Display" 524 Depth 16 525 Modes "1280x1024" 526 EndSubSection 527 SubSection "Display" 528 Depth 24 529 Modes "1280x1024" 530 EndSubSection 531EndSection 532 533 534Section "Screen" 535 Identifier "Screen MGA2" 536 Device "MGA G200 AGP" 537 Monitor "Generic Monitor" 538 DefaultDepth 8 539 540 SubSection "Display" 541 Depth 8 542 Modes "1280x1024" 543 Option "rgb bits" "8" 544 Visual "StaticColor" 545 EndSubSection 546EndSection 547 548 549XCOMM ********************************************************************** 550XCOMM ServerLayout sections. 551XCOMM ********************************************************************** 552 553XCOMM Any number of ServerLayout sections may be present. Each describes 554XCOMM the way multiple screens are organised. A specific ServerLayout 555XCOMM section may be specified from the X server command line with the 556XCOMM "-layout" option. In the absence of this, the first section is used. 557XCOMM When now ServerLayout section is present, the first Screen section 558XCOMM is used alone. 559 560Section "ServerLayout" 561 562XCOMM The Identifier line must be present 563 564 Identifier "Main Layout" 565 566XCOMM Each Screen line specifies a Screen section name, and optionally 567XCOMM the relative position of other screens. The four names after 568XCOMM primary screen name are the screens to the top, bottom, left and right 569XCOMM of the primary screen. In this example, screen 2 is located to the 570XCOMM right of screen 1. 571 572 Screen "Screen MGA 1" "" "" "" "Screen MGA 2" 573 Screen "Screen MGA 2" "" "" "Screen MGA 1" "" 574 575XCOMM Each InputDevice line specifies an InputDevice section name and 576XCOMM optionally some options to specify the way the device is to be 577XCOMM used. Those options include "CorePointer", "CoreKeyboard" and 578XCOMM "SendCoreEvents". In this example, "Mouse1" is the core pointer, 579XCOMM and "Mouse2" is an extended input device that also generates core 580XCOMM pointer events (i.e., both mice will move the standard pointer). 581 582 InputDevice "Mouse1" "CorePointer" 583 InputDevice "Mouse2" "SendCoreEvents" 584 InputDevice "Keyboard1" "CoreKeyboard" 585 586EndSection 587 588 589Section "ServerLayout" 590 Identifier "another layout" 591 Screen "Screen 1" 592 Screen "Screen MGA 1" 593 InputDevice "Mouse1" "CorePointer" 594 InputDevice "Keyboard1" "CoreKeyboard" 595EndSection 596 597 598Section "ServerLayout" 599 Identifier "simple layout" 600 Screen "Screen 1" 601 InputDevice "Mouse1" "CorePointer" 602 InputDevice "Keyboard1" "CoreKeyboard" 603EndSection 604 605