-
Notifications
You must be signed in to change notification settings - Fork 55
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
Update glutin to 0.30.2 to solve Wayland vsync error #187
Comments
We had a similar issue with SRGB issues that shows the same error (#95), this seems to be a different error though. I tried to migrate to glutin 0.30 for v0.8.0 but the API on their end changed a bit, so I thought that it was better to await until after the release. I will try to take a look at this soon, probably it will be included with v0.9, or if the change doesn't break or change anything on our end, we can think about releasing it as 0.8.1. I will keep you updated. Thanks! |
Hey @riverfr0zen! I created a new branch with the migration to Glutin 0.30.2 at #192. It wasn't a trivial change, so I am worried about breaking something with it, it seems to work fine on MacOS, I'll try it on Windows and X11, can you test it a little on Wayland if you have time? Thanks! |
@Nazariglez Tried the branch out on Wayland and my apps crash every time now, regardless of whether vsync is set to true. Crashes with the following error:
On X11 there is no crash, but I noticed that my app seems to be frame-limiting somehow, even though I did not enable vsync and didn't use the FPS limit plugin. Almost as though vsync was on by default. Definite difference from the 0.8.0 branch. |
Agh, I'll recheck it, thanks for taking the time to test it. |
Sure thing, let me know if you want me to test again. |
It seems that glutin applies vsync by default. It's fixed for x11 now, we're disabling and enabling the vsync all the time, without making assumptions about if it's enable or not by default. About Wayland, I guess this fix should allow you to run the app without crashing with vsync disabled, but is not going to fix it for when it's enabled. I was doing some search online and it seems that the error is related to Nvidia GPUs, and in other cases egl driver issues. So, this leads me to the next questions:
Thank you so much for your help! |
Yes, I am using an Nvidia card (proprietary drivers 525). Definitely finding them quite them troublesome on Wayland. I cloned |
I also tested with the |
Did you tried with latest commit? I am running out of ideas, I tried to reproduce this in several ways already, no luck, I must to say that wayland and nvidia is a mess still. I got finally working fedora with wayland on a nvidia card but using "mesa" because it's impossible to me to install proprietary drivers, and it seems to work. If you can try again and it works with sync off, I think that we can merge and see if somebody on the glutin repo know what's going on. This issue with drivers, opengl and wayland is awful, I hope to be able to start working on the wgpu backend soon and leave this issues behind. |
Just tried with the latest
but still getting the same error, regardless of vsync setting:
I think you should just go ahead merge it and wait for the Nvidia/Wayland situation to get better. I myself, after I think a pretty valiant effort to get my various apps/tools working, am going back to X11 for now too :) |
I asked the Glutin's people for some help, fingers crossed. Thanks for the help @riverfr0zen ! |
Vsync whether vsync will be applied or not it's up to display. Be explicit whether you want it or not. On X11 vsync is default that comes from the driver, not from the glutin. See https://docs.rs/glutin/0.30.3/glutin/surface/enum.SwapInterval.html . @riverfr0zen could you provide the log from @Nazariglez have you tried using the exact same config glutin example is using? |
Hi @kchibisov -- I think this is what you were asking for -- let me know otherwise. |
It's clearly an nvidia bug, it tries to use dmabuf format that wasn't advertised to it by the system. Like you really can't do much here I'd say, but I suggest to use different config. What nvidia should do is advertise EGL configs it can actually use, not just all. |
You could be lucky if you use the glutin default config from example, since it happens to pick something working... |
Hey @kchibisov! Sorry for the delay. This is a hard issue to work around because there is no easy way to detect when a machine is running under wayland with nvidia drivers, so, following your advice of using the same config as glutin example does, I added a new feature "opt-in" to be used if you care about this platform. @riverfr0zen Can you test whenever you have time? (no rush). The PR is on #198 and the feature is Thank you so much for your help here @kchibisov. |
I recently switched to Wayland from X11 on my Linux dev box (running Nvidia 520 proprietary drivers) and found that apps that try to enable vsync (e.g.
WindowConfig::default().vsync(true);
crash with the following error:Error: "Couldn't find any pixel format that matches the criteria."
The apps worked fine when I was on X11.
I think I've traced the problem to this issue: rust-windowing/glutin#1444
Looks like it's been fixed there, so can we upgrade glutin for notan to 0.30.2 to fix this problem? Let me know if you need any more info.
The text was updated successfully, but these errors were encountered: