[SOLVED]Screen tearing

Questions about applications and software
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
grungy_me
Level 3
Level 3
Posts: 162
Joined: Mon Sep 30, 2013 3:54 pm

Re: [SOLVED]Screen tearing

Post by grungy_me »

@Joshual1177

Look at the pictures in the following links:

https://en.wikipedia.org/wiki/Screen_tearing

http://withfriendship.com/user/neeraj/s ... earing.php

You can easily test your computer by viewing the following video where it is very obvious if you have a screen tearing problem. If the white bar is moving in one piece without any tearing or any weird artifacts, everything is ok. Otherwise you have a screen tearing problem.

http://www.youtube.com/watch?v=ceX18O9pvLs

----------------------------------------------------------------------------------------------

@DeMus

Your solution worked wonderfully for me on LinuxMint 17 64-bit XFCE with a Nvidia GTX 750 graphics card using the 340.32 proprietary Nvidia graphic driver! Thank you ever so much! :) :) :)

Even though during my install of the driver I ok'd it to run nvidia-config and write the xorg.conf file, when I took a look at the file there seemed to be a lot of information missing regarding my monitor. I used the following command in the terminal to look at that file:

Code: Select all

sudo gedit /etc/X11/xorg.conf
I noticed in the "Nvidia X Server Settings" program (Start menu---> Settings) under the "X Server Display Configuration" that there is a button to "Save to X Configuration File". It defaults to merging with the existing file which is what you want. But unfortunately you do not have the rights to save this file that way. So I opened the program with the sudo command in the terminal:

Code: Select all

sudo /usr/bin/nvidia-settings
Then I used the "Save to X Configuration File" option and merged a new xorg.conf with the old one.

Opened the xorg.conf file again:

Code: Select all

sudo gedit /etc/X11/xorg.conf
And modified the following line:

Code: Select all

Option         "metamodes" "nvidia-auto-select +0+0"
To this:

Code: Select all

Option         "metamodes" "nvidia-auto-select +0+0 { ForceFullCompositionPipeline = On }"
Saved the file and rebooted.

Now there is no more screen tearing and I am happy! :)

Edit: As another possible solution, I noticed that the screen tearing went away when disabling "compositing" which is found in: Start menu---> Settings---> Window Manager Tweaks. And then click on the "Compositor" tab and uncheck mark "Enable display compositing". But I did not have enough knowledge to know what I'm losing by disabling that feature. Hence why I chose to try DeMus's solution with compositing enabled as is it's default.
SimpleTechGuy

Re: [SOLVED]Screen tearing

Post by SimpleTechGuy »

Had to create an account to say thanks to DeMus...
SimpleTechGuy

Re: [SOLVED]Screen tearing

Post by SimpleTechGuy »

As a side note for those with multiple monitors you will need to add { ForceFullCompositionPipeline = On } for each monitor.
Mine looks like this:

Code: Select all

    Option         "metamodes" "DVI-I-2: nvidia-auto-select +0+0 { ForceFullCompositionPipeline = On }, DVI-I-3: nvidia-auto-select +1920+0 { ForceFullCompositionPipeline = On }"
DeMus

Re: [SOLVED]Screen tearing

Post by DeMus »

grungy_me wrote:@Joshual1177

I noticed in the "Nvidia X Server Settings" program (Start menu---> Settings) under the "X Server Display Configuration" that there is a button to "Save to X Configuration File". It defaults to merging with the existing file which is what you want. But unfortunately you do not have the rights to save this file that way. So I opened the program with the sudo command in the terminal:

Code: Select all

sudo /usr/bin/nvidia-settings
When I open my Nvidia settings program and try to save the xorg.conf file in /etc/X11 I get a window asking for my password since I want to write something onto the system disk. After typing the password the file is saved. Don't you get that? I use version 331.38 of the driver.
grungy_me
Level 3
Level 3
Posts: 162
Joined: Mon Sep 30, 2013 3:54 pm

Re: [SOLVED]Screen tearing

Post by grungy_me »

@DeMus
When I open my Nvidia settings program and try to save the xorg.conf file in /etc/X11 I get a window asking for my password since I want to write something onto the system disk. After typing the password the file is saved. Don't you get that? I use version 331.38 of the driver.
No I did not get that. Hence why I used the sudo command to open nvidia-settings.
C-TZ

Re: [SOLVED]Screen tearing

Post by C-TZ »

My god, I've been having trouble with video tearing since I can remember.. This year I found out that MATE in combination with Compiz works super good, but there's a downside. When you use Firefox vanilla and you leave tabs open with flash and facebook, and you have a certain set of configurations for Compiz, like alt-tab functionality + cubedesktop (where you can switch desktops using ctrl-alt-click and you get an overview on a cube on al your desktops) it sometimes freezens. Sometimes this freez ends in a crash, where the window manager is gone and you have to either ctrl-alt-backspace to reset X or start it manualy using a TTY (since the crash also makes it impossible to type in windows like terminals), which is a drag.

I'm so tempted to do a reinstall and find out if this works. I've been looking for a way to get a nice tear-free desktop with nvidia vanilla drivers since 4 years ago when I quit Gentoo and started using Debian and Mint. But I have to work and can't do it right now. But I'm sure to try later on this year, maybe next month, and let you guys know if it also works.

If this is the case, this SHOULD be a sticky post. And this fix should be integrated into the Nvidia control panel configuration editor for saving the X-org file, so people don't have to do this manually.

@DeMus, you're a god amongst men. :)
DeMus

Re: [SOLVED]Screen tearing

Post by DeMus »

Although it is nice to see that people like the solution I wrote here, it is just something an Nvidia helpdesk employee wrote me. Why it is not known, I have no idea. Why are solutions like this one not brought into the open, I have no idea.
C-TZ wrote this should be a sticky post, I like that, and it should be part of the Nvidia settings program, I like that even more. That way everyone who installs the driver can see the mentioned as an option. Maybe Nvidia should build it into the drivers as a standard part of the driver, so it works automatically.
viva1992

Re: [SOLVED]Screen tearing

Post by viva1992 »

Thank you very much :)
doctorx

Re: [SOLVED]Screen tearing

Post by doctorx »

I thought i would post my solution for kde to see if it helps anyone:

i did not alter my xorg.conf except to turn off power mizer.

what i did though was add these lines to /etc/environment

CLUTTER_PAINT=disable-clipped-redraws:disable-culling
CLUTTER_VBLANK=True
KWIN_TRIPLE_BUFFER=1

The last line is key. The top 2 are needed for nvidia and make a large difference.

This desktop flies now. Gaming is such a treat and watching mythtv is tearfree and fast.
mha109

Re: [SOLVED]Screen tearing

Post by mha109 »

doctorx wrote: CLUTTER_PAINT=disable-clipped-redraws:disable-culling
CLUTTER_VBLANK=True
KWIN_TRIPLE_BUFFER=1.
Made an account only to say, Thank You!
I've been searching for a solution to my incredibly slow and lagging cinnamon desktop for quite a while now and installing various sorts of Nvidia drivers back and forth. Without any luck, until now.
Those three lines made a world of difference and my desktop is now super smooth.

For the record I'm running the nightly build of cinnamon over an ubuntu 14.04, 64-bit installation with nvidias 304.123 driver.
Megazell

Re: Screen tearing

Post by Megazell »

DeMus wrote:Hi,

I also have an Nvida card (GTX760) and had the tearing problem. I got in touch with somebody from the Nvidia helpdesk and he advised me to do the following:
After installation of the latest driver suitable for your card you open the Nvidia settings program. In here you make sure you save the current settings to the /etc/X11/xorg.conf file.
I had no such file to begin with but saving the settings makes it.

You can now open a terminal and type: kdesudo kate /etc/X11/xorg.conf. Type your password and kate will open the file.
Now almost at the end of the file you see 2 lines with options:
Option "nvidiaXineramaInfoOrder" "DFP-0"
Option "metamodes" "nvidia-auto-select +0+0 { ForceFullCompositionPipeline = On }"
First copy the second options line to a new line below it and put a # sign infront of it to make it a remark.

The first one is standard, the second one has been changed by the line coming from the helpdesk, who gave me the part printed in bold.
Change the second line to the one above and save it. To make sure the file in its new configuration is used you have to reboot.
Since then my tearing problems are over. I don't say it is over for you as well but it won't hurt to try.
When it doesn't work change the line back to the original one.

Good luck.
Excellent work. I have LAN setup at home and with family over for the holidays I was sitting on two rigs still using LM16 because I could not figure out how to get rid of this tearing.

You just made my holiday! Time to frag these clowns :)
Megazell

Re: [SOLVED]Screen tearing

Post by Megazell »

doctorx wrote:I thought i would post my solution for kde to see if it helps anyone:

i did not alter my xorg.conf except to turn off power mizer.

what i did though was add these lines to /etc/environment

CLUTTER_PAINT=disable-clipped-redraws:disable-culling
CLUTTER_VBLANK=True
KWIN_TRIPLE_BUFFER=1

The last line is key. The top 2 are needed for nvidia and make a large difference.

This desktop flies now. Gaming is such a treat and watching mythtv is tearfree and fast.
Does this work for XFCE? I thought the problem was gone but it's still here - not as bad as before but still here. :(
doctorx

Re: [SOLVED]Screen tearing

Post by doctorx »

Megazell wrote:
doctorx wrote:I thought i would post my solution for kde to see if it helps anyone:

i did not alter my xorg.conf except to turn off power mizer.

what i did though was add these lines to /etc/environment

CLUTTER_PAINT=disable-clipped-redraws:disable-culling
CLUTTER_VBLANK=True
KWIN_TRIPLE_BUFFER=1

The last line is key. The top 2 are needed for nvidia and make a large difference.

This desktop flies now. Gaming is such a treat and watching mythtv is tearfree and fast.
Does this work for XFCE? I thought the problem was gone but it's still here - not as bad as before but still here. :(
Only if you are using kwin for the manager. I did that before and it works very well and very fast.
Megazell

Re: [SOLVED]Screen tearing

Post by Megazell »

I am not certain this issue is solved. Not sure how many of you guys/gals are gamers but the problem is gone and the vidoe someone posted shows that I have no tearing.

Now when I play a games like L4D 2, Serious Sam 3 or even CUBE 2 - the moment a lot of action takes place - the visual tearing returns. Going from the game to desktop - the visual tearing is back during movies and/or browsing graphic heavy sites.

Reboot.

The visual tears are gone across the board until a game with heavy 3D graphics somehow reactivates it again.

I've tried this one 3 different desktops with nvidia cards - running Linux Mint 17 KDE 64 Bit, Linux Mint XFCE 32 Bit and Lubuntu 14.04.

I am hoping for a permanent solution to be found soon - or I will have to return to Linux Mint 16 for 2 of these rigs and Lubuntu 13.04 for the last rig.
doctorx

Re: [SOLVED]Screen tearing

Post by doctorx »

Megazell wrote:I am not certain this issue is solved. Not sure how many of you guys/gals are gamers but the problem is gone and the vidoe someone posted shows that I have no tearing.

Now when I play a games like L4D 2, Serious Sam 3 or even CUBE 2 - the moment a lot of action takes place - the visual tearing returns. Going from the game to desktop - the visual tearing is back during movies and/or browsing graphic heavy sites.

Reboot.

The visual tears are gone across the board until a game with heavy 3D graphics somehow reactivates it again.

I've tried this one 3 different desktops with nvidia cards - running Linux Mint 17 KDE 64 Bit, Linux Mint XFCE 32 Bit and Lubuntu 14.04.

I am hoping for a permanent solution to be found soon - or I will have to return to Linux Mint 16 for 2 of these rigs and Lubuntu 13.04 for the last rig.
My fix only applies to kwin/kde. You also have to change rendering to raster and opengl to 3.1(2.0 may be fine). I do not have any tearing at all. The xorg.conf fix didnt work for me.

Also, something weird was I had to uncheck suspend desktop effects for fullscreen. Oddly, with my fix, games ran faster that way. In fact easily 10-20% faster in diablo 3. I do not have an explanation why.
Wonder
Level 5
Level 5
Posts: 655
Joined: Wed Jul 11, 2012 8:09 pm

Re: [SOLVED]Screen tearing

Post by Wonder »

Megazell wrote:I am not certain this issue is solved. Not sure how many of you guys/gals are gamers but the problem is gone and the vidoe someone posted shows that I have no tearing.

Now when I play a games like L4D 2, Serious Sam 3 or even CUBE 2 - the moment a lot of action takes place - the visual tearing returns. Going from the game to desktop - the visual tearing is back during movies and/or browsing graphic heavy sites.

Reboot.

The visual tears are gone across the board until a game with heavy 3D graphics somehow reactivates it again.

I've tried this one 3 different desktops with nvidia cards - running Linux Mint 17 KDE 64 Bit, Linux Mint XFCE 32 Bit and Lubuntu 14.04.

I am hoping for a permanent solution to be found soon - or I will have to return to Linux Mint 16 for 2 of these rigs and Lubuntu 13.04 for the last rig.
I think that, this problem, not only in LM17 KDE with nvidia card, I view the tearing problem in others desktops of LM17 and with other graphics cards.

The fix posted in this thread, at me, works fine fine, but I have LM17 KDE with nvidia card.

Regards!
Megazell

Re: [SOLVED]Screen tearing

Post by Megazell »

Hey,

Thanks for the feedback people.

I ended up searching and trying this - http://mangel312.blogspot.com/2014/05/t ... mpton.html

So far all of the tears are gone.

@doctorx - Yeah I removed the line about Kwin because I could not find a kwf4n alternative setting.
Megazell

Re: [SOLVED]Screen tearing

Post by Megazell »

doctorx wrote:My fix only applies to kwin/kde. You also have to change rendering to raster and opengl to 3.1(2.0 may be fine). I do not have any tearing at all. The xorg.conf fix didnt work for me.

Also, something weird was I had to uncheck suspend desktop effects for fullscreen. Oddly, with my fix, games ran faster that way. In fact easily 10-20% faster in diablo 3. I do not have an explanation why.
Well - I got some tearing just now coming out of a match in L4D 2 and then a brief tear in a game of ScreenCheat.

How do I apply the triple buffer setting to XFCE?

How do I change reading to raster and OpenGL 3.1?
doctorx

Re: [SOLVED]Screen tearing

Post by doctorx »

Megazell wrote:
doctorx wrote:My fix only applies to kwin/kde. You also have to change rendering to raster and opengl to 3.1(2.0 may be fine). I do not have any tearing at all. The xorg.conf fix didnt work for me.

Also, something weird was I had to uncheck suspend desktop effects for fullscreen. Oddly, with my fix, games ran faster that way. In fact easily 10-20% faster in diablo 3. I do not have an explanation why.
Well - I got some tearing just now coming out of a match in L4D 2 and then a brief tear in a game of ScreenCheat.

How do I apply the triple buffer setting to XFCE?

How do I change reading to raster and OpenGL 3.1?
this may be a better question in the xfce forum... but you have to run kwin as the composter, not xfce composter. This is the kde forum.
DeMus

Re: [SOLVED]Screen tearing

Post by DeMus »

I have just filled out the question from on the helpdesk page of Nvidia to ask if the solution they gave me and which I passed on here could be become a part of the driver and if not, at least be a setting in the configuration program:

Code: Select all

In 2013 I had contact with the Nvidia helpdesk about tearing pictures when watching a movie on the computer. The problem was solved by a very friendly helpdesk person. The solution was to change a line in the /etc/X11/xorg.conf file:

Original line:
Option "metamodes" "nvidia-auto-select +0+0"
After the change:
Option "metamodes" "nvidia-auto-select +0+0 { ForceFullCompositionPipeline = On }"

I was wondering if this setting can be part of the driver, or if that is a problem, at least be an option in the settings program? It turns out many prople are having this problem. There is a solution for it, one which really works great, so why not make it so everyone can use it without having to search for it.
Nvidia would really help many people using Linux on computers with an Nvidia graphics card.

Thank you very much.
Now let's see what happens. Is Nvidia really interested in making our systems using Linux run even better? I sure hope so.
I will keep you informed about any answers I get.
Locked

Return to “Software & Applications”