Vulkan triple buffering doesn't work on Linux

Appreciate your response and forwarded the above message to engineering team.
Allow us some time now to debug and fix it ASAP.

This is still not fixed with 450.51 beta driver, despite of the release notes mentioning "Fixed a bug that could cause some Swap Group configurations to present at half of the display refresh rate. ".

Start Hitman 2 in Proton. Start any mission/save game and enable vsync in the game’s options. If the GPU is fast enough to match the display’s refresh rate, the game runs fine at 60Hz/fps. Then go into the game options and increase resolution scale beyond 100% until you drop below 60fps. It then instantly jumps to 30fps rendering. Turning vsync off, you end up with stable e.g. ~55fps.

This is NOT the case on Windows when using the same DXVK version in Hitman 2 as on Linux. On Windows, vsync runs with the correct frame rate under high GPU load. This is clearly an issue of Nvidia’s Xorg driver support. You can even enforce the number of backbuffers in DXVK via “dxgi.numBackBuffers = 3” and still the Nvidia Linux driver DOES NOT comply with what the application asks it to do.

Is this supposed to remain broken forever?

Allow us some time now to debug and fix it ASAP.

I can confirm that 450.51 beta driver doesn’t fix the triple buffer issue.


Another problem is that when there is v-synced software running, all other windows stutters when moving/resizing. This also happens without X11 compositor, too (but with a compositor it stutters even more). Another issue which is broken since the first Vulkan driver?

450.56.02 - fixed :)

Can confirm that. Finally!
Have you checked OGL as well?

For triple buffering in OpenGL you need to specify: Option "TripleBuffer" "1" in Xorg config file.

I’ve checked it, in the entire 450.xx series, OpenGL triple buffering doesn’t work. The last driver where it works is 440.100, so in the lastest stable driver 450.57 triple buffering doesn’t work on both: Vulkan and OpenGL.

So they fixed Vulkan in beta driver, but OpenGL is now broken :/


Moreover:

  • capturing full screen application (game) in flipping mode via XComposite (OBS Studio) makes the game run in blit mode, so screen tearing is visible regardless of V-Sync. In this case I have to play via compositor…
  • V-Sync’ed Vulkan (and also OpenGL, but Vulkan is worse) window running in background causes stuttering when moving windows (especially with independent OpenGL X11 compositor) - this doesn’t happen with Intel/AMD drivers.
  • i noticed “Force Composition Pipeline” is recomended by some websites, but this option should never be used - it causes GPU load on idle and minimal mouse cursor lag - it’s better to use good X11 compositor.

Thanks for testing. That’s a bummer, as this option introduces input lag of hell even for window compositors. :(

I think this might be an xorg limitation, as afair this is also the case with other vendors.

Yeah, this is extremely annoying. Sometimes even the Dolphin file browser triggers this in Firefox, when I close Dolphin Firefox starts compositing at full refresh rate again. As if the severe performance drops when new windows appear weren’t already bad enough. :(

I totally agree on this point, I’ve never understood how people could use this option. It’s like a very bad version of TearFree.

Yep, but my qdre-compositor (qdre-git in AUR) can reduce the lag to 0 when this option is enabled :) Could you check on 440.100 drivers and disabled KWin compositor for curiosity?


For games I sometimes use libstrangle to limit FPS to 60 (my screen max refresh rate), then lag is negligible with triple buffered V-Sync and the image is still smooth - no stuttering. For some reasons frame limiters reduces the triple buffer lag :)


Another annoying NVIDIA bugs:

  • run Vulkan application and switch to terminal (Ctrl+Alt+F2) and go back - the app is freezed - need to kill the process,
  • run Vulkan application and put your computer to sleep and wake up - the app is freezed - need to kill the process,
  • run CUDA/OpenCL application and put your computer to sleep and wake up - CUDA/OpenCL no longer works - need to restart the computer (or maybe manually reload the driver modules),

Workaround for Vulkan freeze for QMPlay2: https://github.com/zaps166/QmVk/blob/b7d2af8ab67e9ff3d32e63a28c855c4c896123ed/Queue.cpp#L57

qdre-compositor repository: https://gitlab.com/zaps166/qdre

Sounds interesting, though I’m good to go with my OGL usage limited to just non-gaming. If it works for you, I’ve no doubt that it would apply to others as well. :)

Issue has been fixed and will be available in future release.

450.66 - Vulkan is fixed, but what about OpenGL? Why OpenGL triple buffering is broken since 450.xx?

Fix one API, break second, nice…

Hello, the TripleBuffer option in xorg.conf has been broken since driver 450.xx. I am running driver 470 right now and it still won’t work: it does not force triple buffering in OpenGL games.

Can we expect this to be fixed? It has been broken for close to a year

We are working on it and filed a bug 200768156 internally for tracking purpose.

@fazius2009

ASUSTeK COMPUTER INC P9X79 + Intel(R) Core™ i7-3820 CPU @ 3.60GHz + Ubuntu 20.04.1 LTS + 5.11.0-27-generic + Driver 470.57.02 + NVIDIA GeForce GTX 980

I ran unigine heaven benchmark and played Dota2 game on above configuration setup after adding triple buffer option but did not observed any significant changes in FPS value.
On my test system, FPS score with triple buffer option is little higher than without triple buffer option.
Please confirm game and exact repro steps where you are observing issue.

@fazius2009

ASUSTeK COMPUTER INC P9X79 + Intel(R) Core™ i7-3820 CPU @ 3.60GHz + Ubuntu 20.04.1 LTS + 5.11.0-27-generic + Driver 470.57.02 + NVIDIA GeForce GTX 980

I ran unigine heaven benchmark and played Dota2 game on above configuration setup after adding triple buffer option but did not observed any significant changes in FPS value.
On my test system, FPS score with triple buffer option is little higher than without triple buffer option.
Please confirm game and exact repro steps where you are observing issue.

@fazius2009 @zaps166
Please help to update on my previous comments.