Two display cards - results

I wanted to follow up on my questions from a few days back, about how to install an Nvidia 9800 and “another” card and use the other card for display and the 9800 just for CUDA. Here what I found:

  1. 9800 + “legacy” NVidia. Forget about it. As netlama explained, the drivers for the new and legacy cards are incompatible. The only way to make it work is to use the open source “nv” driver on the legacy card, and it is unaccelerated. Not acceptible to me anyway.

  2. 9800 + ATI 9250. This works, but was fiddly and I ultimately choose another option. There are a couple of guides about getting Nvidia and ATI cards to work together that I found useful:

http://ryonsherman.wordpress.com/2009/02/1…cards-in-linux/

and

http://wiki.debian.org/NvidiaGraphicsDrivers

Basically all you need to understand is that the Nvidia installer is going to overwrite the OpenGL libraries that the ATI card needs. This is both for the open source ATI driver (which I used, it’s pretty good, unlike the Nvidia one) and the restricted one. The referenced pages discuss how to get both cards to work together, but for CUDA purposes all you need to do is to restore the ATI files and links after the Nvidia driver in installed. The ones that matter for the open source driver are:

/usr/lib/libGL* links and library

and

/usr/lib/xorg/modules/extensions/libglx* links and library

Install the ATI card on a clean system, or else remove all traces of Nvidia drivers first, and then back the indicated files up (but not under /usr/lib, the Nvidia installer does a scary-efficient job of hunting down and killing things it doesn’t like in the /usr/lib tree, even in folders like “backup_save”, learned this the hard way). Then install the Nvidea driver and restore the original ATI files. These have nothing to do with CUDA, so it will work file. You will need to ensure that the module “/lib/modules/<kernel_version>/kernel/drivers/video/nvidia.ko” gets iloaded as well, since X will not do it for you. I just wrote a script to do it manually.

I got this to work, but it seemed kind of fragile because any kernel or Nvidea driver update would require redoing this stuff by hand.

So finally I settled on:

  1. 9800 + “cheap compatible Nvidia card”. I pulled the 8400GS out of a Windows system I use for video editing and replaced it with the ATI card. The rest is pretty much a no brainer. Got things set up the normal way with the 9800, then added the 8400 in the second PCI-e slot. Modified xorg.conf to reference the 8400 card explicitly at it’s bus location:

Section “Device”
Identifier “nvidia8400”
Driver “nvidia”
BusID “PCI:4:0:0”
VendorName “NVIDIA Corporation”
EndSection

Everything works fine, and now I can run CUDA full speed on the 9800 and not have any graphics performance hit in X11. I ran a vga cable to the 9800 card to I can hook it to my monitor in case I need to see boot-up messages, since it is in the primary slot. But this isn’t a big issue.

Hope this is of some help to someone…

–arne

Forgot this link re configuring two cards:

http://ubuntuforums.org/archive/index.php/t-419841.html

I actually found it the most useful for practical technique

:thumbup: It will be

Hi arnet,

Thanks for posting this, that might be very useful!!!

I have two small questions :

  1. Why you finally choose not to use the ATI + NVidia together? What was the problem? Was it working or not?

  2. Using ATI + NVidia together the way you suggest will mean the glx part of nvidia will not work. This mean we cannot display anything on any screen attached to it right? have you try to see if nvidia-settings --query=… is returning good results?(I think this tool is using the glx/gl part as well)

thanks

Jonathan

  1. The “open source” ATI drivers with the most up-to-date OpenGL support are not that stable on 8.04, and they are targetting 8.10 now anyway (personal rant - Ubuntu updates too often and the open source community follows too fast). That was the immediate concern. I didn’t try the restricted drivers, they might have worked better. But longer term I just didn’t want to have to deal with redoing the saving and restoring of libraries every time the drivers or kernel were updated. It’s not really that big a deal. If I hadn’t of had the Nvidia 8400 card in another system I would have probably stuck with it. But an “all Nvidia” solution is easier to manage.

  2. Yep. GLX support is built into the drivers and I do not know of a way to make two different drivers have it in Debian. Most installers drop in their own glx libs and link the standard OpenGL lib to the new ones. The Nvidia one also goes on a “search-and-move-to-a-hidden-location” mission for libs from other drivers. You could write a script to toggle between them (see the third link I provided).

–arne