What is Video Tearing ?
Screen tearing is a visual artifact in video display where a display device shows information from multiple frames in a single screen draw.
The artifact occurs when the video feed to the device is not in sync
with the display's refresh rate. This can be due to non-matching refresh rates—in which case the tear line moves as the phase difference
changes (with speed proportional to difference of frame rates). It can
also occur simply from lack of sync between two equal frame rates, in
which case the tear line is at a fixed location that corresponds to the
phase difference. During video motion, screen tearing creates a torn
look as edges of objects (such as a wall or a tree) fail to line up.
Tearing can occur with most common display technologies and video
cards, and is most noticeable in horizontally-moving visuals, such as in
slow camera pans in a movie, or classic side-scrolling video games.
Screen tearing is less noticeable when more than two frames finish
rendering during the same refresh interval, since this means the screen
has several narrower tears instead of a single wider one.
!!!First install mesa utilitis
if u dont have it!!
Type/Copy this into your terminal (ctrl-alt-t)
sudo apt-get install driconf
-------------------------------------------------------
Now to solve the video tearing
Type/Copy this into your terminal (ctrl-alt-t)
sudo mkdir /etc/X11/xorg.conf.d/
echo -e 'Section "Device"
Identifier "Intel Graphics"
Driver "intel"
Option "TearFree" "true"
Option "DRI" "3"
Option "AccelMethod" "glamor"
EndSection' | sudo tee /etc/X11/xorg.conf.d/20-intel.conf
sudo reboot
-------------------------------------------------------
*"sudo reboot" will
restart the pc!!!!
To revert back to the default
acceleration method , just delete the file you created.
Type this into your terminalsudo rm /etc/X11/xorg.conf.d/20-intel.conf
sudo reboot
*"sudo reboot" will
restart the pc!!!!
Option "DRI"
"3" this will enable DRIconf
What is DRIConf ?
DRIconf is a
configuration applet for the Direct Rendering Infrastructure. It
allows customizing performance and visual quality settings of OpenGL
drivers on a per-driver, per-screen and/or per-application level.
The settings are
stored in system wide and per-user XML configuration files, which are
parsed by the OpenGL drivers on startup. For more details see
ConfigurationInfrastructure.
DRIConf is
written in Python with the python-gtk toolkit bindings.
Option
"AccelMethod" "glamor" this will enable Glamore
What is Glamore ?
The glamor module
is an open-source 2D graphics common driver for the X Window System
as implemented by X.org. It supports a variety of graphics chipsets
which have OpenGL/EGL/GBM supports.
It’s a GL-based
rendering acceleration library for X server:
It uses GL
functions and shader to complete the 2D graphics operations.
It uses normal
texture to represent a drawable pixmap if possible.
It calls GL
functions to render to the texture directly. It’s somehow hardware
independent. And could be a building block of any X server’s DDX
driver:
Xorg’s DDX
driver could leverage glamor-egl package to create an egl context
without any native X system. The xf86-video-modesetting driver uses
glamor by default but other drivers have support for it
(xf86-video-ati and xf86-video-intel). This package can support every
platform which has OpenGL and gbm and drm libraries.
Why Glamor?
Basically, the
biggest two advantages of Glamor is:
Graphic device
has powerful 3D capability. To use 3D function to accelerate 2D
rendering is possible and many drivers already do so. OpenGL provides
a more convenient and standard interface to leverage GFX device’s
3D power. It would be better to call OpenGL directly rather than
manually write 3D pipeline control code for each different GFX
device.
We have heard of
complains about why we need to develop two version drivers for a
single graphic device for a long time. One is for mesa’s DRI driver
and the other is for 2D DDX driver. One of glamor’s purpose is to
eliminate the latter one.