Skip to content

Commit 1aa42e0

Browse files
authored
Merge pull request #215 from KraHsu/dev/readme-cn-wayland
docs(readme): mirror Wayland viewer troubleshooting into README_CN
2 parents 6d6a5ec + 3d0728c commit 1aa42e0

1 file changed

Lines changed: 28 additions & 0 deletions

File tree

‎docs/README_CN.md‎

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,34 @@ QD_GRAPH=0 genelab train … # 或只针对单条命令
160160

161161
</details>
162162

163+
<details>
164+
<summary><b>Wayland 下 viewer 无法渲染(<code>--vis</code>):<code>makeCurrent() failed</code> / <code>eglError: 3000</code></b></summary>
165+
166+
<br>
167+
168+
在 **Wayland** 会话下,Genesis viewer 的 Qt `QOpenGLWidget` 可能无法在合成器上激活其 EGL
169+
上下文,于是 `--vis` 打开的窗口不渲染,并在终端刷屏:
170+
171+
```
172+
QWaylandGLContext::makeCurrent: eglError: 3000
173+
QOpenGLWidget: Failed to make context current
174+
qt.qpa.backingstore: composeAndFlush: makeCurrent() failed
175+
```
176+
177+
(`eglError: 3000` 实际是 `EGL_SUCCESS` —— EGL 没报具体错误码,只是上下文激活失败;这是 Qt
178+
OpenGL 在 Wayland 上的经典上下文共享问题。)强制 Qt 走 **XWayland**(X11 后端),其 GLX/EGL 行为更稳定:
179+
180+
```bash
181+
export QT_QPA_PLATFORM=xcb # 整个会话
182+
QT_QPA_PLATFORM=xcb genelab play <task> --vis # 或只针对单条命令
183+
```
184+
185+
若仍失败,再关掉 Qt 自动缩放(`QT_AUTO_SCREEN_SCALE_FACTOR=0`),或在混合显卡笔记本上锁定独显
186+
(`__NV_PRIME_RENDER_OFFLOAD=1 __GLX_VENDOR_LIBRARY_NAME=nvidia`)。同时出现的 `QFont::fromString`
187+
和 `dubious mass` 行无害,可忽略。
188+
189+
</details>
190+
163191
---
164192

165193
<div align="center">

0 commit comments

Comments
 (0)