I think you have prime sync disabled. Prime sync takes care of synchronizing what the dGPU is rendering with what the iGPU is presenting. Even if the game has vsync enabled, if prime sync is disabled you will get tearing.
Check out this thread on how to enable it: https://forums.developer.nvidia.com/t/how-to-enable-prime-synchronization/55972.
With prime sync I get no tearing even if vsync is off, but if I turn vsync on in a vulkan game I get the freezes mentioned in the issue you linked. So for nvidia optimus laptops you don't really need vsync now other than limiting the framerate. You can limit the framerate with libstrangle without enabling vsync to circumvent the freezes.
Known issue, not our bug. DXVK enables vsync correctly from the Vulkan side, there's not much more we can do.
I think you have prime sync disabled. Prime sync takes care of synchronizing what the dGPU is rendering with what the iGPU is presenting. Even if the game has vsync enabled, if prime sync is disabled you will get tearing.
Check out this thread on how to enable it: https://forums.developer.nvidia.com/t/how-to-enable-prime-synchronization/55972.
With prime sync I get no tearing even if vsync is off, but if I turn vsync on in a vulkan game I get the freezes mentioned in the issue you linked. So for nvidia optimus laptops you don't really need vsync now other than limiting the framerate. You can limit the framerate with libstrangle without enabling vsync to circumvent the freezes.
Is prime sync mandatory when using prime render offloading?
prime render offload = intel for the desktop and normal task, offloading heavy task to the nvidia GPU (like under windows).
I'm not sure actually. I use full prime, so what I said may not apply 100% to prime offloading. But there must be some synchronization between the dGPU and iGPU. Do you get any tearing when using just the intel card?
No tearing at all when using the intel GPU.
Does libstrangle works with DXVK?
Known issue, not our bug. DXVK enables vsync correctly from the Vulkan side, there's not much more we can do.
Thank you for confirming this. Will try working with nvidia on this one.
@dv-longinus
No tearing at all when using the intel GPU.
There is tearing when offloading rendering from AMD dGPU to Intel iGPU (and probably other way round, but I couldn't test that). It's an xorg limitation, it can't trigger page flipping that way. This needs to be mitigated by leaving on TearFree or the window compositor.
Though it might be that using the compositor as mitigation might not even work for these cases on Nvidia due to their cr.. weird Xorg driver. I remember having tearing issues with it for Vulkan fullscreen windows in general, without any GPU load offloading involved at all.
@dv-longinus
No tearing at all when using the intel GPU.
There is tearing when offloading rendering from AMD dGPU to Intel iGPU (and probably other way round, but I couldn't test that). It's an xorg limitation, it can't trigger page flipping that way. This needs to be mitigated by leaving on TearFree or the window compositor.
Though it might be that using the compositor as mitigation might not even work for these cases on Nvidia due to their cr.. weird Xorg driver. I remember having tearing issues with it for Vulkan fullscreen windows in general, without any GPU load offloading involved at all.
Using prime-sync, the screen tearing was gone.
Under prime offloading, using the intel GPU for the xserver an the normal activities (internet, email, coding), I have no tearing.
Using the Nvidia GPU for gaming, I have screen tearing.
Libstrangle works to limit the fps.
However the vsync remains broken.
__GL_SYNC_TO_VBLANK=1`x1 2020-04
Hi,
I am setup two laptop to use the prime render offloading (one with GTX 980M under ubuntu Budgie and one with a GTX 1060 Max-Q under Solus OS Budgie).
Everything works fine, except the vsync when using games with DXVK (D9VK or DXVK).
When using dxvk vsync remains disabled.
I have tried using a conf file with these values :
dxgi.syncInterval = 1d3d9.presentInterval = 1or
__GL_SYNC_TO_VBLANK=1Could this be linked to this issue? https://forums.developer.nvidia.com/t/hangs-freezes-when-vulkan-v-sync-vk-present-mode-fifo-khr-is-enabled/67751#5359836
There is a thread opened with nvidia here (I replied today) : https://forums.developer.nvidia.com/t/hangs-freezes-when-vulkan-v-sync-vk-present-mode-fifo-khr-is-enabled/67751#5359836
The offload mode works properly the performance is on part if not better than the default prime-sync. it basically works the way the laptop is supposed to work (better performance, less power consumption and the laptop runs cooler than before).
Is there any other option I could use to force vsync under DXVK games?
Could we keep this threat open in case as a reference for other with the same issue?
Could we try to troubleshoot it to see where it is coming from and if this comes from nvidia, I can send all the info and logs to them?