Monday, February 11, 2008

Ubuntu Dual Display

When I first installed Ubuntu, I checked out the visual effects. I was anticipating many cool features. I set it to the highest setting, and everything worked fine. I then did

> sudo apt-get install compizconfig-settings-manager

to get the configuration settings manager. This allows you to customize your desktop effects. All was going well, until I decided to get my dual screen setup running... Big mistake!

Turns out, my xorg.conf wasn't set properly. I tried using the Screen and Graphics configuration window provided by Ubuntu, but could not get it to work. What was happening was that I couldn't turn on ANY desktop effects at all. I did, however, see my dual screens displayed, but I wanted the cool effects!

After mucking around for a bit, I finally found a configuration that worked for my setup.

I added a few options to my graphics card device to support Twinview (instead of using Xinerama). TwinView allows you to extend your desktop to the 2nd monitor while treating it as the same window. After hooking everything up, logged out, then in, and everything worked like a charm.

Here's what I have in my xorg.conf:

Section "Device"
Identifier "card0"
Driver "nvidia"
VendorName "nVidia Corporation"
Boardname "geForce 7600 GT"
Busid "PCI:1:0:0"
Option "NoLogo" "0"
Option "RenderAccel" "true"
Option "HWcursor"
Option "CursorShadow"
Option "CursorShadowAlpha" "32"
Option "CursorShadowXOffset" "3"
Option "CursorShadowYOffset" "3"
Option "AllowGLXWithComposite" "true"
Option "TwinView"
Option "MetaModes" "1600x1200,1024x768; 1600x1200,1600x1200; 1600x1200; 1280x1024,1280x1024; 1280x1024; 1024x768,1024x768; 1024x768; 800x600,800x600; 800x600"
Option "TwinViewOrientation" "RightOf"
Option "SecondMonitorHorizSync" "UseEdidFreqs"
Option "SecondMonitorVertRefresh" "UseEdidFreqs"
EndSection

Section "Screen"
Identifier "screen0"
Device "card0"
Defaultdepth 24
Monitor "LCD MAG"
SubSection "Display"
Depth 24
Modes "1600x1200@60" "1400x1050@60" "1280x960@75" "1280x1024@60" "1280x960@60" "1280x1024@75" "1152x864@75" "1024x768@60" "1024x768@70" "1024x768@75" "832x624@75" "800x600@60" "800x600@75" "800x600@72" "800x600@56" "640x480@75" "640x480@72" "640x480@60"
EndSubSection
EndSection

Section "ServerLayout"
Identifier "twinview"
Screen 0 "screen0" 0 0
Inputdevice "Generic Keyboard"
Inputdevice "Configured Mouse"
Option "Xinerama" "0"
EndSection

The "LCD MAG" is my primary monitor.

For more information, take a look at Dual Monitors and Twinview Example.

Just to let you know, I have a nVidia GeForce 7600 GT. Twinview is used with nVidia. If you have another graphics card, you're on your own :P


W

No comments: