Wednesday, April 02, 2008

Using an External Monitor or Projector With My Linux Laptop

For years, it was difficult enough to get my laptop working with an external monitor that I didn't even bother trying: I would boot into Windows in order to give a presentation. (This is the only reason I ever booted into Windows (or have a Windows install).) It either got dramatically easier to accomplish this at some point in the last year, or I've been incredibly stupid all this time. Just in case, here's how it works on my Dell Inspiron 6400 running Gutsy. My video card is an NVIDIA GeForce Go 7300


  1. Plug in the external monitor or projector. The monitor may work immediately (especially if you're repeating this step after fiddling about below), but it may be at the wrong resolution.


  2. Open "Applications -> System Tools -> NVIDIA Settings" or execute sudo nvidia-settings on the command line. This utility is provided by the nvidia-glx-new package, which you should probably have installed.


  3. Choose "X Server Display Configuration" and click "Detect Displays" at the bottom of the screen.


  4. The external monitor should appear in the Layout pane. Click on it, then click "Configure". Choose "TwinView" (which should hopefully not say that it requires an X restart).


  5. In the "Display" box, choose "Position: Clones". This means that you want the same display to appear on both monitors. This is what works best for me, particularly for giving presentations. Having separate displays seems to confuse applications—for example, "Presentation Mode" in Evince will "center" the slides, displaying the left half of a slide on the right half of the laptop screen and the right half of a slide on the left half of the projector. It's probably possible to tweak this with exactly the right viewport/workspace settings (ugh), but that's not how I roll.


  6. If the display is smaller than the default display—the display's square will be smaller in the Layout pane and the displayed area will be cropped on the screen—click on the
    default display in the Layout pane and choose a lower resolution. 1024x768 is usually safe. The laptop display will probably look bad, but the external display should look fine.

    Be careful: any smaller than 1024x768 and the Settings applet will be too big to display on the screen. If this happens, you'll have to navigate blind or hit Ctrl-Alt-Backspace to restart X (or don't automatically hit OK after the resolution changes and it will revert after 15 seconds).



To remove the external monitor or projector:


  1. Unplug the monitor.

  2. Click "Detect Displays".

  3. A message "The display device FOO has been unplugged..." will appear. Click "Remove."

  4. Click "Quit".



Under no circumstances should you click "Save to X Configuration File" at any point in this process. That's just asking for trouble.

Some sequence of actions—it's not clear which—may screw up the "X Server Display Configuration" pane. The display will
continue to function in the meanwhile, but all the above commands are inaccessible. Restarting X made it go away (for me).

[UPDATE] It seems it's necessary to update your xorg.conf to get decent resolution on some projectors. I'm still investigating... In the meantime, this should help.

No comments: