15

I am fairly new to Linux and Ubuntu. Just swapped it with Windows 10 on my ASUS ZenBook S13 yesterday.

I noticed a LOT of screen tearing, not only in videos with fast moves but even when I hover over files in the archive manager or scroll in Firefox (yes, I have already activated the Firefox internal VSync option).

I tried a few things such as Tear Free true in the 20-intel.conf file. This option fixed my tearing issue and brought up another, bigger issue. Just look what it does to my desktop. But these are only on my desktop, not on other windows like the browser and they vary, sometimes they are 3.

Wayland seems to fix this issue too, but there are several reasons why I don't want to use Wayland, such as no fractional scaling, worse anti-aliasing and a weird bug with the cursor where it is double the size on system windows like the Terminal or Settings.

When I activate other options in the 20-intel.conf file, such as Triple buffer true or Accel method uxa, I am unable to log in, only when I use Wayland.

My expectation is, that I can use normal Ubuntu (no Wayland) without any screen tearing.

I have provided information about my VGA controller and the current state of my 20-intel.conf file below.

00:02.0 VGA compatible controller: Intel Corporation UHD Graphics 620 (Whiskey Lake) (prog-if 00 [VGA controller])
        DeviceName: VGA
        Subsystem: ASUSTeK Computer Inc. UHD Graphics 620 (Whiskey Lake)
        Flags: bus master, fast devsel, latency 0, IRQ 146
        Memory at b0000000 (64-bit, non-prefetchable) [size=16M]
        Memory at a0000000 (64-bit, prefetchable) [size=256M]
        I/O ports at 3000 [size=64]
        Expansion ROM at 000c0000 [virtual] [disabled] [size=128K]
        Capabilities: <access denied>
        Kernel driver in use: i915
        Kernel modules: i915

20-intel.conf:

Section "Device"
    Identifier "Intel Graphics"
    Driver "intel"
#   Option "AccelMethod" "uxa"
    Option "TearFree" "true"
#   Option "TripleBuffer "true"
EndSection

5 Answers5

18

This didn't work for me, unfortunately. I was able to fix with modifying my /etc/X11/xorg.conf.d/20-intel-graphics.conf file to include DRI3, which I found here

Section "Module"
    Load "dri3"
EndSection

Section "Device" Identifier "Intel Graphics" Driver "intel" Option "DRI" "3" EndSection

Jkasnese
  • 318
  • It works like a charm on my ThinkPad L480 with Intel Graphics 620. – stz184 Sep 09 '20 at 12:09
  • It works fine on Ubuntu Mate 20.04 with Intel UHD 520. – NicolasSmith Sep 19 '20 at 09:38
  • 1
    It works fine on Xubuntu 20.04 with Intel HD Graphics 4000. – Eren Seymen Oct 26 '20 at 23:33
  • 3
    Hm, I don't have this file. I don't even see xorg.conf.d dir in /etc/X11. – Mikhail Dec 10 '20 at 10:48
  • Me neither. It was edited by Jaroslav. Here is on /etc/X11/xorg.conf – Jkasnese Jan 13 '21 at 17:53
  • I added my own xorg.conf in /etc/X11 with this, and it fixed the screen tearing! – Raceimaztion Feb 01 '21 at 23:54
  • 3
    This does stop the tearing for me, but break a few applications. Firefox needs hardware acceleration disabled to work. Signal and others, just don't. As for @Rene, the location for my files was in /usr/share/X11/xorg.conf.d. – Jobu Sep 23 '21 at 13:49
  • 1
    stopped tearing for me, for some reason i had am 10-amdgpu.conf in /usr/share/X11/xorg.conf.d i just overwrote it's contents and it solved it (made a backup ofcourse) – Fuseteam Jan 03 '22 at 18:41
  • It stopped tearing, but no video application works (Zoom, cheese). It also broke vscode, but I could fix this by disabling hardware acceleration. – Bach Jan 15 '22 at 15:50
  • Solved tearing for me as well on Debian. I never noticed tearing until I played some 4k videos on my 4k TV via HDMI. Weirdly I have intel chipset but my Debian runs 10-amdgpu.conf. I had a lot of trouble adding 20-intel.conf but whole my desktop env was crashed and system was prompting only command line after reboot. Then I did like @Fuseteam and solved. Why? Just, why does it take from 10-amdgpu.conf? – memoricab Mar 27 '22 at 17:20
  • If "DRI" "3" is enabled without "TearFree" "true", there is still viaible tearing on i5-6500. I have to load dri3 and use both options to eliminate tearing completely. – Amigo Chan Jul 08 '22 at 10:45
3

I resolved this issue by replacing /etc/X11/xorg.conf.d/20-intel.conf with /usr/share/X11/xorg.conf.d/20-intel.conf containing the following configuration:

Section "Device"
    Identifier "Intel Graphics"
    Driver "modesetting"
EndSection

I have no more tearing and I am able to use waylandfree Ubuntu. :)

Hope this helps anyone!

P.S.: I tested the tearing using this YouTube video (epilepsy warning!) and moving windows around as if I had a stroke.

  • Wait, don't mind this answer for now. I suspect the tearing issue comes with the fractional scaling I am using. When I turn that on, I have tearing again and the tearing is removed when fractional scaling is turned off. Let me investigate on this. – René Jörg Spies May 02 '20 at 21:57
  • Ok, just found out that I have no tearing without fractional scaling at all and no tearing with fractional scaling only when I don't move the mouse cursor. So, when I move my cursor, my screen just goes /////\////. – René Jörg Spies May 02 '20 at 22:07
  • The tearing occurs only when I scale my display to something rather odd like 125% using fractional scaling. It disappears when I scale it to 100% with activated fractional scaling. – René Jörg Spies May 02 '20 at 22:12
  • Alright, I am tired of testing now (because I need to reboot every time I change the config file and my login password is 23 characters long lol). I will just look if I can file some bugfile somewhere and see what happens (I also found out a bug with the fractional scaling thing where it scales my screen down to 50 or 25% because of Canonicals rather weak programming.) – René Jörg Spies May 02 '20 at 22:29
2

None of the above worked for me, but I found something simple that did:

xrandr --output HDMI3 --transform 1,0,-1,0,1,-1,0,0,1

This shifts the screen one pixel down and one to the right. I do lose one row and one column of pixels, but it prevents the mouse pointer from hitting the left or top edges, which is what seems to trigger this behavior in my case.

0

You can try disabling aspect ratio in SMplayer or other player in Xorg, this fixed it for me.

Edit: have you tried using a compositor? like kwin/Picom , can easily fix tearing, works with AMD too

0

I am using Xubuntu 18.04 and have the following Intel graphics:

$ inxi -G
Graphics:  Card: Intel Atom/Celeron/Pentium Processor x5-E8000/J3xxx/N3xxx Integrated Graphics Controller
           Display Server: x11 (X.Org 1.19.6 ) driver: intel Resolution: 1920x1080@59.93hz
           OpenGL: renderer: Mesa DRI Intel HD Graphics 400 (BSW) version: 4.6 Mesa 20.0.8

I had to add/change the following file here:

/usr/share/X11/xorg.conf.d/20-intel.conf

The location might vary for 20.04 or newer version of Ubuntu.

The file contents look like this:

Section "Module"
    Load "dri3"
EndSection

Section "Device" Identifier "Intel Graphics" Driver "intel" Option "DRI" "3"
Option "AccelMethod" "sna" Option "TearFree" "true" EndSection

With this configuration screen tearing disappearad for me, tested with the Steam Link software package and playing some of games.

Options taken from older answers and from https://bodhilinux.boards.net/thread/277/screen-tearing-issue-solved

SSB
  • 113