PDA

View Full Version : 2x GPUs on Linux



rexguo
11-03-2010, 01:06 AM
Hi!

I have a machine with 2 GPUs. How do I choose which GPU to
create my GL context on? What kind of X server config do I
need? Thanks!

.rex

eile
11-03-2010, 01:48 AM
How do I choose which GPU to
create my GL context on?

Using the right display string


What kind of X server config do I
need?

XOrg works find. Don't enable Xinerama.

More info: http://www.equalizergraphics.com/documentation/parallelOpenGLFAQ.html#multigpu

Dark Photon
11-03-2010, 04:58 AM
I have a machine with 2 GPUs. How do I choose which GPU to create my GL context on? What kind of X server config do I need? Thanks!
It's going to depend on your vendor and how you want the two GPUs to behave. There are several options, at least on NVidia. The traditional way is to just set them up so each GPU has its own screen. If NVidia, just run this once you get their driver's installed:

nvidia-xconfig --enable-all-gpus

For more details, search for multi-gpu and multiple gpus in:

/usr/share/doc/NVIDIA_GLX-1.0/README.txt

Then in your app, just create create your X connection (XOpenDisplay) to :0.0 or :0.1, depending on which GPU you want.

rexguo
11-03-2010, 06:45 AM
Thanks for the great help, guys!
It's really useful to me and now
I know where to look/start.

.rex

rexguo
11-03-2010, 06:47 AM
And for those who are in similiar situations, here's something
I found that shows the utilisation % of both the GPUs:

http://manpages.ubuntu.com/manpages/lucid/man1/alt-nvidia-current-smi.1.html