aboutsummaryrefslogtreecommitdiff
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
parent0528bc6f3115f838a75071ce8c2728bed20e7405 (diff)
Limit nvidia-smi to opensuse because it causes huge memory leak on ubuntu/debian. Add example toggle-recording.sh scriptHEAD5.5.9master
-rw-r--r--README.md2
-rw-r--r--meson.build2
-rw-r--r--project.conf2
-rwxr-xr-xscripts/toggle-recording.sh6
-rw-r--r--src/egl.c4
5 files changed, 11 insertions, 5 deletions
diff --git a/README.md b/README.md
index 770fa91..f49210b 100644
--- a/README.md
+++ b/README.md
@@ -88,7 +88,7 @@ These are the dependencies needed to build GPU Screen Recorder:
* wayland (wayland-client, wayland-egl, wayland-scanner)
## Runtime dependencies
-* libglvnd (which provides libgl, libglx and libegl) is needed. Your system needs to support at least OpenGL ES 3.1.
+* libglvnd (which provides libgl, libglx and libegl) is needed. Your system needs to support at least OpenGL ES 3.1
There are also additional dependencies needed at runtime depending on your GPU vendor:
diff --git a/meson.build b/meson.build
index 83eba3c..7aa81de 100644
--- a/meson.build
+++ b/meson.build
@@ -1,4 +1,4 @@
-project('gpu-screen-recorder', ['c', 'cpp'], version : '5.5.8', default_options : ['warning_level=2'])
+project('gpu-screen-recorder', ['c', 'cpp'], version : '5.5.9', default_options : ['warning_level=2'])
add_project_arguments('-Wshadow', language : ['c', 'cpp'])
if get_option('buildtype') == 'debug'
diff --git a/project.conf b/project.conf
index 38551eb..9ae58d8 100644
--- a/project.conf
+++ b/project.conf
@@ -1,7 +1,7 @@
[package]
name = "gpu-screen-recorder"
type = "executable"
-version = "5.5.8"
+version = "5.5.9"
platforms = ["posix"]
[config]
diff --git a/scripts/toggle-recording.sh b/scripts/toggle-recording.sh
new file mode 100755
index 0000000..b353dc9
--- /dev/null
+++ b/scripts/toggle-recording.sh
@@ -0,0 +1,6 @@
+#!/bin/sh -e
+
+killall -SIGINT gpu-screen-recorder && sleep 0.5 && notify-send -t 1500 -u low 'GPU Screen Recorder' 'Stopped recording' && exit 0;
+video="$HOME/Videos/$(date +"Video_%Y-%m-%d_%H-%M-%S.mp4")"
+notify-send -t 1500 -u low 'GPU Screen Recorder' "Started recording video to $video"
+gpu-screen-recorder -w screen -f 60 -a "default_output" -o "$video"
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;