Skip to content

Slicing crashes with Zink vkMapMemory error on NVIDIA (Wayland) #275

@Pitu

Description

@Pitu

Is there an existing issue for this problem?

  • I have searched the existing issues

Snapmaker_Orca Version

2.3.1

Operating System (OS)

Linux

OS Version

CachyOS (Arch-based)

Additional system information

  • Kernel: linux-cachyos with linux-cachyos-nvidia-open 7.0.0-1 modules
  • DE/WM: KDE Plasma 6 / KWin (Wayland session)
  • GPU: NVIDIA GeForce RTX 2070 SUPER
  • NVIDIA driver: nvidia-open 595.58.03
  • OpenGL renderer (default, no Snapmaker env): NVIDIA GeForce RTX 2070 SUPER/PCIe/SSE2 (native proprietary GLX — not Zink)
  • Mesa EGL vendor files present: /usr/share/glvnd/egl_vendor.d/10_nvidia.json, /usr/share/glvnd/egl_vendor.d/50_mesa.json

Printer

SnapMaker U1

How to reproduce

On NVIDIA proprietary drivers (version > 555) under KDE Plasma Wayland, Snapmaker Orca crashes during slicing with VK_ERROR_MEMORY_MAP_FAILED due to the forced-Zink workaround in AppRun. Disabling that workaround (via ZINK_DISABLE_OVERRIDE=1) avoids the crash but leaves the 3D viewport completely black with no hardware-accelerated rendering path functional. This appears to be the same class of bug that was recently fixed upstream in OrcaSlicer PR OrcaSlicer#12308 ("Fixed EGL/GLX mismatch causing a blank 3D preview when running on Linux with Wayland").

Current release installed as AppImage at /opt/snapmaker-orca-appimage/snapmaker-orca-appimage.AppImage (please let me know how to retrieve the exact version string if needed — it did not print in --debug 5 output).

Steps to Reproduce

  1. Launch snapmaker-orca on a KDE Plasma Wayland session with an NVIDIA GPU running driver version > 555.
  2. Load any moderately complex model.
  3. Trigger slicing.

Actual results

The app crashes with the following console output:

MESA: error: zink: couldn't allocate memory: heap=3 size=4194304
MESA: error: zink: couldn't allocate memory: heap=3 size=4194304
MESA: error: zink: couldn't allocate memory: heap=3 size=2097152
MESA: error: zink: couldn't allocate memory: heap=3 size=2097152
MESA: error: ZINK: vkMapMemory failed (VK_ERROR_MEMORY_MAP_FAILED)
zsh: segmentation fault (core dumped)  /usr/bin/snapmaker-orca --debug 5

This happens because AppRun detects NVIDIA driver > 555 on Wayland and sets MESA_LOADER_DRIVER_OVERRIDE=zink / GALLIUM_DRIVER=zink, forcing the app down a Zink code path that fails to map Vulkan memory on this configuration.

Expected results

Slicing completes without crashing, using hardware-accelerated rendering on the native NVIDIA OpenGL stack.

Project file & Debug log uploads

body.zip

orca-direct.log
orca-nozink.log

Checklist of files to include

  • Log file
  • Project file

Anything else?

I extracted the AppImage and tested every reasonable combination of environment variables. Results:

Configuration 3D viewport Slicing
Default (AppRun forces Zink on NVIDIA > 555) Works Crashes (vkMapMemory)
ZINK_DISABLE_OVERRIDE=1 (AppRun escape hatch) Black/blank Works
ZINK_DISABLE_OVERRIDE=1 + QT_QPA_PLATFORM=xcb (Xwayland) Black/blank Works
ZINK_DISABLE_OVERRIDE=1 + explicit __GLX_VENDOR_LIBRARY_NAME=nvidia + __EGL_VENDOR_LIBRARY_FILENAMES=/usr/share/glvnd/egl_vendor.d/10_nvidia.json Black/blank Works
ZINK_DISABLE_OVERRIDE=1 + GBM_BACKEND=nvidia-drm + NVIDIA GLX Black/blank Works
QT_QPA_PLATFORM=xcb + WAYLAND_DISPLAY= (pure X11 via Xwayland) Black/blank Works
/tmp/squashfs-root/bin/snapmaker-orca direct (bypass AppRun, no env vars) Black/blank Works
LIBGL_ALWAYS_SOFTWARE=1 Works Works (but unusably slow)
GBM_BACKEND=dri (no hw accel) Works Works (but unusably slow)

Key findings:

  1. The binary in bin/snapmaker-orca links to libGL.so.1, libEGL.so.1, libGLX.so.0, and libwayland-egl.so.1 — all system libraries, no bundled Mesa.
  2. glxgears runs smoothly under both native Wayland and Xwayland, so the NVIDIA GL stack is healthy.
  3. glxinfo reports the native NVIDIA proprietary renderer by default — the system is not using Zink unless the AppRun explicitly forces it.
  4. With Zink disabled by any method, the 3D viewport is blank regardless of which fallback GL path is forced, indicating the app's GL context initialization does not work on NVIDIA + Wayland without Zink.
  5. Only software rendering fallbacks produce a usable (but impractically slow) viewport.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions