Update I tracked this down to a driver issue that is fixed in the 560 beta. But hijacked the issue with another one, as explained in the follow up messages, the Wayland frame callbacks are now restricting the frame rate to 1/2 or 1/3rd of what it should be. And that does not appear to be an Nvidia issue either.
vkQueuePresentKHR always seem to wait for the GPU when running on Wayland. This does not happen on XWayland, X11 or Windows. This is a serious performance problem with both GPU and CPU load, since it can halve the framerate.
I originally thought this was a problem with wgpu, so I reported the problem here You're invited to talk on Matrix. But after further investigation, it looks like it’s a generic problem on Wayland, and only Wayland.
To verify this, I modified the vkcube sample here GitHub - fredizzimo/Vulkan-Tools at present-blocking, by faking delays on both the GPU and CPU. And took captures with nsight-system.
On Wayland it looks like this (run vkcube-wayland), observe that vkQueuePresentKHR, waits for the GPU and that the CPU time therefore is around 13 ms, missing the VSYNC interval of 10 ms, and therefore dropping frames
On XWayland and other platforms, both the CPU and GPU are run in parallel, and the framerate is a stable 100 FPS
It seems like a serious problem, and I haven’t been able to find another report like this, either on this forum or elsewhere on internet, after a lot of searching.
It also does not seem to be an explicit sync issue, I’m currently running nvidia-dkms-555.58.02-1, but I have also tried with nvidia-dkms-550.90.07-4. It also does not seem to be kernel related, I’m currently running 6.10.2.arch1-1, but I have also tried with 6.6.42-1-lts. I have also tried both KDE Plasma 6.1.3, and Gnome, so it does not seem to be compositor related either.
My GPU is GTX 970, and I will be able to try with a 3070 in a couple of days. But I don’t have any other GPUs available to test with, so I can’t for sure tell if it’s a Nvidia specific problem or not.
OpenGL applications also don’t have this GPU/CPU lockstep issue.
The present mode does not change the behaviour.