CUDA & OpenGL interop creates tearing on display, VSYNC needed

on my Linux desktop the frame tearing was removed by activating VSYNC as such:

nvidia-settings -a SyncToVBlank=1
export __GL_SYNC_TO_VBLANK=1

Om my Jetson TK1 however, there is no “nvidia-settings” application, and I have been unable to activate VSYNC.

I tried modifying /etc/X11/xorg.conf and adding:

Option      "RegistryDwords" "SyncToVBlank=1"
Option      "RegistryDwords" "XVideoTextureSyncToVBlank=1"

But did not see any effect.

I Believe that both X and OpenGL need to have VSYNC activated. Would be greatful for any hints.

shameless bump

(promise I won’t do it again :-)

Since your question seems to be a configuration issue specific to the Jetson TK1, you will likely have a much higher chance of receiving a helpful answer in the “Jetson & Embedded Systems” forum adjacent to this one.

Tearing in graphics output can occur anytime VSYNC is not on, independent of whether DirectX, OpenGL, or CUDA are used in the application, since it is a visual artifact indicative of a particular race condition (updates to frame buffer vs display device reading out frame buffer). Therefore I would expect any graphical environment to have the option to turn VSYNC on, and I would further expect it to be on by default.

Indeed I’ve also posted this question there. I was hoping this more forum would reach a wider developer audience.

Agreed regarding VSYNC. However, to my surprise, VSYNC is not always on by default, and apparently many gamers care more about FPS than tear-free images (this is very strange to me).

It is true that gamers often turn VSYNC off. That has been true since at least the late 1990s when I first observed this. Best I know, there are multiple reasons for this, one of which is the desire for fastest possible reaction time. Also, if the output frame rate occasionally falls below the display refresh rate, noticeable jerkiness will occur when VSYNC is on, as the effective frame rate drops to half the display refresh rate.