Nv3dsink video tearing

Using nv3dsink to display video that is panning horizontally I get a tearing issue on screen. How do I avoid this?

Please execute steps in the post and try again:

Executing the above results in a blank screen. I.e. linux desktop goes away. Just as a side note I did never experience video tearing using nvoverlaysink, but since it is deprecated I have been trying to use nv3dsink.

I am at the moment using only one display and assign all overlays to that one:

cd /sys/class/graphics/fb0
echo 4 > blank
echo 0x0 > device/win mask
echo 0x3f > device/win mask
echo 0 > blank

I guessed that the lower 6 bits indicated which overlay is active on screen0. What does the top two bits do in:

cd /sys/class/graphics/fb1
echo 4 > blank
echo 0x0 > device/win_mask
echo 0xc > device/win_mask
echo 0 > blank

Is there any documentation available for the win_mask?

On my system with only one display attached /sys/class/graphics/ contains only fb0 and fbcon, no fb1. That might be the reason for the blank screen (the cd to fb1 fails and then the overlay for the linux desktop gets disabled on fb0 instead of fb1).

Since the nv3dsink is using a x window I am thinking that it might not be synchronized (and double buffered) at all. Other graphics on the desktop are certainly not drawn in such a manner. Just dragging a window across the screen creates tearing of that window. Is this the cause of video tearing when using nv3dsink?

Is it possible to reproduce it on default TX2 board? If it’s also seen on devkit, please share steps so that we can try.

On the devboard:

jetson_clocks --fan
cd /sys/class/graphics/fb0
echo 4 > blank
echo 0x0 > device/win_mask
echo 0x3f > device/win_mask
echo 0 > blank
xrandr --output HDMI-0 --set TegraOverlayPriority 255
xrandr --output HDMI-0 --set TegraOverlayBlendmode Opaque
gst-launch-1.0 udpsrc port=15004 ! tsdemux ! queue ! h264parse ! omxh264dec ! nv3dsink window-x=0 window-y=0 window-width=1920 window-height=1080 sync=false

In /etc/X11/xorg.conf

Section “Device”
Identifier “Tegra0”
Driver “nvidia”
Option “AllowEmptyInitialConfiguration” “true”
Option “TegraReserveDisplayBandwidth” “false”

It seems the issue was related to the window manager. The development board had LXDE set up by following some other online guide.

However, when following:


To set up LXDE and compton, both the moving window tearing and video panning tearing went away.

1 Like

Good to know it is resolved and thanks for sharing the tips.