I have had a number of requests on how to do both TV out and TwinView, and so since I have
a video card capable of both now, I decided I'd give it a go.
You MUST have the NVidia drivers installed and working properly before this tutorial will work,
as it relies solely upon features found in NVidia's drivers.
Firstly, edit the Identifier fields for the Device, Screen, and ServerLayout sections. Make them all
follow a standard naming convention like I have in my sample below, using "-normal" as the suffix
for each relevant field. I have the portions you need to edit set in red here:
Section "Device"
Identifier "device-normal"
BoardName "MSI GF4 Ti4200"
Driver "nvidia"
Option "DPMS"
EndSection
Section "Screen"
Identifier "screen-normal"
Device "device-normal"
Monitor "monitor1"
DefaultColorDepth 24
Subsection "Display"
Depth 24
Modes "1024x768" "800x600" "640x480"
EndSubsection
EndSection
Section "ServerLayout"
Identifier "normal"
InputDevice "Keyboard1" "CoreKeyboard"
InputDevice "Mouse1" "CorePointer"
Screen "screen-normal"
EndSection
Once you are done that,save the file. You can test it if you like by
logging out of X completely and restarting it. Note once more, that if
you are unsure of this, and don't know how to recover in the event that you
screw something up, you should probably just wait on this tutorial until
you become more familiar with Linux and X and editing files in general.
Next, copy that entire section above, to use as a template for the next
set of definitions.
Paste it at the end of the file, under the last set.
Section "Device"
Identifier "device-tvout"
BoardName "MSI GF4 Ti4200"
Driver "nvidia"
Option "DPMS"
Option "MetaModes" "800x600"
Option "TVOutFormat" "COMPOSITE"
Option "TVStandard" "NTSC-M"
Option "ConnectedMonitor" "TV"
EndSection
Section "Screen"
Identifier "screen-tvout"
Device "device-tvout"
Monitor "monitor1"
DefaultColorDepth 24
Subsection "Display"
Depth 24
Modes "1024x768" "800x600" "640x480"
EndSubsection
EndSection
Section "ServerLayout"
Identifier "tvout"
InputDevice "Keyboard1" "CoreKeyboard"
InputDevice "Mouse1" "CorePointer"
Screen "screen-tvout"
EndSection
This will enable only TV out, and saves you the steps of rebooting and
unplugging your monitor when you wish to use just your TV as a display device.
Again, copy and paste the set of definitions, and change the relevant parts.
Note that in this example, the "ConnectedMonitor" option is missing.
Section "Device"
Identifier "device-twinview"
BoardName "MSI GF4 Ti4200"
Driver "nvidia"
Option "DPMS"
Option "TwinView"
Option "SecondMonitorHorizSync" "30-50"
Option "SecondMonitorVertRefresh" "60"
Option "TwinViewOrientation" "RightOf"
Option "MetaModes" "1024x768, 1024x768"
EndSection
Section "Screen"
Identifier "screen-twinview"
Device "device-twinview"
Monitor "monitor1"
DefaultColorDepth 24
Subsection "Display"
Depth 24
Modes "1024x768" "800x600" "640x480"
EndSubsection
EndSection
Section "ServerLayout"
Identifier "twinview"
InputDevice "Keyboard1" "CoreKeyboard"
InputDevice "Mouse1" "CorePointer"
Screen "screen-twinview"
EndSection
That should enable TwinView for two monitors at 1024x768 resolutions on both of them.
Now, copy and paste that set of definitions, and change the relevant parts again:
Section "Device"
Identifier "device-twinview2"
BoardName "MSI GF4 Ti4200"
Driver "nvidia"
Option "DPMS"
Option "TwinView"
Option "SecondMonitorHorizSync" "30-50"
Option "SecondMonitorVertRefresh" "60"
Option "TwinViewOrientation" "RightOf"
Option "MetaModes" "1024x768, 800x600"
Option "TVOutFormat" "COMPOSITE"
Option "TVStandard" "NTSC-M"
EndSection
Section "Screen"
Identifier "screen-twinview2"
Device "device-twinview2"
Monitor "monitor1"
DefaultColorDepth 24
Subsection "Display"
Depth 24
Modes "1024x768" "800x600" "640x480"
EndSubsection
EndSection
Section "ServerLayout"
Identifier "twinview2"
InputDevice "Keyboard1" "CoreKeyboard"
InputDevice "Mouse1" "CorePointer"
Screen "screen-twinview2"
EndSection
Using this layout, X will be on both my monitor at 1024x768, and on my TV at 800x600,
because my TV doesn't support higher than 800x600, and most don't. This would work
much better if I used the same resolution on both my TV and my monitor, but a 21" monitor
just looks too big at 800x600. Heh.
Note the line that says:
Option "TwinViewOrientation" "RightOf"
This is the key to your desires! If you make the option say "LeftOf", then the second
display (in this case, the TV) will be located at that position, when you start X.
So, moving your mouse cursor to the extreme left on the monitor will put it at the
extreme right on the TV. Basically, if you are using a TV as your secondary display,
you would most likely want it to be at the "RightOf" anyhow, and use your monitor as
your primary display.
Another option you should be aware of here is "Clone" which does as the name implies;
clones the primary display onto the second display. Note that the most recent NVidia
driver supports up to 16 displays, but I have yet to see a video card that can do this.
If you happen to have one of your monitors on top of the other, you can also use the options
"Above" and "Below" in place of "LeftOf". This is something that I would like to try, some
day in the future.
If you wish to read more information on further configuration, please have a look at the
file
/usr/share/doc/NVIDIA_GLX-1.0/README which is installed with the most recent
NVidia drivers. Particular points of interest would be on configuring the "MetaModes" option.
Now, when you want to use either TwinView configuration or just TV out, after you log in,
type
startx -- -layout NAME where NAME is the Identifier of the server layout that you
wish to use. For example, if I wanted to use the last server layout in the code listings above,
I would type in
startx -- -layout twinview2 and hit
Enter.
Now, my guess is that Chunky_Ks is gonna rip this apart and show me a much easier
way of doing it. I'll sit by my inbox and wait for it. :)