Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Window redraw lag when dragging windows #2465

Open
wrouesnel opened this issue Oct 14, 2013 · 98 comments
Open

Window redraw lag when dragging windows #2465

wrouesnel opened this issue Oct 14, 2013 · 98 comments
Labels

Comments

@wrouesnel
Copy link
Contributor

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
Copy link

ccurvey commented Oct 16, 2013

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
Copy link

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

@ScipioAfricanus
Copy link

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

@mdsitton
Copy link

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
Copy link

---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
Copy link
Contributor

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

@hadim
Copy link

hadim commented Nov 16, 2013

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

@mtwebster
Copy link
Member

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
Copy link

devtoi commented Feb 25, 2014

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
Copy link
Member

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

linuxmint/muffin@403d24e

@devtoi
Copy link

devtoi commented Feb 25, 2014

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

@mtwebster
Copy link
Member

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
Copy link

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
Copy link

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

@mdirik
Copy link

mdirik commented Jul 25, 2014

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

@pinumbernumber
Copy link

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

@andrewfraley
Copy link

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

@andresmanz
Copy link

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
Copy link

mdirik commented Aug 10, 2014

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
Copy link

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
Copy link

startas commented Aug 10, 2014

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

@pinumbernumber
Copy link

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

@mdsitton
Copy link

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
Copy link

startas commented Aug 14, 2014

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
Copy link

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
Copy link
Contributor Author

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
Copy link

startas commented Aug 14, 2014

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

@joemaro
Copy link

joemaro commented May 10, 2015

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
Copy link

HTL2001 commented May 22, 2015

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
Copy link

tand00ri commented Jun 9, 2015

@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/

@zunjack
Copy link

zunjack commented Oct 23, 2021

Luke Lafreniere just shamed Cinnamon on Linus Tech Tips for taking so long to fix this.

@warlon
Copy link

warlon commented Dec 8, 2021

This part of the video shows the issue in action: https://youtu.be/TtsglXhbxno?t=1294

@uzarnom
Copy link

uzarnom commented Feb 19, 2022

Hi All, so I recently installed mint. I have been having windows stuttering issues as well. I managed to resolve it.

Keeping in mind, I have an Nvidia card, with 2 monitors running at different refresh rates. (60Hz and 144Hz).

I following this guide: https://forums.linuxmint.com/viewtopic.php?t=367756

Steps

re-writing the part of the guide that worked for me

  1. open display application, ensure the refresh rate is correct for my monitors (60Hz and 144Hz)
  2. go to terminal and enter nvidia-settings
  3. in the nvidia settings GUI go --->X Screen 0 > OpenGL Settings
  4. turn off "Allow Flipping"
  5. and that was it, the guide says I'll need to redo it on every restart but I didn't need to

Inix -Fxxxrz

Expand my systems details ``` System: Kernel: 5.4.0-100-generic x86_64 bits: 64 compiler: gcc v: 9.3.0 Desktop: Cinnamon 5.2.7 wm: muffin 5.2.0 dm: LightDM 1.30.0 Distro: Linux Mint 20.3 Una base: Ubuntu 20.04 focal Machine: Type: Desktop Mobo: ASUSTeK model: ROG STRIX B450-I GAMING v: Rev 1.xx serial: BIOS: American Megatrends v: 4007 date: 12/08/2020 CPU: Topology: 8-Core model: AMD Ryzen 7 2700X bits: 64 type: MT MCP arch: Zen+ rev: 2 L2 cache: 4096 KiB flags: avx avx2 lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm bogomips: 118171 Speed: 2184 MHz min/max: 2200/3700 MHz boost: enabled Core speeds (MHz): 1: 1883 2: 1950 3: 2058 4: 1984 5: 2194 6: 2190 7: 2189 8: 2146 9: 2190 10: 2048 11: 2194 12: 2194 13: 2186 14: 2170 15: 2190 16: 2029 Graphics: Device-1: NVIDIA TU106 [GeForce RTX 2060 Rev. A] vendor: Gigabyte driver: nvidia v: 510.47.03 bus ID: 06:00.0 chip ID: 10de:1f08 Display: x11 server: X.Org 1.20.13 driver: nvidia unloaded: fbdev,modesetting,nouveau,vesa resolution: 1920x1080~60Hz OpenGL: renderer: NVIDIA GeForce RTX 2060/PCIe/SSE2 v: 4.6.0 NVIDIA 510.47.03 direct render: Yes Audio: Device-1: NVIDIA TU106 High Definition Audio vendor: Gigabyte driver: snd_hda_intel v: kernel bus ID: 06:00.1 chip ID: 10de:10f9 Device-2: AMD Family 17h HD Audio vendor: ASUSTeK driver: snd_hda_intel v: kernel bus ID: 09:00.3 chip ID: 1022:1457 Device-3: Plantronics HD1 type: USB driver: plantronics,snd-usb-audio,usbhid bus ID: 5-1:2 chip ID: 047f:c03b Sound Server: ALSA v: k5.4.0-100-generic Network: Device-1: Intel I211 Gigabit Network vendor: ASUSTeK driver: igb v: 5.6.0-k port: d000 bus ID: 03:00.0 chip ID: 8086:1539 IF: enp3s0 state: up speed: 1000 Mbps duplex: full mac: Device-2: Realtek RTL8822BE 802.11a/b/g/n/ac WiFi adapter vendor: ASUSTeK driver: rtw_pci v: N/A port: c000 bus ID: 04:00.0 chip ID: 10ec:b822 IF: wlp4s0 state: down mac: Drives: Local Storage: total: 3.42 TiB used: 26.04 GiB (0.7%) ID-1: /dev/nvme0n1 vendor: Samsung model: SSD 970 EVO Plus 1TB size: 931.51 GiB speed: 31.6 Gb/s lanes: 4 serial: rev: 3B2QEXM7 scheme: MBR ID-2: /dev/sda vendor: Samsung model: SSD 860 QVO 1TB size: 931.51 GiB speed: 6.0 Gb/s serial: rev: 1B6Q scheme: MBR ID-3: /dev/sdb vendor: Samsung model: SSD 850 EVO 500GB size: 465.76 GiB speed: 6.0 Gb/s serial: rev: 3B6Q scheme: MBR ID-4: /dev/sdc vendor: SK Hynix model: HFS256G39MND-3310A size: 238.47 GiB speed: 6.0 Gb/s serial: rev: 2P00 scheme: MBR ID-5: /dev/sdd type: USB vendor: Toshiba model: External USB 3.0 size: 931.51 GiB serial: rev: 5438 scheme: MBR Partition: ID-1: / size: 915.40 GiB used: 15.39 GiB (1.7%) fs: ext4 dev: /dev/nvme0n1p5 Sensors: System Temperatures: cpu: 45.5 C mobo: N/A gpu: nvidia temp: 50 C Fan Speeds (RPM): N/A gpu: nvidia fan: 36% Repos: No active apt repos in: /etc/apt/sources.list Active apt repos in: /etc/apt/sources.list.d/1password.list 1: deb [arch=amd64 signed-by=/usr/share/keyrings/1password-archive-keyring.gpg] https://downloads.1password.com/linux/debian/amd64 stable main Active apt repos in: /etc/apt/sources.list.d/additional-repositories.list 1: deb https://dl.winehq.org/wine-builds/ubuntu/ focal main Active apt repos in: /etc/apt/sources.list.d/official-package-repositories.list 1: deb http://packages.linuxmint.com una main upstream import backport #id:linuxmint_main 2: deb http://archive.ubuntu.com/ubuntu focal main restricted universe multiverse 3: deb http://archive.ubuntu.com/ubuntu focal-updates main restricted universe multiverse 4: deb http://archive.ubuntu.com/ubuntu focal-backports main restricted universe multiverse 5: deb http://security.ubuntu.com/ubuntu/ focal-security main restricted universe multiverse 6: deb http://archive.canonical.com/ubuntu/ focal partner Info: Processes: 401 Uptime: 29m Memory: 15.62 GiB used: 4.48 GiB (28.7%) Init: systemd v: 245 runlevel: 5 Compilers: gcc: 9.3.0 alt: 9 Shell: bash v: 5.0.17 running in: gnome-terminal inxi: 3.0.38 ```

@lukas-the-wizard
Copy link

lukas-the-wizard commented Feb 20, 2022

Luke Lafreniere just shamed Cinnamon on Linus Tech Tips for taking so long to fix this.

Linux mint is a buggy mess and noone in the dev team cares. The proof is that this issue is almost 10 years open

TLDR
Dont use Cinnamon for anything

@maxwell-kalin
Copy link

I was introduced to linux with mint.
Its sad to see this.

@melroy89
Copy link

melroy89 commented Feb 21, 2022

Linux mint is a buggy mess and noone in the dev team cares. The proof is that this issue is almost 10 years open

I really think that the Linux Mint dev team is doing a good job like @mtwebster is really doing it's best over here. So fist of all, all the ❤️ to Linux Mint. It's hard for just a few devs that are actively contributing to this project, making a good open-source and free product for us all. Cinnamon is mainly maintained now by mtwebster and that's about it.

If you compare that to the big tech companies like Microsoft. Microsoft says 1.3 million backend programmers worked on Windows 10. 800k designers, and 2 billion testers. So I think the world is not fair.

Creating over 1k issues on GitHub is easier than solving them and fixing all the C code.

@a73s
Copy link

a73s commented Mar 8, 2022

can confirm this is still a problem. only problem i have ever had with mint, its tolerable though. PRO TIP: it doesnt happen if the youtube video is fullscreen.

@melroy89
Copy link

We really need Wayland sooner than later

@a73s
Copy link

a73s commented Oct 4, 2022

This is solved for me with mint 21. must be the window manager/compositor update

@akaIDIOT
Copy link

akaIDIOT commented Jan 3, 2023

This problem started with Mint 21.1 (cinnamon 5.6.2+vera / muffin 5.6.2+vera) for me. Tried @uzarnom's solution of disabling flipping in the OpenGL settings to no avail. Like @a73s, though, it does seem to go away for full screen windows, as it's very noticeable when a video is playing in Firefox, for example. Dragging things around, I can see 'global the refresh rate isn't effected as the mouse cursor twirls about happily enough, it's just the window being dragged that's slugging behind, as well as its contents.

Recently upgrade to 21.1 from a fairly fresh 21. Before the upgrade, this was not an issue, everything seemed smooth enough. Running an nvidia 2070 super into 165Hz 3440×1440 and a 60Hz 5260×1440, both over their own displayport cables. Happy to provide other things that might be help in diagnosing this.

edit: fooling around with this, it's noticeable that the issue on the main screen (the big one) gets resolved by putting whatever's on the second screen in full screen so no parts of the desktop env are visible. Having no windows open over there makes no difference, still stuttery. Oddly enough, there's no need to put things full screen on the main one…

@Scramblejams
Copy link

FWIW, I had this issue as long as I had multiple monitors and was using an Nvidia card to drive them. On my last upgrade I switched to a recent AMD GPU, using the open source amdgpu driver, and the problem went away. (Well, still not as smooth as when I'm trying Wayland, but that's a separate issue.)

@akaIDIOT
Copy link

I recently noticed that my symptoms include way higher than expected CPU usage, on a single core. Tried some timing things, seems to not be hung up in system calls, but haven't been able to figure where that cpu time (that goes up when I drag a stuttery window around) goes yet.

@maxwell-kalin
Copy link

its pathetic that this issue is after 10 Years still a thing.

Never Mint again...

@seyfer
Copy link

seyfer commented Oct 25, 2023

I have this on latest Cinnamon and ubuntu 23.04

@akaIDIOT
Copy link

FWIW: this problem completely went away for me by swapping out my nvidia card for an AMD one (switched purely because of this issue). Never really managed to find out what was causing the higher CPU usage, but somewhere in the stack, changing from nvidia to AMD fixed both the higher CPU usage and the resulting lagginess.

@claudiux
Copy link
Member

nVidia code is private code.

@melroy89
Copy link

The issue is closed. Does that mean the window redraw lag is gone?

@akaIDIOT
Copy link

That was surely not my intention with the comment a couple hours ago... It's an observed difference, no statement claiming nVidia's code was the culprit here. Considering the whole things is noticeably different when something is in full screen mode, there's at least some weirdness going on somewhere, maybe not in nVidia's private code.

Just meant I can't really test anything anymore, as I can no longer reproduce it on different hardware...

@a73s
Copy link

a73s commented Oct 25, 2023

This should not have been closed, it cannot be assumed that it's nvidia's code causing the issue. If it was on nvidia's end wouldn't you see the same issue with other desktops?

@andrewfraley
Copy link

andrewfraley commented Oct 25, 2023

It's been over nine years since I first commented on this, but I first observed this same behavior on Intel graphics. I don't know if it's still a problem for Intel graphics, however.

@claudiux
Copy link
Member

I haven't encountered this problem in years with Intel or AMD graphics cards.

@811Alex
Copy link

811Alex commented Oct 26, 2023

I'd like to echo @a73s's sentiment.
On the exact same system Cinnamon had this issue on (multi-monitor desktop, Nvidia GPU, Intel CPU, plenty of resources), I've tried XFCE and KDE Plasma, both looked as smooth as it gets. I haven't experienced this problem on any other DE.

Make no mistake, this is a Cinnamon issue.

@claudiux claudiux reopened this Oct 26, 2023
@seyfer
Copy link

seyfer commented Oct 30, 2023

this is totally cinnamon with a GPU rendering issue
I did switch to the CPU rendering session, and everything ran smoothly.

@darkguset
Copy link

darkguset commented Jan 6, 2024

I have this on latest Cinnamon and ubuntu 23.04

Same here on Mint 21.2 with Kernel 6.2.0.39 - NVIDIA 3080Ti, dual monitors (main screen on DP0, secondary on HDMI0) - when both monitors are active moving windows on the main screen are jerky even though the mouse pointer is smooth and main monitor also reports 144Hz (secondary is at 60Hz). When deactivating the secondary monitor the jerkiness goes away.
I tried disabling the flipping method in OpenGL to no avail.

I think it might have something to do with the fact that the two monitors are running at different refresh rates. I changed both to 60Hz and the jerkiness seemed a bit less. It might be a placebo effect though, I can't be sure.

@akaIDIOT
Copy link

What @darkguset mentions sounds identical to what my situation was. What was interesting to me, and potentially useful in helping others / developers to debug this, is that the CPU usage spiked while dragging the stuttery windows. I couldn't find a decent way of logging or profiling what libraries or functions cause the usage spikes.

Would cinnamon developers be able to help with setting things up to uncover that kind of information? Hoping @darkguset would be willing and able to help, I've changed my hardware and can't currently reproduce the issue I had...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests