diff options
author | dec05eba <dec05eba@protonmail.com> | 2025-01-08 17:17:33 +0100 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2025-01-08 17:17:33 +0100 |
commit | 43d353b7b4a544fc06a52fdcf1eb79a2b501cf9e (patch) | |
tree | 6d9bcc64febb5fbb3069874e5c3e97f7c11d0d51 | |
parent | 621f253f000863688d32f4f9a5a57db4690735c7 (diff) |
Unset DRI_PRIME as well when gpu offloading cant be used
-rw-r--r-- | src/main.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
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) { |