For some individuals having dual monitors would be a nice to have Convenience, however, not worth the effort to wrestle with the configuration issues that are too likely to be encountered. For myself, it is difficult to conceive how I could do without this setup for any extended period. When you program seeing the code adjacent to the rendering or execution is an advantage I cannot give up. Therefore, whenever I lose the ability to use two monitors I begin a new quest to set the world right again.
I have been through this cycle several times now, whatever the reason, I had no choice. I needed to recover my erstwhile dual monitor setup. Each time what's encountered differs slightly from the previous experience. My affair with the dual monitor setups began under a mixed version of Debian, a churned together affair, that made a respectable desktop. All was well until forced to upgrade from Debian 3.0 to 3.1, which was an unmitigated disaster in too many respects to recount. Not only did I lose my dual monitor setup, I lost by my error, the earlier video configuration file. My recovery would have been easier had I a base to tweak than to start from scratch.
It was at this point I received a link that guaranteed the dual monitor configuration would work. I was dubious, because it appeared to me, on first sight, that the author(s) took a short cut placing most of the expected details of both monitors on one "Screen" section that are usually in their "Monitor" section(s). Once it failed, I was careless seeing no need to retain either the file or the link. Eventually I lost both. Neither Tom nor I were able to re-find the link he gave me. At best I have a short section of configuration code that was retained only because it was commented out. Even on first use I had commented out the "TwinView" line, because I had already found Xinerama to my liking:
Section "Screen" Identifier "Default Screen" Device "NVIDIA Corporation NV34 [GeForce FX 5200]0" Monitor "PL201M" DefaultDepth 24 # Option "NvAGP" "1" # Option "TwinView" "true" # Option "SecondMonitorHorizSync" "31-80" # Option "SecondMonitorVertRefresh" "56-85" # Option "MetaModes" "1600x1200, 1280x1024; 1280x1024, 1280x1024;" # Option "TwinViewOrientation" "RightOf" # Option "Xinerama" "on"
Lets get one idea out of the way immediately, make an error in your configuration: NO! It does not stop working. You may perhaps have some unnoticed problems but your two monitor view does not necessarily disappear. Nonetheless, there are seemingly simple misassignments that shut down the video, so always keep a working single monitor configuration file ready to be substituted. That is, when your configuration file change fails, Ctr-Alt-F1 into a full screen terminal. Rename your current failed, dual monitor configuration to something like xorg.conf.dual.failure-cause. After wards, rename your xorg.conf.single to xorg.conf, then reboot.
For the daring and when you think you are really close do a single change, no more, then either reboot of try the Ctr-Atl-F7 [1.] [2.] to see if you have reached a successful version. If not repeat the cycle or reboot and recode the single monitor configurations file.
When trying to get a video configuration file working, I first place the sections in an order that makes sense to me. To me, separating the "Screen" section, one for each monitor, when you have two (different or alike) monitors makes sense to me. My mode of thinking about the problems is to construct a logical structure. Nonetheless, I am skipping the sections labeled "Files", "Module" and the multiple "InputDevice". Though they might not contribute to problems, I have no special insights to contribute. Nonetheless, I have made changes in these sections, e.g. the "InputDevice" my three button, wheel mouse has quite different settings from the Ubuntu 5.10 to the desktop 6.06. My focus, for this article, begins with the "Device" sections that describes video card(s), because I know for certain seemingly small changes can result in unexpected behaviour. Thus, it will be a significant part of the discussion.
There are a number of suggested dual monitor configuration files that may work almost immediately for your system. Therefore, I suggest you do your own search when you are ready to do a dual monitor setup. Moreover, compare the content with the version that has already been generated and usable for your single monitor system. Finally here is a listing with links and maybe a comment or two on some the methods others have employed to configure a dual monitor system [3.], perhaps these will help.
Let us start with the "Device" section, where each is either a separate card or each is a different port on the same card. The latter conforms to my hardware. Here is what mine looked like on Ubuntu 5.10:
Section "Device" Identifier "NVIDIA Corporation NV34 [GeForce FX 5200] 0" VendorName "nVidia" Driver "nvidia" BusID "PCI:2:0:0" Screen 0 EndSection Section "Device" Identifier "NVIDIA Corporation NV34 [GeForce FX 5200] 1" VendorName "nVidia" Driver "nvidia" BusID "PCI:2:0:0" Screen 1 EndSection
I wish to draw your attention to the first line, i.e. labeled the 'Identifier', there was a change in the placement of the port number. Under Ubuntu 6.06 it now is at the start of the line. I think that change took place using the same hardware for both distributions, however, I cannot say either that is a certainty or if the change was a critical in making it work under 6.06. My problem is that I only have an editor's automated backup of the penultimate stage not the then running version. There has been a hardware change since then that has altered the configuration radically, however, that is a story for another day. When I write that article, I might speculate why the older, working file was lost.
The important take away lesson here is wherever the placement of the port number, do not rotely copy what you read has worked. Examine your card, if it a dual port, be certain the port's actual number you see on the card is properly matched to the monitor that is attached to that port number. Let say your port numbers match mine, if you substitute a 1 for the proper 0 and further place a 2 for the 1 port in your configuration, the video setup will fail. Use your real port numbers as you find them on your hardware.
Of considerable importance too is the BusID, i.e. the slot your video card resides. Your generated single monitor file is a good guide, which is another reason to keep a copy. I remember this being an important issue, however, I no longer remember the details. I think I used the aforementioned video configuration file along with reading documentation. [Regarding the last point, I probably read the details by running the command line: "man xorg.conf" (use info if that is your preference).] I also remember looking at the dmesg output to sooth my doubts. When it finally worked I essentially forgot it, because once configured properly it works.
There is one last issue, in the aforementioned Ubuntu 6.06 configuration file the driver listed was the open "nv" that I know did not work at that time. Therefore, I was forced to use nVidia's proprietary driver. ATI once again via ADM is saying they will have an open source driver, nVidia may follow the example. In the future watch and test open drivers to see if they work, in the longer term they are to be preferred.
Next let's look at the monitor sections, mine have remained essentially unchanged so we will look at it in the generic form:
Section "Monitor" Identifier "[Model Name]" Option "[Mine is 'DPMS']" HorizSync Check manual, two numeric VertRefresh values separated by a dash on each line, for example 56-85 assumed to be Hz for vertical refresh rate. EndSection
I have found examples that list vendor name and models that I think are superfluous, hence, they are not added in my configuration file. The more significant section are the "Screen"(s), in my reading the xorg documentation I learned a fact that would have helped greatly pertaining to the default screen numbering. That is, "... Most drivers require that the primary screen (0) be present.". I interpret that to mean the default screen that you will see next:
Section "Screen" Identifier "Default Screen" Device "0 NVIDIA Corporation NV34 [GeForce FX 5200]" Monitor "PL201M" DefaultDepth 24 SubSection "Display" Depth 1 Modes "1600x1200" EndSubSection [left out unnecessary, repetitive code [4.] ] SubSection "Display" Depth 24 Modes "1600x1200" EndSubSection EndSection
In the second screen the code is simpler (Ubuntu 6.06 version) where I use on one depth and a single mode that is more appropriate for thin film transistor monitors:
Section "Screen"
Identifier "Second Screen"
Device "1 NVIDIA Corporation NV34 [GeForce FX 5200]"
Monitor "770 TFT"
DefaultDepth 24
SubSection "Display"
Depth 24
Modes "1280x1024"
EndSubSection
EndSection
Other than the display subsection, there is little new here. However, as you will see in a subsequent article that does not imply always smooth sailing. Now we move to the important "ServerLayout" section that has several critical settings that must be correct for you to see your dual monitor configuration function:
Section "ServerLayout" Identifier "Default Layout" Option "Clone" "off" # Option "Xinerama" "on" Screen 0 "Default Screen" Screen 1 "Second Screen" RightOf "Default Screen" InputDevice "Generic Keyboard" InputDevice "Configured Mouse" EndSection
This section really puts everything together in one package. Of major importance are the screen settings. Note as already mentioned the default screen is zero, however, pay particular note to the second screen placement. To the right of, means the user's right side. There is little else to describe in my own setup, other than the Xinerama option (one large picture) was moved to its own section "ServerFlags". The last section in my files are the "DRI", which I suspect was completely unnecessary in my configuration. I had both monitors attached using VGA analog cables.
As detailed as these instructions are, something may not work on your system. Try to figure out the area the code is wrong and make a single change and rerun. Look carefully at your single monitor setup to be certain at least that part is correct. In addition, here is a list of references that attack the same problem, although most use quite different stress on the style, on the ordering and on the content in sections. Moreover, the focus of their attention differs from mine [5.]. In most of the listed references, I made little use of their content, nonetheless, seeing some now they would have been of interest.
I have one final reference that I found helpful, however, it is in pdf format. Thus, you are going to have to find your own link to a copy. This article appeared in the July, 2005 issue of Linux Format (an U.K. publication). I believe the file name is LXF68.tut_twinview. I remember seeing something in this article that allowed me to bring up my dual monitor setup for the first time successfully. Therefore, I have positive response to it, though it may not be better than those listed under footnote 5.
Finally, for those that have never successfully run a two (or more) monitor setup, do not panic when you see the duplicate boot up flashing by on each screen (that includes gui portions). This implies neither failure nor success of your configuration. I would also advise against suppressing the splash screen in the booting script, because I know my Xinerama works when I see the nVidia graphics on each screen. That is quickly followed by the login screen on the default screen. Having never used either the clone or TwinView I can give no guidance.
This is the first of several articles on Linux hardware. The expectation is for topics to appear aperiodically with some being quite short. I hope these find some use helping others by the problems I have encountered or just becoming aware a problem exists despite not having a neat solution.
I had intended including a photo of the setup, however, being pressed by the schedule that does not seem possible. Hence, I think it might be better the next time this topic is discussed. At that time I can stress the differences and how I like the newer dual monitor system I now use. At that time you can essentially view them side by side.
Corrections, suggested extension or comments write: How-To-Guy. If the mailto does not work, use this: hcohen[-At-]bst-softwaredevs.com.
© Herschel Cohen, All Rights Reserved
____________________________________________________________________ 1. Instructions under: "Switch to Console mode". Return 2. Please check the references, I was certain it was F8. Ran across a reference where the F8 was used in Fedora and F7 under Ubuntu. That might explain my memory of that key combination. Return 3. a. Here is a dual monitor system built on Debian, stepwise. It's a simpler setup, but covers sections I use too. b. I looked at this, it discusses nVidia drivers that I use. not sure I took much. Nonetheless, it talks about a dual head type card that I too use. c. Here is another different experiment using xinerama, but not the same, it's X86 not xorg. Select and use what fits. Return 4. It is actually worse, I used multiple resolutions that are only appropriate for CRTs. That is, I think some of the code is wrong, but there seem to be no ill effects. Return 5. List in no particular order or worth: Look at: Tweaking xorg.conf AGP & PCI Cards nVidia & Matrox Debian Multiple Monitors & Cards Xinerama v. TwinView Matrox Dual Head Card Dual Head with Different Resolutions Return