From 43d353b7b4a544fc06a52fdcf1eb79a2b501cf9e Mon Sep 17 00:00:00 2001 From: dec05eba Date: Wed, 8 Jan 2025 17:17:33 +0100 Subject: Unset DRI_PRIME as well when gpu offloading cant be used --- src/main.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main.cpp b/src/main.cpp index 994ddef..6b07a76 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1894,7 +1894,7 @@ static bool is_xwayland(Display *display) { static bool is_using_prime_run() { const char *prime_render_offload = getenv("__NV_PRIME_RENDER_OFFLOAD"); - return prime_render_offload && strcmp(prime_render_offload, "1") == 0; + return (prime_render_offload && strcmp(prime_render_offload, "1") == 0) || getenv("DRI_PRIME"); } static void disable_prime_run() { @@ -1902,6 +1902,7 @@ static void disable_prime_run() { unsetenv("__NV_PRIME_RENDER_OFFLOAD_PROVIDER"); unsetenv("__GLX_VENDOR_LIBRARY_NAME"); unsetenv("__VK_LAYER_NV_optimus"); + unsetenv("DRI_PRIME"); } static gsr_window* gsr_window_create(Display *display, bool wayland) { -- cgit v1.2.3