Skip to content

Linux: Crash on NVIDIA Wayland caused by conflict between "WEBKIT_DISABLE_DMABUF_RENDERER=1" and "__NV_DISABLE_EXPLICIT_SYNC=1" #6770

Description

@HomuraDevil

Please confirm the following.

  • I checked the existing issues for duplicate problems
  • I have tried resolving the issue using the support portal
  • I have ensured my Modrinth App installation is up to date

What version of the Modrinth App are you using?

0.15.12

What operating systems are you seeing the problem on?

Linux

Describe the bug

Hi! 👋

After spending a few hours debugging this issue, I think I found a reproducible workaround and a conflict between two NVIDIA-related workarounds that may help both users and developers.

Environment

  • OS: Arch Linux (EndeavourOS)
  • Desktop: KDE Plasma 6
  • Session: Wayland
  • GPU: NVIDIA GeForce RTX 3050 Laptop
  • Driver: nvidia-open 610.43.03
  • WebKitGTK: webkit2gtk-4.1 2.52.5
  • Modrinth App: latest Arch package

Problem

Modrinth App crashed immediately on launch with:

Segmentation fault (core dumped)

A GDB backtrace consistently showed the crash occurring inside:

libwebkit2gtk-4.1.so.0

What I tested

None of the following solved the problem:

  • Clearing Modrinth config/cache
  • Reinstalling the package
  • Official package
  • AUR package
  • Flatpak
  • X11 session
  • WEBKIT_DISABLE_DMABUF_RENDERER=1
  • WEBKIT_DISABLE_COMPOSITING_MODE=1
  • LIBGL_ALWAYS_SOFTWARE=1
  • GSK_RENDERER=cairo

Discovery

Launching the binary directly with:

__NV_DISABLE_EXPLICIT_SYNC=1 /usr/lib/modrinth-app

works perfectly.

However, launching through the default wrapper still crashes.

After investigating, I found the reason.

The launcher automatically exports:

WEBKIT_DISABLE_DMABUF_RENDERER=1

for NVIDIA users.

On my system these two workarounds conflict.

Configuration Result
WEBKIT_DISABLE_DMABUF_RENDERER=1 ❌ Crash
__NV_DISABLE_EXPLICIT_SYNC=1 ✅ Works
Both together ❌ Crash

Removing the automatic

export WEBKIT_DISABLE_DMABUF_RENDERER=1

from /usr/bin/modrinth-app and only using

__NV_DISABLE_EXPLICIT_SYNC=1

makes the application launch normally.

Additional information

While debugging I also encountered:

Gdk-Message: Error 71 (Protocol error) dispatching to Wayland display.

ERROR: WebKit encountered an internal error.
This is a WebKit bug.

/usr/src/debug/webkit2gtk-4.1/webkitgtk-2.52.5/Source/WebKit/WebProcess/Network/WebLoaderStrategy.cpp(640)

Suggestion

It may be worth revisiting the NVIDIA launcher workaround.

On this configuration, WEBKIT_DISABLE_DMABUF_RENDERER=1 appears to conflict with __NV_DISABLE_EXPLICIT_SYNC=1, while using only __NV_DISABLE_EXPLICIT_SYNC=1 allows the application to run normally.

Steps to reproduce

No response

Expected behavior

No response

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    appRelates to Modrinth App

    Type

    Fields

    No fields configured for Bug.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions