PCsuggest

  • Quick tip
  • SECURITY
  • NETWORKING
  • OpenWrt
  • HARDWARE

How to Fix Linux screen tearing on Intel graphics

Updated - December 4, 2019 by Arnab Satapathi

Screen tearing in Linux could be a major issue with non-compositing window managers.

Even many compositing window manager could show tearing while dragging windows.

Seems like lots of technical jargon, so to simplify the matter let's discus about basics.

What is Screen tearing?

You may often notice that a part of the video/graphics/window is torn apart from the main section. It's is glitch related with video or graphics rendering, when the input video is not in sync with the refresh rate of the display. That's called Screen tearing and on LCD displays, horizontal screen tearing is much prominent.
Screen tearing happens mostly when you're playing a video and dragging/moving or maximizing/minimizing a window.

What is a compositing window manager?

Basically stacking window managers like kWin, Mutter, XFWM, Compiz with the capability of-screen buffering. They've functionalities like window shadow, 3D animation, transparent windows, anti-aliasing, blur background and many more.
They're much more visually appealing than simple window managers, read more here.

Contents

  • Fix Linux screen tearing with window managers
  • Prevent screen tearing on Linux with X11 configuration
  • Conclusion and thoughts

Fix Linux screen tearing with window managers

It's rather easy if you're using KWin, Mutter, Muffin or any other compositing window manager, there should be an option to to enable vsync anywhere in the settings.

If you're using KDE or minimal KWin, use the instruction below.

  1. Open up the System Settings application.
  2. Go to the Display and Monitor option under the Hardware section.
  3. Then on the Tearing prevention option, set it to Full screen repaints. img
kwin fix linux screen tearing

XFWM also has an option to enable vsync to prevent tearing, that never works !

You can also use a compositing manager like compton or xcompmgr with Openbox or XFWM window manager. But there's  another little tweak to prevent linux screen tearing efficiently on Intel graphics.

Prevent screen tearing on Linux with X11 configuration

It's possible to minimize screen tearing with a little tweak to the X11 configuration. However this option may not work always, specially with Intel Atom or Celeron CPU's inbuilt graphics.

amazon prime logo
Try AmazonPrime for free
Enjoy free shipping and One-Day delivery, cancel any time.

First create a new X11 configuration directory, mkdir -p /etc/X11/xorg.conf.d/, if already not exists.

Create a configuration file 20-intel.conf there with your favorite text editor as root. sudo nano /etc/X11/xorg.conf.d/20-intel.conf 

Put the configuration below there, and save the file, and exit the test editor.

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

Finally restart your X11 session by logging out and logging in again, or simply reboot the PC.

However you may need to add other few extra option like Option  "AccelMethod" "uxa" or Option  "TripleBuffer" "true" in the 20-intel.conf file.

Checked with 2nd generation Intel HD3000 graphics and 5 generation HD5500 graphics, both worked without those options.

Conclusion and thoughts

So, that's all about fixing screen tearing in linux with Intel graphics, hope it helped you.

Enabling vsync decreases the graphics benchmark performance, so next I'll experiment with the TripleBuffer and completely disable vsync and compare the difference.

If you've any question or suggestion, just leave a comment. Also don't forget to share if you've found this tutorial worthy to share.

Filed Under: hardware, how to Tagged With: gpu, graphics, linux

Your comments
  1. Vitaly says

    October 15, 2020

    Now I cannot startx: no screens found(EE).

    Reply
  2. Torsten Bünting says

    June 19, 2020

    Hi, thanks for this, specifically Travis solution worked for my old Thinkpad T500 with Intel GM45 graphics

    [...]

    Section "Device"
    Identifier "Intel Graphics"
    Driver "intel"
    Option "DRI" "2"
    Option "AccelMethod" "SNA"
    Option "TripleBuffer" "true"
    option "TearFree" "true"
    EndSection

    [...]

    Reply
    • Torsten Bünting says

      June 19, 2020

      I forgot, the system is Linux Mint 20 Beta...

      Reply
  3. JRP says

    May 25, 2020

    It worked with Linux Lite 4.8, but messed up VLC video playback. I guess I just go to Windows for that task, then.

    Reply
  4. fhfs says

    April 26, 2020

    Thanks, was really looking for this, since wayland is still(10 years later) a pain in my ass

    Reply
  5. Alex says

    April 17, 2020

    YEAH BOY! Thanks guys!

    Reply
  6. tahirgurz says

    October 22, 2019

    Instructions given below KDE section worked well for my manjaro kde intel 4000HD graphics

    Reply
  7. Alan says

    May 2, 2019

    Didn't work for me.
    System:
    Host: NUC7i7 Kernel: 4.15.0-48-generic x86_64 bits: 64
    Desktop: Cinnamon 4.0.10 Distro: Linux Mint 19.1 Tessa
    Machine:
    Type: N/A System: Intel product: NUC7i7DNKE v: J85069-202
    serial:
    Mobo: Intel model: NUC7i7DNB v: J83500-202 serial:
    UEFI [Legacy]: Intel v: DNKBLi7v.86A.0060.2018.1220.1528 date: 12/20/2018
    CPU:
    Topology: Quad Core model: Intel Core i7-8650U bits: 64 type: MT MCP
    L2 cache: 8192 KiB
    Speed: 802 MHz min/max: 400/4200 MHz Core speeds (MHz): 1: 801 2: 800
    3: 800 4: 800 5: 800 6: 800 7: 800 8: 800
    Graphics:
    Device-1: Intel UHD Graphics 620 driver: i915 v: kernel
    Display: x11 server: X.Org 1.19.6 driver: intel resolution: 3840x2160~60Hz
    OpenGL: renderer: llvmpipe (LLVM 7.0 256 bits) v: 3.3 Mesa 18.2.8

    Reply
    • ybb says

      December 3, 2019

      i think linux mint fixes screen tearing itself

      Reply
  8. Travis Fitzgerald says

    March 5, 2019

    I am using a Minix Z83-4 which runs the Intel Cherry trail architecture, running Ubuntu. The config that I got to work tearfree is:

    Section "Device"
    Identifier "Intel Graphics"
    Driver "intel"
    Option "DRI" "2"
    Option "AccelMethod" "SNA"
    Option "TripleBuffer" "true"
    option "TearFree" "true"
    EndSection

    This cleared up all screen tearing (with a slight increase in memory and CPU usage) but a fair trade for watchable video content.

    Reply
  9. ItsAnArse says

    January 10, 2019

    Thank you very much for this, exactly what I needed on my Haswell-based laptop running bunsenlabs. Cheers

    Reply
  10. Allen says

    January 9, 2019

    Just thought i would chime in. This works great on Arco Linux!, thanks for the share.

    Reply
  11. Richi Amaro says

    October 10, 2018

    Thanks the config file in /etc/X11/xorg.conf.d/20-intel.conf works great on fedora 28 in a dell inspiron 5000 series.

    Reply
  12. J says

    September 26, 2018

    Thanks!

    Reply
  13. Rainer Halstenbach says

    August 5, 2018

    Thank you VERY MUCH for that superb little help. I had exactly these kind of problems with my new Acer Swift5, where i replaced the pre-installed Windows10 by an Ubuntu Mate. This X setting helped me out (the Option "TearFree" already did the job".

    Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Copyright © PCsuggest.com · All rights reserved.

  • Home
  • About
  • Contact
  • Privacy Policy
  • Sitemap