NVIDIA BUG, KDE Wayland Games are Force Vsynced

@ekurzinger Hey with new release fix most of the issues for me with Wayland, though I play on 60hz screen so for me input lag is very noticeable on wayland sadly. As wayland tearing protocol is merged and release, Would be great to see Nvidia supporting it, as that’s helps alot playing competitive gaming even on low end hardware. Any eta?

@ekurzinger sorry for the ping, I just wanted to make a quick update.
After updating to plasma 6 alpha - I can 100% get uncapped framerate in absolutely all games(L4D2, Quake 2,etc) with 0 issues, however it is good to note that VRR(Freesync/G-Sync) activates only when 1 monitor is active, if both of the monitors are active then it doesn’t get activated at all.

1 Like

I am not sure it’s truly fixed.

As the monitor always stays with GSync ON in KDE6, even if you disable VRR in the UI and through environment variables.

There might be other underlying issues possibly related to sync to vblank, on the gpu driver side.

There are more discussions of the problem in the urls below that needs fixing.


This should have ULMB2 turned on, but for whatever reason, be sync to vblank / vsync or some other issue being enforced, gsync are kept on.

Where, in X11, ULMB2 are turned on, in place of Gsync.


Here is another issue on Wayland, possibly related GPU utilization always near 70% on Wayland when gaming - #2 by random-user00 X11 has the right GPU usage, while Wayland are most of the time lower, at least in DX11 games. In my experience, DX12 (VKD3D) has better usage, but still not as responsive or fully use.

I think in some form this bug seems to have returned, I noticed it cap fps to refresh rate in some linux native games - for example CS2 and also some proton games(not all) like doom the dark ages for example.

There is a thread on github’s proton about this: Nvidia+Wayland+Proton+Vulkan , Some games locked to refresh rate · Issue #7896 · ValveSoftware/Proton · GitHub

EDIT: Just a quick observation it seems to be linked to the game/app being native vulkan and affects both xwayland and native wayland.
For cs2 to get wayland you need to set launch options: LD_PRELOAD=libSDL2-2.0.so SDL_VIDEODRIVER=wayland %command%

1 Like

On x11 you had to edit xorg.conf with { AllowGSYNC=Off, AllowVRR=Off } to truly disable G-Sync inside the monitor and get it to “Normal” operation mode. (My Viewsonic XG2703-GS needed it and if it wasn’t disabled, there were slight visible stutters when outside the G-Sync operation range)

Here is an example line:

Option         "metamodes" "DP-4: 2560x1440_144 +0+0 { AllowGSYNC=Off, AllowVRR=Off }, HDMI-0: 2560x1440_240 +2560+0 { AllowGSYNC=Off, AllowVRR=Off }"

As for wayland, I do not think there is a way yet to actually get this done. Luckily on modern monitors you can disable VRR (or G-Sync) inside the monitor itself, which is the case for my current main monitor.

Just to add, when editing the cs2.sh and changing export SDL_VIDEO_DRIVER=x11 to export SDL_VIDEO_DRIVER=wayland it will cap the fps to your refresh rate.

I am honestly not sure if LD_PRELOAD=libSDL2-2.0.so SDL_VIDEO_DRIVER=wayland %command% as launch option is the same as changing the config to wayland, but since the behavior is different, I do not think so.

If you set the game to fullscreen instead of windowed fullscreen, it will go to twice the refresh rate.
Funnily, if you open the console in-game, it uncaps the fps.

On X11, it works fine, it’s on wayland that it doesnt work.

I somehow fixed this problem of Wayland native games (cs2. or via proton/wine) running into a frame rate cap of my refresh rate.

Last Friday I decided to test another compositor and installed Hyprland. I came from KDE, which I had used since I switched to Linux.

After doing a minimal setup, I immediately hopped into cs2 and osu (via wine_wayland) and noticed, no fps-cap. Of course I blamed KDE now. I even tested it again before installing Hyprland, so it’s not a random update that fixed this behavior.

Now, I got fed up with Hyprland already (too much setup for my taste) and switched back to KDE for now, but still wanted to try some stuff and, to my surprise, the fps-cap is gone before I could do anything. I can play Wayland native games with unlocked fps now.

Just….why?

This makes absolutely no sense to me, but I’m still reporting this in the hopes that someone else can spin their head around it.

According to testing Screen tearing only works for wayland + vulkan application.

QT_LOGGING_RULES="kwin_*.debug=true"
 

To test the tearing you’ll need to add this environment variable

and then in console write this
journalctl -f | grep "Presentation"

And it should show Async that means tearing enabled on the app. (you’ll have to run the game)

Tearing doesn’t work on xwayland app.