Tear Free (VSync)
Forcing tear free on all outputs for the screen using xrandr command.
This only works when supported by the driver. (Only AMD as far as I know)
Manually
Manually this can be done using the following command when the output name is known.
Check Display
Use this command to get the "TearFree" status of all outputs.
Set all Connected Outputs
Get all connected outputs using command line.
Command line to set all at once.
for out in $(xrandr --prop | grep '^[A-Z][A-Za-z]*-[0-9]\sconnected\s' | awk '{print $1}') ; do xrandr --output ${out} --set "TearFree" on ; done
Create a Shell Script
Create you own command and put the following bash script in file tear-free.sh in your own user bin directory.
Insert the next text to the file.
#!/bin/bash
if [[ -z "$1" ]] ; then
echo "Usage: $0 <mode>"
echo "Sets tear free mode on screen outputs."
echo "Where mode can be 'off', 'on' or 'auto'."
exit 1
fi
# Set each output of the current screen to the passed mode.
for out in $(xrandr --prop | grep '^[A-Z][A-Za-z]*-[0-9]\sconnected\s' | awk '{print $1}')
do
xrandr --output ${out} --set "TearFree" "${1}" 2> /dev/null
result=$?
#echo "xrandr --output ${out} --set \"TearFree\" \"${1}\" => ${result}"
if [[ $result != 0 ]] ; then
echo "Not supported on this device output '${out}' !"
fi
done