Skip to content

Fix black viewport on Linux .deb install and Wayland systems#153

Merged
fernandotonon merged 1 commit intomasterfrom
fix/linux-viewport-black-screen
Feb 25, 2026
Merged

Fix black viewport on Linux .deb install and Wayland systems#153
fernandotonon merged 1 commit intomasterfrom
fix/linux-viewport-black-screen

Conversation

@fernandotonon
Copy link
Owner

Summary

  • Fix .deb PluginFolder path: The CI build hardcoded /usr/local/lib/OGRE in plugins.cfg, but the .deb installs plugins to /usr/lib/qtmesheditor/. Ogre couldn't load any render system, resulting in a black viewport.
  • Force XCB platform on Linux: Ogre's externalWindowHandle requires X11 window IDs. Under Wayland, winId() returns an incompatible surface handle. Added QT_QPA_PLATFORM=xcb both in main.cpp and the .deb launcher script.
  • Bump version to 2.7.4

Root cause

The render timer in MainWindow calls renderOneFrame() and catches exceptions — when the render system fails to load (wrong plugin path) or materials fail (if GL3Plus is used without shaders), the exception handler silently stops the timer. The viewport stays black with no visible error.

Test plan

  • Verified locally on Ubuntu with NVIDIA RTX 3060 (driver 580.x) — viewport renders the grid correctly
  • CI builds .deb with corrected plugins.cfg path
  • Install .deb on Ubuntu and confirm viewport renders

Made with Cursor

The .deb package had an incorrect PluginFolder path in plugins.cfg
(pointing to /usr/local/lib/OGRE from the CI build instead of
/usr/lib/qtmesheditor where the .deb installs plugins), preventing
Ogre from loading any render system.

Additionally, on Wayland desktops Ogre's externalWindowHandle requires
X11 window IDs which are unavailable under the Wayland compositor,
so we now force the XCB platform plugin on Linux.

- Fix PluginFolder path in .deb packaging via sed in deploy.yml
- Add QT_QPA_PLATFORM=xcb to .deb launcher script
- Force XCB platform in main.cpp on Linux before QApplication init
- Bump version to 2.7.4

Co-authored-by: Cursor <cursoragent@cursor.com>
@sonarqubecloud
Copy link

@fernandotonon fernandotonon merged commit ee948e2 into master Feb 25, 2026
14 checks passed
@fernandotonon fernandotonon deleted the fix/linux-viewport-black-screen branch February 25, 2026 14:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant