Monday, June 16, 2008

Configuring dual monitor setup in Ubuntu

So my friend was in dual monitor hell after a new installation of Kununtu (8.04). It would only do clone mode (where both monitors have the same output) or not start at all. We did some research into the xrandr . While in clone mode, we gave the command:

xrandr --output VGA-0 --right-of DVI-0

This complained about the screen not being big enough. A little more research said to edit the xorg.conf and change the Screen block to look like this:


Section "Screen"
Identifier "Default Screen"
Monitor "Configured Monitor"
Device "Configured Video Device"
SubSection "Display"
Virtual 3200 1200
EndSubSection
EndSection


The key part is the "Virtual" line. It says that the "virtual" screen is 3200 pixels wide by 1200 pixels high. She is running a DVI and CRT monitor side-by-side, each running 1600x1200.

Restarting the X-server (ctrl-alt-backspace), then startx from the command line resulted in clone mode again. From here, we issued the command

xrandr --output VGA-0 --right-of DVI-0

again, and behold, functional multi-display.

Of course, this means that she has to issue that command every time she logs in.

Additionally, since dual monitor support is such a complex issue, your mileage may vary. I followed the following steps to find my solution.

1. Does the initial configuration after install meet your needs? No
2. From System Settings->Monitor & Display, can you get it to work? No
3. Examine the /etc/X11/xorg.conf file. Can it be tweaked to make it work? No
4. Install the drivers from your video card manufacturer. Does this work? No
5. Mess with xrandr until it works.