2x GPUs on Linux


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!


Using the right display string

XOrg works find. Don’t enable Xinerama.

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

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:


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

Thanks for the great help, guys!
It’s really useful to me and now
I know where to look/start.


And for those who are in similiar situations, here’s something
I found that shows the utilisation % of both the GPUs: