fix(desktop): Linux 默认禁用 WebKitGTK DMABUF 渲染器,修复启动黑屏 - #1288
Open
linanwanttodo wants to merge 1 commit into
Open
linanwanttodo wants to merge 1 commit into
linanwanttodo wants to merge 1 commit into
Conversation
WebKitGTK 2.46+ 在部分 AMD/Intel GPU 上启用 DMABUF 渲染器后, 渲染进程 (WebKitWebProcess) 首帧异常:窗口弹出但内容持续黑屏, 或随机挂死不再重绘。参见 tauri-apps/tauri#13498。 在 main() 中、任何 GTK/WebKit 初始化之前设置 WEBKIT_DISABLE_DMABUF_RENDERER=1,强制回退共享内存渲染路径。 仅在用户未显式设置该变量时生效,不影响排查调优。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
问题
Linux 环境下启动桌面客户端,主窗口弹出但内容持续黑屏(后端引擎 ohmyagent 正常启动,仅渲染层异常)。
实测复现环境:Ubuntu 26.04 + AMD 核显(Ryzen Hawk Point iGPU),官方 AppImage。
根因
WebKitGTK 2.46+ 默认启用 DMABUF 渲染器,在部分 AMD/Intel GPU 与较新 Mesa 组合下渲染进程 (WebKitWebProcess) 首帧异常:窗口黑屏或随机挂死不再重绘。已知问题:tauri-apps/tauri#13498。
修复
在
main()中、任何 GTK/WebKit 初始化之前设置WEBKIT_DISABLE_DMABUF_RENDERER=1,强制回退共享内存渲染路径:var_os检查),保留排查调优出口验证
同环境实测:不设置该变量时窗口黑屏,设置后窗口正常渲染。临时验证可通过启动前
WEBKIT_DISABLE_DMABUF_RENDERER=1环境变量确认。本 PR 未改动 X11/Wayland 后端选择,仅处理 WebKit 渲染路径。