Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enabling v-sync doesn't work on X11 but works on Wayland #1676

Open
DragonSWDev opened this issue May 1, 2024 · 3 comments
Open

Enabling v-sync doesn't work on X11 but works on Wayland #1676

DragonSWDev opened this issue May 1, 2024 · 3 comments

Comments

@DragonSWDev
Copy link

DragonSWDev commented May 1, 2024

Hello, so basically after creating window surface and context from display I'm enabling or disabling v-sync based on flag passed to the function. Code looks like this:

match vsync_enabled {
            false => gl_surface.set_swap_interval(&gl_context, glutin::surface::SwapInterval::DontWait).unwrap(),
            true => gl_surface.set_swap_interval(&gl_context, glutin::surface::SwapInterval::Wait(NonZeroU32::new(1).unwrap())).unwrap()
        }

it works as expected on Wayland but doesn't work on X11 where v-sync is always disabled. I'm on Fedora 40 with NVIDIA GPU. "Sync to VBlank" option is enabled in NVIDIA Settings. Other OpenGL applications (e.g. glxgears) are running with FPS blocked to refresh rate. Am I missing something?

@kchibisov kchibisov added the GLX label Jun 6, 2024
@kchibisov
Copy link
Member

Are you using EGL or GLX here?

@kchibisov kchibisov added needs repro and removed GLX labels Jun 6, 2024
@DragonSWDev
Copy link
Author

@kchibisov How can I check this?

@kchibisov
Copy link
Member

Print https://docs.rs/glutin/latest/glutin/display/trait.GlDisplay.html#tymethod.version_string .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants