second gpu doesn't work on linux

Hi, All,

I don’t find a good place to post my problem, I hope I can find help here.

I was trying to use second GPU in NON-SLI mode for my application, but I can not use it on my linux machine. I was using OpenGL with glut for my application. I got information that I can pass display to glut, to tell which GPU would be used for the OpenGL command in a particular context. However, when I tried pass:

-display :1.0 to glut, it reports the following errors:

freeglut (Dummy): OpenGL GLX extension not supported by display ‘:1.0’

Sounds like my second GPU doesn’t work at all ( I checked the temperature of the two gpus in NVIDIA monitor, one is high ( 74, the other is low: 65C)

Any comments, suggestions are appreciated.

Thanks in advance.

I think my condiguration doesn’t work for second GPU.
Here is the xorg.conf I’m using:

Xorg configuration created by system-config-display

Section “ServerLayout”
Identifier “single head configuration”
Screen 0 “Screen0” 0 0
InputDevice “Mouse0” “CorePointer”
InputDevice “Keyboard0” “CoreKeyboard”
EndSection

Section “Files”

RgbPath is the location of the RGB database. Note, this is the name of the

file minus the extension (like “.txt” or “.db”). There is normally

no need to change the default.

Multiple FontPath entries are allowed (they are concatenated together)

By default, Red Hat 6.0 and later now use a font server independent of

the X server to render fonts.

RgbPath “/usr/X11R6/lib/X11/rgb”
FontPath “unix/:7100”
EndSection

Section “Module”
Load “dbe”
Load “extmod”
Load “fbdevhw”
Load “glx”
Load “record”
Load “freetype”
Load “type1”
Load “dri”
EndSection

Section “InputDevice”

Specify which keyboard LEDs can be user-controlled (eg, with xset(1))

Option “Xleds” “1 2 3”

To disable the XKEYBOARD extension, uncomment XkbDisable.

Option “XkbDisable”

To customise the XKB settings to suit your keyboard, modify the

lines below (which are the defaults). For example, for a non-U.S.

keyboard, you will probably want to use:

Option “XkbModel” “pc102”

If you have a US Microsoft Natural keyboard, you can use:

Option “XkbModel” “microsoft”

Identifier “Keyboard0”
Driver “kbd”
Option “XkbModel” “pc105”
Option “XkbLayout” “us”
EndSection

Section “InputDevice”
Identifier “Mouse0”
Driver “mouse”
Option “Protocol” “IMPS/2”
Option “Device” “/dev/input/mice”
Option “ZAxisMapping” “4 5”
Option “Emulate3Buttons” “yes”
EndSection

Section “Monitor”
Identifier “Monitor0”
VendorName “Monitor Vendor”
ModelName “Unknown monitor”
HorizSync 31.5 - 83.0
VertRefresh 50.0 - 76.0
Option “dpms”
EndSection

Section “Device”
Identifier “Videocard0”
Driver “nvidia”
VendorName “Videocard vendor”
BoardName “NVIDIA GeForce 8800 GTS”
EndSection

Section “Device”
Identifier “Videocard1”
Driver “nvidia”
VendorName “Videocard vendor”
BoardName “NVIDIA GeForce 8800 GTS”
EndSection
Section “Screen”
Identifier “Screen0”
Device “Videocard0”
Monitor “Monitor0”
DefaultDepth 24
Option “SLI” “off”
SubSection “Display”
Viewport 0 0
Depth 24
Modes “1280x960” “1152x864” “1024x768” “800x600” “640x480”
EndSubSection
EndSection

Section “Screen”
Identifier “Screen1”
Device “Videocard1”
DefaultDepth 16
SubSection “Display”
Viewport 0 0
Depth 16
Modes “1280x960” “1152x864” “1024x768” “800x600” “640x480”
EndSubSection
EndSection

Section “DRI”
Group 0
Mode 0666
EndSection

Shouldn’t that be “:0.1”?

It’s not clear to me what you’re actually doing. If you have X running on both displays, you can get your app to appear on your second display simply by moving your mouse to the second display and launching the application. The GUI will show up on your second display without any command-line changes.

Thank you for your suggestions. I’ll try that.

I was trying to use two GPUs, and split my job to 2 parts, and do them in parallel in the two GPUs.

I run two X server, and launch my application in the X server with display :1.0, then the error message was popped up and my application is terminated. I guess my X configuration is not correct, and my second GPU is not in working. But I have no idea on how to fix it.

Thanks.

I just tried :0.1 , it doesn’t work either with same error message.

It doesn’t seem like your question is CUDA specific and there may be a more appropriate forum to discuss this.

Anyway, have you tried running something simple like glxgears on both monitors? (glxgears -display :0.1)

This will confirm if this is an X setup problem or something specific to your application.

glxgear run well on display :0,0, but not on :0.1 or :1.0, here is the error message:

$ glxgears

$ glxgears -display :0.1

glxgears: Error: couldn’t open display ‘:0.1’

$ glxgears -display :1.0

Xlib: extension “GLX” missing on display “:1.0”.

glxgears: Error: couldn’t get an RGB, Double-buffered visual.

I think my X setup is not correct. I’m using one monitor, two GPU cards. I was trying to use both GPU to do some GPGPU calculation. You are right, my case is not CUDA related, but I don’t find a good place to post my questions. Maybe I should ask in hardware forum. Anyway, thank you for your help.

You don’t need to run X to run CUDA on multiple GPUs.
Run the queryDevice example to see if you detect both cards.
Run the multiGPU example to see if you can run on both of them.

I was just playing with this in testing the C870 (which has no video output) plus a graphics card running glxgears on display :0.0 and :0.1. This works fine.
Here’s part of my xorg.conf that might be useful for you:

Section “Device”
Identifier “Videocard0”
Driver “nvidia”
VendorName “NVIDIA Corporation”
BoardName “Quadro NVS 285”
BusID “PCI:24:0:0”
EndSection

Section “Device”
Identifier “Videocard1”
Driver “nvidia”
VendorName “NVIDIA Corporation”
BoardName “Tesla C870”
BusID “PCI:88:0:0”
Option “UseDisplayDevice” “none”
EndSection

Section “Screen”
Identifier “Screen0”
Device “Videocard0”
Monitor “Monitor0”
DefaultDepth 16
Option “TwinView” “0”
Option “metamodes” “1280x1024 +0+0; 640x480 +0+0”
SubSection “Display”
Depth 16
EndSubSection
EndSection

Section “Screen”
Identifier “Screen1”
Device “Videocard1”
Monitor “Monitor0”
DefaultDepth 24
SubSection “Display”
Viewport 0 0
Depth 24
Virtual 800 600
EndSubSection
EndSection

Thank you. I’ll try this tomorrow.

Oh, Yes. multiGPU example works fine on my machine. I’m not using CUDA, I’m using OpenGL with two GPU. Thank you.

I have tried your configuration file, now it is working. Thank you very much for your help.

For others convenience, I put my complete xorg.conf file here. The key issues here are setting up two screens corretly in order to use two GPU seperately.

I do have another question, how can I inquery the number of GPUs installed in the system, with OpenGL ( not CUDA )?

#xorg.conf for 2 gpus:

Xorg configuration created by system-config-display

Section “ServerLayout”
Identifier “single head configuration”
Screen 0 “Screen0” 0 0
Screen 1 “Screen1” 0 0
InputDevice “Mouse0” “CorePointer”
InputDevice “Keyboard0” “CoreKeyboard”
EndSection

Section “Files”

RgbPath is the location of the RGB database. Note, this is the name of the

file minus the extension (like “.txt” or “.db”). There is normally

no need to change the default.

Multiple FontPath entries are allowed (they are concatenated together)

By default, Red Hat 6.0 and later now use a font server independent of

the X server to render fonts.

RgbPath      "/usr/X11R6/lib/X11/rgb"
FontPath     "unix/:7100"

EndSection

Section “Module”
Load “dbe”
Load “extmod”
Load “fbdevhw”
Load “glx”
Load “record”
Load “freetype”
Load “type1” Identifier “Keyboard0”
Driver “kbd”
Option “XkbModel” “pc105”
Option “XkbLayout” “us”
EndSection

Section “InputDevice”
Identifier “Mouse0”
Driver “mouse”
Option “Protocol” “IMPS/2”
Option “Device” “/dev/input/mice”
Option “ZAxisMapping” “4 5”
Option “Emulate3Buttons” “yes”
EndSection

Section “Monitor”
Identifier “Monitor0”
VendorName “Monitor Vendor”
ModelName “Unknown monitor”
HorizSync 31.5 - 83.0
VertRefresh 50.0 - 76.0
Option “dpms”
EndSection

Section “Device”
Identifier “Videocard0”
Driver “nvidia”
VendorName “NVIDIA Corporation”
BoardName "NVIDIA GeForce 8800 GTS"Section “Device”
Identifier “Videocard1”
Driver “nvidia”
VendorName “NVIDIA Corporation”
BoardName “NVIDIA GeForce 8800 GTS”
BusID “PCI:4:0:0”
Option “UseDisplayDevice” “none”
EndSection

Section “Screen”
Identifier “Screen0”
Device “Videocard0”
Monitor “Monitor0”
DefaultDepth 16
#Option “SLI” “on”
Option “TwinView” “0”
Option “metamodes” “1280x1024 +0+0; 640x480 +0+0”
SubSection “Display”
#Viewport 0 0
Depth 16
#Modes “1280x960” “1152x864” “1024x768” “800x600” “640x480”
EndSubSection
EndSection

Section “Screen”
Identifier “Screen1”
Device “Videocard1”
Monitor “Monitor0”
DefaultDepth 24
SubSection “Display”
Viewport 0 0
Depth 24
Virtual 800 600

Modes “1280x960” “1152x864” “1024x768” “800x600” “640x480”

EndSubSection

EndSection

Section “DRI”
Group 0
Mode 0666
EndSection

BusID       "PCI:1:0:0"

EndSection

Load  "dri"

EndSection

Section “InputDevice”