aboutsummaryrefslogtreecommitdiff
path: root/src/egl.c
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2025-06-12 14:41:42 +0200
committerdec05eba <dec05eba@protonmail.com>2025-06-12 14:42:04 +0200
commit630c5042410996d3ec05ddf2906f1f5d2d424626 (patch)
tree2467dd70a7a93a17723cae33554830e4093d33ad /src/egl.c
parent0528bc6f3115f838a75071ce8c2728bed20e7405 (diff)
Limit nvidia-smi to opensuse because it causes huge memory leak on ubuntu/debian. Add example toggle-recording.sh scriptHEAD5.5.9master
Diffstat (limited to 'src/egl.c')
-rw-r--r--src/egl.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/egl.c b/src/egl.c
index ca65f02..25a3444 100644
--- a/src/egl.c
+++ b/src/egl.c
@@ -459,9 +459,9 @@ bool gsr_egl_load(gsr_egl *self, gsr_window *window, bool is_monitor_capture, bo
/* This fixes nvenc codecs unable to load on openSUSE tumbleweed because of a cuda error. Don't ask me why */
const bool inside_flatpak = getenv("FLATPAK_ID") != NULL;
if(inside_flatpak)
- system("flatpak-spawn --host -- nvidia-smi -f /dev/null");
+ system("flatpak-spawn --host -- sh -c 'grep -q openSUSE /etc/os-release && nvidia-smi -f /dev/null'");
else
- system("nvidia-smi -f /dev/null");
+ system("sh -c 'grep -q openSUSE /etc/os-release && nvidia-smi -f /dev/null'");
}
return true;