aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2024-07-26 17:45:05 +0200
committerdec05eba <dec05eba@protonmail.com>2024-07-26 17:48:11 +0200
commit5e2a233d235414ec0e8c12f62e59ba9e51b144e7 (patch)
tree5e312c89b5c155fe049a30075a015df969a15827
parent6be0324528d240d135fde47aed41a26979f4f0a6 (diff)
Disable prime-run for now until the option to select a gpu device is added
-rw-r--r--TODO2
-rw-r--r--src/main.cpp9
2 files changed, 8 insertions, 3 deletions
diff --git a/TODO b/TODO
index 00989c0..0c87db9 100644
--- a/TODO
+++ b/TODO
@@ -129,7 +129,7 @@ Support vfr matching games exact fps all the time. On x11 use damage tracking, o
Another method to track damage that works regardless of the display server would be to do a diff between frames with a shader.
Support selecting which gpu to use. This can be done in egl with eglQueryDevicesEXT and then eglGetPlatformDisplayEXT. This will automatically work on AMD and Intel as vaapi uses the same device. On nvidia we need to use eglQueryDeviceAttribEXT with EGL_CUDA_DEVICE_NV.
- Maybe on glx (nvidia x11 nvfbc) we need to use __NV_PRIME_RENDER_OFFLOAD_PROVIDER and __GLX_VENDOR_LIBRARY_NAME instead.
+ Maybe on glx (nvidia x11 nvfbc) we need to use __NV_PRIME_RENDER_OFFLOAD, __NV_PRIME_RENDER_OFFLOAD_PROVIDER, __GLX_VENDOR_LIBRARY_NAME, __VK_LAYER_NV_optimus, VK_ICD_FILENAMES instead. Just look at prime-run /usr/bin/prime-run.
Remove is_damaged and clear_damage and return a value from capture function instead that states if the image has been updated or not.
diff --git a/src/main.cpp b/src/main.cpp
index 8c80164..f2022f9 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -1755,7 +1755,7 @@ static void info_command() {
if(monitor_capture_use_drm(&egl, wayland)) {
// TODO: Allow specifying another card, and in other places
if(!gsr_get_valid_card_path(&egl, egl.card_path, true)) {
- fprintf(stderr, "Error: no /dev/dri/cardX device found. If you are running GPU Screen Recorder with prime-run then try running without it. Also make sure that you have at least one connected monitor or record a single window instead on X11\n");
+ fprintf(stderr, "Error: no /dev/dri/cardX device found. Make sure that you have at least one monitor connected or record a single window instead on X11\n");
_exit(23);
}
}
@@ -2014,6 +2014,11 @@ int main(int argc, char **argv) {
unsetenv("__GL_SYNC_TO_VBLANK");
// Same as above, but for amd/intel
unsetenv("vblank_mode");
+ // Disable prime-run and similar options as it doesn't work, the monitor to capture has to be run on the same device
+ unsetenv("__NV_PRIME_RENDER_OFFLOAD");
+ unsetenv("__NV_PRIME_RENDER_OFFLOAD_PROVIDER");
+ unsetenv("__GLX_VENDOR_LIBRARY_NAME");
+ unsetenv("__VK_LAYER_NV_optimus");
if(argc <= 1)
usage_full();
@@ -2400,7 +2405,7 @@ int main(int argc, char **argv) {
if(monitor_capture_use_drm(&egl, wayland)) {
// TODO: Allow specifying another card, and in other places
if(!gsr_get_valid_card_path(&egl, egl.card_path, is_monitor_capture)) {
- fprintf(stderr, "Error: no /dev/dri/cardX device found. If you are running GPU Screen Recorder with prime-run then try running without it. Also make sure that you have at least one connected monitor or record a single window instead on X11\n");
+ fprintf(stderr, "Error: no /dev/dri/cardX device found. Make sure that you have at least one monitor connected or record a single window instead on X11\n");
_exit(2);
}
}