Remove screen tearing using Compton

Report Bugs, Issues and non- package Requests
Message
Author
User avatar
Jeremy
Posts: 6
Joined: Sat Feb 17, 2018 2:57 pm

Re: Remove screen tearing using Compton

#11 Post by Jeremy »

colin_b wrote:I have got a humble spec PC - Intel Celeron G1610T 2.3GHz, GeForce GT 710 2GB DDR3 (Nouveau drivers), 8GB RAM.

The above Compton settings worked fine for removing video tearing but I still had some stutter when playing videos on YouTube etc.

I am a born tinkerer, so I decided to explore and test some of Compton's numerous settings, most are shown at https://github.com/chjj/compton/wiki/perf-guide.

After many attempts I have come up with a setup which totally eliminates tearing and drastically reduces video stutter. As a suggestion, would it be possible to give the Compton manager the option of 3 startup modes which can be set with something like checkboxes.

1) Default - Basic Compton startup (should work on all machines)
2) Faster - compton --backend glx --paint-on-overlay --vsync opengl-swc (should work on most machines)
3) Fastest - compton --backend glx --unredir-if-possible --glx-no-stencil --glx-no-rebind-pixmap --glx-swap-method buffer-age --vsync opengl-swc (might need a reasonably modern video card)
Thanks for the info, I tested all 3 of them.
  • 1) still gave me a little bit of tearing,
  • 2) no tearing, absolutey perfect,
  • 3) gave me "local 2D fuzzy tearing" in VLC, depending on the displayed scenes
Instead of adding the compton command in auto start, I would suggest to modify the compton.conf file, accessible in MX Tools -> Tweak -> Compositor
Find and edit the following lines:

Code: Select all

backend = "glx";
[...]
paint-on-overlay = true;
[...]
vsync = "opengl-swc";
The advantages of doing it through the compton.conf file is that you will be able to edit all the rest of the parameters as well, and you will be able to use the compton settings GUI. Finally, the Tweak GUI will be more coherent as well, since the settings visible in compositor tabs are the ones currently in use, instead of being a second compton process which will never run because you launched your one custom compton command first

User avatar
colin_b
Posts: 452
Joined: Sun Mar 19, 2017 7:21 pm

Re: Remove screen tearing using Compton

#12 Post by colin_b »

Jeremy, my apologies for the long delay in replying to your post.

I am using MX17 from a USB stick, and I have found that whenever I modify Compton settings I am greeted by no signal to my TV and monitor when I reboot. It might be something to do with the backend glx command, but I don't really know. What I do know is I had no problems with MX 16. I have waved the white flag with Compton and given up with it.

One thing I have found is that MX 17 running without a compositor does a reasonably good job, there is little in the way of tearing on YouTube. Also, I downloaded VLC 3 from the test repo and gave it a try. There is no tearing at all even though the compositor is off. I tried it with the XFWM compositor and found that tearing had returned.

VLC 3 + no compositor works fine for me.

User avatar
MX<3
Posts: 49
Joined: Mon Oct 23, 2017 10:06 am

Re: Remove screen tearing using Compton

#13 Post by MX<3 »

colin_b wrote:Jeremy, my apologies for the long delay in replying to your post.

I am using MX17 from a USB stick, and I have found that whenever I modify Compton settings I am greeted by no signal to my TV and monitor when I reboot. It might be something to do with the backend glx command, but I don't really know. What I do know is I had no problems with MX 16. I have waved the white flag with Compton and given up with it.

One thing I have found is that MX 17 running without a compositor does a reasonably good job, there is little in the way of tearing on YouTube. Also, I downloaded VLC 3 from the test repo and gave it a try. There is no tearing at all even though the compositor is off. I tried it with the XFWM compositor and found that tearing had returned.

VLC 3 + no compositor works fine for me.

I prefer it without a Compositor too. I lose a little eye candy but I find the result is better and less buggy.
My Computer
MAG X570 TOMAHAWK WIFI Motherboard
Ryzen 5 3600 Six Core CPU
2x 8GB DDR4 2666 Memory Modules
NVidia GeForce RTX 3060Ti Grfx Card
M.2 x1 @500GB HDD x1 @ 2TB

User avatar
KoO
Posts: 491
Joined: Fri Feb 10, 2017 1:21 am

Re: Remove screen tearing using Compton

#14 Post by KoO »

Give this a go open Nvidia X Server Settings > X Server Display Configuration > click Advanced > tick Force Full Compostion Pipeline Then click Apply {Hopefully this will help}

OR
Have a look at this video https://www.youtube.com/watch?v=C8ojAdu8_DI
Main : MX 19.1-AHS (i3) 5.4.13-1~mx19+1, Asus B450-i AMD 5 3600 , 32gb Hyper-X 3200 , GTX970 . :linuxlove:
Lenovo T430 : Debian10 antiX17 (i3) , 4.20.12 , i5 , 12gb .
Lenovo X220 : Test Machine (ATM)

User avatar
rich
Posts: 180
Joined: Sat Mar 31, 2018 6:39 pm

Re: Remove screen tearing using Compton

#15 Post by rich »

I too had issues editing the compton config file, but wanted to use the mx compton tool along with these alterations because they do get rid of tearing for me and because the mx tool is great. Running the command with the cli options worked fine, but editing the config file caused compton to hang and freeze the desktop. I was able to work around this by editing the compton-launch.sh script from

compton --dbus --config /home/$USER/.config/compton.conf -b

to

compton --dbus --config /home/$USER/.config/compton.conf &>/dev/null &

I don't know if this is safe but it worked for me. It says in the compton man page that the -b (daemon) flag can cause issues on some systems, I think maybe that's what happened.

But now I have smooth scrolling, video playback and window movement :)

User avatar
dolphin_oracle
Developer
Posts: 19926
Joined: Sun Dec 16, 2007 1:17 pm

Re: Remove screen tearing using Compton

#16 Post by dolphin_oracle »

nice tip on the -b, thanks.
http://www.youtube.com/runwiththedolphin
lenovo ThinkPad X1 Extreme Gen 4 - MX-23
FYI: mx "test" repo is not the same thing as debian testing repo.

User avatar
rich
Posts: 180
Joined: Sat Mar 31, 2018 6:39 pm

Re: Remove screen tearing using Compton

#17 Post by rich »

Sure! Glad to help

User avatar
skorkr
Posts: 2
Joined: Sat Mar 31, 2018 6:46 pm

Re: Remove screen tearing using Compton

#18 Post by skorkr »

Guys I've tried literally everything posted here, tried more settings for compton from their github and nothing works at all. Xfwm can play youtube fullscreen videos without tearing but scrolling in firefox is painful. Compton can kind of maybe fix the tearing in firefox except for a constant break in the top fifth of the screen (amazing stuff, never seen this). This is on a 760 gtx nvidia. The closed driver can work when the full compositing pipeline thing is selected, but I would prefer it if I could stay on the opensource driver. Am I missing something? How is this still a problem in the 21. century?

User avatar
dolphin_oracle
Developer
Posts: 19926
Joined: Sun Dec 16, 2007 1:17 pm

Re: Remove screen tearing using Compton

#19 Post by dolphin_oracle »

usually the solution for nvidia is the proprietary driver.

the reverse-engineered opensoure nouveau driver can be fine, but its generally accepted to be far inferior in performance to the closed-source drivers.
http://www.youtube.com/runwiththedolphin
lenovo ThinkPad X1 Extreme Gen 4 - MX-23
FYI: mx "test" repo is not the same thing as debian testing repo.

User avatar
skorkr
Posts: 2
Joined: Sat Mar 31, 2018 6:46 pm

Re: Remove screen tearing using Compton

#20 Post by skorkr »

I guess I was unlucky with my gpu - the proprietary driver did fix my issues.

Post Reply

Return to “Bugs and Non-Package Requests Forum”