After I got the spare monitor working, I wanted a dual monitor setup with my desktop system running Fedora Core 14. I had an extra PCI graphics card, but it was so old that the resolution would not go above 800×600. The HP Compaq motherboard had an on board Intel Graphics Card, but the BIOS would not allow both graphics cards. If I enabled one of the graphics cards, it would disable the other one automatically.
The easiest way out seemed like buying a graphics card that supported dual monitors. PCI graphics cards are both expensive and slow (obsolete). HP computer did not even have an AGP socket (obsolete). Instead, there were two PCI-express sockets. The longer one supports graphics cards. This is one of those cases where a faster, newer graphics card with more memory is cheaper (as compared to PCI or AGP cards).
It is kind of like DDR2 memory sticks are both faster and a whole lot cheaper than DDR memory sticks for the same amount of memory. DDR3 memory sticks are even less costly than DDR2 sticks.
One of my monitors accepted only VGA, and the other one accepted both VGA and DVI. So I was looking for a video card that supported both monitors and was PCI express compatible. My plan was to use the Gateway monitor (VGA) as the main monitor, and the Hanns-G monitor (DVI) as the second monitor.
I ended up buying Nvidia GT Force 6600 128Mb that supported VGA, DVI, and S-video for $20. Not the latest and greatest, but the price was right, and I thought it would do the job.
I had xorg.conf configurations for each monitor working at 1280×1024 separately, so I knew the monitors were capable of supporting that resolution. I updated the xorg.conf file to support both monitors, plugged both monitors in, and booted the system. Please see the sample working xorg.conf files for each configuration at the end of this post.
Well, nothing is easy. I have tried many different ideas, and booted the system many many times. Then I thought that the driver that I was using, nouveau, was not up to the task, and downloaded the nvidia graphics driver. By the way, nouveau is the open source version of the nvidia graphics driver. Choose the right driver for your graphics card from this link. http://www.nvidia.com/object/unix.html.
So you would think that switching the nouveau driver with nvidia driver would be trivial. Just remove one package and add the other one. Well, the problem is this: how could you remove (rmmod) a driver that your monitor is connected to? The system will not allow it. If the nouveau was dynamically loaded later in the boot process, you could black list it in /etc/modprobe.d directory. But unfortunately the nouveau driver is built into the kernel and it is loaded together with the kernel. The driver also does modeset so that it can not be disabled.
I guess one option would be to build your own kernel from source without the nouveau driver, which is doable. But that is a separate project in itself, and it would take a long time. And who has time?
I switched the xorg.conf file to on board graphics version, shutdown the system, unplugged the nvidia, and rebooted the system. I wanted to run the nvidia install script, but now it complained that it could not find the nvidia graphics card. Later on I found out that there was a way to override that error, you will see it in the install script.
I switched back to the nouveau version of xorg.conf, and replugged the nvidia card, and also edited the /boot/grub/grub.conf file to include nomodeset option in the kernel line as shown below:
kernel /boot/vmlinuz-220.127.116.11-45.fc14.i686 nomodeset ro root=/dev/sda1
The nomodeset option in the kernel line allows you to switch the graphics driver to ‘nvidia’. You can unload the nouveau driver by typing ‘modprobe -r nouveau’.
Once the nvidia driver is installed, we can load it and use it in xorg.conf file. There are many many different ways of using this driver and it can get confusing. But what I did is I used the driver in “TwinView” mode. In this mode the nvidia driver presents to the X Window manager a single display that spans both monitors so that from the view of the X Window manager it looks like a single display device is plugged in. However, the nvidia driver manages the two monitors individually. For example in my case each monitor resolution is 1280×1024, but when I run System->Preferences->Monitors from the menu, the display resolution shown is 2560×1024.
As part of nvidia driver installation, another display configuration utility is installed in system preferences menu called System->Preferences->Nvidia X Server Settings. This program allows you to configure monitors, move them around as you wish. It is a very nice program with lots of features.
I tried booting Linux Mint 10 live DVD to see how far it would go. It recognized both monitors and configured them in ‘mirrored’ mode where both monitors display the exact same thing. It is possible to reconfigure this, but the real problem is that the maximum resolution was 1024×768. This limitation is due to the nouveau driver. If you want to use the real power of the Nvidia card you have to use the nvidia driver.
— Sample xorg.conf files below —
Dual Monitor with nvidia driver
Dual Monitor with nouveau driver
Single monitor with onboard Intel graphics controller