godot icon indicating copy to clipboard operation
godot copied to clipboard

Grabbing and moving Godot window is laggy on Linux (GNOME)

Open Pilvinen opened this issue 5 years ago • 18 comments
trafficstars


Bugsquad note: This issue has been confirmed several times already. No need to confirm it further.


Godot version: Godot mono 64 bit 3.x and higher.

OS/device including version: Ubuntu Linux 18.04 with XFCE window manager. GeForce GTX 750 Ti, NVIDIA driver 435.21, GLES3 and GLES2.

Issue description: When you try to move a Godot window it's very hard to move it because it becomes laggy. Some of the CPU cores become maxed out while you're moving it. This also happens to any OS windows that are moving across the Godot window.

Steps to reproduce:

  1. Install Ubuntu 18.04 with NVDIA drivers.
  2. Get Godot stable Linux Mono 64 bit version.
  3. Create any "hello world" project.
  4. Run project.
  5. Try to grab and drag the Godot window around or any other window across it.

Video showing the problem https://www.dropbox.com/s/3n7vwjqp69274sa/2020-06-01%2015-56-06.mov?dl=0

Pilvinen avatar Jun 01 '20 13:06 Pilvinen

I can't reproduce this on the following configuration, both with compositing disabled and enabled:

  • NVIDIA GeForce GTX 1080 (driver version 440.82)
  • Godot 3.2.2beta3
  • Fedora 31
  • KDE Plasma 5.17.5, KWin 5.17.5

Can you reproduce this after disabling compositing in the Xfce window manager settings?

Calinou avatar Jun 01 '20 13:06 Calinou

I forgot to mention that I have a multi-monitor setup with three monitors which might affect the result.

Disabling compositing makes it behave normally as far as I can tell.

With compositing off it sometimes "paints" the screen with the Godot window, but not with other OS windows.

Pilvinen avatar Jun 01 '20 13:06 Pilvinen

I had this issue on Ubuntu 22.04 running GNOME on X11.

I tried another window manager, awesomewm, and the issue was no longer there. So it may be something with Ubuntu/GNOME/mutter.

bizzk3t avatar May 23 '22 07:05 bizzk3t

Can reproduce on Arch Linux running GNOME X11, single monitor setup

MoltenCoreDev avatar Jul 13 '22 18:07 MoltenCoreDev

Can reproduce on Arch Linux running GNOME X11, single monitor setup

Which graphics card model and driver are you using?

Calinou avatar Jul 13 '22 21:07 Calinou

A GTX 1660 Super, running proprietary drivers version 515.57. Also the project is using GLES3

MoltenCoreDev avatar Jul 13 '22 22:07 MoltenCoreDev

I'm also still getting some jank while resizing or moving the Godot window on Alpha 16. I have a PopOS 22.04 - NVIDIA Quadro P1000 The driver I use is the proprietary Nvidia one, version : 515.48.07 But I also tried with version 510, and got the same problem.

I have recorded a video showing this in another issue here : #63788

#EDIT : This is only happening on Godot 4 Alpha. Godot 3 is working great, no jank at all (cf the video)

Cheers

hakro avatar Sep 07 '22 15:09 hakro

This is a HotSpot profile on Fedora 37 KDE where I resize the window every frame by dragging its corner during 10 seconds:

image

Compare this to a profile where I rotate the camera in the 3D editor continuously for 10 seconds, but never resize the window:

image

The bottleneck seems to be Control/OptionButton update notifications, which are called when the window is resized as the root Control's size changes (and therefore, minimum sizes need to be recalculated).

Calinou avatar Mar 21 '23 16:03 Calinou

I have the same exact problem. If I move or resize the window it becomes really laggy. I tested and it seems to only happen in Foward+ because it doesn't do it in Compatibility.

Vysp3r avatar Jul 11 '23 00:07 Vysp3r

this happens on both Forward+ and Mobile for me, just in case someone wants to investigate this further

GravermanDev avatar Oct 15 '23 20:10 GravermanDev

Same here, using Manjaro, and nvidia 535. The whole Godot becomes super laggy to me, even menus. Only on Forward+.

DavidGasku avatar Oct 21 '23 19:10 DavidGasku

Had the same laggy UI problem, tried updating NVidia drivers to no avail. What works for me is opening NVidia Settings, going to OpenGL Settings and unchecking the option Allow Flipping. Restart Godot and the choppiness is gone for me. No idea what this option does though.

Edit: actually, restarting Godot doesn't even seem necessary for me. As soon as I check Allow Flipping, dragging the Godot window instantly becomes laggy. And as soon as I uncheck it, it's smooth again.

image

$ inxi -Fxz
System:
  Kernel: 6.2.0-36-generic x86_64 bits: 64 compiler: N/A Desktop: GNOME 42.9
    Distro: Ubuntu 22.04.3 LTS (Jammy Jellyfish)
Machine:
  Type: Desktop Mobo: ASUSTeK model: ROG STRIX X570-F GAMING v: Rev X.0x
    serial: <superuser required> UEFI: American Megatrends v: 4408
    date: 10/27/2022
CPU:
  Info: 6-core model: AMD Ryzen 5 5600X bits: 64 type: MT MCP arch: Zen 3
    rev: 0 cache: L1: 384 KiB L2: 3 MiB L3: 32 MiB
  Speed (MHz): avg: 2711 high: 3700 min/max: 2200/4650 boost: enabled
    cores: 1: 2200 2: 2875 3: 2200 4: 2874 5: 3475 6: 2200 7: 3700 8: 2873
    9: 2200 10: 2200 11: 2863 12: 2873 bogomips: 88635
  Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm
Graphics:
  Device-1: NVIDIA GA104 [GeForce RTX 3070 Lite Hash Rate] vendor: Gigabyte
    driver: nvidia v: 535.129.03 bus-ID: 0a:00.0
  Display: x11 server: X.Org v: 1.21.1.4 driver: X: loaded: nvidia
    unloaded: fbdev,modesetting,nouveau,vesa gpu: nvidia resolution: 3440x1440
  OpenGL: renderer: NVIDIA GeForce RTX 3070/PCIe/SSE2
    v: 4.6.0 NVIDIA 535.129.03 direct render: Yes
Audio:
  Device-1: NVIDIA GA104 High Definition Audio vendor: Gigabyte
    driver: snd_hda_intel v: kernel bus-ID: 0a:00.1
  Device-2: AMD Starship/Matisse HD Audio vendor: ASUSTeK
    driver: snd_hda_intel v: kernel bus-ID: 0c:00.4
  Device-3: SteelSeries ApS Arctis 7 type: USB
    driver: hid-generic,snd-usb-audio,usbhid bus-ID: 3-4:3
  Sound Server-1: ALSA v: k6.2.0-36-generic running: yes
  Sound Server-2: PulseAudio v: 15.99.1 running: yes
  Sound Server-3: PipeWire v: 0.3.48 running: yes
Network:
  Device-1: Intel I211 Gigabit Network vendor: ASUSTeK driver: igb v: kernel
    port: f000 bus-ID: 06:00.0
  IF: enp6s0 state: up speed: 1000 Mbps duplex: full mac: <filter>
  IF-ID-1: br-2060f9e73e0b state: down mac: <filter>
  IF-ID-2: docker0 state: down mac: <filter>
Drives:
  Local Storage: total: 1.82 TiB used: 165.46 GiB (8.9%)
  ID-1: /dev/nvme0n1 vendor: Samsung model: SSD 970 EVO 1TB
    size: 931.51 GiB temp: 40.9 C
  ID-2: /dev/nvme1n1 vendor: Samsung model: SSD 970 EVO 1TB
    size: 931.51 GiB temp: 42.9 C
Partition:
  ID-1: / size: 915.82 GiB used: 165.43 GiB (18.1%) fs: ext4
    dev: /dev/nvme1n1p1
  ID-2: /boot/efi size: 96 MiB used: 32.4 MiB (33.8%) fs: vfat
    dev: /dev/nvme0n1p1
Swap:
  ID-1: swap-1 type: file size: 2 GiB used: 0 KiB (0.0%) file: /swapfile
Sensors:
  System Temperatures: cpu: 37.0 C mobo: 38.0 C gpu: nvidia temp: 51 C
  Fan Speeds (RPM): N/A gpu: nvidia fan: 0%
Info:
  Processes: 319 Uptime: 6m Memory: 31.25 GiB used: 3.71 GiB (11.9%)
  Init: systemd runlevel: 5 Compilers: gcc: 11.4.0 Packages: 2526 Shell: Bash
  v: 5.1.16 inxi: 3.3.13

choonge avatar Nov 07 '23 06:11 choonge

No idea what this option does though.

Beware there are negative consequences to disabling Allow Flipping, such as VRR not working.

Calinou avatar Nov 07 '23 09:11 Calinou

Seems like everyone here has an NVIDIA GPU. Does anyone have this problem on AMD or is it another NVIDIA driver shenanigans.

Vysp3r avatar Nov 07 '23 13:11 Vysp3r

Also confirming this issue. Nvidia GTX 1080 TI on Arch Linux with latest KDE Plasma and Gnome desktop environments. Dragging either a Godot game (debug or exported) and/or the Godot game editor window around is very laggy. This has been an issue at least since version 4 of Godot (only because I haven't tried any version prior).

JamesMowery avatar Jan 17 '24 02:01 JamesMowery

@JamesMowery Can you try disabling Allow Flipping in nvidia-settings as described above?

Also, can you reproduce this if you force the GPU to run at a high power state in the PowerMizer tab of nvidia-settings?

Calinou avatar Jan 17 '24 14:01 Calinou

@Calinou I can reproduce this on Godot 4.2.1. I am using Nvidia GTX 670 on Ubuntu 22.04.4 LTS with Gnome desktop environment. Disabling Allow Flipping makes the problem go away. Setting the Prefer Maximum Performance in PowerMixer settings does not help. The laggy behavior happens on Forward+ and Mobile modes but not on Compability.

ranzuh avatar Feb 24 '24 17:02 ranzuh

  • Godot 4.2.2 Stable
  • nVidia RTX 3080, 2x monitors, connected via DisplayPort.
  • Proprietary driver 550.78, on Arch. Fresh install of the whole OS.

New empty project. Forward+ and Mobile cause stutters when I drag the window around. Compatibility doesn't.

Disabling OpenGL -> Allow Flipping in the nvidia-settings tool makes the stuttering go away. ~~I see the warning above in this thread about enabling it, but this was enabled by default for me~~ (edit: oops, misread the post. it was warning about disabling the setting, not enabling it).

Setting PowerMizer to Prefer Maximum Performance in nvidia-settings makes no difference at all. It shows the "performance level" going up to 4 in the nvidia-settings UI, but dragging the Godot window still stutters exactly as much.

Edit: I noticed the bugsquad notice above. I'm going to leave this repro info anyhow since I took the time to gather it. Better than it going to waste.

I also did a bisect. The first commit where the problem begins: 197cb4e7718034aba35832a547477dfc858a7280

kavika13 avatar May 14 '24 18:05 kavika13

+1

cpuccino avatar Jun 11 '24 03:06 cpuccino

@cpuccino Please don't bump issues without contributing significant new information. Use the :+1: reaction button on the first post instead.

Calinou avatar Jun 11 '24 15:06 Calinou

This still happens in 4.3 beta3.

Where it occurs for me: 4.3 beta3 (builds: yes, editor: no ! ) 4.1.1 stable (builds:yes, editor:yes)

Toggling "Allow Flipping" on or off makes no difference in my case.

Godot v4.3.beta3.mono - Ubuntu 22.04.4 LTS 22.04 - X11 - Vulkan (Forward+) - dedicated NVIDIA GeForce GTX 1060 6GB (nvidia; 535.183.01)

Flavelius avatar Jul 21 '24 14:07 Flavelius

Was experiencing this on Pop!_OS on Godot 4.2.2 and Godot 4.3 until last night when I updated my OS.

heyitsdoodler avatar Aug 20 '24 13:08 heyitsdoodler