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