Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use zink to add better support for Wayland on Nvidia #8372

Closed
1 task done
klylabs opened this issue Feb 10, 2025 · 4 comments
Closed
1 task done

Use zink to add better support for Wayland on Nvidia #8372

klylabs opened this issue Feb 10, 2025 · 4 comments
Labels
enhancement New feature or request

Comments

@klylabs
Copy link
Contributor

klylabs commented Feb 10, 2025

Is there an existing issue for this feature request?

  • I have searched the existing issues

Is your feature request related to a problem?

When running orca slicer under Wayland with an NVIDIA GPU,the home tab and preview pane usually fails to load, the most commonly suggested workaround involves setting environment variables like:

_EGL_VENDOR_LIBRARY_FILENAMES=/usr/share/glvnd/egl_vendor.d/50_mesa.json 
WEBKIT_DISABLE_DMABUF_RENDERER=1

this workaround forces software-based rendering rather than a proper hardware-accelerated solution.

I'm somewhat sure that the issue lies somewhere within nvidia's OpenGL implementation as this issue has also been known to occur with other CAD apps like FreeCAD, with users being required to set QT_QPA_PLATFORM=xcb which basically forces Qt apps to run via X11/XWayland

Which printers will be beneficial to this feature?

All

Describe the solution you'd like

Use Zink to run OpenGL on top of Vulkan bypassing the problematic NVIDIA OpenGL stack while retaining hardware acceleration.

to achieve this, you just need to set:
__GLX_VENDOR_LIBRARY_NAME=mesa __EGL_VENDOR_LIBRARY_FILENAMES=/usr/share/glvnd/egl_vendor.d/50_mesa.json MESA_LOADER_DRIVER_OVERRIDE=zink GALLIUM_DRIVER=zink
in addition to WEBKIT_DISABLE_DMABUF_RENDERER=1

I'm still utterly unfamiliar with the whole structure of orca slicer, but ideally i'd like this to be set programmatically inside the application, i temporarily edited the build script on my own local fork to add these to AppRun when it detects from nvidia-smi that the drivers is > 555 but i'm not sure if this is really an acceptable solution long term

Describe alternatives you've considered

  1. [Continuing software rendering]
  2. [Switch to X11 when using orca slicer]

Additional context

  1. Zink documentation link under Mesa
  2. Zink requires mesa 23.2.1 at the minimum, which means an ubuntu user would need to be on jammy-updates or later
  3. All my tests were done on arch
@klylabs klylabs added the enhancement New feature or request label Feb 10, 2025
@klylabs
Copy link
Contributor Author

klylabs commented Feb 10, 2025

Without Zink:

Without.Zink.webm

With Zink:

With.Zink.webm

@klylabs klylabs changed the title Use zink to implement better support for Wayland on Nvidia Use zink to add better support for Wayland on Nvidia Feb 10, 2025
@predy3dprint
Copy link

Thank you very much. That is the game changer. Works on Arch Linux perfectly.

@yobson1
Copy link

yobson1 commented Feb 11, 2025

works wonderfully on arch with KDE/KWin thanks

@klylabs
Copy link
Contributor Author

klylabs commented Feb 26, 2025

#8373 has been merged

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants