<?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[X11 Nvidia black window]]></title><description><![CDATA[<p dir="auto">We get a black window when running smallest possible Qt application using OpenGL on Linux with an Nvidia graphics card (proprietary 580.159.03).</p>
<p dir="auto">To rule out environment and driver problems, we have written three corresponding applications using xlib only, xcb only, and a xlib xcb mix. All three of them work on the same Nvidia graphics card in the same environment.<br />
The attached xlib.cpp, xcb.cpp, xcb_xlib.cpp and qt.cpp can be built following the instructions in build_and_run.sh (replace the QT path in the script to where your Qt installation is first).<br />
Replacing EGL_PLATFORM_XCB_KHR with EGL_PLATFORM_X11_KHR in xcb_xlib.cpp, and using xlib display, causes eglCreatePlatformWindowSurfaceEXT to return a nullptr for EGLSurface in xcb_xlib.cpp, exactly what we see in Qt.<br />
Is there something we're missing in qt.cpp to make this work or is this a bug in Qt that can be fixed?<br />
We started looking into the Qt source code, the call to eglCreatePlatformWindowSurfaceEXT(EGL_PLATFORM_X11_KHR, xlib display, [...]) returns 0. If we modify Qt to call eglCreatePlatformWindowSurfaceEXT(EGL_PLATFORM_XCB_KHR, xcb connection, [...]), we instead get a valid surface that can be queried with eglQuerySurface that report the correct size. The window is still black but having a surface is a good start for anyone looking into this.</p>
<p dir="auto"><a href="https://drive.google.com/file/d/1VeEOeEb74BybcQg9nnEJORb_EnWZ78GA/view?usp=drive_link" target="_blank" rel="noopener noreferrer nofollow ugc">Attached source files</a></p>
]]></description><link>https://forum.qt.io/topic/165114/x11-nvidia-black-window</link><generator>RSS for Node</generator><lastBuildDate>Fri, 25 Sep 2026 18:12:22 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/165114.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 24 Sep 2026 11:16:07 GMT</pubDate><ttl>60</ttl></channel></rss>