PDA

View Full Version : QGLWidget with multiple monitors



Rayven
2nd August 2006, 15:21
I am not sure if this belongs in the Qt forums or the OpenGL forums, but I thought I would try anyhow. I am using a QGLWidget on an HP workstation that has 4 monitors. There are, however, only 2 video cards with one digital output each. The output is split into 2 connectors using a video splitter cable. I am running Linux Red Hat WS and the xorg.conf file is setup to span 2 desktops across 2 monitors.

The Problem:
The issue I am having is that any OpenGL widget will only appear on monitor 0. Monitors 1 - 3 do not display anything. Anything built using Qt (minus the QGLWidget) appear correctly. I am really not sure how to solve this problem, and the monitor/computer setup cannot change easily (meaning, somone other than me has to make the modification decision). Is there anything I can do in Qt to fix the problem? Or do I need to suggest a different setup for the machine?



Section "ServerLayout"
Identifier "single head configuration"
Screen 0 "Screen0" 0 0
Screen 1 "Screen1" Rightof "Screen0"
Screen 2 "Screen2" Rightof "Screen1"
Screen 3 "Screen3" Rightof "Screen2"
InputDevice "Mouse0" "CorePointer"
InputDevice "Keyboard0" "CoreKeyboard"
EndSection

Section "ServerFlags"
Option "Xinerama" "1"
EndSection

: // Left out InputDevice sections

Section "Monitor"
Identifier "Monitor0"
VendorName "HP"
ModelName "HP 1825 Flat Panel Monitor"
DisplaySize 360 290
HorizSync 30.0 - 82.0
VertRefresh 56.0 - 76.0
Option "dpms"
EndSection

Section "Monitor"
Identifier "Monitor1"
VendorName "HP"
ModelName "HP 1825 Flat Panel Monitor"
DisplaySize 360 290
HorizSync 30.0 - 82.0
VertRefresh 56.0 - 76.0
Option "dpms"
EndSection

Section "Monitor"
Identifier "Monitor2"
VendorName "HP"
ModelName "HP 1825 Flat Panel Monitor"
DisplaySize 360 290
HorizSync 30.0 - 82.0
VertRefresh 56.0 - 76.0
Option "dpms"
EndSection

Section "Monitor"
Identifier "Monitor3"
VendorName "HP"
ModelName "HP 1825 Flat Panel Monitor"
DisplaySize 360 290
HorizSync 30.0 - 82.0
VertRefresh 56.0 - 76.0
Option "dpms"
EndSection

Section "Device:
Identifier "Videocard0"
Driver "nvidia"
VendorName "Nvidia"
BoardName "Nvidia Quadro 4 (generic)"
Option "TwinView" "True"
Option "TwinViewOrientation" "RightOf"
Option "UseEdidFreqs" "True"
Option "MetaModes" "1024x768, 1024x768"
BusID "PCI:1:0:0"
Screen 0
EndSection

Section "Device:
Identifier "Videocard1"
Driver "nvidia"
VendorName "Nvidia"
BoardName "Nvidia Quadro 4 (generic)"
Option "TwinView" "True"
Option "TwinViewOrientation" "RightOf"
Option "UseEdidFreqs" "True"
Option "MetaModes" "1024x768, 1024x768"
BusID "PCI:1:0:0"
Screen 1
EndSection

Section "Device:
Identifier "Videocard2"
Driver "nvidia"
VendorName "Nvidia"
BoardName "Nvidia Quadro 4 (generic)"
Option "TwinView" "True"
Option "TwinViewOrientation" "RightOf"
Option "UseEdidFreqs" "True"
Option "MetaModes" "1024x768, 1024x768"
BusID "PCI:16:0:0"
Screen 0
EndSection

Section "Device:
Identifier "Videocard3"
Driver "nvidia"
VendorName "Nvidia"
BoardName "Nvidia Quadro 4 (generic)"
Option "TwinView" "True"
Option "TwinViewOrientation" "RightOf"
Option "UseEdidFreqs" "True"
Option "MetaModes" "1024x768, 1024x768"
BusID "PCI:16:0:0"
Screen 1
EndSection

Section "Screen"
Identifier "Screen0"
Device "Videocard0"
Monitor "Monitor0"
DefaultDepth 24
SubSection "Display"
Viewport 0 0
Depth 24
Modes "1280x1024" "1280x960" "1152x864" "1024x768" "800x600" "640x480"
EndSubSection
EndSection

Section "Screen"
Identifier "Screen1"
Device "Videocard1"
Monitor "Monitor1"
DefaultDepth 24
SubSection "Display"
Viewport 0 0
Depth 24
Modes "1280x1024" "1280x960" "1152x864" "1024x768" "800x600" "640x480"
EndSubSection
EndSection

Section "Screen"
Identifier "Screen2"
Device "Videocard2"
Monitor "Monitor2"
DefaultDepth 24
SubSection "Display"
Viewport 0 0
Depth 24
Modes "1280x1024" "1280x960" "1152x864" "1024x768" "800x600" "640x480"
EndSubSection
EndSection

Section "Screen"
Identifier "Screen3"
Device "Videocard3"
Monitor "Monitor3"
DefaultDepth 24
SubSection "Display"
Viewport 0 0
Depth 24
Modes "1280x1024" "1280x960" "1152x864" "1024x768" "800x600" "640x480"
EndSubSection
EndSection


If there are any "spelling" mistakes in the xorg.conf file, please disregard them. I had to type the file in manually. Thanks for any suggestions!

high_flyer
3rd August 2006, 10:49
I don't know if OpenGL uses hardware acceleration.
But if it does, that is the reason, since Xinerama does not support hardware acceleration.

Rayven
4th August 2006, 04:20
...Xinerama does not support hardware acceleration.
Is there some other mode to place the four screens other than Xinerama to achieve a better performance? I removed (as a test) the Xinerama line from the xorg.conf file, and I am still having the same problem. I know that OpenGL supports hardware acceleration, so this is "sounding" like the problem, but just removing the Xinerama is not fixing it. Any suggestions?

high_flyer
4th August 2006, 11:28
I needed to deal with a similar setup (multiple screens) and as far as I understand when working with multiple screens there is still no answer to hardware acceleration, and Xinerama is needed for sure.
But if I were you, I would try to figure out if OGL NEEDS hardware acceleration or just supports it, and try to figure out if your code uses hardware acceleration or not.
It could be you can get away with 3D OGL rendering with out the need to use hardware acceleration, but I don't know much about that subject.