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