SUMMARY When using Kwin from 6.0.1, Wayland session, with Nvidia closed-source driver (tried both nvidia-open and nvidia) and high refresh rate monitors (no VRR, tried both 120hz and 165hz), the game 逆転裁判456 (Apollo Justice: Ace Attorney Trilogy) would shutter heavily. On the other hand, if switching back to X11 session, the problem is just gone without any other setting change. STEPS TO REPRODUCE 1. Install KDE 6.0.1 2. Use steam to lauch Apollo Justice: Ace Attorney Trilogy OBSERVED RESULT The game shutters heavily (looks like bad vsync, older frames can sometime show up) in Wayland session EXPECTED RESULT The game doesn't shutter at all in both Wayland and X11 sessions. SOFTWARE/OS VERSIONS Linux/KDE Plasma: Archlinux KDE 6 KDE Plasma Version: 6.0.1 KDE Frameworks Version: 6.0.0 Qt Version: 6.6.2 ADDITIONAL INFORMATION It looks like using gamescope can solve the shuttering, but gamescope has its own bugs. It looks like monitor refresh rate is not involved, 60Hz can still reproduce the bug.
Just to be extra safe, the game only supports borderless and windowed mode. It should be unrelated to the Vsync change for full screen game. Furthermore it should be a KWin wayland compositing Vsync bug, as nested gamescope compositor solves the shuttering completely in Wayland mode.
Retried on kwin 6.0.2, still the same result. On X11 everything is fine, On Wayland the game shutters heavily. So rollback to X11. Just to mention, my memory may not be that accurate, but in Kwin 5.x wayland, it also seems to have some shuttering, but not as series. Do no have the KDE 5 environment to retry X11/Wayland comparison though. If there is certain graphic workload to reproduce, I'm pretty happy to try.
This is https://gitlab.freedesktop.org/xorg/xserver/-/issues/1317
I'm not sure if it's the same bug of Xwayland. As if I go with gamescope for the game, the shuttering is just gone.
The issue is a race condition, it can be triggered or "fixed" by lots of factors, including using a different or nested compositor. Until it's fixed, all glitches with the proprietary NVidia driver can be assumed to be that problem
OK, that sounds reasonable. I guess the best way I can go is never buy any laptops with NVidia dGPU any more. Just curious, would going NVK be a way to solve it?
Yes, Nouveau (and the new replacement for it) doesn't have this problem. It'll soon be fixed in the proprietary driver as well.
Just a final question. My laptop has two USB-C with DisplayPort alt mode, one is wired to AMD iGPU, the other wired to Nvidia dGPU. And all my previous report is using that Nvidia dGPU to render and output everything. However today I switched to go back using that USB-C port wired to AMD iGPU, and the output and KWin are all handled by AMD iGPU (nvidia-smi shows nothing when idle at desktop). Then if I run the game again, the game shows up in nvidia-smi, so I believe it's rendered by NVidia dGPU but output still handled by iGPU (hybrid). In that case I also see no shuttering at all. Does the regressed NVidia closed-source bug can also explain this observation?