8

I'm using dual monitors, one of which is rotated with

xrandr --output HDMI-1 --rotate left

I get screen tearing on Google Chrome (installed from Chrome's PPAs, not Chromium) on both monitors, though it's more noticeable on the rotated one. I don't seem to get screen tearing in other programs, like gnome-terminal for example.

My GPU is

$ inxi -G
Graphics:  Device-1: Intel UHD Graphics 630 driver: i915 v: kernel 
           Display: x11 server: X.Org 1.20.4 driver: i915 resolution: 1920x1080~60Hz, 1920x1080~60Hz 
           OpenGL: renderer: Mesa DRI Intel UHD Graphics 630 (Coffeelake 3x8 GT2) v: 4.5 Mesa 19.0.8 

I tried adding

Section "Device"
   Identifier  "Intel Graphics"
   Driver      "intel"
   Option      "TripleBuffer" "true"
   Option      "TearFree"     "true"
   Option      "DRI"          "false"
EndSection

to /etc/X11/xorg.conf.d/20-intel-graphics.conf as per this question, but the problem is that command makes my dual monitors act as one monitor (the same picture shows up on both monitors). I tried removing the TripleBuffer and DRI lines, but that changed nothing. This side effect is mentioned in this Arch Linux Forum thread with a possible solution of adding i915.semaphores=1 to the kernel boot parameters. I don't know if that 7 year old advice is still relevant and if I was in a situation where I could fiddle with kernel boot parameters, I probably wouldn't be using Ubuntu in the first place.

I also tried setting the chrome://flags/#ignore-gpu-blacklist Chrome flag as per this question, but nothing seems to have changed in chrome://gpu/.

I'm using i3 as my window manager. I'm using X, not Wayland (i3 doesn't work with Wayland).

  • 1
    For the i3 try running also Compton compositor manager. It should eliminate any tearing. – Michal Przybylowicz Oct 6 '19 at 13:21
  • 1
    I also have this issue on 19.10. – Sam Johnson Dec 28 '19 at 7:06
  • A couple months later I try to fix this again and end up back on my own question from Google with no solution – Boris Feb 20 at 16:41
  • @Michal it doesn't. – Boris Feb 20 at 17:19
  • Do you get screen tearing in Firefox too? – WinEunuuchs2Unix Jun 20 at 20:23
3

I was able to fix for i7 Ubuntu 20.04 modifying my /etc/X11/xorg.conf file to include DRI3 as follows, which I found here.

Section "Module"
    Load "dri3"
EndSection

Section "Device"
    Identifier  "Intel Graphics"
    Driver      "intel"
    Option      "DRI"   "3"
EndSection
| improve this answer | |
  • Maybe helpful cd-rw.org/t/… – nobody Jun 20 at 9:38
  • This fixed the screen tearing but turned all my monitors (I have 3 now) into one, they all display the same image. How do I fix this? – Boris Jun 24 at 21:24
  • Turns out the outputs were renamed from HDMI-1 to HDMI1 (I don't know if as a result of this or something else). I changed the xrandr commands in my ~/.xinitrc file to xrandr --output HDMI1 --left-of HDMI2 etc. and I have 3 monitors again. – Boris Jun 24 at 21:36
  • Never mind, my screen is still tearing, I think that was just wishful thinking – Boris Jun 24 at 22:17
2

I have this same issue on 19.10 with latest Kubuntu and i915 driver for Intel GPU.

I think I got it working with these settings: settings

--

Operating System: Kubuntu 19.10 KDE Plasma Version: 5.16.5 KDE Frameworks Version: 5.62.0 Qt Version: 5.12.4 Kernel Version: 5.3.2-050302-generic

| improve this answer | |
0

When there is no screen-tearing in gnome-terminal it isn't a surprise. It doesn't require high-performance graphics processing to keep up to it's relatively static display with no video or graphics animations.

From another Q&A, several users (one, two, three, four, five) have reported that Intel graphics cards cause severe screen tearing/flickering on Ubuntu >= 16.10. The oft-proposed "solution" is to add the boot parameter i915.enable_rc6=0.

Read the warnings in the other Q&A though because it leads to higher temperatures as the Intel GPU doesn't sleep as much. Because the GPU isn't sleeping as much the screen tearing has gone away for these folks. To add the boot parameter use:

sudo -H gedit /etc/default/grub

Locate the line with "quiet splash" and change it to "quiet splash i195.enable_rc6-0".

Save the file, exit gedit and run sudo update-grub. Then reboot and test the changes.


In the Arch Linux page dedicated to Intel Graphics you will find other suggestions:

  • create / edit /etc/modprobe.d/i915.conf and insert options i915 enable_fbc=1.
  • create / edit /etc/modprobe.d/i915.conf and insert options i915 fastboot=1.

These are just a few of the tips and you should visit the page and give it a good read.


I mentioned in another deleted answer compton which Ubuntu Bionic (18.04) man page describes. Although available in Ubuntu the answer was downvoted because citations were from non-Ubuntu users in Linux Mint community. Because you are using the I3 window manager, not part of Ubuntu, you may have success with it.

| improve this answer | |
0

You said this tearing is appears only with i3 window manager. As you doesn't seem to use any compositor manager, you should try to enable vertical syncronization for your card.

First thing you need to do is to disable polling in drm_kms_helper driver. Create new file /etc/modprobe.d/drm_kms_helper.conf (or edit existing /etc/modprobe.d/modprobe.conf) with following content:

options drm_kms_helper poll=0

The i915 module must be properly configured for your card. Kernel modesetting must be allowed. To configure i915 kernel module add folowwing lines to /etc/modprobe.d/i915.conf:

options i915 modeset=1                  # Allow KMS driver to load
options i915 enable_psr=0               # Panel self refresh
options i915 preliminary_hw_support=1   # This option must be enabled for Skylake cards and later
options i915 semaphores=1               # Try this if you have issues with TearFree Xorg option and SNA aceel method
options i915 fastboot=1                 # Keep uefi/BIOS provided screen on loading
options i915 enable_rc6=7 enable_fbc=1 lvds_downclock=1 # Power saving features
#options i915 enable_guc=3              # Force loading firmware (No effect in latest kernels)

Configure your xorg-server:

sudo gedit /etc/X11/xorg.conf.d/20-intel.conf

Insert following lines:

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

V-sync enabled by default for Intel xorg driver.

Also you should configure Google Chrome with chrome://flags or command line switches. Following switches might be useful:

--in-process-gpu
--enable-gpu-vsync
--disable-font-subpixel-positioning
--enable-accelerated-mjpeg-decode
--enable-accelerated-video
--enable-gpu-memory-buffer-compositor-resources
--enable-gpu-memory-buffer-video-frames
--enable-gpu-rasterization
--enable-smooth-scrolling
--enable-zero-copy
--force-gpu-rasterization
--ignore-gpu-blacklist
--enable-features=CheckerImaging

You can add this switches to /etc/{chromium,chromium-browser,google-chrome}/default

Reboot and see if it fixed your issue. Hope this helps you!

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.