Results 1 to 4 of 4

Thread: QGLWidget with multiple monitors

  1. #1
    Join Date
    Jan 2006
    Location
    Third rock from the sun
    Posts
    106
    Thanks
    17
    Thanked 6 Times in 6 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default QGLWidget with multiple monitors

    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?

    Qt Code:
    1. Section "ServerLayout"
    2. Identifier "single head configuration"
    3. Screen 0 "Screen0" 0 0
    4. Screen 1 "Screen1" Rightof "Screen0"
    5. Screen 2 "Screen2" Rightof "Screen1"
    6. Screen 3 "Screen3" Rightof "Screen2"
    7. InputDevice "Mouse0" "CorePointer"
    8. InputDevice "Keyboard0" "CoreKeyboard"
    9. EndSection
    10.  
    11. Section "ServerFlags"
    12. Option "Xinerama" "1"
    13. EndSection
    14.  
    15. : // Left out InputDevice sections
    16.  
    17. Section "Monitor"
    18. Identifier "Monitor0"
    19. VendorName "HP"
    20. ModelName "HP 1825 Flat Panel Monitor"
    21. DisplaySize 360 290
    22. HorizSync 30.0 - 82.0
    23. VertRefresh 56.0 - 76.0
    24. Option "dpms"
    25. EndSection
    26.  
    27. Section "Monitor"
    28. Identifier "Monitor1"
    29. VendorName "HP"
    30. ModelName "HP 1825 Flat Panel Monitor"
    31. DisplaySize 360 290
    32. HorizSync 30.0 - 82.0
    33. VertRefresh 56.0 - 76.0
    34. Option "dpms"
    35. EndSection
    36.  
    37. Section "Monitor"
    38. Identifier "Monitor2"
    39. VendorName "HP"
    40. ModelName "HP 1825 Flat Panel Monitor"
    41. DisplaySize 360 290
    42. HorizSync 30.0 - 82.0
    43. VertRefresh 56.0 - 76.0
    44. Option "dpms"
    45. EndSection
    46.  
    47. Section "Monitor"
    48. Identifier "Monitor3"
    49. VendorName "HP"
    50. ModelName "HP 1825 Flat Panel Monitor"
    51. DisplaySize 360 290
    52. HorizSync 30.0 - 82.0
    53. VertRefresh 56.0 - 76.0
    54. Option "dpms"
    55. EndSection
    56.  
    57. Section "Device:
    58. Identifier "Videocard0"
    59. Driver "nvidia"
    60. VendorName "Nvidia"
    61. BoardName "Nvidia Quadro 4 (generic)"
    62. Option "TwinView" "True"
    63. Option "TwinViewOrientation" "RightOf"
    64. Option "UseEdidFreqs" "True"
    65. Option "MetaModes" "1024x768, 1024x768"
    66. BusID "PCI:1:0:0"
    67. Screen 0
    68. EndSection
    69.  
    70. Section "Device:
    71. Identifier "Videocard1"
    72. Driver "nvidia"
    73. VendorName "Nvidia"
    74. BoardName "Nvidia Quadro 4 (generic)"
    75. Option "TwinView" "True"
    76. Option "TwinViewOrientation" "RightOf"
    77. Option "UseEdidFreqs" "True"
    78. Option "MetaModes" "1024x768, 1024x768"
    79. BusID "PCI:1:0:0"
    80. Screen 1
    81. EndSection
    82.  
    83. Section "Device:
    84. Identifier "Videocard2"
    85. Driver "nvidia"
    86. VendorName "Nvidia"
    87. BoardName "Nvidia Quadro 4 (generic)"
    88. Option "TwinView" "True"
    89. Option "TwinViewOrientation" "RightOf"
    90. Option "UseEdidFreqs" "True"
    91. Option "MetaModes" "1024x768, 1024x768"
    92. BusID "PCI:16:0:0"
    93. Screen 0
    94. EndSection
    95.  
    96. Section "Device:
    97. Identifier "Videocard3"
    98. Driver "nvidia"
    99. VendorName "Nvidia"
    100. BoardName "Nvidia Quadro 4 (generic)"
    101. Option "TwinView" "True"
    102. Option "TwinViewOrientation" "RightOf"
    103. Option "UseEdidFreqs" "True"
    104. Option "MetaModes" "1024x768, 1024x768"
    105. BusID "PCI:16:0:0"
    106. Screen 1
    107. EndSection
    108.  
    109. Section "Screen"
    110. Identifier "Screen0"
    111. Device "Videocard0"
    112. Monitor "Monitor0"
    113. DefaultDepth 24
    114. SubSection "Display"
    115. Viewport 0 0
    116. Depth 24
    117. Modes "1280x1024" "1280x960" "1152x864" "1024x768" "800x600" "640x480"
    118. EndSubSection
    119. EndSection
    120.  
    121. Section "Screen"
    122. Identifier "Screen1"
    123. Device "Videocard1"
    124. Monitor "Monitor1"
    125. DefaultDepth 24
    126. SubSection "Display"
    127. Viewport 0 0
    128. Depth 24
    129. Modes "1280x1024" "1280x960" "1152x864" "1024x768" "800x600" "640x480"
    130. EndSubSection
    131. EndSection
    132.  
    133. Section "Screen"
    134. Identifier "Screen2"
    135. Device "Videocard2"
    136. Monitor "Monitor2"
    137. DefaultDepth 24
    138. SubSection "Display"
    139. Viewport 0 0
    140. Depth 24
    141. Modes "1280x1024" "1280x960" "1152x864" "1024x768" "800x600" "640x480"
    142. EndSubSection
    143. EndSection
    144.  
    145. Section "Screen"
    146. Identifier "Screen3"
    147. Device "Videocard3"
    148. Monitor "Monitor3"
    149. DefaultDepth 24
    150. SubSection "Display"
    151. Viewport 0 0
    152. Depth 24
    153. Modes "1280x1024" "1280x960" "1152x864" "1024x768" "800x600" "640x480"
    154. EndSubSection
    155. EndSection
    To copy to clipboard, switch view to plain text mode 

    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!

  2. #2
    Join Date
    Jan 2006
    Location
    Munich, Germany
    Posts
    4,716
    Thanks
    21
    Thanked 418 Times in 411 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: QGLWidget with multiple monitors

    I don't know if OpenGL uses hardware acceleration.
    But if it does, that is the reason, since Xinerama does not support hardware acceleration.

  3. #3
    Join Date
    Jan 2006
    Location
    Third rock from the sun
    Posts
    106
    Thanks
    17
    Thanked 6 Times in 6 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QGLWidget with multiple monitors

    Quote Originally Posted by high_flyer
    ...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?

  4. #4
    Join Date
    Jan 2006
    Location
    Munich, Germany
    Posts
    4,716
    Thanks
    21
    Thanked 418 Times in 411 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: QGLWidget with multiple monitors

    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.

Similar Threads

  1. QGLWidget updateGL()
    By Lele in forum Qt Programming
    Replies: 7
    Last Post: 30th May 2006, 15:08
  2. how to corss compile for windows in Linux
    By safknw in forum Qt Programming
    Replies: 24
    Last Post: 13th May 2006, 05:23
  3. Multiple shortuts for the action
    By Lemming in forum Qt Programming
    Replies: 6
    Last Post: 6th April 2006, 22:29
  4. Replies: 25
    Last Post: 15th January 2006, 00:53

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.