Cinnamon: Tearing/Vsync issues in Cinnamon/Clutter

Created on 10 Aug 2014  ·  72Comments  ·  Source: linuxmint/cinnamon

Running nVidia hardware on multiple machines, and along with other nVidia users I have bad screen tearing in Cinnamon/Clutter unless the game has a VSYNC option which forces it on, then things work fine. For some reason VLC doesn't have tearing that I can notice, but Totem always has horrible tearing.

The solution being done by several users right now is to switch to the Compton compositor instead and forcing on VSYNC for everything through that, but can't we get an option to force it on for Cinnamon instead? For some reason the usual Cluttter options do NOT force on VSYNC. See the following threads on the Linux Mint forums and Reddit:

http://forums.linuxmint.com/viewtopic.php?f=59&t=171020
http://www.reddit.com/r/linux_gaming/comments/28skqt/psa_do_you_have_screen_tearing_issues_only_in/

Also found this suggestion to add a VSYNC option to Cinnamon options, but if that option doesn't work anyway then that won't fix the problem.

https://github.com/linuxmint/Cinnamon/issues/1773

Using nVidia closed driver.

GRAPHICS WEIRDNESS

Most helpful comment

I know exactly what issue you guys are talking about. I fixed it by using the generic modesetting Xorg module instead of the Intel one. This was achieved by simply removing the module:
sudo apt-get remove xserver-xorg-video-intel

Relevant reddit thread that prompted me to try this: https://www.reddit.com/r/archlinux/comments/4cojj9/it_is_probably_time_to_ditch_xf86videointel/

All 72 comments

Is this something demonstrable with Intel graphics?

nVidia hardware so far as I said. No clue about Intel. Do you have Intel hardware? Do you see any screen tearing in games or movies in Totem? This has always been a problem for me on Mint.

If there is a setting that successfully can force vsync on in every app perhaps it should be made the default configuration setting for all nVidia hardware.

Intel here (4500MHD) and there is tearing everywhere out of the box. Adding some Clutter environment variable hacks gets rid of it but then everything is jerky and slow to respond (dragged windows lag behind the cursor).

What Clutter variable are you using out of curiosity? One or both of these?

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

Tried each of those as well as both, no dice. Note: GNOME and most other Xorg DEs also seem to do this. Weston doesn't.

But is that what you used to eliminate tearing?

As for things slowing down when you did apply whatever tearing fix you used, that might be due to some inefficiency in Clutter and/or the particular fix you used. If I were you I'd give Compton a try and see if you get no tearing + better performance than Clutter. Corvias has it posted here:

http://www.reddit.com/r/linux_gaming/comments/28skqt/psa_do_you_have_screen_tearing_issues_only_in/

Sorry, yes the CLUTTER_PAINT line fixes tearing by itself but it causes the other problems I described.

As for the other fix, it says to install Openbox. Is it possible to use Compton with Cinnamon?

I was curious about that myself as well, I saw it mentioned that there is no "--replace", so you cannot swap in Compton and swap out Clutter once running Cinnamon, but maybe there is a way to load up Cinnamon with Compton instead, not sure how to though.

It looks like trying out Compton is pretty easy though, just install the Openbox metapackage, Compton, make the config file and select Openbox in the login manager to log into. Curious to try it out myself now when I have some spare time to see if I get any performance differences in games.

So, here: https://github.com/linuxmint/muffin/pull/86, we made detection of these types of programs better, to improve their performance (by not compositing them). People were beating down the doors saying we needed to do this if Cinnamon was to be a gaming platform. (I'm not exaggerating!)

So, now, we seem to have exposed this side effect of tearing (of course), which I can't reproduce yet, but I'm going to keep trying.

Ideally, we have the performance and the no-tearing, but aren't the two mutually exclusive to a degree? Honestly I'm not very familiar anymore with the different drivers and manufacturers out there. I'd welcome more input (and of course I'll continue to look for more info too).

Yeah it is indeed a strange issue. My understanding is X.org by default doesn't want to vsync, whereas Wayland by default does want to vsync, so Wayland apps don't have to implement code to force vsync on like they do with X apps.

There are a lot of movies and games in which tearing is particularly visible and I can easily see a line(s) across my monitor. There are several other games where it isn't though. It may depend on what monitor you have, too. That's why perhaps having a setting in Cinnamon to force on or off vsync might be the best solution, and then based upon certain hardware perhaps you could change what the default setting should be, or just not bother with that last part.

It's easiest to notice in situations where large blocks of graphics are moving, so movies are particularly noticeable.

Some Steam games I've noticed it in extra easily (pan around the screen):
Snapshot
XCOM (until they implemented vsync support, it was especially noticeable in movie sequences)
Defense Zone 1 and 2
World of Goo
Probably several others I can't think of at the moment. Many games are OK due to having vsync options in-game, especially many of the "higher-end" games like Painkiller and Civilization.

I couldn't reproduce it on any open source games yet.

Totem/Movie Player is very easy to reproduce though. Can play any movie, especially high-res movies, I get a very solid tearing line at 1/3rd of the way down my screen. However, VLC does not have this issue so that is what I use on my HTPC with Mint 17 and nVidia. Using some other type of output apparently.

What I haven't done yet is compare framerate performance between Compton and Cinnamon and other WMs. If Compton fixes screen tearing _and_ gives a better framerate, maybe Cinnamon should switch to it instead of Mutter/Muffin. XD

I'm definitely willing to do tests and troubleshooting in my spare time if there are any helpful tests that I can do or things I can try. ^n.n^

The thing that gets me (unless I'm misreading about Compton) is an easy fix would just be to _force_ redirection (compositing) on these windows, or simply provide a switch (like in an applet) to allow you to disable unredirect detection - nothing to do with vsync at all.

Discussing with someone who knows a bit more about video cards, and reading a bit myself, it seems like they all have their own way to force vsync on or off, and as you mentioned, some of the programs themselves do as well. So would it be satisfactory to simply avoid the issue and force compositing in these cases?

Right, unless there is a way to have Muffin adjust a program's settings to avoid screen tearing, it'd probably be best to have an option to force it on everywhere, just like you can do with Compton from what I understand from what Corvias has said here:
http://www.reddit.com/r/linux_gaming/comments/28skqt/psa_do_you_have_screen_tearing_issues_only_in/
with:
compton -b --backend glx --vsync opengl-swc

...since it looks like the "sync to vblank" option in the nVidia control panel is useless or helpless in fixing it. XD

I need to play with some Muffin settings and see if I can fix tearing through it. Do you know of any settings that might do so? If I remember correctly in Mint 16 I used some settings that fixed tearing, but Corvias tried "everything" he said and couldn't get it fixed without using Compton, but I still need to try myself.

Either way, once the right setting or solution is found, having an option in Effects or someplace better for that might be good. That'd be easy enough I could add it myself. XD

Has any of you already tried Gnome Shell to see if the tearing (and other vsync issues) also happen there?

I've heard complaints of Gnome Shell having vsync issues, but have not tried it yet myself. I'll install a few DEs this weekend and try things out.

I also have a tearing issue on the desktop - about 10-15 pixels wide lane is tearing, everything else is good. This bug exists in all cinnamon versions, intel hd graphics here.

Hello!
I have got tearing issues with Intel GMA 4500MHD using cinnamon.
It happens with other linux distros as well, using unity, or gnome 3 desktop environment.
So It seems like It's gnome 3 related issue. (Doesn't happen with Linuxmint + mate)
The tearing occurs at scrolling pages, or playing youtube videos (full screen youtube is worse), but It doesn't affected the full screen movie playing, that's fine.

Do you have any idea for this? Thank you!

After some searching, I found this: https://bbs.archlinux.org/viewtopic.php?id=177925&p=1
What is you opinion about it?
This issue exist for a long time. :-/

It seems like it's better with this xorg.conf content:
Section "Device"
Identifier "Intel Graphics"
Driver "intel"
Option "TearFree" "true"
EndSection

/etc/environment has already this two lines by default:
(only this doesn't helped, I had to add the xorg.conf lines)
CLUTTER_PAINT=disable-clipped-redraws:disable-culling
CLUTTER_VBLANK=True

Are you using Linux Mint 17.1? It has vsync turned on by default in everything unless you turn it off in the options.

Yes, it's 17.1 (upgraded from Linuxmint 17).
The issue happened on both, until I just added TearFree in xorg.conf now.

On Linux Mint 17.1 and the integrated graphics of an Intel Core i5-3450 the tearing happens on desktop applications like Sublime or Firefox. On an i5 laptop, it also happens even in VLC, horribly so.

When I watch videos or play games, the screen gets updated inside the windows I see a triangle in the lower-left and another in the upper-right inside of the rectangular part of the screen that gets updated. My card is an "Integrated Intel Graphics Media Accelerator 3100". It is another issue with synchronisation, else I wouldn't see two triangles in portions of the screen that get updated. My "xorg.conf" file in "/etc/X11/" is empty, so I don't know what to do about that and how I am going to fix this problem.

Hopefully this issue is gone in Mint 17.3 for everyone, it's been gone for me for a long while but I'm still on NVIDIA.

@Swiftpaw I do still get tearing on Cinnamon with Nvidia on my 4K monitor, but not my 1080p monitor.

What settings are you using to remove tearing?

I get tearing on both of my 60Hz monitors using a GTX 760 and Linux Mint 17.2 Rafaela.

If I have understood it correctly; screen tearing is a guarranteed issue (at least for Linux) if your GPU is of the Kepler architecture and you're not using a global Vsync.
My problem is that I can't find any Vsync setting in Nvidia X Server Settings, and I'm a Linux-newbie so I don't know of any other softwares that can do that. Any recommendations?

edit: Is this fixed in 17.3?
edit2: no
edit3: July 15th. This part is off-topic as it isn't EXPLICITLY about (or even applicable to?) Cinnamon, but I'm hitching to the thread if I may since this is a prominent result when googling "Linux Mint screen tearing", and it might help some poor lost soul, like me writing the things above. Please let me know if this is not allowed at all

So here's a brief write-up of what I've learned about Linux screen tearing since I posted ITT a couple weeks ago. I'm still not exactly what you would call an expert so excuse me if my terminology is off. Written for anyone like me who stumbled into this thread from Google looking for ANY fix to "tearing in Linux" whatsoever.

If you want to spend as little time and effort as possible your first go-to should be to check if you're currently using any sort of compositor, be it a compositing "Window Manager" or a standalone compositor. If your Desktop Environment is Cinnamon, chances are that you are using "Muffin" which is a compositing WM.
If you have confirmed that you are indeed in a composited environment; make sure global vsync is active and then you should be good. If you're using a compositing WM and vsync is definitely on but you're still getting tearing; look into turning compositing off (at least I THINK that's a requirement, I never tried "turning off compositing" in a WM personally) and getting a standalone compositor - for example Compton or xcompmgr-dana.
That's as far as I can help if you don't want to change your current WM and you're still having issues.

However, if you are ok with changing your software and spending time learning about crap I'm pretty sure is not applicable to anything in life but graphics in GNU/Linux, the following paragraphs are for you.

Check which WMs are compatible with your current DE (or if the DE even allows an alternative WM) and then switch to a compositing one, for example Compiz. Also, a standalone compositor is pretty much always an option as long as you can turn off compositing in your current WM.

The root of the problem lies within X11 (aka X, aka X-Windows) which is what your DE or WM is using to display graphics. X11 has been piled upon with software additions and upgrades since the late 80's and is - from what I hear - a jumbled mess.
Wayland is a modern replacement for X, designed from the start to be used with compositing environments. It is in development at the moment so supported applications are scarce. On top of that; only a select few distros are compatible, depending on their supported toolkits. If you're able and willing despite that then it's definitely worth trying out.

I get diagonal screen tearing in Firefox in Linux Mint 18 Cinnamon beta on Intel Graphics.

➜ ~ inxi -Fxz
System: Host: lapgk Kernel: 4.4.0-24-generic x86_64 (64 bit gcc: 5.3.1)
Desktop: Cinnamon 3.0.5 (Gtk 3.18.9-1ubuntu3)
Distro: Linux Mint 18 Sarah
Machine: System: Dell (portable) product: Latitude E6540 v: 00
Mobo: Dell model: N/A Bios: Dell v: A16 date: 09/01/2015
CPU: Quad core Intel Core i7-4800MQ (-HT-MCP-) cache: 6144 KB
flags: (lm nx sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx) bmips: 21550
clock speeds: max: 3700 MHz 1: 2716 MHz 2: 2700 MHz 3: 2700 MHz
4: 2700 MHz 5: 2711 MHz 6: 2725 MHz 7: 2847 MHz 8: 2704 MHz
Graphics: Card-1: Intel 4th Gen Core Processor Integrated Graphics Controller
bus-ID: 00:02.0
Card-2: Advanced Micro Devices [AMD/ATI] Mars XTX [Radeon HD 8790M]
bus-ID: 01:00.0
Display Server: X.Org 1.18.3 driver: intel
Resolution: [email protected]
GLX Renderer: Mesa DRI Intel Haswell Mobile
GLX Version: 3.0 Mesa 11.2.0 Direct Rendering: Yes
Audio: Card-1 Intel 8 Series/C220 Series High Definition Audio Controller
driver: snd_hda_intel bus-ID: 00:1b.0
Card-2 Intel Xeon E3-1200 v3/4th Gen Core Processor HD Audio Controller
driver: snd_hda_intel bus-ID: 00:03.0
Card-3 Logitech Webcam C270 driver: USB Audio usb-ID: 003-039
Sound: Advanced Linux Sound Architecture v: k4.4.0-24-generic
Network: Card-1: Intel Ethernet Connection I217-LM
driver: e1000e v: 3.2.6-k port: f080 bus-ID: 00:19.0
IF: eno1 state: up speed: 1000 Mbps duplex: full mac:
Card-2: Intel Centrino Ultimate-N 6300
driver: iwlwifi bus-ID: 03:00.0
IF: wlp3s0 state: up mac:
Drives: HDD Total Size: 512.1GB (54.6% used)
ID-1: /dev/sda model: Crucial_CT512MX1 size: 512.1GB
ID-2: /dev/mmcblk0 model: N/A size: 64.3GB
Partition: ID-1: / size: 470G used: 235G (53%) fs: ext4 dev: /dev/dm-1
ID-2: /boot size: 236M used: 60M (27%) fs: ext2 dev: /dev/sda1
RAID: No RAID devices: /proc/mdstat, md_mod kernel module present
Sensors: System Temperatures: cpu: 50.0C mobo: N/A gpu: N/A
Fan Speeds (in rpm): cpu: N/A
Info: Processes: 283 Uptime: 4 days Memory: 5866.6/15952.7MB
Init: systemd runlevel: 5 Gcc sys: 5.3.1
Client: Shell (zsh 5.1.1) inxi: 2.2.35

`

I also get diagonal screen tearing in Firefox, using Intel integrated graphics (Intel® HD Graphics 520).

System: Host: nix-johan Kernel: 4.4.0-28-generic x86_64 (64 bit gcc: 5.3.1)
Desktop: Cinnamon 3.0.6 (Gtk 3.18.9-1ubuntu3)
Distro: Linux Mint 18 Sarah
Machine: System: Dell (portable) product: XPS 13 9350
Mobo: Dell model: 07TYC2 v: A01
Bios: Dell v: 1.4.4 date: 06/14/2016
CPU: Dual core Intel Core i5-6200U (-HT-MCP-) cache: 3072 KB
flags: (lm nx sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx) bmips: 9600
clock speeds: max: 2800 MHz 1: 790 MHz 2: 781 MHz 3: 733 MHz
4: 799 MHz
Graphics: Card: Intel Sky Lake Integrated Graphics bus-ID: 00:02.0
Display Server: X.Org 1.18.3 drivers: intel (unloaded: fbdev,vesa)
Resolution: [email protected]
GLX Renderer: Mesa DRI Intel HD Graphics 520 (Skylake GT2)
GLX Version: 3.0 Mesa 11.2.0 Direct Rendering: Yes
Info: Processes: 218 Uptime: 9:13 Memory: 1221.5/7608.6MB
Init: systemd runlevel: 5 Gcc sys: 5.3.1
Client: Shell (bash 4.3.421) inxi: 2.2.35

I know exactly what issue you guys are talking about. I fixed it by using the generic modesetting Xorg module instead of the Intel one. This was achieved by simply removing the module:
sudo apt-get remove xserver-xorg-video-intel

Relevant reddit thread that prompted me to try this: https://www.reddit.com/r/archlinux/comments/4cojj9/it_is_probably_time_to_ditch_xf86videointel/

@Frogging101 Thank you for letting us know. This seems to have solved my tearing issue in Firefox, and presumably system-wide as well. At the first boot after having removed the module, my system got stuck at the Mint boot animation. Fortunately, after a hard-shutdown, it booted without any issues.

@Frogging101 Strange solution, worked for me too

not worked for me :

System:    Host: lemao-portable Kernel: 4.4.0-34-generic x86_64 (64 bit gcc: 5.3.1)
           Desktop: Cinnamon 3.0.7 (Gtk 3.18.9-1ubuntu3.1)
           Distro: Linux Mint 18 Sarah
Machine:   System: Micro-Star product: GE70 2PE v: REV:1.0
           Mobo: Micro-Star model: MS-1759 v: REV:0.B
           Bios: American Megatrends v: E1759IMS.525 date: 11/05/2014
CPU:       Dual core Intel Core i5-4210H (-HT-MCP-) cache: 3072 KB
           flags: (lm nx sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx) bmips: 11573
           clock speeds: max: 3500 MHz 1: 2987 MHz 2: 3077 MHz 3: 2985 MHz
           4: 3023 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.3 driver: nvidia
           Resolution: [email protected]
           GLX Renderer: GeForce GTX 860M/PCIe/SSE2
           GLX Version: 4.5.0 NVIDIA 361.42 Direct Rendering: Yes

i have try this too :
https://forums.linuxmint.com/viewtopic.php?f=206&t=136859?f=206&t=136859#p743478

EDIT : i have only the problem with Nvidia, if i switch to intel i don't have any problem.

@NodokaMurmevent - you need to use bumblebee or prime. I've got almost the same laptop (Acer Aspire V17, i7-4720HQ and Nvidia 860M) and I could never use the Nvidia only without tearing. The reason is the Nvidia uses the Intel's framebuffer (or something like that) so if you try to use _only_ the Nvidia, there's no control of the framebuffer to vsync, and you get tearing. I use Bumblebee and Primusrun to run stuff on the Nvidia on demand, and no tearing. :)

Bumblee isn't perfect, though, and I haven't been able to fully disable the Nvidia when not in use, so there's no real power savings... :/

thanks for the infos ! I only use the switch in the drivers. I will try Bumblebee.

sudo apt-get remove xserver-xorg-video-intel

That totally worked for me. Thank you. I think they could add that fix as default.
I got Mint 18, GTX 650, i5-3330

I don't know if this contributes to the conversation any. When I try

# Cinnamon 2.8.8
CLUTTER_VBLANK=False cinnamon --replace --clutter-show-fps --clutter-default-fps=75

I got

*** Error in `cinnamon': double free or corruption (!prev): 0x00005646fa5578e0 ***

I was trying to turn Vblank off because cinnamon was limiting clutter and programs (glxgears) to ~60FPS with a tv plugged in over HDMI (that I wasn't actively using); I would like to find a way to run programs at the native 75 FPS/Hz of my primary display without physically unpluggin the hdmi cable. I was extra frustrated because the Nvidia Control Panel had the 75Hz monitor selected for its "XServer XVideo" "Sync to this device" but things still run at 60FPS.

But I dont really understand video well enough to know if forcing cinnamon to run at the higher 75FPS would make for issues for a 60Hz display. I didn't think so, But its the only reason I can figure why Clutter/Cinnamon would opt to use the lesser clock.

j'ai le même problème pour ma part. (tearing diagonal ds firefox avec carte intel).

@sibe39 I had the same problem but I was able to solve it with the uxa acceleration mode. I posted some instructions and a conf file. https://github.com/echuber2/linux-settings

@echuber2 With "uxa", the "MDM Session" lag (very low), it's not possible ! (but the tearing diagonal in firefox disappears with uxa).
There is only "sna" and "glamor" which works correctly (but with diagonal tearing in firefox...).

A another solution to solve the problem of diagonal tearing by with sna in conf file ?

@sibe39 You're right, it seems to have poor latency. It's as though the desktop framerate has dropped to 30fps. I've just committed a new version of the conf that uses glamor and seems to work more smoothly. Can you try it out? If this still doesn't work, I'm going to try to get modesetting to work or try other driver PPAs. (Alternatively, I could just stop using Cinnamon. I don't think people are having these problems with other WMs+Compton, but I'd rather not switch.)

Also, I did put the CLUTTER tweaks in /etc/environment. With that and the conf, it's currently not tearing and mostly smooth, with occasional lag. (Nope, see below.)

Actually the issue with lag gets worse when the CLUTTER tweaks are added in uxa and glamor modes. I'm getting the best result with glamor+no clutter tweaks right now.

@echuber2 The diagonal tearing is specific for firefox (No problem with chromium or other application : vlc, mplayer etc...).
Best for the moment is : go in "about:config" (in firefox) and for "gfx.xrender.enabled" put "true" and no tearing. (There may be some scratches that appear but it is less embarrassing and rare).

The diagonal tearing problem in firefox is also present in "Gnome 3/Gnome Shell" (not specific cinnamon).

PS : With xfce, compton is not necessary with intel card for not to have of tearing, this file in /etc/X11/xorg.conf.d is enough : https://github.com/sibe39/scripts_divers/blob/master/xorg_intel.conf

Summary of opportunities against the tearing : https://raw.githubusercontent.com/sibe39/Doc/master/regler_probleme_tearing.txt

@sibe39 Thank you! (I'll update my readme later...) What I did was: update to LM18.1, get 4.8 kernel and latest nvidia drivers, setup bumblebee completely, leave SNA as the default mode, and crucially, turn on gfx.xrender.enabled to stop the diagonal problem in Firefox. This does work better than any of my xorg.conf suggestions.

I'm continuing to have this issue with what seems like no solution in sight. I have a Dell XPS 15 laptop with NVIDIA Optimus running on a Skylake Intel HD 530 and a GTX 960M combo.

The issue seems to occur when I have bumblebee installed for GPU switching, which should default to running off the Intel GPU. There is no tearing if I don't have bumblebee installed and default to using the NVIDIA GPU. If I choose to set the intel GPU to use the intel driver rather than leaving it at modesetting, I get insane graphical artifacts regardless of the settings I choose.

Is there some setting in the compositor that can be changed? I've installed KDE on the side and tested the same configuration with bumblebee and there is no tearing whatsoever. This issue only persists on Cinnamon.

In nvidia-settings, do you have it configured to sync to your display?

Not sure what distro you are running, but you could try reinstalling and reconfiguring Bumblebee with the procedure described here. http://lenovolinux.blogspot.com.au/2018/02/bumblebee-on-lenovo-t440p-nvidia-gt.html

@mainmachine It's not possible to configure nvidia-settings to sync with display since you cannot access advanced settings when using an Optimus laptop and have bumblebee installed. I'm also not sure why that would change anything since the video output should be coming through the Intel integrated GPU?

image

@echuber2 I'm running on the latest Arch Linux.

Might want to check your xorg logs for errors and warnings, and still peruse the link I posted above to make sure your modules are being updated correctly (although I'm sure it's different for Arch)

@echuber2 checking Xorg logs for errors and warnings specific to what problem? Because bumblebee is definitely working. Not sure how Xorg logs would help with V-sync or tearing issues. What I'm getting is a diagonal tearing that is system wide and is not limited to just firefox or chrome. This is especially evident if I move windows around really fast.

Running glxgears -info | grep GL_RENDERER vs optirun glxgears -info | grep GL_RENDERER yields GL_RENDERER = Mesa DRI Intel(R) HD Graphics 530 (Skylake GT2) and GL_RENDERER = GeForce GTX 960M/PCIe/SSE2 respectively. So bumblebee is definitely working here.

@kvnxiao - Yes, the Intel GPU should be doing this, but check on the "X Server XVideo Settings" tab. I'm typing this from a Optimus laptop and I don't have tearing, so there's hope. :)

I am using modesetting driver as well, looking through my Xorg.0.log...

Can you post your Xorg.0.log somewhere?

I've been trying for years and I've never been able to eliminate Vsync/tearing issues on my machine. It's not as bad as it used to, but I still occasionally notice it when I play some high-bitrate videos. I use Nvidia graphics only.

If you guys go to https://www.vsynctester.com and run the test, can you see the red or cyan vsync in the right corner? I haven't been able to eliminate that no matter what "fix" or browser I tried.

@mainmachine Here is my Xorg.0.log file:
xorg.0.log

In the X Server XVideo Settings tab, it says Currently synced to display: Unknown
image

@echuber2 - that looks like a good resource for that specific hardware; here's another that I've found invaluable (it is specific to Ubuntu, though):

http://danielteichman.blogspot.com/2017/03/how-to-install-bumblebee-on-ubuntu-1604.html

@kvnxiao - it's probably worth looking over your config versus these two links.

I'm also using the latest stable Mesa (17.3.2) - what are you using?

@mainmachine @echuber2

Good news! It seems like after some tinkering I actually got it to work! No more diagonal screen tearing visible system wide.

I'm not sure if this applies to other optimus users with older integrated intel GPUs, but for Skylake users with Intel HD 530, this is what I found that helped me fixed the problem.
I followed danalec's post in this thread here: https://bbs.archlinux.org/viewtopic.php?id=208299
Reinstalled xf86-video-intel and added a 20-intel.conf to my xorg configurations to use intel over modesetting (for the TearFree=true setting, which only works in AccelMethod=sna):

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

Since I use GRUB, I then added these kernel parameters to /etc/default/grub in the GRUB_CMDLINE_LINUX_DEFAULT line:

modprobe.blacklist=nouveau i915.enable_rc6=0 i915.enable_psr=0 i915.preliminary_hw_support=1 i915.enable_hd_vgaarb=1 intel_idle.max_cstate=1

And regenerated my grub configuration file, then rebooted.

All that, and bumblebee is still working:

$ optirun glxgears -info | grep GL_RENDERER
GL_RENDERER   = GeForce GTX 960M/PCIe/SSE2

@kvnxiao - the only difference I've seen that looks notable is that your Xorg is this:
[ 2.393] (II) Loading /usr/lib/xorg/modules/drivers/intel_drv.so
...I have this xorg module, but it does not get loaded. AFAIK with Bumblebee you should not have a /etc/X11/xorg.conf, this is handled by Bumblebee for the Nvidia GPU with /etc/bumblebee/*.conf

Do you have an xorg.conf in /etc/X11/ and if so, what's in it? If you have any lines specifying or loading the "intel" module, then I'd comment and restart...

@kvnxiao - that's great! 👍

As far as this issue goes globally, it seems as if more and more vsync is getting solved at the driver level. This has certainly been my experience with Nvidia, AMD and Intel, on both Nvidia proprietary and Mesa... maybe this isn't an issue for Cinnamon (or any other DE) specifically anymore...?

@mainmachine Well... the reason I asked for help originally was because while on the modesetting driver for the integrated intel GPU, there didn't appear to be any screen tearing when I was testing in KDE. Going back to Cinnamon, there's horrible screen tearing unless I use the intel driver and apply the changes I listed in the above post.

To me that seemed like a DE issue. If while keeping the system configuration constant, swapping to a different DE showed no screen tearing, but swapping back and screen tearing shows up again.

@kvnxiao - sure, could be Kwin was doing something different at the compositor level, versus what muffin does. With regard to DE's, tearing is usually solved by compositing in the window manager. I think currently Cinnamon does this by default, but there is an option to disable compositing for full screen applications (like games, for example). This is in Settings > General > Disable compositing for full-screen windows, if you're curious.

These doesn't help me out on my radeon r5 230 1Gb VRAM caicos GPU. I have no such things with couple of others DE's to be honest the only DE which has these issue is Cinnamon.

This problem is still quite alive and well. Must be some complicated for it to have a 6+ year span.

@cppcooper

Can you be more specific about what symptoms you're seeing and what configuration you have, now?

I see vsync-issues & tearing in cinnamon, the issue subsides if I start the session with xfce instead.
I am running Archlinux, I do not recall what the kernel version is. I can say I cloned the repo and built it this last weekend.
I have tried numerous potential remedies, but the only one that works is using xfce which is unfortunate because I prefer the panels and default hotkeys in Cinnamon. Switching the vsync method, nouvea/nvidia drivers were both tried, tried the different composition pipeline options in the nvidia settings, etc.

I only consider it a problem inside firefox when watching videos. I even tried some firefox specific fixes, which I figured might work since VLC doesn't seem to suffer as badly from it. In fact any time I think I've seen tearing I'm not sure if it was or not, so it might as well be considered tear-free at that point (VLC that is).

Nvidia GT 710

I have tearing in Linux Mint 19.3 (Cinnamon, 64-bit) with Nvidia GTX 1060 (3GB) (driver: 440.48.02), using desktop applications such as firefox, as well as in games (i recently tried CounterStrike:CZ, Torchlight 2, No Man's Sky and various different Unity3d Games, also self made Unity3d Games).

To solve this, i tried what they said here: https://github.com/linuxmint/Cinnamon/issues/3355
also added "ForceFullCompositionPipeline" to both of my monitors.

I've read that it should be less issue on MATE, but i would prefer to stay with Cinnamon.

I have tearing in Linux Mint 19.3 (Cinnamon, 64-bit) with Nvidia GTX 1060 (3GB) (driver: 440.48.02), using desktop applications such as firefox, as well as in games (i recently tried CounterStrike:CZ, Torchlight 2, No Man's Sky and various different Unity3d Games, also self made Unity3d Games).

Why do you need the nvidia beta vulkan driver?, ubuntu vulkan packages aren't new enough to benefit from the new extensions.

To solve this, i tried what they said here: #3355
also added "ForceFullCompositionPipeline" to both of my monitors.

I doubt adding that option will help with the newer nvidia drivers

I've read that it should be less issue on MATE, but i would prefer to stay with Cinnamon.

@leigh123linux
the newest driver was recommended in a forum cause i had problems with Unity3d using Vulkan and No Man's Sky using also only vulkan.

ForceFullCompositionPipeline helped a bit for desktop application, its way better for me with enabled, but didn't get rid of it completly

Seeing the same problem with Nvidia RTX 2070 on Ubuntu 19.10 and Cinnamon 4.2.4 (though same was with previous versions for the past year+) and as others have tried ForceFullCompositionPipeline and other settings to no avail. Beyond it be annoying for me, apparently it's pretty bad on web meettngs - I need to be on zoom often and share my screen which makes the attendees see the desktop or window or I'm sharing disappear and show my background and then reappear periodically. After months of trying to resolve this, regrettably I'd had to switch to the default GNOME (3.34.2) and everything has been fine but I do miss my Cinnamon. Would love to see a fix for this.

Have you tried the various Vsync modes in the control panel?

https://www.reddit.com/r/CinnamonDE/comments/dx4lyk/vsync_method/

Honestly I am skeptical the vsync modes do anything, there is no discernible difference between any of them for me. After rebooting between changing the modes.

Check the source if you're skeptical. They do something; I saw it make a difference on one of my machines instantly after changing the setting. (That did not have an nvidia GPU though.) If anything I bet this all comes down the drivers you have installed. Although, if there is something distinctively wrong with Cinnamon's vsync then I'd also like to know about it.

I also tried different vsync modes but it did not make a noticeable difference. I also tried different driver versions, the recommended one, the newest, older stable drivers that were recommended by community users, nothing helped.

@echuber2 I too have tried those various Vsync modes and followed the steps in the link. No change. I'm on an Nvidia. And I don't think it's the drivers as I don't have this issue anymore with GNOME :( Open to trying other things as would love to switch back.

Was this page helpful?
0 / 5 - 0 ratings