```
Issue
Graphics flicker (windows, tooltips, etc.). For example when I open the applications menu and close it while my mouse is hovering over the menu, then I will see the menu flicker. This also happens with context menus, tooltips, and basically anything that
Steps to reproduce
Update to Cinnamon 4.0.0 on Arch. Here is one way of triggering it:
You will now see the applications menu flickering for a few frames and then it disappears.
Note that this does not happen when the mouse is not in the region where the applications menu will appear. So if I have my mouse on the right side of the desktop and I open and close the menu, then there will be no flickering.
Another method is to open Nemo and drag the window around. You will see flickering (old contents of the Nemo window) where the window was a few frames before.
Expected behaviour
No flickering.
Other information
This started happening after I updated to Cinnamon 4.0.0.
I have tried using uxa and sna as AccelMethod, since in mutter (and muffin) it's known that sna can cause screen tearing. uxa is a bit slower but does not have screen tearing, but it does not stop the flickering.
Interestingly enough, I wanted to record my desktop to show the effect, but when during recording there was no flickering. After I stopped recording, Cinnamon crashed and asked if I wanted to restart Cinnamon. Scrolling in my browser (Vivaldi) also does not cause any flickering or other artifacts.
Also, software rendering does not have this problem (but of course is laggy).
Use the phone to record the footage.
I have tried using uxa and sna as AccelMethod, since in mutter (and muffin) it's known that sna can cause screen tearing. uxa is a bit slower but does not have screen tearing, but it does not stop the flickering.
Can you attach your xorg config? Also, are you using Muffin's vsync?
gsettings get org.cinnamon.muffin sync-to-vblank
You might want to try disabling your driver workarounds if vsync is enabled in Cinnamon.
Use the phone to record the footage.
Hopefully this gives you a better idea of what's going on. :)
I have tried using uxa and sna as AccelMethod, since in mutter (and muffin) it's known that sna can cause screen tearing. uxa is a bit slower but does not have screen tearing, but it does not stop the flickering.
Can you attach your xorg config? Also, are you using Muffin's vsync?
gsettings get org.cinnamon.muffin sync-to-vblankYou might want to try disabling your driver workarounds if vsync is enabled in Cinnamon.
That command returns true. I have no driver workarounds (other than sometimes switching to uxa for recording my desktop without screen tearing), so I don't know what I'd change.
This is what's in my /usr/share/X11/xorg.conf.d/20-intel.conf file:
#Section "Device"
# Identifier "Intel Graphics"
# Driver "intel"
# Option "AccelMethod" "sna"
# Option "DRI" "3"
# Option "TearFree" "true"
# Option "VirtualHeads" "2"
#EndSection
Section "Device"
Identifier "Intel Graphics"
Driver "intel"
Option "AccelMethod" "uxa"
Option "VirtualHeads" "2"
EndSection
It doesn't matter which section I use, the flickering remains.
oh wow, it's pretty bad :)
OK, I'll try to reproduce on some hardware here.
In the meantime see if you really need to use the intel driver, it's legacy and should only be used for really old chipsets.
You can try without the Xorg changes first, and then without the intel driver (i.e. falling back to modesetting).
I can reproduce a similar issue on Cinnamon 3.8.9. It only happens when I hover any window on top of the wallpaper, and display black squares on it (never on windows or menu). And it's not always when I move a window, most of times it's just by moving the mouse, or even during Firefox repaints (rough guess).
Context:
You can try without the Xorg changes first, and then without the intel driver (i.e. falling back to modesetting).
I switched to the modesetting driver and the problem remains :'(
Having the same or similar issues on Arch after upgrading my system a couple of mins ago. All Cinnamon related packages were bumped to 4.0.0. I am using the nvidia proprietary drivers.
Pretty much every animation of the desktop seems to be glitching, the launcher menu, the panel hiding animation, various other panel applets, the workspaces/expo plugin, etc... Resizing and moving windows also leaves tons of glitching artifacts. This happens on all of my screens. Even the text input and animations in Nemo glitches (using the address bar and browsing directories) and Chromium does, too (writing this text is quite difficult).
This makes Cinnamon unusable...
I recorded my bug: https://photos.app.goo.gl/sUUjrTMeSBFyefpW6
@eli-schwartz Why is Arch broken?, I can't reproduce this on my Intel(Ironlake) or nvidia(1050Ti) hardware.
Here's a couple things you can try:
gsettings set org.cinnamon.muffin threaded-swap false (restart Cinnamon)This disables the threaded implementation for swap waiting. I haven't had any issues with this, but worth trying. If no change, its better to leave it on.
Review performance considerations I've outlined on the wiki.
Check env in bash. If there any variables that alter the behavior of Clutter, remove them. E.g., CLUTTER_VBLANK, CLUTTER_PAINT, etc.
I have been testing with both Nvidia and Intel and can't reproduce this. I'm going to install Mesa 18.2.0 and see if it makes a difference.
OpenGL vendor string: Intel Open Source Technology Center
OpenGL renderer string: Mesa DRI Intel(R) HD Graphics 520 (Skylake GT2)
OpenGL core profile version string: 4.5 (Core Profile) Mesa 18.0.5
OpenGL core profile shading language version string: 4.50
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL core profile extensions:
OpenGL version string: 3.0 Mesa 18.0.5
OpenGL shading language version string: 1.30
OpenGL context flags: (none)
OpenGL extensions:
OpenGL ES profile version string: OpenGL ES 3.2 Mesa 18.0.5
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20
OpenGL ES profile extensions:
OpenGL vendor string: NVIDIA Corporation
OpenGL renderer string: GeForce GTX 1080 Ti/PCIe/SSE2
OpenGL core profile version string: 4.6.0 NVIDIA 396.54.09
OpenGL core profile shading language version string: 4.60 NVIDIA
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL core profile extensions:
OpenGL version string: 4.6.0 NVIDIA 396.54.09
OpenGL shading language version string: 4.60 NVIDIA
OpenGL context flags: (none)
OpenGL profile mask: (none)
OpenGL extensions:
OpenGL ES profile version string: OpenGL ES 3.2 NVIDIA 396.54.09
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20
Here's a couple things you can try:
gsettings set org.cinnamon.muffin threaded-swap falseThis disables the threaded implementation for swap waiting. I haven't had any issues with this, but worth trying. If no change, its better to leave it on.
Didn't help.
- Check
envin bash. If there any variables that alter the behavior of Clutter, remove them. E.g.,CLUTTER_VBLANK,CLUTTER_PAINT, etc.
I actually modified ~/.profile and added:
export CLUTTER_VBLANK=
export CLUTTER_PAINT=
and now I have no more flickering! :+1: I then tried only the VBLANK line and that didn't help. If I only unset CLUTTER_PAINT then the flickering stops. The previous value of CLUTTER_PAINT for me was:
CLUTTER_PAINT=disable-clipped-redraws:disable-culling
Hope this helps!
gsettings set org.cinnamon.muffin threaded-swap false
This seems to have fixed a couple of issues, but I'm not sure, because I reloaded Cinnamon afterwards. The glitches while moving and resizing windows were still there.
CLUTTER_PAINT
I had set CLUTTER_PAINT=disable-clipped-redraws:disable-culling in my /etc/environment and commenting this out and relogging seems to have fixed the issue.
However, if I drag the windows around really fast, occasionally a couple of flashing/flickering lines/artifacts of the silhouette are still there. The overall performance also seems worse. Moving the window of a video player like MPV lets the image freeze.
Regarding Force (Full) Composition Pipeline, I will try this later today...
@leigh123linux I don't know -- I cannot reproduce it either! Tried on two systems, both intel integrated graphics, ivy bridge (thinkpad x230) and sandy bridge (Dell Latitude E5420).
Okay, yes, I can reproduce this iff I export CLUTTER_PAINT='disable-clipped-redraws', which I did not have by default.
This seems to be essentially the muffin version of this mutter bug: https://bugzilla.gnome.org/show_bug.cgi?id=771815
I had nothing in env at first (env | grep -i clutter returns nothing). I tried to add this to my .profile and now it seems to work fine :+1:
Well it's back, maybe it was just reloading my session that made the bug disappear ?..
Do you want me to create a new bug ?
@shavounet Did you remove all traces of variables containing CLUTTER from your environment? Its not clear to me from your previous comment if you added or removed them.
I tried to add this to my .profile and now it seems to work fine
There are other flickering-related issues that I see on some configurations, but they're of the same nature that has existed on Muffin pre-4.0. That would be #5359 and https://github.com/linuxmint/muffin/issues/322 - they occur occasionally.
@eli-schwartz Try adding these configure options listed https://github.com/linuxmint/muffin/blob/master/debian/rules#L33
--disable-wayland-egl-platform \
--disable-wayland-egl-server \
--disable-kms-egl-platform \
--disable-wayland \
--disable-native-backend
Are the affected users using GDM?
Are the affected users using GDM?
I'm using LightDM...
The flickering does only occur when CLUTTER_PAINT is set with one of the disable-clipped-redraws or disable-culling values.
However, the other rare screen artifacts (black window silhouettes) when dragging the windows around really fast don't seem to be related to this issue here. This sounds more like linuxmint/muffin#322. I didn't notice it before, though.
Review performance considerations I've outlined on the wiki.
Regarding following the performance advices from the wiki, the performance is still worse after the 4.0.0 upgrade compared to before, most notably in the expo-plugin's desktop switching animation. I think that's because of the VBlank option, which is set to enabled by default now. Turning it off and just using "Force Full Composition Pipeline" in the nvidia xorg config, as opposed to the wiki, gives me much better performance, just like before the upgrade.
Regarding following the performance advices from the wiki, the performance is still worse after the 4.0.0 upgrade compared to before, most notably in the expo-plugin's desktop switching animation. I think that's because of the VBlank option, which is set to enabled by default now. Turning it off and just using "Force Full Composition Pipeline" in the nvidia xorg config, as opposed to the wiki, gives me much better performance, just like before the upgrade.
The cursor lagging behind a dragged window is an artifact, but not representative of overall compositor performance - same with animations. The main intent behind those suggestions is to reduce _application_ rendering related input latency. This shouldn't be confused with Muffin's own window management rendering. If you are comparing 3.8 with vblank off + force composition pipeline and 4.0 with vblank on, yes in my experience there is a huge improvement with input latency from other applications.
I've found force composition pipeline slows down application rendering on a GTX 970, 1070, and 1080ti on 60Hz 2560x1080 and 3440x1440 monitors. There will also be frame-pacing issues when vblank is disabled. You can test this by opening baobab and clicking on a drive - the spinner will run faster than it intended regardless of driver options.
If it works for you, that's great. I'm mainly trying to frame this in the proper context so people don't draw the wrong conclusions and use sketchy driver workarounds when its not necessary. So far the only good use case I've found for vblank off is when PRIME sync is in use.
@jaszhix There was nothing at first (no CLUTTER), and I added the empty definitions in my .profile (just to try...). My problem was temporary resolved, until I rebooted today.
It issues you pointed to me seems related, indeed. One of the last comment (https://github.com/linuxmint/Cinnamon/issues/5359#issuecomment-419063438) does work for me.
@eli-schwartz Try adding these configure options listed https://github.com/linuxmint/muffin/blob/master/debian/rules#L33
Tried building modified packages, this doesn't fix the issue. And our public clutter package actually enables this (as does gnome), despite that it worked before cinnamon 4 apparently.
I guess I could hear muffin disabling these options if cinnamon does not support wayland, but that's just a matter of not building unused code I guess. And it should probably be discussed as modified defaults for the (recursive) muffin configure.ac itself.
Are the affected users using GDM?
Definitely not. I reproduced the issue using barebones Xorg. Specifically, this script inspired by startx, but even simpler (it doesn't use xinit, for one): https://www.archlinux.org/packages/community/any/sx/
I was having these issues using just startx no login manager, can confirm the above fix resolves the flickering when moving windows or switching workspaces.
In my case I had
export CLUTTER_PAINT=disable-clipped-redraws:disable-culling
export CLUTTER_VBLANK=True
in my .xprofile
I then changed it to
export CLUTTER_PAINT=
export CLUTTER_VBLANK=
I'm having flickering issues when moving windows. Specially when approaching the right or bottom edge. It will almost always flicker on my second screen.
I have an amd rx 580.
Nothing makes a difference, i.e.: vsync, threaded swap, CLUTTER_*
I fixed this problem by switching from cinnamon software to cinnamon (hardware?)
FWIW I see flickering every 30 min or so. Resizing the background image and disabling Stretch mode seems to have resolved it. If anyone is interested in trying to repro, create large (6k x 4k) image and set to stretch to fit
Please, I have the same problem. There is a solution? I could not identify the fix in this issue!!