[Solved ] Screen tearing on external monitor (HDMI) (doesn't occurs in some circumstances)

I’ve connected a second monitor: my laptop has a DisplayPort output, so I’m using a DisplayPort > HDMI adapter to hook the monitor.
In the Xfce’s preferences, I’m using it as “Extend to the right”.

The external monitor is a Samsung C24F396 Curved, 24’’ max resolution Full HD, 1920 x 1080, 60Hz (user manual here: https://downloadcenter.samsung.com/content/UM/201906/20190618104444943/BN46-00552H-Eng.pdf)
This monitor is also provided with the FreeSync technology:

  • Standard Engine: Enable the basic FreeSync functions of the AMD graphics card.
  • Ultimate Engine: Enable the FreeSync feature with a higher screen frame rate. Screen tearing (abnormal sync between the screen and content) is reduced in this mode. Note that screen flickering may occur during game play.

But since I don’t have an AMD graphics card, this option is useless for me.

My inxi -G:

Graphics: Device-1: Intel 3rd Gen Core processor
Graphics driver: i915 v: kernel
Display: x11 server: X.Org 1.20.9
driver: intel
unloaded: modesetting
resolution: 1: 1366x768~60Hz 2: 1280x720~60Hz
OpenGL: renderer: Mesa DRI
Intel HD Graphics 4000 (IVB GT2) v: 4.2 Mesa 20.2.1

As you can see, the laptop’s monitor is set to 1366x768 at 60Hz (maximum available resolution) and the external monitor to 1280x720 at 60Hz; I’ve set it to this lower resolution because between the HDMI cable and the monitor there is a recording device (AverMedia ezrecorder 310, which support a maximum resolution 1920x1080 at 60Hz, like the Samsung monitor) but GTA San Andreas doesn’t support such high resolution, so i set the game to 1280x720, also to avoid high CPU and GPU usage.
But I can also directly connect the laptop’s output to the monitor: the tearing still occurs.

Furthermore I launch the game using MangoHud: in the mangohud config for this game I set
vsync=3 (remember that the game is running using DXVK) to force vsync, to avoid tearing, and works as expected because when I launch the game without the second monitor, there is no screen tearing on the laptop’s monitor: as I connect the second monitor, screen tearing occurs on both monitors (on the laptop’s screen and on the Samsung monitor). If I’m not mistake, the screen tearing in a multimonitor setup occurs when the refresh rate is different on both monitors, but both monitors are at 60Hz, and as I’ve said the screen tearing only occurs when the second HDMI monitor is connected.
So, to set the same resolution and refresh rate on both monitors , I run, before to execute the game:
xrandr --output LVDS1 --mode 1280x720 --rate 60

These are the informations of xrandr after my settings:

LVDS1 connected primary 1280x720+0+0
(normal left inverted right x axis y axis) 310mm x 170mm
 1280x720      59.86    60.00*   59.74

HDMI3 connected 1280x720+1366+0
(normal left inverted right x axis y axis) 1600mm x 900mm
 1280x720      60.00*+  50.00    59.94

Please also notice that: before to launch the game, I stop the compositor (Picom) because introduce lags and reduce the graphic performances, but I repeat: thanks to mangohud vsync=3 option and when the HDMI is not connected there is no tearing.

To summarize:

  • The tearing occurs only with Gta San Andreas which uses DXVK, in combination with the second monitor; if there is no second monitor, tearing doesn’t occurs. I also tried to attach another monitor, a television, but the tearing is still here, when I attach it to the laptop’s output and I run Gta San Andreas; there are no performance issues (every game playing smooth: there is only tearing with GTA:SA when the external monitor is connected: the FPS are alway stable and the game playing is smooth and fast)
  • No problem with OpenGL.
  • And also no problem when I launch vkcube which uses Vulkan like Gta San Andreas (with Picom disabled and vsync=3 in mangohud’s configuration).

What’s happening? Am I miss something?

Sorry for the long message: I would be exhaustive and precise in explaining the issue.

Create a xorg config file for the intel driver and add the TearFree option. Example:

$ cat /etc/X11/xorg.conf.d/91-intel.conf 

Section "Device"
        Identifier  "Intel HD 4000"
        Driver      "intel"
        BusID       "PCI:1:0:0"
        Option      "DRI"      "3"
        Option      "TearFree" "true"
EndSection
 
Section "DRI"
        Group  "video"
        Mode   0666
EndSection
 
Section "Extensions"
        Option "Composite" "Enable"
        Option "RENDER"    "Enable"
EndSection
 
Section "InputClass"
        Identifier          "Keyboard Defaults"
        MatchIsKeyboard     "yes"
        Option              "XkbOptions" "terminate:ctrl_alt_bksp"
EndSection

To get the correct BusID you can issue inxi -Gxxx

I am aware of such option, however:

https://wiki.archlinux.org/index.php/intel_graphics#Tearing

Says “This option may increase memory allocation considerably and reduce performance.”

And in facts, it reduces and impacts performances on my system.

In facts, when gaming, I disable composition as I said.

Then you need better hardware, or else compromise on the game settings. I have no other ideas to solve your problem.

Why? With compositor disabled and using vsync=3 in mangohud’s configuration all is running fine and smooth; if you read better my post, you’ll figure out that I only have tearing (not performances issues) when I play GTA:SA with HDMI monitor (without HDMI monitor, GTA:SA RUNNING OK like all other games); all other 3D games doesn’t introduce tearing nor any issues with external HDMI monitor; so, for the rest, the performances are all ok and good; so I don’t need better hardware, for playing old games.

Obviously.

Well, I solved in a very simple way:

I set these Xfce’s parameters as following:

Instead of set the second screen as “Extend to the right” I set it as “Mirror” with same resolution and framerate, without the need of fiddling with xrandr.

1 Like

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.