<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Display issue with Qt application windows over SSH&#x2F;X11]]></title><description><![CDATA[<p dir="auto">I'm attempting to use PyQt apps on a remote Linux server by SSH and X11 forwarding.</p>
<p dir="auto">The application window is all black and unusable. Only the window's title bar exists to close it.<br />
I believe it has to do with Qt and OpenGL over ssh/X11.</p>
<p dir="auto">Using Windows 10, PuTTY, VcXsrv, and the PyQt apps are on a Linux OpenSUSE 42.3 host (nVidia drivers).<br />
The apps work fine locally. More details follow:<br />
I can display glxgears over ssh/x11 - not optimal, but at least displays.</p>
<p dir="auto"><strong>1.  Display issues with Spyder 3.2.8 &amp; 3.3.0 with Qt/PyQt (5.9.4/5.9.2)</strong></p>
<ul>
<li>Full issue description: <a href="https://github.com/spyder-ide/spyder/issues/7447" target="_blank" rel="noopener noreferrer nofollow ugc">https://github.com/spyder-ide/spyder/issues/7447</a></li>
<li>Issue was closed since it is likely a Qt/PyQt problem.</li>
<li>Spyder displays correctly over ssh/x11 when older versions of Qt/PyQt(5.6.2/5.6.0) are used</li>
</ul>
<p dir="auto">The PuTTY terminal displays following:</p>
<pre><code>% 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
</code></pre>
<p dir="auto"><strong>2.  Display issues with PyQt5 opengl examples from</strong>:  <a href="https://github.com/baoboa/pyqt5" target="_blank" rel="noopener noreferrer nofollow ugc">https://github.com/baoboa/pyqt5</a></p>
<ul>
<li>Specifically <code>2dpainting.py </code> from: <a href="https://github.com/baoboa/pyqt5/tree/master/examples/opengl" target="_blank" rel="noopener noreferrer nofollow ugc">https://github.com/baoboa/pyqt5/tree/master/examples/opengl</a></li>
<li>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)</li>
<li>The non-opengl examples seem to work ok. (not black filled)</li>
</ul>
<pre><code>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
</code></pre>
<p dir="auto"><strong>Any recommendations to try for #1 &amp; #2?</strong></p>
<ul>
<li>I tried pyqt 5.11.2 but with same results.</li>
<li>environment variable settings?</li>
</ul>
<p dir="auto"><strong>3. qt5/pyqt5 performance degradation over ssh/x11</strong><br />
This maybe a separate topic all together,  but I will likely notice performance degradation over ssh/x11<br />
if it occurs. Based on previous posts I suspect it will.</p>
<p dir="auto">Any idea if these changes will be in later versions of qt/pyqt? (To help with ssh/X11 performance)</p>
<ul>
<li><a href="https://codereview.qt-project.org/#/c/181609/" target="_blank" rel="noopener noreferrer nofollow ugc">https://codereview.qt-project.org/#/c/181609/</a></li>
<li><a href="https://codereview.qt-project.org/#/c/151141/" target="_blank" rel="noopener noreferrer nofollow ugc">https://codereview.qt-project.org/#/c/151141/</a><br />
See Bug/Posts:</li>
<li><a href="https://bugreports.qt.io/browse/QTBUG-56851" target="_blank" rel="noopener noreferrer nofollow ugc">https://bugreports.qt.io/browse/QTBUG-56851</a></li>
<li><a href="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</a></li>
<li><a href="https://stackoverflow.com/questions/28782162/serious-performance-problems-with-qt5-and-x11" target="_blank" rel="noopener noreferrer nofollow ugc">https://stackoverflow.com/questions/28782162/serious-performance-problems-with-qt5-and-x11</a></li>
</ul>
<p dir="auto">Can anyone comments on these apps rather than the standard ssh w/x11 forwarding? (despite this ssh/x11 working fine for years for several Qt applications)</p>
<ul>
<li><a href="https://xpra.org/" target="_blank" rel="noopener noreferrer nofollow ugc">https://xpra.org/</a></li>
<li><a href="https://wiki.x2go.org/doku.php" target="_blank" rel="noopener noreferrer nofollow ugc">https://wiki.x2go.org/doku.php</a></li>
<li><a href="https://virtualgl.org/" target="_blank" rel="noopener noreferrer nofollow ugc">https://virtualgl.org/</a></li>
</ul>
<p dir="auto">Thank you!</p>
]]></description><link>https://forum.qt.io/topic/92664/display-issue-with-qt-application-windows-over-ssh-x11</link><generator>RSS for Node</generator><lastBuildDate>Sat, 06 Jun 2026 20:33:27 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/92664.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 15 Jul 2018 21:34:27 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Display issue with Qt application windows over SSH&#x2F;X11 on Tue, 27 Jul 2021 15:00:35 GMT]]></title><description><![CDATA[<p dir="auto">This is the first place where Google gets me, when I was trying to find a solution for the issue I had, which was:</p>
<blockquote>
<p dir="auto">Qt: QOpenGLWidget: Failed to make context current<br />
composeAndFlush: makeCurrent() failed</p>
</blockquote>
<p dir="auto">when I used a Qt application over WSL2 with X11 forwarding to my Windows host with VcXsrv.</p>
<p dir="auto">I understand this topic/question is old, but It would save me Googling time if someone described here a similar problem as I had.<br />
What I did <strong>wrong</strong> in my case was setting <code>LIBGL_ALWAYS_INDIRECT</code> env variable (it was set to <code>1</code>).<br />
As suggested in <a href="https://superuser.com/a/1502715/577566" target="_blank" rel="noopener noreferrer nofollow ugc">this</a> Stackoverflow post - unset it, and <em>unset the "Native opengl"</em> checkbox in VcXsrv XLaunch UI, and that fixes the runtime:</p>
<pre><code>export LIBGL_ALWAYS_INDIRECT=
</code></pre>
<hr />
<p dir="auto">I'm on latest Windows 11 Preview with VcXsrv 1.20.9 + Ubuntu 20.04 over WSL2 with Qt 5.15.2.<br />
My Qt Application also sets:</p>
<pre><code class="language-cpp">QGuiApplication::setAttribute(Qt::AA_UseDesktopOpenGL);
QGuiApplication::setAttribute(Qt::AA_ShareOpenGLContexts);
</code></pre>
]]></description><link>https://forum.qt.io/post/672930</link><guid isPermaLink="true">https://forum.qt.io/post/672930</guid><dc:creator><![CDATA[Youw]]></dc:creator><pubDate>Tue, 27 Jul 2021 15:00:35 GMT</pubDate></item><item><title><![CDATA[Reply to Display issue with Qt application windows over SSH&#x2F;X11 on Mon, 16 Jul 2018 23:59:21 GMT]]></title><description><![CDATA[<p dir="auto">Thanks for recommendation.<br />
Done.<br />
<a href="http://lists.qt-project.org/pipermail/interest/2018-July/030460.html" target="_blank" rel="noopener noreferrer nofollow ugc">http://lists.qt-project.org/pipermail/interest/2018-July/030460.html</a></p>
]]></description><link>https://forum.qt.io/post/469879</link><guid isPermaLink="true">https://forum.qt.io/post/469879</guid><dc:creator><![CDATA[hemlock66]]></dc:creator><pubDate>Mon, 16 Jul 2018 23:59:21 GMT</pubDate></item><item><title><![CDATA[Reply to Display issue with Qt application windows over SSH&#x2F;X11 on Mon, 16 Jul 2018 19:49:04 GMT]]></title><description><![CDATA[<p dir="auto">Hi and welcome to devnet,</p>
<p dir="auto">That's a topic you should rather bring to the <a href="http://lists.qt-project.org/mailman/listinfo/interest" target="_blank" rel="noopener noreferrer nofollow ugc">interest mailing list</a>. You'll find there Qt's developers/maintainers. This forum is more user oriented.</p>
]]></description><link>https://forum.qt.io/post/469844</link><guid isPermaLink="true">https://forum.qt.io/post/469844</guid><dc:creator><![CDATA[SGaist]]></dc:creator><pubDate>Mon, 16 Jul 2018 19:49:04 GMT</pubDate></item></channel></rss>