linuxmint / cinnamon

A Linux desktop featuring a traditional layout, built from modern technology and introducing brand new innovative features.
GNU General Public License v2.0
4.56k stars 743 forks source link

Window redraw lag when dragging windows #2465

Open wrouesnel opened 11 years ago

wrouesnel commented 11 years ago

Cinnamon 2.0.2 and all earlier versions I've used seem to do an excessive amount of processing when click-dragging windows.

This manifests as a slight, but noticeable stutter when sliding the window around, which makes the desktop experience seem laggy - it's extremely noticeable when I boot from Cinnamon into Windows 7, where windows slide around smoothly.

If I monitor the cinnamon process with top, I can see the CPU usage while not dragging, but doing something like playing a YouTube video sits at around 5-10%. The moment I start dragging a window (a Chrome window full of text) - cpu usage jumps to about 30%.

ccurvey commented 11 years ago

I hate to say "me too", but..."Me too!" I'm running on a somewhat older box, with Cinnamon running on top of Ubuntu 13.04. Everything else seems OK, it's just window dragging that is an issue. And the "stutter" is noticable, after which the window just jumps to the next point. It seems to happen when dragging any window (chrome, uxterm). Let me know what other supporting info I can provide. I can't find anything interesting in my system logs.

ManIVIctorious commented 11 years ago

I can confirm this, but i have a very poor graphics card...

ScipioAfricanus commented 11 years ago

I'm experiencing these same issues too. I'm running the latest Cinnamon from the nightly ppa on Ubuntu 13.10.

mdsitton commented 11 years ago

I run a multihead system on arch linux with cinnamon 2.0.2 currently (3x 1920x1080) i have tried both a 660 and my 7870. They both exibit the same behavior, extremly laggy windows when moving or sizing. Im using the opensource drivers atm. (Will try catalyst once they are updated to work)

On my system its almost unbearable.

cunoastere commented 11 years ago

---Update--- if I disable in Cinnamon Settings panel -> Window Tiling and Edge Flip -> Window Tiling and Snapping - the windows move again fast across the screen; I got this hint by moving around a window and I got the new HUD thing showing me the position that I could put that window; whenever HUD was showing up the lagg will start.

I can confirm the same behaviour on my laptop; using Manjaro Linux and Cinnamon 2.0.6 I have a dual-core P6100 CPU and an Intel HD 3000 graphics card. I dind't have this issue before with 1.6 or 1.8. I was looking for an option with Muffin to disable "window content" while moving but no luck so far, using Dconf editor. It would be great if someone would provide an explanation why this is happening. Keep up the good work ;)!

leigh123linux commented 11 years ago

The delay on windows dragging is nothing compared to resizing windows (eg: gnome-terminal), it can take several seconds :-(

hadim commented 11 years ago

I confirm this bug with Intel core I5 and Intel graphic controller (2nd generation).

mtwebster commented 11 years ago

You can set the tile HUD threshold to 1 and it will essentially disable the HUD display while still keeping tiling enabled. Maybe in the next version a more direct way of disabling it can be added, along with a more robust set of graphics for animating the HUD.

devtoi commented 10 years ago

I can confirm this bug on i7-2600K CPU and AMD R9 290 GPU(latest beta drivers). Particularly on my 120hz screen. Disabling tiling and snapping did not help.

mtwebster commented 10 years ago

What version of Cinnamon are you running? One cause of this was patched relatively recently.

https://github.com/linuxmint/muffin/commit/403d24edc854c6610ff46427b6cf2072fa62bfa5

devtoi commented 10 years ago

I am running Cinnamon 2.0.14. Will try to install the latest.

mtwebster commented 10 years ago

Having the latest muffin is probably more important. If you're on muffin 2.0.4 you don't have the fix yet. If you run 2.0.5 it will have it.

(I'm not guaranteeing your particular issue is fixed, could be some other cause possibly, but it's worth checking)

andrewfraley commented 10 years ago

I am experiencing something similar with Cinnamon 2.0.14 and Muffin 2.0.5 on Mint 16 with an i5-4440s with Intel HD 4600 graphics. When I drag Windows they cannot keep up with the mouse cursor. It's as if the windows are are attached to my cursor with a small rubber band.

andrewfraley commented 10 years ago

Here's a video of what I'm experiencing. Is this normal behavior? http://youtu.be/KylzMTZpD7w

mdirik commented 10 years ago

I can confirm this case is still valid for Cinnamon 2.2.14 and also Gnome Shell 3.12.2 on Debian Jessie.

pinumbernumber commented 10 years ago

I also get this and it's really distracting to be honest. Markedly less smooth than Unity etc, and indeed Windows...

andrewfraley commented 10 years ago

Experiencing the same thing I complained about previously, but also with an NVidia GTX 760. The problem is definitely worse with multiple monitors.

andresmanz commented 10 years ago

I get this on Cinnamon 2.2.14, too, with an NVidia GT 630 with the proprietary driver version 340.24 (and two Monitors). When downgrading to driver version 304, the windows move fast again, but then I experience tearing.

mdirik commented 10 years ago

On Sun 10 Aug 2014 04:04:47 AM EEST, Andres Manz wrote:

I get this on Cinnamon 2.2.14, too, with an NVidia GT 630 with the proprietary driver version 340.24 (and two Monitors). When downgrading to driver version 304, the windows move fast again, but then I experience tearing.

Window drag lag disappears when the vsync is disabled via the environment variables. AFAIK Nvidia driver 304 doesn't enable vsync by default (unlike the newer ones), so it may explain why you have fast dragging and tearing when you downgrade to it.

High CPU usage is prevalent regardless of vsync, though.

pinumbernumber commented 10 years ago

Can confirm that windows are a lot less laggy if I make no attempt to enable vsync (intel drivers), but then videos are unwatchable.

startas commented 10 years ago

Its also strange that linux mint doesnt have this bug, and arch linux has.

pinumbernumber commented 10 years ago

@startas No, I'm getting it on Mint 17.

mdsitton commented 10 years ago

Even weirder since i posted in this issue, i havent had the issue again. I have since installed cinnamon on several differant devices, hardware, and software(distros) configurations.

startas commented 10 years ago

Its weird - i "solved" this issue (i have only intel hd graphics, so it only might work for intel graphics) by recompiling xf86-video-intel with flag "--disable-dri3", and recompiling lib32-mesa with same flag "--disable-dri3", of course you must also remove flag "--enable-dri3". While i'm using 64 bit linux, compiling 64 bit mesa package without dri3 and installing it crashes cinnamon desktop, but somehow recompiling only xf86-video-intel and 32 bit version of mesa for 64 bit systems "fixed this issue", it also fixed huge lags in chrome. Only disabling dri3 in 2d drivers doesnt work, but disabling dri3 in 32 bit version of mesa and installing it worked, i wonder why - this package is not even installed by default, as 64 bit linux uses 64 bit cinnamon, so it uses 64 bit mesa, and i have no idea how it worked :D

mdsitton commented 10 years ago

except there is one issue with that, DRI3 didnt exist when this issue was first created.

Currently arch linux also diables DRI3 by default i think?

wrouesnel commented 10 years ago

This issue feels like it might be related to something I see in Kerbal Space Program on Linux (with Cinnamon): perfect frameworks, except when I click and hold the mouse to pan around a rocket - then it stutters and jumps badly. Cinnamon is perhaps doing some kind of blocking in the redraw loop for mouse events?

startas commented 10 years ago

In arch linux, xf86-video-intel is compiled without dri3, but mesa is compiled with dri3.

joemaro commented 9 years ago

on my quite fast pc, resizing windows with cinnamon is a pain and i would love an option to disable the realtime visualization of the content of the window. xfce does this in a very good way.

HTL2001 commented 9 years ago

This is happening but only on my external monitor, on a Macbook ("late 2014") with intel graphics. The window will also display tearing artifacts, again only on the external display. The lag does not noticeably change if I enable "TearFree" but it does fix the tearing. I am scaling the external display up 2x2 with xrandr.

edit: I should note that something like glxgears does not suffer reduced framerate if I drag it around on that display, in fact it was reporting ~71 fps on a 60Hz monitor, despite the movement making it look <10 frames per second. Leaving it alone it performs normally.

edit2: it appears the scaling does not change the lag either.

tand00ri commented 9 years ago

@wrouesnel and others...

The KSP issue specifically is probably due to your mouse polling rate being set too high, particularly if you have a gaming mouse, such as a Razer DeathAdder or similar (which I use). The following tutorial should help:

https://patrickmn.com/aside/lowering-gaming-mouse-sensitivity-in-ubuntu-9-10/

darekdeo commented 8 years ago

I've recorded a video showing issue I have (Chromium browser dragging issue, while Nemo and Firefox are runned for comparison only): https://youtu.be/Ec99EYjwiqY I have the same issue with IntellJ and sometimes with Pidgin or less times with Nemo. I am using Mint 17.3 and Cinnamon 2.8.6 with amd propietary drivers. Things to note:

-Mint 17.3 with Cinnamon 2.8.6 -couldn't load opensource gpu drivers to test them, it kept me in software rendering mode now (I remember xorg open source worked fine when I've installed 17.0 Mint back few months ago) -Forcing disabled vsync in amd propietary CCC help little less laggy windows, but it makes screen tearing especialy while scrolling websites -When Cinnamon just started everything works fine, no laggy dragging windows, no laggy resizing. The issue is present after some time (for example 10-40 minutes after Chromium was started) -Restarting Cinnamon (ctrl + alt + esc) does help temporary (above point) -(edit): it did not happen before on 17.2 and Cinnamon 2.6 if I remember correctly, but I had bigger tearing problem back then.

Edit: The same things happes using opensource drivers, managed to re-install them.

darekdeo commented 8 years ago

Running fresh Mint 17.3 Cinnamon from USB stick, the same issue as explained above. Checked Ubuntu Gnome3 and Ubuntu Mate for comparison. While running both from USB for quite long time I haven't noticed any issues/slowdowns.

Somehow it looks like it is related to GPU, happens especially to software which have GPU support, like Chromium. Second thing to note is, it looks like it happens faster while having intelihide for menubar and keep punching menubar with Chromium window. I can hear fans in laptop start to work louder. Best to drag Chromium window by circulating over desktop.

"Disable composing for fullscreen windows" enabled/disabled - no change

It is slow to repruduce even with punching menubar, easiest way is to simply browse Internet for some time, but I understand it could be hell for debugging.

CarstenKoenig commented 8 years ago

I have this issue too - but what I noticed is that windows get laggy after some time - but if I open new ones they don't lag.

For example if I let a terminal sit there for say an hour it will stutter while dragging quite a bit, but a newly opened terminal will behave just fine.

And yes that's when I have chrome open (which is basically open all the time).

It's no big deal as every other aspect seems to work fine (for example you don't notice more lag in games or something) - the only other strange thing I noticed is that the lock screen takes about 10sec. to load (I never noticed that before I ugraded to Mint 17.3)


PS: I noticed that the cinnamon --replace process will show quite high CPU usage (around 16% on my system) some time after I moved a laggy window around.

darekdeo commented 8 years ago

Disabled intellihide, set panel to always show. Running currently OS for few hours and surprise! no lags! I just feel like in heaven.

cptX commented 8 years ago

I can confirm the lag of the window behind cursor, in Linux Mint 17.3, Cinnamon 2.8.6, with nvidia 352.63 proprietary driver. Very annoying! The problem is independent of compositing enabled or not!

Poeschl commented 8 years ago

I can also confirm the lag with Mint 17.3, Cinnamon 2.8.6 and integrated Graphics of i5-4210U or a nVidea GeForce 820M. I played a little with the show/hide panel settings and it appears that the lag is only there when the panel is shown. When I set it to auto-hide all window drags are smooth. (Yeah I know this is the complete opposite of the comment from DarekDeo).

darekdeo commented 8 years ago

Maybe not complete opposite, from both of our comments looks like something is wrong with the panel. :)

edit: or at least related to it.

vivek313 commented 8 years ago

I have this issue as well. Anyone try a different graphics driver? I had this problem on Xubuntu 15.10 and once I changed the driver, everything worked fine. I can't seem to find that option here? I go to drivers in settings panel and a blank list just shows up.

davidva-cml commented 8 years ago

Setup: Fedora 23, Cinnamon, GDM, Nvidia proprietary drivers (also with Nouveau)

I am also experiencing stuttering when dragging windows, and also when typing or scrolling through a file in Vim. For instance, while I type, a few letters will appear with the keystroke, then the cursor will hang for a few milliseconds, and then the letters I typed during the hang all appear.

The stuttering seems to happen regularly. If I had to guess, I'd say about every 500 ms. Interestingly, if I move a window around quickly for a period of time, top shows Xorg sometimes taking a huge percentage of the CPU (~53%) when moving windows...this does not seem right. Any ideas?

EDIT: I booted up the Fedora 23 Cinnamon Spin Live CD and interestingly, did not encounter any stuttering. But, using the same DM environment (Cinnamon, lightdm, nouveau drivers) in my HDD installation still does. I may try installing the Cinnamon spin directly off the Live CD on a different machine to see if the problem persists; I will report back with any results.

netsudo commented 8 years ago

Wow, okay. Thanks @DarekDeo this works much better when the smart panel is disabled. Just a shame I can't watch Youtube videos in the large player when my browser is fullscreened now, which is why I turned that panel on in the first place, but the windows were getting bad.

I find it strange how laggy all windows still are though, they're not unbearable, but if I go back to Windows my 144hz makes everything look and feel so smooth, moving windows around and they all feel so solid and stable, come back on Linux and my 60 almost feels smoother than my 144 and windows feel like they're meant to be laggy when you're dragging them around.

I also just want to add that the intelligent panel seems to affect windows as well, my browser had been flickering white full on glitching out a lot, went through a few trying them out to see which one no longer experienced it, thought something might be broken with cinnamon or my graphics driver, turns out the panel was the problem @_@

davidva-cml commented 8 years ago

Well that's interesting, I noticed the stuttering I was seeing seemed to happen at the same frequency as the System Monitor applet was updating, so I removed it from the panel and rebooted, and now the stutter has gone away for me. This seems to further support @DarekDeo 's suggestion that something might be wrong with the panel. Maybe, whatever process/thing is updating it is hanging briefly during its redraw loop (I am not a graphics programmer)?

kgillibrand commented 8 years ago

I have the same issue actually, updating to a newer version of Cinnamon made it a bit better but my Nvidia desktop (i5-3570k, Nvidia 780ti) is still not as smooth as my much less powerful Intel graphics laptop (i7-4500u, Intel graphics 4400).

Both of them are running Mint 17.3, Cinnamon 3.04 (nightly channel), and the 4.4.0-22 kernel.

The drivers used are Nvidia's 364 (364.19-0ubuntu0~gpu14.04.3) from the Nvidia drivers PPA and the Intel drivers included in the kernel.

igrek00 commented 8 years ago

@davidva-cml thank you, removing Sytem Monitor applet solved problem for me!

noobmagnet commented 8 years ago

Turned off "sync to vblank" in the nvidia xserver settings and resizing apps like Telegram is smooth as butter now

SamusAranX commented 7 years ago

This is still a problem for me. I'm using a fresh install of Ubuntu 16.04.1, using an Nvidia GTX 1070 with driver version 375, so performance shouldn't be an issue.

Vahan86 commented 7 years ago

@JosephMcc, can we mark this issue as a bug?

melroy89 commented 7 years ago

@davidva-cml Did you manage to get it fixed? I also see Xorg on top of CPU usage when dragging windows... Maybe we should report it as a Xorg issue. Although it could always be a Cinnamon issue afterall.. The simplest way to reproduce is to run glxgears on the background while dragging windows around.

However, some people within this issue could suffer from a totally different lagg issue (which could be Cinnamon related).

JoMas971 commented 7 years ago

I'm afraid that i have the same issue. But i have a really powerful PC (Core i7-5930K 3.5GHz 6 cores + Nvidia TITAN X running the latest nvidia driver + 32 GB of RAM and my OS ins installed on a SSD). So performances shouldn't be an issue. But still, every time i'm trying to drag a window, i have slowness like everyone else in this thread. But the most open apps i have the more slowness it is ! When i monitor (htop) i can se that the Xorg process take 90% or more of CPU usage. So it could come from Xorg, not cinnamon directly. It should be great to have feedback to understand what is going on there. Thanks.

Running : Linux kernel 4.10.0-generic FerenOS (which is using the latest version of Linux Mint distro) Running cinnamon 3.4.6

mikebutash commented 6 years ago

I'm curious if others have figured out any work arounds for this lately as this has gone quiet.

For me, Cinnamon begins destablizing with this lag growing from reboot over time, until it gets almost too annoying to take anymore, and usually I find I have to reboot it hard as the screen won't wake up from sleep any longer. Like the last post, it's a powerful computer (20 cores, 40 threads, dual xeon, 128gb ram, nvidia 1070, dual nvme, 3x 4k displays), so performance is not an issue, and I don't get this with other desktop environments other than kde (which has it's own compositing issues). I've turned off vblank and most other gl features, and still destabilizes, usually within a week, but never any errors to telltale toward something.

I'm using Arch linux, Cinnamon 3.8.1-1, 4.16.13 kernel, and nvidia 396.24 drivers. I keep upgrading hoping this goes away, but never does.

mikebutash commented 6 years ago

Apparently (as is with most every desktop now) the answer is to simply use software rendering of the desktop. I managed to go a few weeks last time before I was getting a 5 second display timeout about every minute or so, which becomes rather infuriating over time.

Usually I just flip to a different desktop, KDE (praying they fix it too) or Mate (marco tends to behave, but the desktop is otherwise lacking vs. others) after a pacman -Syyu, but this time I noticed the cinnamon software render mode. After a week of normal use with software render, I'd normally start getting the lag after a few days, but with software mode, it's been smooth, and really see no downside in performance in desktop use.

It's a shame this compositor bug seems to persist, but is almost certainly video/gl related. Compositors are the bane of every linux desktop I find, I've yet to find one that behaves properly, even windoze aero I found in 4k is absolute crap that shipped with my xps 9560.