From a3f6864572f5fffd5e4debffe3e6beea146440b3 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Thu, 30 May 2024 01:28:59 +0200 Subject: Fix recording freeze on nvidia when __GL_SYNC_TO_VBLANK is set to 1 --- src/main.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src') diff --git a/src/main.cpp b/src/main.cpp index 16b2a06..e8e35b9 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -3535,6 +3535,10 @@ int main(int argc, char **argv) { // nvidia doesn't support vaapi and nvidia-vaapi-driver doesn't support encoding yet. // Let vaapi find the match vaapi driver instead of forcing a specific one. unsetenv("LIBVA_DRIVER_NAME"); + // Some people set this to force all applications to vsync on nvidia, but this makes eglSwapBuffers never return. + unsetenv("__GL_SYNC_TO_VBLANK"); + // Same as above, but for amd/intel + unsetenv("vblank_mode"); dpy = XOpenDisplay(NULL); wayland = !dpy || is_xwayland(dpy); -- cgit v1.2.3