# NVIDIA/Twin View

* NVIDIA
* Introduction |
* TV-OUT |
* Twin View |
* SLI |
* Stereo
TwinView is a feature of modern nVidia graphics cards first introduced on the GeForce2 MX range of cards. TwinView presents a single big screen to the operating system, one advantage of this approach compared to using multiple cards with Xinerama is that hardware accelerated OpenGL applications work on both screens and can be moved from one to other easily.

## Buying a TwinView card

If you do not currently have a TwinView card but are interested in buying one, there are few things to look out for:
* Some cards listed as featuring TwinView have the second display only available through a TV out which is of no real use for dual head system - though this maybe useful for multitasking video with other operations. Popular configurations of TwinView are HD15/TV, DVI/HD15 and DVI/DVI. Many configurations of the later two combinations have the second output which either can be the monitor or a TV out giving the best of both worlds.
* Most TwinView cards have at least one DVI output which is a DVI-I which can support analog monitors with the aid of an adaptor (such as CRTs and old/cheap LCD displays) in addition to DVI LCD displays, be careful, if this is what you want/need that you don't get a card with DVI-D output which only supports LCDs.
* The majority of highend NVIDIA cards have a DVI/DVI combination so this is generally easy to find. For a cheaper card you will probably have to settle for a DVI/HD15 card which may require looking at several models before you find one.
* The resolution of the second display on GeForce2 MX cards is limited by a slow pixel clock (150Mhz) which limits this screen to 1280x1024. GeForce4 (all modern cards) and later cards have both outputs running with the same pixel clock giving the same maxiumum resolution on both screens.

## Configuring TwinView with NVIDIA's binary driver

APPENDIX G of the NVIDIA Readme has a comprehensive coverage of the TwinView feature. The configuration of XFree86/Xorg is similar to other setups, the main difference is the "Screen" section, here is an example TwinView setup:
The options used in this example are specific to TwinView and therefore may need some explanation:
* "TwinView" needs to be set for TwinView to work
* "TwinViewOrientation" selects where the second screen is placed in relation to the first one: "RightOf", "LeftOf", and "Clone"
* "MetaModes" is a list of modes comprised of 1st and 2nd monitor pairs, each pair is separated by a semi-colon (;).
** 1280x1024,1280x1024 - both monitors are set to 1280x1024
** 1280x1024,1024x768 - the first monitor is set to 1280x1024 and second to 1024x768 (on the right in this case)
** 1280x1024,NULL - the first monitor is set to 1280x1024 the and second is not displaying anything.
** 1280x1024,1280x1024+1200+0 - the first monitor is set to 1280x1024 and the second is set to 1280x1024 offset by 1200 from the origin of the first screen in the horizonatal direction creating a 80pixel overlap in the middle. This can be used with edge blended projectors (which overlap the image to avoid a noticeable join)
* SecondMonitorHorizSync The HorizSync option in the Monitor Section is the for the first monitor and this is its equivalent on the second monitor.
* SecondMonitorVertRefresh The VertRefresh option in the Monitor Section is the for the first monitor and this is its equivalent on the second monitor.
* Subsection "Display" You may think that you don't need this, however you'd be wrong if you thought that! If only one screen is connected the Nividia driver will say "(WW) NVIDIA(0): Only one display device connected; disabling TwinView." and X will revert to the settings in this section, it is a good idea to check that the default resolution works with both monitors (in case one breaks) so that you can get a graphical login without messing about.
The default meta mode is the left most one. You can switch through the modes in two ways whilst X is running. The first method is to use the Ctrl-Alt-+/- key combination to change native resolution of the screen whilst keeping the virtual screen size the same, this is sometimes called a virtual desktop. The other method only available on modern distributions is to use the xrandr command which changes resolution without creating a virtual desktop, xrandr with no arguments gives a list of all the available modes, to change to mode two use "xrandr -s 2", more details about xrandr can be found on its man page.

### Other options

* NoTwinViewXineramaInfo - Although TwinView presents to the OS as a single screen it also by default uses the Xinerama extension to tell the window manager what physical screens there are. The Window manager will typically use this information to control the behaviour of maximised windows so that they only maximise onto one screen. This option, when set, turns off this feature.
* TVStandard - For controlling the second monitor on cards that feature it - see the TV-OUT for more details.
* TVOutFormat - For controlling the second monitor on cards that feature it - see the TV-OUT for more details.
* TVOverScan - For controlling the second monitor on cards that feature it - see the TV-OUT for more details.
* ConnectedMonitor - To override the monitor type detected by the Nvidia driver - maybe useful for some old non-DDC monitors.
NB: if you use your flat panels in analog mode, you will need to refer to them as CRTs (e.g., "ConnectedMonitor" "CRT, CRT" (or "CRT-0, CRT-1"))

## Alternatives to TwinView

TwinView in the author's opinion is the best way to get a dual-head system due the support of hardware acceleration on both screens:
* Multiple Similar Nvidia cards using Xinerama, accelerated 3D (via GLX) a new feature introduced in driver version 76.64, see Appendix V in the NVIDIA Readme for more details.
* in addition to your main AGP card you can use any number of PCI graphics cards and with the aid of the X11R6 Xinerama extension you can span your desktop across the cards and the cards do not have to made by the same manufacturer (though I've never tried this). Xinerama is described by the, fairly outdated, Xinerama-HOWTO. This method does not provide accelerated 3D support the non primary display(s).
* If you have a system where you cannot get upgraded graphics or extra graphics card (for example in a laptop) you can use VNCwall to create a multihead display using the display output of many networked machines. This option does not provide accelerated 3D support on any displays due to the use of VNC.
* DMX: provides multi-head support for multiple displays attached to different machines using the X protocol.

## TV-out with TwinView

It is possible to use TwinView with a monitor plus a TV if you want everything on your monitor to appear also on the TV. This is particularly useful for watching films and if you don't want to start a separate X display for the TV (as described on TV-OUT). Starting mplayer is also simple, you don't need any special options or scripts to direct output to the TV and while watching the film, your monitor will still be on.
This configuration is taken from the mplayer documentation.
First download the latest nvidia driver from www.nvidia.com, make sure it works and insert the following into your X config file, typically under /etc/X11/xorg.conf if you use xorg:
The important bits are TwinViewOrientation, MetaModes and TVStandard.
* TwinViewOrientation: "Clone" means to duplicate the monitor screen to the TV
* MetaModes: these are pairs of resolutions, first means your monitor, the second the TV
* TVStandard: see the readme.txt file of the nvidia driver (that you have downloaded from www.nvidia.com) or TV-OUT to figure out what to put here
These setting will clone your monitor and everything will also appear on the TV. To start watching a film just type what you would normally do: