Screen tearing on Linux Mint 18

Please post suggestions for improvement of Cinnamon on:
https://github.com/linuxmint/Cinnamon
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Taskman

Re: Screen tearing on Linux Mint 18

Post by Taskman »

Portreve wrote:This thread got me to thinking because I don't have an nVidia graphics card, but I do get a fair amount of screen tearing, and I'm pretty well sick of it.

I found a solution to this for those of us with Intel chipset graphics cards. I'm going to write out the directions here so that basically anyone of any knowledge level can follow them.

Super simple to follow and worked perfectly in LM 18 Mate on my Macbook Air
Thanks so much for this The screen tearing has really been bugging me when scrolling in Chrome.
User avatar
Portreve
Level 13
Level 13
Posts: 4870
Joined: Mon Apr 18, 2011 12:03 am
Location: Within 20,004 km of YOU!
Contact:

Re: Screen tearing on Linux Mint 18

Post by Portreve »

Taskman wrote:Super simple to follow and worked perfectly in LM 18 Mate on my Macbook Air
Thanks so much for this The screen tearing has really been bugging me when scrolling in Chrome.
Oh, cool! I'm happy this was able to be of use to someone.

I've always found that it works best in crafting directions to explain to the person what they are attempting to accomplish, *and* to make no assumptions about their knowledgeability.
Flying this flag in support of freedom 🇺🇦

Recommended keyboard layout: English (intl., with AltGR dead keys)

Podcasts: Linux Unplugged, Destination Linux

Also check out Thor Hartmannsson's Linux Tips YouTube Channel
Raydog

Re: Screen tearing on Linux Mint 18

Post by Raydog »

Portreve wrote:
Taskman wrote:Super simple to follow and worked perfectly in LM 18 Mate on my Macbook Air
Thanks so much for this The screen tearing has really been bugging me when scrolling in Chrome.
Oh, cool! I'm happy this was able to be of use to someone.

I've always found that it works best in crafting directions to explain to the person what they are attempting to accomplish, *and* to make no assumptions about their knowledgeability.
A big thanks from me too. :D
It worked nicely on my MBP using an Intel 4000HD/Mint 18 KDE.
drdusty

Re: Screen tearing on Linux Mint 18

Post by drdusty »

thanks to Portreve for the very helpful post on screen tearing on Mint 18 related to Intel graphics. very concise and helpful.
jayotis_d

Re: Screen tearing on Linux Mint 18

Post by jayotis_d »

If you are using default AMD driver paste this into terminal

Code: Select all

sudo bash -c 'cat <<EOF >/usr/share/X11/xorg.conf.d/20-amd.conf
Section "Device"
   Identifier  "amd Graphics"
   Driver      "radeon"
   Option      "TearFree"    "true"
EndSection
EOF'
prashantsays

Re: Screen tearing on Linux Mint 18

Post by prashantsays »

Portreve wrote:This thread got me to thinking because I don't have an nVidia graphics card, but I do get a fair amount of screen tearing, and I'm pretty well sick of it.

I found a solution to this for those of us with Intel chipset graphics cards. I'm going to write out the directions here so that basically anyone of any knowledge level can follow them.

Create a Intel graphics-specific configuration file in /usr/share/X11/xorg.conf.d, and title it "20-intel.conf":

Step 1: Open your terminal emulator, and enter the following command:

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


Step 2: Copy from here and paste into nano, using [CTRL] + [SHIFT] + [V]:

Code: Select all

Section "Device"
   Identifier  "Intel Graphics"
   Driver      "intel"
   Option      "TearFree"    "true"
EndSection
The reason I added emphasis above to [SHIFT] is that straight [CTRL] + [V] will not work as you think in a terminal window. It tries to send CTRL + V directly to the program you're running.

Step 3: Exit nano, saving changes:

[CTRL] + [X], y for "Yes, save changes", and [ENTER] to execute this.


Step 4:

exit [ENTER] to close the terminal window.

Step 5: Restart your computer.

Step 6: There is noooooooo... step number six.
I did at that and diagonal tearing went away, but what came with it was white flashing dots while watching youtube videos, so i reverted the last step. As it is easy to bear diagonal tearing then flashing dots :D
prashantsays

Re: Screen tearing on Linux Mint 18

Post by prashantsays »

Yfrwlf wrote:
Ascaris wrote:
Yfrwlf wrote:Doesn't seem to have completely gotten rid of it, but mostly. Very strange. Either way I hope this behavior gets reverted in the future as no tearing in any app is a killer feature of Mint in my opinion! :D
I did have some tearing in Cinnamon in programs other than Firefox with the proprietary Nvidia drivers, but some of the usual settings for Ubuntu/Mint to take care of that seem to have worked, as I have not seen tearing in a long while (and I am really sensitive to it, so I'd be very likely to notice it).

A decent write-up can be found at:

viewtopic.php?t=174237&start=20
Cool I will try more fixes if I find any more tearing, thanks! For me the only tearing seemed to have been in Firefox, and it now seems to have been fixed by setting:

Code: Select all

gfx.xrender.enabled;true
in about:config. I have smooth scrolling turned on and so far I haven't noticed any tearing, so for anyone else who only has the issue with Firefox, give it a try!
This fixed diagonal tearing for me also, that too without side effects.
vamdolly

Re: Screen tearing on Linux Mint 18

Post by vamdolly »

Portreve wrote:This thread got me to thinking because I don't have an nVidia graphics card, but I do get a fair amount of screen tearing, and I'm pretty well sick of it.

I found a solution to this for those of us with Intel chipset graphics cards. I'm going to write out the directions here so that basically anyone of any knowledge level can follow them.

Create a Intel graphics-specific configuration file in /usr/share/X11/xorg.conf.d, and title it "20-intel.conf":

Step 1: Open your terminal emulator, and enter the following command:

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


Step 2: Copy from here and paste into nano, using [CTRL] + [SHIFT] + [V]:

Code: Select all

Section "Device"
   Identifier  "Intel Graphics"
   Driver      "intel"
   Option      "TearFree"    "true"
EndSection
The reason I added emphasis above to [SHIFT] is that straight [CTRL] + [V] will not work as you think in a terminal window. It tries to send CTRL + V directly to the program you're running.

Step 3: Exit nano, saving changes:

[CTRL] + [X], y for "Yes, save changes", and [ENTER] to execute this.


Step 4:

exit [ENTER] to close the terminal window.

Step 5: Restart your computer.

Step 6: There is noooooooo... step number six.

Question as im still new to this is there a way to revert back to default encase this has a worse effect for me, as i have tearing on my lenovo thinkpad t430 after updates were installed from clean install.
User avatar
Mick-Cork
Level 4
Level 4
Posts: 493
Joined: Sun Mar 23, 2014 10:10 pm
Location: West Cork & London

Re: Screen tearing on Linux Mint 18

Post by Mick-Cork »

Portreve wrote:This thread got me to thinking because I don't have an nVidia graphics card, but I do get a fair amount of screen tearing, and I'm pretty well sick of it.

I found a solution to this for those of us with Intel chipset graphics cards. I'm going to write out the directions here so that basically anyone of any knowledge level can follow them.
Just want to say a quick/big thanks for this.

Dell Latitude E5450, Integrated Intel graphics, Linux Mint 18.1 Cinnamon.

Worked a treat - fixed tearing both on locally played and streamed browser videos. Happy chappie here :)
User avatar
Portreve
Level 13
Level 13
Posts: 4870
Joined: Mon Apr 18, 2011 12:03 am
Location: Within 20,004 km of YOU!
Contact:

Re: Screen tearing on Linux Mint 18

Post by Portreve »

vamdolly wrote:Question as im still new to this is there a way to revert back to default encase this has a worse effect for me, as i have tearing on my lenovo thinkpad t430 after updates were installed from clean install.
Let me answer this by way of posing a question.

Why is the behavior of your computer (relating to the screen tearing issue) different now than it was before you followed my directions?

To answer this question "correctly", let's look at how the OS works in this particular situation.

The first step I gave you was to create a new file (into which subsequent directions had you add content). At no point did I give you an instruction to modify, in some way, an existing settings file, even including a modification for it to go looking for the file I actually did have you create.

By logic and plain reason alone, what should this suggest to you? It should suggest that there must be some central, system-level function which says, "look into this particular folder, see what files are there, and if any of them have settings relevant to detected hardware, then use those settings instead of (or in addition to) the default settings".

Sorry, I know that's a long-winded way of explaining it, but basically, that's what's going on.

The file you created has Intel Graphics chipset-specific settings. If you had specified some other make-believe hardware, then nothing would have happened because said hardware was never discovered on boot (because, of course, it doesn't exist.)

If you were to delete the file, it would stop using those settings.

HOWEVER... there is an alternative option for you.

It is the convention of settings files such as the one my directions have you create, that if you begin a line with the "#" character, it is treated as a comment, and not as any sort of executable instruction. Therefore, you can simply re-edit the file and add # characters to the beginning of each line, save the file, and restart the computer. At that point, the file will be read, but everything in it will be a comment, and therefore ignored.

This is sometimes referred to as "commenting out" a line, and it has the added benefit that, if you were to eventually find the problem you were having was something else, instead of having to reconstruct the file (and hoping you could find these instructions again) you could merely de-comment the lines, save the file, reboot, and voila! everything would be back the way it was again.
Flying this flag in support of freedom 🇺🇦

Recommended keyboard layout: English (intl., with AltGR dead keys)

Podcasts: Linux Unplugged, Destination Linux

Also check out Thor Hartmannsson's Linux Tips YouTube Channel
vamdolly

Re: Screen tearing on Linux Mint 18

Post by vamdolly »

Portreve wrote:
vamdolly wrote:Question as im still new to this is there a way to revert back to default encase this has a worse effect for me, as i have tearing on my lenovo thinkpad t430 after updates were installed from clean install.
Let me answer this by way of posing a question.

Why is the behavior of your computer (relating to the screen tearing issue) different now than it was before you followed my directions?

To answer this question "correctly", let's look at how the OS works in this particular situation.

The first step I gave you was to create a new file (into which subsequent directions had you add content). At no point did I give you an instruction to modify, in some way, an existing settings file, even including a modification for it to go looking for the file I actually did have you create.

By logic and plain reason alone, what should this suggest to you? It should suggest that there must be some central, system-level function which says, "look into this particular folder, see what files are there, and if any of them have settings relevant to detected hardware, then use those settings instead of (or in addition to) the default settings".

Sorry, I know that's a long-winded way of explaining it, but basically, that's what's going on.

The file you created has Intel Graphics chipset-specific settings. If you had specified some other make-believe hardware, then nothing would have happened because said hardware was never discovered on boot (because, of course, it doesn't exist.)

If you were to delete the file, it would stop using those settings.

HOWEVER... there is an alternative option for you.

It is the convention of settings files such as the one my directions have you create, that if you begin a line with the "#" character, it is treated as a comment, and not as any sort of executable instruction. Therefore, you can simply re-edit the file and add # characters to the beginning of each line, save the file, and restart the computer. At that point, the file will be read, but everything in it will be a comment, and therefore ignored.

This is sometimes referred to as "commenting out" a line, and it has the added benefit that, if you were to eventually find the problem you were having was something else, instead of having to reconstruct the file (and hoping you could find these instructions again) you could merely de-comment the lines, save the file, reboot, and voila! everything would be back the way it was again.
Thanks for the reply i was looking at multiple forums when i posted this so ended up posting a different forum fix in here but you have answered my question and when i get home im going to try the file creation tutorial you have posted.
User avatar
sfrusciante
Level 3
Level 3
Posts: 161
Joined: Wed Mar 19, 2014 11:15 am
Location: Italy

Re: Screen tearing on Linux Mint 18

Post by sfrusciante »

Yfrwlf wrote:
cogsncogs wrote:
Yfrwlf wrote: Cool I will try more fixes if I find any more tearing, thanks! For me the only tearing seemed to have been in Firefox, and it now seems to have been fixed by setting:

Code: Select all

gfx.xrender.enabled;true
in about:config. I have smooth scrolling turned on and so far I haven't noticed any tearing, so for anyone else who only has the issue with Firefox, give it a try!
I've been experiencing diagonal screen tearing in Firefox on LM18 Cinnamon on my machine that has integrated Intel graphics. This appears to have fixed it. Thanks! :)
Glad to hear it! I wonder why this is needed in Mint 18 though, or if it's something recent in Firefox that changed.
It was needed in LM 18.1 XFCE.
I got a crazy number of people to disappoint. -me
jorgenask

Re: Screen tearing on Linux Mint 18

Post by jorgenask »

Portreve wrote:This thread got me to thinking because I don't have an nVidia graphics card, but I do get a fair amount of screen tearing, and I'm pretty well sick of it.

I found a solution to this for those of us with Intel chipset graphics cards. I'm going to write out the directions here so that basically anyone of any knowledge level can follow them.

Create a Intel graphics-specific configuration file in /usr/share/X11/xorg.conf.d, and title it "20-intel.conf":

Step 1: Open your terminal emulator, and enter the following command:

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


Step 2: Copy from here and paste into nano, using [CTRL] + [SHIFT] + [V]:

Code: Select all

Section "Device"
   Identifier  "Intel Graphics"
   Driver      "intel"
   Option      "TearFree"    "true"
EndSection
The reason I added emphasis above to [SHIFT] is that straight [CTRL] + [V] will not work as you think in a terminal window. It tries to send CTRL + V directly to the program you're running.

Step 3: Exit nano, saving changes:

[CTRL] + [X], y for "Yes, save changes", and [ENTER] to execute this.


Step 4:

exit [ENTER] to close the terminal window.

Step 5: Restart your computer.

Step 6: There is noooooooo... step number six.

Thank you very much!
This seemes to have done the trick for tearing in video playback on my Acer Swift 3 with Intel HD 620 running Linux Mint Cinnnamon

Knock on wood!
jorgenask

Re: Screen tearing on Linux Mint 18

Post by jorgenask »

Actually it seemes as though enabling hardware acceleration in "about:config" seemes to have taken care of the diagonal tearing on my Dell XPS 13 :)

I usually use Chrome, which I experience no tearing out of the box, but nice to have a tear free firefox available as well!
User avatar
Pjotr
Level 24
Level 24
Posts: 20135
Joined: Mon Mar 07, 2011 10:18 am
Location: The Netherlands (Holland) 🇳🇱
Contact:

Re: Screen tearing on Linux Mint 18

Post by Pjotr »

There is a price you pay for TearFree, though:
The problem is that it increases memory allocation considerably and reduces performance, giving you the same penalty as using a compositor. If you then use a compositor on top, you use even more memory to achieve the same effect. As such it is optional.
Source:
https://bugs.freedesktop.org/show_bug.cgi?id=37686#c123

And apparently that also holds true for gfx.xrender.enabled in Firefox, when set to true. At least, that's what I learned from a quick web search for that switch.

So the thing to consider is: do you wish to sacrifice some performance for having a tear-free Firefox? Some people will want to, some won't.
Tip: 10 things to do after installing Linux Mint 21.3 Virginia
Keep your Linux Mint healthy: Avoid these 10 fatal mistakes
Twitter: twitter.com/easylinuxtips
All in all, horse sense simply makes sense.
pocketsVFX

Re: Screen tearing on Linux Mint 18

Post by pocketsVFX »

The tearing I'm experiencing in browser is because the whole of Mint 18 + Cinnamon tears on my fresh install. I can induce tearing moving any window around, observe it scrolling in any browser or window and in any video playback in any browser (stands to reason, if the browser window itself tears when I move it quickly, pixel movement within the frame of that window will also tear).

I do not recall this phenomenon in Ubuntu + Gnome, which I used about a month before giving Mint a try. So far I like it a lot, except for the tearing, which means that any videos I wish to watch full screen I'll be forced to reboot to Win10, because it's not a limitation of my hardware. I've read years of fixes for this DE and that, but there seems to be no true fix for Cinnamon (per one such forum thread very similar to this one) as the blame may be on x.org 1.8 where some folks saw no tearing in 17.x with x.org 1.5 though I'm hopeful that this isn't the case.

Code: Select all

System:    Host: Vincent Kernel: 4.4.0-81-generic x86_64 (64 bit gcc: 5.4.0)
           Desktop: Cinnamon 3.2.7 (Gtk 3.18.9-1ubuntu3.3)
           Distro: Linux Mint 18.1 Serena
Machine:   Device: laptop System: ASUSTeK product: G551JM v: 1.0
           Mobo: ASUSTeK model: G551JM v: 1.0
           BIOS: American Megatrends v: G551JM.204 date: 10/13/2014
Battery    BAT0: charge: 51.0 Wh 98.8% condition: 51.6/56.2 Wh (92%)
           model: ASUSTeK N551-52 status: Discharging
CPU:       Quad core Intel Core i7-4710HQ (-HT-MCP-) cache: 6144 KB
           flags: (lm nx sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx) bmips: 19955
           clock speeds: max: 3500 MHz 1: 2488 MHz 2: 2637 MHz 3: 2546 MHz
           4: 2800 MHz 5: 2529 MHz 6: 2485 MHz 7: 2865 MHz 8: 2526 MHz
Graphics:  Card-1: Intel 4th Gen Core Processor Integrated Graphics Controller
           bus-ID: 00:02.0
           Card-2: NVIDIA GM107M [GeForce GTX 860M] bus-ID: 01:00.0
           Display Server: X.Org 1.18.4 drivers: modesetting,nvidia
           Resolution: 1920x1080@60.00hz, 1920x1080@60.00hz
           GLX Renderer: GeForce GTX 860M/PCIe/SSE2
           GLX Version: 4.5.0 NVIDIA 375.66 Direct Rendering: Yes

edit: update, I moved up to 4.10 kernel in the hopes that might help. It didn't. Likewise, moving to nvidia 378 or 381 drivers only created more problems, either with Cinnamon crashing on start or freezing on a black frame after the login screen. I rolled back to the x.org driver, removed nvidia drivers and then went back to 375 and it's been stable, with screen tearing.
rlandersen

Re: Screen tearing on Linux Mint 18

Post by rlandersen »

Same here. I cannot get rid of screen tearing problems in Linux Mint 18+ Cinnamon.
Any help would be appreciated.

Thank you.

Code: Select all

System:    Host: mint Kernel: 4.8.0-53-generic x86_64 (64 bit gcc: 5.4.0)
           Desktop: Cinnamon 3.4.1 (Gtk 3.18.9-1ubuntu3.3)
           Distro: Linux Mint 18.2 Sonya
Machine:   Mobo: ASUSTeK model: P9X79 DELUXE v: Rev 1.xx
           Bios: American Megatrends v: 1203 date: 05/24/2012
CPU:       Hexa core Intel Core i7-3960X (-HT-MCP-) cache: 15360 KB
           flags: (lm nx sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx) bmips: 50634
           clock speeds: max: 5700 MHz 1: 1366 MHz 2: 1241 MHz 3: 1201 MHz
           4: 1199 MHz 5: 1271 MHz 6: 1306 MHz 7: 1207 MHz 8: 1202 MHz
           9: 1290 MHz 10: 1245 MHz 11: 1397 MHz 12: 1227 MHz
Graphics:  Card: NVIDIA GK104 [GeForce GTX 680] bus-ID: 01:00.0
           Display Server: X.Org 1.18.4 drivers: nouveau (unloaded: fbdev,vesa)
           Resolution: 1920x1080@60.00hz
           GLX Renderer: N/A GLX Version: N/A Direct Rendering: N/A
Audio:     Card-1 NVIDIA GK104 HDMI Audio Controller
           driver: snd_hda_intel bus-ID: 01:00.1
           Card-2 Intel C600/X79 series High Definition Audio Controller
           driver: snd_hda_intel bus-ID: 00:1b.0
           Sound: Advanced Linux Sound Architecture v: k4.8.0-53-generic
Network:   Card-1: Intel 82579V Gigabit Network Connection
           driver: e1000e v: 3.2.6-k port: f040 bus-ID: 00:19.0
           IF: eno1 state: up speed: 1000 Mbps duplex: full mac: <filter>
           Card-2: Qualcomm Atheros AR9285 Wireless Network Adapter (PCI-Express)
           driver: ath9k bus-ID: 08:00.0
           IF: wlp8s0 state: down mac: <filter>
           Card-3: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller
           driver: r8169 v: 2.3LK-NAPI port: c000 bus-ID: 0a:00.0
           IF: enp10s0 state: down mac: <filter>
Drives:    HDD Total Size: 5543.8GB (0.0% used)
           ID-1: /dev/sda model: Samsung_SSD_850 size: 512.1GB temp: 0C
           ID-2: /dev/sdb model: WDC_WD5001FZWX size: 5001.0GB temp: 38C
           ID-3: USB /dev/sdc model: Ultra size: 30.8GB temp: 0C
RAID:      No RAID devices: /proc/mdstat, md_mod kernel module present
Sensors:   System Temperatures: cpu: 40.0C mobo: N/A
           Fan Speeds (in rpm): cpu: 0
Info:      Processes: 281 Uptime: 1:24 Memory: 1707.2/16018.9MB
           Init: systemd runlevel: 5 Gcc sys: 5.4.0
           Client: Shell (bash 4.3.481) inxi: 2.2.35 
User avatar
sfrusciante
Level 3
Level 3
Posts: 161
Joined: Wed Mar 19, 2014 11:15 am
Location: Italy

Re: Screen tearing on Linux Mint 18

Post by sfrusciante »

Unfortunately I have no answer on the go for this problem: still, you can take a look at this and search solutions by yourself, it's the place where is most likely to found one.
I got a crazy number of people to disappoint. -me
Yfrwlf
Level 3
Level 3
Posts: 171
Joined: Sat Jun 08, 2013 7:46 pm

Re: Screen tearing on Linux Mint 18

Post by Yfrwlf »

Linux Mint 17.1+ (I think it was) was perfect! No screen tearing whatsoever. Then along comes Mint 18 and suddenly tearing problems are back and crazier than ever!

I can fix Firefox tearing with the about:config xrender setting change, but I've noticed that other apps such as Nemo will tear now and then. I assume this version of Muffin is just horribly broken for some reason, at least with NVIDIA, and it sounds like other video chipsets are having the problem as well. NVIDIA force-composition-pipeline makes things much worse for me.

I can only hope Muffin will be in better shape again once Ubuntu 18.04 / Mint 19 finally rolls around, and that hopefully there will be better solutions to solving tearing issues (besides buying a Freesync/Gsync monitor). I haven't gotten around to switching to compton or other compositors yet. It'd be really great if the default compositor was in better shape!

It's almost like Muffin decided to let applications control their own v-sync, and if true you'd think that might be a good thing, except a) so many desktop apps like Nemo should always v-sync by default and b) there are apps that simply do not have v-sync options, so being able to turn it on system-wide and enforce it for all apps is still desirable I'd say until there is a better way for users to control per-app v-sync options. But I'm just guessing.
User avatar
sfrusciante
Level 3
Level 3
Posts: 161
Joined: Wed Mar 19, 2014 11:15 am
Location: Italy

Re: Screen tearing on Linux Mint 18

Post by sfrusciante »

Nice to hear this.
I got a crazy number of people to disappoint. -me
Locked

Return to “Cinnamon”