Penguin
Blame: HowToXineramaHOWTO
EditPageHistoryDiffInfoLikePages
Annotated edit history of HowToXineramaHOWTO version 5, including all changes. View license author blame.
Rev Author # Line
1 perry 1 Using the Xinerama Extensions to !MultiHead XFree86 V. 4.0+
2
3
4
5 ----
6
2 perry 7 !!!Using the Xinerama Extensions to !MultiHead XFree86 V. 4.0+
1 perry 8
9 !!Dennis Baker drbaker@softhome.netv2.0 Revised November 2, 2000
10
11
12 ----
13 ''This document describes how to configure XFree86 Version 4.0+ with Multiple monitors and the Xinerama extentions. ''
14 ----
15
16
17
18
19 !!1. Introduction
20
21
22 ****1.1 What is Xinerama?
23
24 ****1.2 Guidelines
25
26
27
28
29
30 !!2. Planning
31
32
33 ****2.1 What you need
34
35 ****2.2 Design considerations
36
37 ****2.3 Layout
38
39
40
41
42
43 !!3. Video Card set up.
44
45
46
47
48 !!4. Scan the PCI Bus
49
50
51
52
53 !!5. Editing your XConfig File
54
55
56 ****5.1 Adding all of your video cards
57
58 ****5.2 Identifying Your Video Cards
59
2 perry 60 ****5.3 Configuring the !ServerLayout Section
1 perry 61
62
63
64
65
66 !!6. Testing Your Configuration
67
68
69
70
71 !!7. Editing your startup files
72
73
74
75
76 !!8. Window Managers and Xinerama
77
78
79 ****8.1 Enlightenment
80
81 ****8.2 Sawfish
82
83
84
85
86
87 !!9. Sample XF86Config Files
88
89
90
91
92 !!10. Credits
93 ----
94
2 perry 95 !!1. !IntroductionMany changes made based input from Nico Schottelius nicos@pcsystems.de
1 perry 96
97 !!1.1 What is Xinerama?
98
99
100
101 Why do you need Xinerama ? And what is it ? The Xinerama extensions were introduced to the XFree86 system in version 4.0. Xinerama is an extension to XFree86 Release 6 Version 4.0 (X4.0) which allows applications and window managers to use the two (or more) physical displays as one large virtual display.
102
103
104
105
106
107 The beauty of the Xinerama extensions is that they are totally transparent to user space. Previously, applications could only reside on one of the displays and could not be moved between the two. Window managers had to be specially written to support the two displays. With Xinerama, window managers and applications don't have to be specially written to support the larger "Virtual Desktop" which Xinerama creates.
108
109
110
111
112 !!1.2 Guidelines
113
114
115
116 This is not meant to be a guide on how to set up your specific monitor, or videocard. In fact, I assume that you already have X Window running for your setup. Please refer to the XF86 Documentation for more information.
117
118
119
120
121
122 As far as I know, there are no limits to which video cards you can configure this way, nor does it seem to matter if you mix different types of video cards in a setup, The sample configuration I use in this documentation uses two different video cards, an AGP Fire GL 1000 and a PCI Matrox Millenium II. What effect this has on 3d Accelleration I don't know as I don't currently accellerate either of my video cards.
123
124
125
126
127
128 This Howto assumes that you know how to edit text files, do basic video card configuration for X Window, add and remove hardware from your system, start and stop system services, and follow simple instructions. If feel you will have trouble with any of these things, please seek help. I am not responsible if you damage any of your stuff.
129
130
131
132 ----
133
134 !!2. Planning
135
136
137 Planning a Xinerama setup is pretty straight forward. There as essentially three things you need to take into account, screen resolution, color depth, and screen layout.
138
139
140
141
142 !!2.1 What you need
143
144
145
146 You will need at least 2 graphics cards (a dual headed one should work, too) and two monitors, an operating system on which XFree runs (for instance Linux or Solaris) and XFree86 version 4.0. I assume your setup works, and that your two video cards are supported by XFree86.
147
148
149 Unless you recently upgraded or installed linux you are probably running an older version of X. Verify that you are running version 4.0 or better by typing the following command:
150
151
152
153
154
155
156
157 papel:/home/nico/X/bin # X -version
158
159
160
161
162
163
164 You should now see something like this:
165
166
167
168
169
170
171
172 ----
173
174 XFree86 Version 4.0 / X Window System
175 (protocol Version 11, revision 0, vendor release 6400)
176 Release Date: 8 March 2000
177 If the server is older than 6-12 months, or if your card is newer
178 than the above date, look for a newer version before reporting
179 problems. (see http://www.XFree86.Org/FAQ)
180 Operating System: Linux 2.3.46 i686 [[ELF]
181 Module Loader present
182
183 ----
184
185
186
187
188
189
190
191
192
193 If the version is not 4.0 or higher ( first line ), you will need to upgrade. Use your distributions package manager to upgrade to version 4.0 or better or download it directly from XFree86 and install it.
194
195
196
197
198
199
200
201 ftp://ftp.xfree86.org/pub/XFree86/4.0/
202
203
204
205
206
207
208 or better use one of the mirrors found at
209
210
211
212
213
214
215
216 http://www.xfree86.org/4.0/ftp.html
217
218
219
220
221
222
223 After download the files install the new X with the Xinstall.sh shellscript. Please note, if you install X this way it is bypassing any package management your system has.
224
225
226
227
228 !!2.2 Design considerations
229
230
231
232 It is possible to have each physical screen in your Xinerama setup to have a different resolution. There are some advantages to this, I was able to use an old monitor which only operates at 640x480, and a bigger 17" at 1280x1024 in my setup. I have also heard of web developers and graphics designed who use one big "preview" screen and flank it with one or two smaller screens. I think this flexibility is one of the great things about the Xinerama extensions.
233
234
235
236
237
238 There are several UI issues which are specific to Xinerama with most current generation window managers (see the section on
239 Window Managers
240 ) do not address well. The most anoying is the poor handling of dead areas.
241
242
243
244
245
246 Window managers assume the display area is a rectangle equal in size to the heighth and width of your total desktop. If you use more than one display resolution in a Xinerama setup your desktop will be non-rectangular. This results in "dead areas", areas which do not exist on your display, but window manager interpret as "Empty". Many window managers will try to utilize this dead area for new windows. The result is windows which are inaccessable. As window managers become Xinerama aware and this problem will go away quickly.
247
248
249
250
251
252 Window managers also don't handle the concept of maximizing a window when you are running Xinerama. Usually what happens is it maximizes your window across all available screens. Having Netscape spread across 2 displays is generally not the best way to surf the net.
253
254
255
256
257
258 Unlike with screen resolotion, Xinerama limits your entire virtual screen to one color depth. If you were planning on pulling out a cheap video card for your second display you need to keep this in mind. If your old video card only supports 8 bit color you might get a bigger display but most newer programs look lousy in 256 colors.
259
260
261
262
263 !!2.3 Layout
264
265
266
267 Layout decisions are fairly simple, you just need to decide how you want to physically lay out your monitors. Most people will simply place their monitors in a row and view their desktop as one giant monitor. It is also possible to overlap displays, or place them in more complex layouts. Keep in mind though what I said above about window managers expecting rectangular displays.
268
269
270
271 ----
272
273 !!3. Video Card set up.
274
275
276 This is a good time to back up your existing config file
277
278
279 I did it like this:
280
281
282
283
284 root# > cp /etc/X11/XF86Config /etc/X11/XFree86Config.working
285
286
287
288
289
290
291 Before we start the multihead portion of this process you need to have ALL of your existing cards working properly with the display they will have in the final configuration. If you haven't already, configure and install each different video card/ monitor combination you are going to have in your final setup. If you have several identical video cards you can get away with configuring one and copying the configuration for the other cards.
292
293
294
295
296
297 Note, it is possible configure and test your video cards without physically swapping them. If you use the technique in the scan
298 PCI Bus Section
299 below and specify the bus ID.
300
301
302
303
304
305 After you have each card set up, back up or print it's config file as you will need it later.
306 Here's how I did it:
307
308
309
310
311 root# > cp /etc/X11/XF86Config /etc/X11/XFree86Config.Matrox
312
313
314
315 On Some setups the XF86Config file is stored in /etc so you would do it like this:
316
317
318
319
320 root# > cp /etc/XF86Config /etc/XFree86Config.Matrox
321
322
323
324
325
326
327 If your video cards are identical you can probably get away with just one copy. However don't skip this step, If all else fails this will be you backup config file incase my instructions lead you astray.
328
329
330
331
332
333 Once you have all of your displays configured you are almost there...
334
335
336
337 ----
338
339 !!4. Scan the PCI Bus
340
341
342 This is a good time to put all of your video cards into your system and set up your monitors. Set everything up the way you want it when you are done, as you will have to repeat steps later if you change things.
343
344
345 This next step needs to be done from the console with-out X running. If you are in X, exit now. If your system uses a display manager such as xdm or gdm exit you need to stop that service.
2 perry 346 If you need to stop a display manager from !RedHat the easiest way is like this:
1 perry 347
348
349
350
351 root# > telinit 3
352
353
354
355 for Debian, Storm or Corel :
356
357
358
359
360 root# > /etc/init.d/xdm stop
361
362
363
364 If neither of these methods work you, reboot your computer and start up in single user mode.
365
366
367
368
369
370 In a multi-head setup you need to explicitly identify each video card in your config file. To do this you need to use the PCI Bus Identifier your system assigns the card. At this time, all video cards need to be in your system.
371
372
373 To find out what your PCI bus IDs are:
374
375
376
377
378 root# > XFree86 -scanpci
379
380
381
382 X will then output a code for each device on your PCI bus.
383
384 ----
385
386 (0:0:0) Intel 82443BX Host
387 (0:1:0) Intel 82443BX AGP
388 (0:7:0) Intel 82371AB PIIX4 ISA
389 (0:7:1) Intel 82371AB PIIX4 IDE
390 (0:7:2) Intel 82371AB PIIX4 USB
391 (0:7:3) Intel 82371AB PIIX4 ACPI
392 (0:9:0) Adaptec 2940U/UW
393 (0:11:0) 3COM 3C900 10b Combo
394 (0:12:0) Matrox unknown card (0x2007) using a Matrox MGA 2164W
395 (1:0:0) unknown card (0x1092/0x0152) using a Texas Instruments Permedia 2
396
397 ----
398
399
400
401
402
403
404 PCI cards and devices are identified with a leading 0, AGP cards with a 1. In my case I have a Matrox Millenium II (0:12:0) and a Diamond FireGL(1:0:0). Find your video cards and write down the numbers associated with them. It is important that you know which number goes with which card.
405
3 EddieDean 406 !Alternate Method to Scanning the PCI Bus
407
408 You can also find these numbers without having to shut your X server down as long as you have /proc enabled. Simply look at the contents of /proc/pci which will have the appropriate information. The three numbers you are looking for are the Bus, Device, and Function. For example, The last few lines of my /proc/pci read:
409
410 ----
411 Bus 0, device 9, function 0:
412 VGA compatible controller: S3 Inc. 86c764/765 Trio32/64/64V+ (rev 68).
413 IRQ 11.
414 Non-prefetchable 32 bit memory at 0xe8000000 0xebffffff.
415 Bus 1, device 5, function 0:
416 VGA compatible controller: nVidia Corporation NV10 Geforce 256 SDR (rev 16
417 ).
418 IRQ 11.
419 Master Capable. Latency=64. Min Gnt=5.Max Lat=1.
420 Non-prefetchable 32 bit memory at 0xe6000000 0xe6ffffff.
421 Prefetchable 32 bit memory at 0xc8000000 0xcfffffff.
422 ----
1 perry 423
3 EddieDean 424 As you can see, my S3 card is on Bus 0, device 9 and function 0 which would correspond to (0:9:0) from a XFree86 -scanpci output. My Geforce card would be listed as (1:5:0)
1 perry 425
426 ----
427
428 !!5. Editing your XConfig File
429
430
431 If I haven't lost you so far, we are in the home stretch now. This section is pretty confusiing so I suggest you also read the manpage for XF86Config, or at least skim it. Do it now... I'll wait.
432
433
434
435
436
437
438
439 root# > man XF86Config
440
441
442
443
444
445 !!5.1 Adding all of your video cards
446
447
448
449 Open your current XF86Config file and scroll down to the Monitor Section. You want to copy the following sections from the device specific XF86Config backup files you created above : Monitor, Device, Screen. These sections should go in your XF86Config file after the coresponding section in the file you have open. As you copy each section make certain that the Identifier is unique for each section, you will reference these Identifiers later.
450
451
452
453
454
455 Clear as Mud Right? You should now have a Monitor Section, a Device Section, and a Screen Section for EACH video card/monitor combination, each Section should have a unique Identifier. If you are still confused reread the prior paragraph. If that doesn't help, look at the sample
456 XF86Config
457 I have included at the end. You did read the manpage right?
458
459
460
461
462 !!5.2 Identifying Your Video Cards
463
464
465
466 Now you need to add the coresponding PCI BusID as an option at the end of each Device Section. The entry should look like this: BusID "PCI:0:12:0", substituting the three numbers with the PCI bus ID which identifies YOUR video card you should have this ID from the
467 PCI Bus Section
468 . Here is a sample Device Section for one of my video cards.
469
470
471
472
473 ----
474
475 Section "Device"
476 Identifier "FireGL"
477 Driver "glint"
478 BusID "PCI:1:0:0"
2 perry 479 !EndSection
1 perry 480
481 ----
482
483
484
485 Please note, even AGP cards use this layout.
486
487
488
489
2 perry 490 !!5.3 Configuring the !ServerLayout Section
1 perry 491
492
493
2 perry 494 Now you need to edit the !ServerLayout Section at the end of the XF86Config File. The !ServerLayour Section is exactally that, it tells you what Screens to use, how to lay them out logically, and what input devices to assign to them. Your current layout is for one screen, keyboard, and mouse. For each Screen section you have created about you need reference in this section for them to appear in your display.
1 perry 495
496
497
498
499
500 Using the existing screen reference as a starting point, create additional references for your other Screen Sections. The reference looks like this:
501
502
503
504
505 Screen "Screen 2" Relationship "Screen 1"
506
2 perry 507 This defines the relationship between the "Screen 2" and "Screen 1". Valid Relationships include: !RightOf, Below, Above, !LeftOf, Absolute X Y, Relative. Use of the first four relationships is pretty obvious as illustrated in my sample:
1 perry 508
509 ----
510
2 perry 511 Section "!ServerLayout"
1 perry 512 Identifier "Simple Layout"
513 Screen "Screen 2"
2 perry 514 Screen "Screen 1" !RightOf "Screen 2"
515 !InputDevice "Mouse1" "!CorePointer"
516 !InputDevice "Keyboard1" "!CoreKeyboard"
517 !EndSection
1 perry 518
519 ----
520
521
522
523 I have other examples in the
524 sample XF86Config
525 section.
526 ----
527
528 !!6. Testing Your Configuration
529
530
531 Once you have completed changing your XF86Config file, save it and your can now test your configuration :
532
533
534
535
536
537
538
539 root# > startx -- +xinerama
540
541
542
543 Hopefully you can now enjoy X with multiple partners... er that is, Monitors.
544
545
546
547 ----
548
549 !!7. Editing your startup files
550
551
552 If this worked you will probably want to change your X configuration to start X this way automatically. There are lots of ways to do this and there are probably better ways than what I've shown below. Here are the methods I used for changing startx and gdm.
553
554
555
556
557
558 If you run X from the command prompt add the +xinerama option to the startx script.
559
560
561
562
563
564
565
566 root# > vi /usr/X11R6/bin/startx
567
568
569
570
571
572
573 At the very end of the file the script starts X with the command xinit. Add the +xinerama option to the very end of that line.
574
575
576
577
578
579 To Configure gdm to start with the xinerama extentions look for [[servers] section at the bottom of /etc/X11/gdm/gdm.conf. Add the +xinerama extension to the end of the line that starts with 0=. It should look like this :
580
581
582
583
584
585
586
587 0=/usr/bin/X11/X +xinerama
588
589
590
591
592
593
594 I have never set up kdm, or xdm for Xinerama, but I got the following tip from Dalibor "dali@dali.net.nz".
595
596
597
598
599
600
601
602 ----
603
604 Here's my changes to startup files for slackware 7.x
605 (i use KDM and x4.01)
606 edit /var/X11R6/lib/xdm/Xservers
607 add +xinerama to the end of last line
608 ie.
609 :0 local /usr/X11R6/bin/X +xinerama
610 It appears that KDM uses standard XFree xdm files, so this should work if you
611 use xdm as well
5 ThomasLindroth 612
4 ThomasLindroth 613 If you use kde3.2 edit /usr/kde/3.2/share/config/kdm/Xservers as above.
1 perry 614
615 ----
616
617
618
619
620 ----
621
622 !! 8. Window Managers and Xinerama
623
624
625 As I mentioned above, a window manager does not need to be written to support Xinerama. However there are certain enhancements which window manager developers can do to make Xinerama users lives easier. Features which I thought were desireable include:
626
627
628 * Intelligent placement of windows. Window managers should not place windows in dead areas or across the borders of two heads. New windows should be placed in the current desktop.
629
630
631 * Maximizing windows should maximize the window to the current head only.
632
633
634 * Window Movements should have edge resistance between heads (Much like they have resistance to other windows).
635
636
637 * Dialogs and informative messages should not pop up Between Heads.
638
639
640
641
642
2 perry 643 I searched the mailing lists, FAQs, and emailed the developers of most of the major window managers to see if they were working on any Xinerama related extensions. The Window Managers/ Desktop environments I reviewed included Blackbox, Enlightenment, KDE, !WindowMaker, and XFCE. Enlightenment and Sawfish were the only two which I found significant enhancements for Xinerama. I have detailed what I discovered below.
1 perry 644
645 !!8.1 Enlightenment
646
647
648
649 From their news page: Sun Mar 26 2000
650
651
652 E with Xinerama support
653
654
655 We just got done adding real xinerama support to E this weekend. Now you have edge resistance moving windows between heads, windows will always pop up on the currently focused head (unless it wants to go someplace else by geom settings or you have it saved to go someplace else), maximize (unless you use "absolute" maximize) stays on the current head also. If you have xinerama and you run E out of CVS, test this and give us feedback.
656
657 !!8.2 Sawfish
658
659
660
661 From the Sawfish mailing list I have discovered that they are actively developing Xinerama support. Features which are currently in the development version include :
662 ----
663
664 * Preventing Windows from being mapped across heads
665 * Preventing Windows from being mapped in dead spots
666 * Edge resistance moving between heads
667 * Centered and Random placement modes place windows on the current Head
668
669 ----
670 I have not tested this functionality.
671
672
673
674 ----
675
676 !! 9. Sample XF86Config Files
677
678
679 My current XF86Config File :
680 ----
681
682 Section "Module"
683 Load "dbe" # Double buffer extension
2 perry 684 !SubSection "extmod"
1 perry 685 Option "omit xfree86-dga" # don't initialise the DGA extension
2 perry 686 !EndSubSection
1 perry 687 Load "type1"
688 Load "freetype"
689 # This loads the GLX module
690 # Load "glx"
2 perry 691 !EndSection
1 perry 692 Section "Files"
2 perry 693 !RgbPath "/usr/X11R6/lib/X11/rgb"
694 !FontPath "/usr/X11R6/lib/X11/fonts/local/"
695 !FontPath "/usr/X11R6/lib/X11/fonts/misc/"
696 !FontPath "/usr/X11R6/lib/X11/fonts/75dpi/:unscaled"
697 !FontPath "/usr/X11R6/lib/X11/fonts/100dpi/:unscaled"
698 !FontPath "/usr/X11R6/lib/X11/fonts/Type1/"
699 !FontPath "/usr/X11R6/lib/X11/fonts/Speedo/"
700 !FontPath "/usr/X11R6/lib/X11/fonts/75dpi/"
701 !FontPath "/usr/X11R6/lib/X11/fonts/100dpi/"
1 perry 702 # The module search path. The default path is shown here.
2 perry 703 # !ModulePath "/usr/X11R6/lib/modules"
704 !EndSection
705 Section "!ServerFlags"
706 !EndSection
707 Section "!InputDevice"
1 perry 708 Identifier "Keyboard1"
709 Driver "Keyboard"
2 perry 710 Option "!AutoRepeat" "500 30"
711 Option "!XkbRules" "xfree86"
712 Option "!XkbModel" "pc101"
713 Option "!XkbLayout" "us"
714 !EndSection
715 Section "!InputDevice"
1 perry 716 Identifier "Mouse1"
717 Driver "mouse"
718 Option "Protocol" "PS/2"
719 Option "Device" "/dev/psaux"
2 perry 720 !EndSection
1 perry 721 Section "Monitor"
722 Identifier "Mini"
2 perry 723 !HorizSync 31.5
724 !VertRefresh 50-90
725 !EndSection
1 perry 726 Section "Monitor"
727 Identifier "Impression"
2 perry 728 !HorizSync 31.5 - 82.0
729 !VertRefresh 50-100
730 !EndSection
1 perry 731 # Video Card #1, Matrox Millenium II PCI Video Card
732 Section "Device"
733 Identifier "Matrox"
734 Driver "mga"
2 perry 735 !VideoRam 8192
1 perry 736 BusID "PCI:0:12:0"
2 perry 737 !EndSection
1 perry 738 # Video Card # 2, Fire GL 1000 AGP video card.
739 Section "Device"
740 Identifier "FireGL"
741 Driver "glint"
2 perry 742 #!VideoRam 8192
1 perry 743 BusID "PCI:1:0:0"
2 perry 744 !EndSection
1 perry 745 Section "Screen"
746 Identifier "Screen 2"
747 Device "FireGL"
748 Monitor "Impression"
2 perry 749 !DefaultDepth 16
1 perry 750 Subsection "Display"
751 Depth 16
752 Modes "1280x1024" "640x480"
2 perry 753 !ViewPort 0 0
754 !EndSubsection
755 !EndSection
1 perry 756 # My Miniature monitor, notice that I used the virtual option so it is
757 # the same heighth as the larger monitor, this is not necessary.
758 Section "Screen"
759 Identifier "Screen 1"
760 Device "Matrox"
761 Monitor "Mini"
2 perry 762 !DefaultDepth 16
1 perry 763 Subsection "Display"
764 Depth 16
765 Modes "640x480"
2 perry 766 !ViewPort 0 0
1 perry 767 Virtual 640 1024
2 perry 768 !EndSubsection
769 !EndSection
770 Section "!ServerLayout"
1 perry 771 Identifier "Simple Layout"
772 Screen "Screen 2"
773 Screen "Screen 1" Rightof "Screen 2"
2 perry 774 !InputDevice "Mouse1" "!CorePointer"
775 !InputDevice "Keyboard1" "!CoreKeyboard"
776 !EndSection
1 perry 777
778 ----
779
780
2 perry 781 An alternate !ServerLayout Section with one Monitor above the other.
1 perry 782 ----
783
2 perry 784 Section "!ServerLayout"
1 perry 785 Identifier "Simple Layout"
786 Screen "Screen 2"
787 Screen "Screen 1" Below "Screen 2"
2 perry 788 !InputDevice "Mouse1" "!CorePointer"
789 !InputDevice "Keyboard1" "!CoreKeyboard"
790 !EndSection
1 perry 791
792 ----
793
794
795 Screens can overlap too. In this configuration I make the two monitors overlap by 80 pixels..
796 ----
797
2 perry 798 Section "!ServerLayout"
1 perry 799 Identifier "Simple Layout"
800 Screen "Screen 2"
801 Screen "Screen 1" Relative "Screen 2" 1200 0
2 perry 802 !InputDevice "Mouse1" "!CorePointer"
803 !InputDevice "Keyboard1" "!CoreKeyboard"
804 !EndSection
1 perry 805
806 ----
807 ----
808
809 !!10. Credits
810
811
812 Much of the introduction and first sections are based loosely on a document submitted to me from Nico Schottelius nicos@pcsystems.de>. As mentioned, KDM and xdm configuration included based on an email from Dalibor dali@dali.net.nz>.
813
814
815
816
817
818 Also thanks to the many people who have emailed me with spelling tips, and suggestions. I have incorporated them whenever I could.
819
820
821
822
823
824
825
826
827
828
829
830
831 ----
The following authors of this page have not agreed to the WlugWikiLicense. As such copyright to all content on this page is retained by the original authors.
  • perry
  • EddieDean
  • ThomasLindroth
The following authors of this page have agreed to the WlugWikiLicense.

    PHP Warning

    lib/blame.php:177: Warning: Invalid argument supplied for foreach()

    lib/blame.php (In template 'html'):177: Warning: Invalid argument supplied for foreach()

    lib/plugin/WlugLicense.php (In template 'html'):99: Warning: Invalid argument supplied for foreach()

    lib/plugin/WlugLicense.php (In template 'html'):111: Warning: in_array() [<a href='function.in-array'>function.in-array</a>]: Wrong datatype for second argument