14 Jul 2007

Dual screen in Ubuntu

Posted by Jacob Emcken

Today I got dual screen in Ubuntu working… I have been fiddling around with it a few times before but nothing seriously. Never got it working the way I wanted. Earlier I edited the xorg.conf by hand while following guides from the internet and yesterday I stumbled upon a graphical Nvidia X configuration tool by accident… the solution was a bit of both.

The tool is called nvidia-settings and looks something like the image below.

As far as I know there are 2 ways of doing dual screen in Linux. Either you can use Xinerama or the Nvidia built-in feature called TwinView (I might be wrong here :D ). Anyways I chose TviewView because that was the default in the Nvidia config tool. After making X aware of my second monitor with the Nvidia tool I saved the X configuration and restarted the X server with the new (Nvidia generated) configuration. The Nvidia generated configuration had 2 problems:

  • It removed my danish keyboard
  • It made my old monitor and the VGA outled the default monitor. I want my new monitor on the DVI outled to be the default.

By hand I added the danish keyboard configuration which I copy-pasted from the old xorg.conf:

Section "InputDevice"
    Identifier     "Keyboard0"
    Driver         "kbd"
    Option         "CoreKeyboard"
    Option         "XkbRules"      "xorg"
    Option         "XkbModel"      "pc104"
    Option         "XkbLayout"     "dk"
EndSection

To force the DVI to be the primary monitor I used the following:

Section "Device"
    Identifier     "NVIDIA Corporation NV43 [GeForce 6600]"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "GeForce 6600"
    BusID          "PCI:1:0:0"
    Option         "NoLogo" "1"
    Option         "TwinView" "1"
    Option         "TwinViewXineramaInfoOrder" "DFP, CRT"
    Option         "TwinViewOrientation" "LeftOf"
    Option         "MetaModes" "DFP: 1600x1200, CRT: 1280x1024"
EndSection

Section "Screen"
    Identifier     "Screen0"
    Device         "NVIDIA Corporation NV43 [GeForce 6600]"
    Monitor        "Monitor0"
    DefaultDepth    24
    SubSection     "Display"
        Depth       24
        Modes      "1600x1200" "1280x1024" "1024x768" "800x600" "640x480"
    EndSubSection
EndSection

First I don’t want to see the Nvidia Logo when X is started… it is a nice logo though :) TwinViewXineramaInfoOrder is the important part because this makes sure that the DVI is the default monitor. You can read more about all the possible options for the Nvidia driver on Nvidias homepage.

My only “problem” is that the background image is streched out on both monitors, but I guess I have to make a custom background image for my dual screen setup. Now I can play World of Warcraft in a dual screen setup in Linux as well which was one of the only things that kept me booting into Windows. To bad performance drops a bit in Linux :( But I have a strong feeling that we are to blame Nvidia for that rather than Wine… but its just a gut feeling. :D

3 Comments to Dual screen in Ubuntu

dimi3
June 24, 2008

Hi Jacob,

I have an ATI card, but after your how-to I think I’ll by a nVidia one – maybe FX 1100 second hand.

In my setup I have one monitor with resolution 1680×1050 and a second LCD TV with resolution 1360×768. I noticed that you have different resolutions on both displays and I have only one question – do you have any ‘dead zones’ on the displays (sections that are not visible on the monitor but you can drag something in them).

Regards :)

dimi3
June 24, 2008

Hi Jacob,

I wonder do you have ‘dead zones’ like areas where you can drag something but you can’t see it on the display with the lower resolution. Because I read some articles that had this problem.

From your screenshot I didn’t understand if your displays are with different resoulution – why does the second one (with firefox on it) has the same Vertical Resolution as the first one?

Regards.

Jacob Emcken
August 24, 2008

Hi dimi3.

I might have had so called “dead zones”… but I think it was due to the fact that I was using screens with different resolutions. If its a bug or by design I don’t know… I didn’t feel the way it worked was a problem for me.

About the screenshot: I did have different resolutions but the screenshot application can’t make screenshots in non-retangular shapes so it just use the background there… on the monitors that part just isn’t visible.

I don’t have this clear in mind because I haven’t bothered with this in Ubuntu for a while now after the setup broke after an update. Anyways I’m pretty sure that maximizing windows worked as it should (not using dead zone space,which you can also see in the screenshot where Firefox is maximized).

Leave a comment