Archive for February, 2009

Ubuntu with two graphics cards

As many of you may know, the newest NVidia drivers (181.22) added support for using a secondary graphics card (8 series or above) as a dedicated PhysX processor… and, if you add another graphics card, you get some more VGA/DVI ports as well.

Anyway, NVidia hasn’t yet been kind enough to provide a driver update for Linux, but it is still possible to use both your graphics cards (as well as multiple monitors!) with Ubuntu. I dove into the process this weekend, finding minimal-to-none documentation about how to do it… very annoying.

However, it is actually rather easy. First of all, start with a new installation of Ubuntu with all updates downloaded and installed (EXCLUDING video drivers). Then, boot up your computer into Ubuntu… you’ll probably have a graphical login screen on whatever monitor is connected to your primary graphics card.

If you do:

  1. Log in
  2. Open a new terminal from Applications -> Accessories -> Terminal

If you don’t:

  1. Press control + alt + F1 to get a fresh console
  2. Log in

Now, at this point you should be able to execute a few simple commands. The first thing we need to do is stop X from starting when the system boots up. Run this command:

sudo update-rc.d -f gdm remove

Now, reboot your computer. If you are in a console and don’t know how to do so, just enter this command:

sudo shutdown -r now

Upon reboot, you should be presented with a standard console-based login prompt. Go ahead and login, and download the lastest NVidia drivers for Linux by using this command:

cd
wget http://us.download.nvidia.com/XFree86/Linux-x86/180.22/NVIDIA-Linux-x86-180.22-pkg1.run

Next, start the NVidia installer. Make sure you accept the license agreement, try to download the kernel module, and if one can’t be found, tell the installer to compile one (you’ll be prompted.) Here’s the command:

sudo sh NVIDIA-Linux-x86-180.22-pkg1.run

After the installation is complete, you’ll have to run the nvidia-xconfig program to set up your /etc/X11/xorg.conf file to run a separate X server on each of your graphics cards. To do this, simply run this command:

sudo nvidia-xconfig -a

Once the command completes (should not take long at all), re-enable Xorg/GDM with this command:

sudo update-rc.d -f gdm defaults

Restart your computer with this command:

sudo shutdown -r now

This time, you should get a graphical login screen. Go ahead and login, and open a terminal. Run this command:

sudo nvidia-settings

… and set up your displays. You’ll want to enable Xinerama.

Comments (8)