From 26edc918c00f245ca555aafe6e639ffc90da7297 Mon Sep 17 00:00:00 2001 From: Antoine Viallon Date: Wed, 24 Jan 2024 13:42:08 +0100 Subject: [PATCH] [Hardware/Nvidia] fix apps not finding nvidia EGL because of bizarre default behavior of Nvidia driver Use undocumented environment variable to fix that. --- hardware/nvidia/proprietary.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/hardware/nvidia/proprietary.nix b/hardware/nvidia/proprietary.nix index 7578a19..e5263ce 100644 --- a/hardware/nvidia/proprietary.nix +++ b/hardware/nvidia/proprietary.nix @@ -131,6 +131,10 @@ in { __GL_THREADED_OPTIMIZATIONS = "0"; # "__GL_THREADED_OPTIMIZATIONS" = toValue generalCfg.unsafeOptimizations; "KWIN_DRM_USE_EGL_STREAMS" = toValue cfg.proprietary.EGLStream; # Make KWin use EGL Streams if needed, because otherwise performance will be horrible. + + + # Undocumented, fix for EGL not being found by Nvidia driver: https://github.com/NVIDIA/egl-wayland/issues/39#issuecomment-927288015 + __EGL_EXTERNAL_PLATFORM_CONFIG_DIRS = "/run/opengl-driver/share/egl/egl_external_platform.d"; }; }; }