gog's info

<?php echo array_rand(array('web', 'dev', 'computers')); ?>

Dual display setup with Nvidia on Ubuntu 8.04

with 6 comments

Setting up multiple monitors under Linux can sometimes be quite a daunting task. TwinView, Xinerama, restricted drivers, editing configuration files, etc. doesn’t sound user friendly at all.

After you install Ubuntu and boot it the first time, you will get a notification in the tray asking you if you would like to install nVidia restricted drivers. They don’t get installed by default because the source code for this drivers isn’t open source. Since we don’t care about that, and just want the damn thing to work install the drivers.

Next, install the NVIDIA X Server Settings using the Add/Remove application or type sudo apt-get install nvidia-settings into your terminal.

Add/Remove dialog

Add/Remove dialog

You can now run the NVIDIA X Server Setting from System -> Administration menu. All the changes you select there will be applied, but they will not be saved because saving them requires root privileges. The file that need to be changed (/etc/X11/xorg.conf) for the changes to become permanent can be changed only by the root user.

Fire up your terminal and first save a backup copy of your xorg.conf file:

sudo cp /etc/X11/xorg.conf /etc/X11/xorg.conf.backup

Now we can run the settings utility as root, enter:

sudo nvidia-settings

Select the X Server Display Configuration from the menu on the left and play around with the options, most of them are self explanatory except maybe for the almost all of the are self explanatory except maybe for the Configuration button.

NVIDIA X Server Settings

NVIDIA X Server Settings

You can run the displays in two basic configurations: TwinView and Separate X screen. We will select TwinView because using separate X screens doesn’t allow you to drag application windows from one display to another, which kinda defeats the purpose of having a dual display setup.

When you are done configuring the displays and are satisfied with the output you get after hitting Apply it’s tame to save this changes to the X configuration files, so hit that button and you are ready, well, almost…

All of the dialogs where being placed in the center, showing one half on the left monitor and the other half on the other monitor. Maximizing windows would make them maximize across both of the screens, and the taskbar spanned across both of the monitors.

To fix this “little annoyance” I had to open up my terminal once again and enter:

sudo dpkg-reconfigure xorg

I restarted my X session (Ctrl + Alt + Backspace) and that was it, everything works as I expect. Application windows are located on my primary display and I can move them to my other display and when I hit maximise it only fills one of the displays. My tray and taskbar are also only on my primary display.

If you have an idea how to create additional taskbars for each of the monitors, and make each taskbar only show tasks from the monitor it is on, do tell. I really miss the functionality I get from using dual display setup under Windows using Ultramon.

Written by Goran Jurić

September 22nd, 2008 at 11:58 am

Posted in Linux,Ubuntu

Tagged with , , ,

6 Responses to 'Dual display setup with Nvidia on Ubuntu 8.04'

Subscribe to comments with RSS or TrackBack to 'Dual display setup with Nvidia on Ubuntu 8.04'.

  1. Thanks for this article. I got the second monitor running fine but was stumped regarding the dialogs. The reconfigure command worked a treat.

    Just one question – How did you find out about the command and why it was needed?

    Paul Whipp

    30 Oct 08 at 05:45

  2. dpkg-reconfigure is part of the standard dpkg tools that are used on Debian based distributions for package management (.deb). After you install a package like Xorg it creates a configuration file based on your hardware.

    dpkg-reconfigure just forces this process to run again and since you install the drivers before running reconfigure it does a much better job of understanding you hardware and creating a proper config file.

    After installing the nvidia drivers my second monitor didn’t have a picture, so I figured it couldn’t hurt to run the configuration again.

    I’m glad this article was helpful to you.

    Goran Jurić

    30 Oct 08 at 11:09

  3. I have exactly the opposite problem. I have one monitor acting as a primary. I would like the two monitors to be treated as one large monitor. Maximizing a window should cover both monitor. Any suggestions on how to achieve this the nvidia-settings tool or using the xorg.conf file?

    Thanks

    Emil

    1 Mar 09 at 05:26

  4. Sorry Emil, but I am no longer working on the same box so I can’t try it myself.

    I do believe you will have to play a little bit with Xinerama. There is a good explanation of various display modes while using two, or more monitors here -> http://ubuntuforums.org/showpost.php?s=def28a79b19c5007375ba301e40502c0&p=1292439&postcount=9

    Good luck!

    Goran Jurić

    1 Mar 09 at 14:23

  5. my second tft display shows no signal even after configuring the nvedia graphics card..pls help

    vishal

    5 Mar 09 at 15:46

  6. Everything works fine!!!! Thanks.

    Christos

    26 Mar 09 at 15:43

Leave a Reply