21 May 2008
I’ve had a hard time finding comprehensive information about setting up an extra monitor with my laptop; I’m collecting everything I’ve figured out here. If you have other tips, experiences or suggestions please post them.
These instructions assume you are using the beta drivers 169.04 or better (available here). It’s possible that they will work for other driver sets as well, but I haven’t tested them.
This program a swiss army knife for all of your display settings. It is installed with the driver and invoked as nvidia-settings from a CLI or in System Tools > NVIDIA X Server Settings. Of particular use is the X Server Display Configuration Page, which allows you to set up your monitors in any arrangement you want.
None of the following instructions do anything that you can’t do using this tool, but it can be a hassle to have to page through all the settings when you just want to turn on another monitor, and I’ve found that it generates xorg.conf files unintelligently and can mess up some of your other system settings. However, when all else fails you can always use nvidia-settings.
XRandR (X Resize and Rotate) is an X extension that allows you to dynamically change the size and orientation of your desktop. It can be used to make on-the-fly changes to your resolution and monitor setup.
TwinView is NVIDIA’s system for allowing your desktop to span multiple monitors. TwinView is not Xinerama (the standard X “big desktop” solution), but it can pretend to be in order to pass correct information to your window manager.
I have found a very simple xorg.conf setup to produce the most useful multimonitor configuration. To your “Device” section, simply add:
Option "TwinView" "1" Option "TwinViewXineramaInfoOrder" "DFP-0" Option "MetaModes" "CRT: nvidia-auto-select, DFP: nvidia-auto-select"
This tells the driver to:
With this setup, your desktop will automatically extend across onto an external monitor if one is connected, and keep your display limited to the laptop’s LCD if there is no other screen. With this setup, all you have to do is plug in your new screen and restart X to get a good TwinView configuration
If, for whatever reason, you don’t want to restart X every time you change display configurations, the driver also makes a “Dynamic TwinView” extension available. If you plug in the new monitor after X has started, the computer won’t know that the screen exists and so can’t extend on to it. There are two ways of forcing a re-scan of available displays: using the previously mentioned nvidia-settings tool, or by using a smaller command-line utility called nv-control-dvc that comes with the nvidia-settings-source package.
To get nv-control-dvc, download the nvidia-settings source package (‘apt-get source nvidia-settings’ on Debian-based distros) and run ‘make’ in the samples directory. You can then make a launcher that calls ‘nv-control-dvc –dynamic-twinview’ that will give you access to new monitors whenever they are connected.
After a new monitor has been detected, you can enable it by opening your favorite resolution-changing program and selecting the resolution that is the combined size of the combined desktops.
A note for compiz-fusion users: this will incorrectly broadcast the size of your screen, and compiz will end up trying to maximize your windows across two desktops. You can manually set your screen configuration with gconf-editor in ‘/apps/compiz/general/screen0/options/outputs’.
Compiz users can use the “clone” tool to mirror one display on another; at the moment I don’t know of any other way of doing this without setting the other screen’s position to “Clone” in nvidia-settings.