fix: Mini Apps crash on NVIDIA + Wayland (disable WebKitGTK DMABUF renderer)#396
Open
denfry wants to merge 1 commit into
Open
fix: Mini Apps crash on NVIDIA + Wayland (disable WebKitGTK DMABUF renderer)#396denfry wants to merge 1 commit into
denfry wants to merge 1 commit into
Conversation
…K DMABUF renderer WebKitGTK's DMA-BUF renderer crashes the web process immediately on the proprietary NVIDIA driver under Wayland, so Mini Apps open as frozen, empty windows that have to be force-killed. Set WEBKIT_DISABLE_DMABUF_RENDERER=1 at startup (overridable) so the inherited webview helper subprocess falls back to a working buffer-sharing path. WebKitGTK is used only for Mini Apps, so nothing else is affected. Closes AyuGram#393
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.
Closes #393
Problem
On Wayland (tiling compositors such as Hyprland) with the proprietary NVIDIA driver, launching any Mini App (Telegraph, Wallet, …) opens a frozen, empty window. Both the Mini App and the main window become unresponsive and have to be killed with
pkill -9. The log shows the webview's web process dying immediately, after whichBotWebViewposts events to it:The affected setup reports
OpenGL ES 3.2 NVIDIA 580.159.04.Root cause
Mini Apps render via WebKitGTK in a helper subprocess. WebKitGTK's default DMA-BUF / GBM renderer crashes the web process immediately on the proprietary NVIDIA driver under Wayland.
lib_webviewonly disables GL for the Raster backend, so with NVIDIA's OpenGL backend the crash-prone DMA-BUF path stays active. This is a well-known WebKitGTK/NVIDIA issue (see WebKit bug 262607).Fix
Set
WEBKIT_DISABLE_DMABUF_RENDERER=1at Linux startup inPlatform::start(), which makes WebKitGTK fall back to a working buffer-sharing path. The webview helper is spawned as a subprocess that inherits this environment, and WebKitGTK is used only for Mini Apps, so nothing else in the app is affected. The value is only set when the user hasn't already defined it, so it stays overridable.lib_webviewis an upstream-pinned submodule, so the fix is applied in AyuGram's own source rather than the submodule.Testing
This is an NVIDIA/Wayland-specific GPU-driver crash and could not be reproduced on the development machine. Verification would be confirming a Mini App now opens normally on affected hardware.
This PR was AI generated.