[Interest] Display issue with Qt application over SSH/X11

charlie hemlock charliehemlock at gmail.com
Tue Jul 17 01:47:55 CEST 2018


Hello,

I was recommended to post an issue here, rather than the qt forum.

*Original post*: https://forum.qt.io/topic/92664/display-issue-with-qt-
application-windows-over-ssh-x11
*Pretty much copied below verbatim:*

I'm attempting to use PyQt apps on a remote Linux server by SSH and X11
forwarding.

The application window is all black and unusable. Only the window's title
bar exists to close it.
I believe it has to do with Qt and OpenGL over ssh/X11.

Using Windows 10, PuTTY, VcXsrv, and the PyQt apps are on a Linux OpenSUSE
42.3 host (nVidia drivers).
The apps work fine locally. More details follow:
I can display glxgears over ssh/x11 - not optimal, but at least displays.


*1. Display issues with Spyder 3.2.8 & 3.3.0 with Qt/PyQt (5.9.4/5.9.2)*

   - Full issue description: https://github.com/spyder-ide/
   spyder/issues/7447
   - Issue was closed since it is likely a Qt/PyQt problem.
   - Note: Spyder displays correctly over ssh/x11 when older versions of
   Qt/PyQt(5.6.2/5.6.0) are used

The PuTTY terminal displays following:

% spyder
QQuickWidget: Failed to make context current
QQuickWidget::resizeEvent() no OpenGL context
QQuickWidget: Failed to make context current
QQuickWidget: Failed to make context current
QQuickWidget::resizeEvent() no OpenGL context
QQuickWidget: Failed to make context current
QQuickWidget: Attempted to render scene with no context
QQuickWidget: Attempted to render scene with no context
composeAndFlush: makeCurrent() failed


*2. Display issues with PyQt5 opengl examples from*:
https://github.com/baoboa/pyqt5

   - Specifically 2dpainting.py from: https://github.com/baoboa/
   pyqt5/tree/master/examples/opengl
   <https://github.com/baoboa/pyqt5/tree/master/examples/opengl>
   - *However* these examples even fail with qt/pyqt(5.6.2/5.6.0) over
   ssh/x11, not just (5.9.4/5.9.2)
   - The non-opengl examples seem to work ok. (not black filled)

QOpenGLWidget: Failed to make context current
QPainter::begin: Paint device returned engine == 0, type: 1
QPainter::setRenderHint: Painter must be active to set rendering hints
QPainter::translate: Painter not active
QPainter::save: Painter not active
QPainter::setBrush: Painter not active
QPainter::setPen: Painter not active
...
QPainter::restore: Unbalanced save/restore
QPainter::setPen: Painter not active
QPainter::setFont: Painter not active
QPainter::end: Painter not active, aborted
composeAndFlush: makeCurrent() failed
composeAndFlush: makeCurrent() failed
QPainter::begin: Paint device returned engine == 0, type: 1
QPainter::setRenderHint: Painter must be active to set rendering hints


*Any recommendations to try for #1 & #2?*

   - I tried pyqt 5.11.2 but with same results.
   - Qt/ OpenGL Environment variables/settings?
   - Could this be any way related to how Qt is compiled?  I'm using
   versions from https://repo.anaconda.com/pkgs/main/linux-64/ or
   https://conda-forge.org/feedstocks/ <https://conda-forge.org/feedstocks/>.



*3. qt5/pyqt5 performance degradation over ssh/x11*
This maybe a separate topic all together, but I will likely notice
performance degradation over ssh/x11
if it occurs. Based on previous posts I suspect it will.

Any idea if these changes will be in later versions of qt/pyqt? (To help
with ssh/X11 performance)

   - https://codereview.qt-project.org/#/c/181609/
   - https://codereview.qt-project.org/#/c/151141/
   See Bug/Posts:
   - https://bugreports.qt.io/browse/QTBUG-56851
   - https://forum.qt.io/topic/56672/need-help-with-
   performance-of-qt-application-when-x11-forwarding
   <https://forum.qt.io/topic/56672/need-help-with-performance-of-qt-application-when-x11-forwarding>
   - https://stackoverflow.com/questions/28782162/serious-
   performance-problems-with-qt5-and-x11
   <https://stackoverflow.com/questions/28782162/serious-performance-problems-with-qt5-and-x11>

4. Can anyone comments on these apps rather than the standard ssh w/x11
forwarding?

    ( ssh/x11 method has worked fine for years for several Qt applications
-- looks like a qt regression to me )

   - https://xpra.org/
   - https://wiki.x2go.org/doku.php
   - https://virtualgl.org/

Thank you!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20180716/834afcbd/attachment.html>


More information about the Interest mailing list