fix(flatpak): NVIDIA Wayland Zink override in entrypoint (#713) - #7
Closed
aceRage wants to merge 1 commit into
Closed
fix(flatpak): NVIDIA Wayland Zink override in entrypoint (#713)#7aceRage wants to merge 1 commit into
aceRage wants to merge 1 commit into
Conversation
Co-authored-by: aceRage <aceRage@users.noreply.github.com>
Owner
Author
|
Superseded by #8: its Flatpak entrypoint carries this rule (NVIDIA Wayland, driver newer than 555) behind ZINK_AUTO_NVIDIA=1, with the same ZINK_FORCE_OVERRIDE / ZINK_DISABLE_OVERRIDE switches, and native GL through GLAD as the default. |
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.
Description
Easy upstream port of Snapmaker/OrcaSlicer#713 (OPEN): fix blank Flatpak Prepare/Preview canvases on NVIDIA Wayland by mirroring the AppImage Zink policy in the Flatpak entrypoint.
The AppImage launcher in
src/dev-utils/platform/unix/build_linux_image.sh.inalready routes OpenGL through Mesa Zink for NVIDIA drivers newer than 555 under Wayland. That workaround was never applied to Flatpak.glxinfo/nvidia-smiare not available in the Flatpak runtime, so the entrypoint now derives the driver major from the mountedorg.freedesktop.Platform.GL.nvidia-*extension in/.flatpak-info.Zink env flags (same controls as the AppImage launcher):
ZINK_DISABLE_OVERRIDE=1— skip the Mesa/Zink override even on affected NVIDIA Wayland sessions.ZINK_FORCE_OVERRIDE=1— force Mesa GLX/EGL + Zink on Wayland even when the parsed driver major is missing or ≤555.Activation (NVIDIA Flatpak + Wayland only): if not disabled, and (
ZINK_FORCE_OVERRIDE=1or driver major >555), set__GLX_VENDOR_LIBRARY_NAME=mesa,__EGL_VENDOR_LIBRARY_FILENAMESto the Mesa EGL vendor JSON,MESA_LOADER_DRIVER_OVERRIDE=zink, andGALLIUM_DRIVER=zink. The existing WebKit DMA-BUF disable (WEBKIT_DISABLE_DMABUF_RENDERER=1) is kept for all NVIDIA Flatpak sessions.Non-NVIDIA and X11 sessions are unchanged. This PR does not touch GLEW/GLAD. Snapmaker/OrcaSlicer#351 is a later Hard port that migrates GLEW → GLAD; once that lands, native NVIDIA GL works and this Zink workaround should become opt-in (
ZINK_FORCE_OVERRIDE=1only).+23/−2 in
scripts/flatpak/entrypointonly. Ultra binary path remains/app/bin/snapmaker-orca.Screenshots/Recordings/Graphs
N/A — Flatpak launcher env policy only; no UI code changes.
Tests
-s sh) onscripts/flatpak/entrypoint: clean.610/555/470), Wayland vs X11, threshold>555,ZINK_DISABLE_OVERRIDE=1wins over force,ZINK_FORCE_OVERRIDE=1on old/empty major, WebKit DMA-BUF retain, Ultraexecpath preserved.ZINK_DISABLE_OVERRIDE=1/ZINK_FORCE_OVERRIDE=1behave as documented. Upstream Fix blank Flatpak canvas on NVIDIA Wayland Snapmaker/OrcaSlicer#713 was reported working on CachyOS KDE Wayland + RTX 3090 / 4070S, driver 610.57.04.