I recently did an update to my NixOS and after that all XWayland programs showed low FPS and tearing. It seems that this regression was introduced by 6.12.91, I did not have any problems with 6.12.90.
I tested with the open NVIDIA drivers, versions 595.71.05 and 580.142 and the version of the NVIDIA driver did not seem to have any effect.
Here are the results of all my tests:
kernel | nvidia | works?
6.18.33 | 595.71.05 | NO: tearing/stuttering
6.12.90 | 580.142 | YES
6.18.33 | 580.142 | NO: tearing/stuttering
6.12.91 | 595.71.05 | NO: tearing/stuttering
6.12.91 | 580.142 | NO: tearing/stuttering
I ran vkcube via XWayland to test for issues (env -u WAYLAND_DISPLAY vkcube). For all the versions that didn’t work, I saw horizontal tears and the framerate did not go above 29, while with the good version I got no tearing and 60 FPS. I did not notice any issues when running vkcube on Wayland natively.
1 Like
I don’t think I’d be able to actually help you, but perhaps an important piece of the puzzle is which chip this is.
I figured it out, I had for some reason set WLR_RENDERER=vulkan, which made XWayland fall back to the CPU for rendering. Not sure why this only surfaced with newer kernel versions.
1 Like
Actually I take that back, XWayland performance is still really bad on 6.18.33 kernel and 595.71.05 driver even after removing the envvar
After some digging around I found what was causing this issue.
It turns out that nvidia-x11-595.71.05 no longer installs the necessary EGL json files, so I had to point the __EGL_EXTERNAL_PLATFORM_CONFIG_DIRS environment variable to some JSON files that I had laying around from an older nvidia derivation before launching sway. With that workaround I managed to get XWayland programs running with normal performance and no tearing.
I assume this is a bug in nixpkgs and these JSON files should be installed automatically.
1 Like