Nvidia driver causes Xorg to use 100% CPU and huge lag when dragging OpenGL app windows

Bug #1799679 reported by Daniel van Vugt
158
This bug affects 27 people
Affects Status Importance Assigned to Milestone
Mutter
Fix Released
Unknown
metacity (Ubuntu)
Invalid
Undecided
Unassigned
mutter (Ubuntu)
Opinion
Undecided
Unassigned
nvidia-graphics-drivers-390 (Ubuntu)
Won't Fix
Undecided
Unassigned
nvidia-graphics-drivers-410 (Ubuntu)
Won't Fix
Undecided
Unassigned
nvidia-graphics-drivers-418 (Ubuntu)
Won't Fix
Undecided
Unassigned
nvidia-graphics-drivers-470 (Ubuntu)
Won't Fix
Undecided
Unassigned
nvidia-graphics-drivers-510 (Ubuntu)
Won't Fix
Undecided
Unassigned
nvidia-graphics-drivers-515 (Ubuntu)
Won't Fix
Undecided
Unassigned
nvidia-graphics-drivers-525 (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Nvidia driver causes Xorg to use 100% CPU and shows high lag and stutter... but only when dragging glxgears/glxheads, or any window over them. Other apps do not exhibit the problem.

ProblemType: Bug
DistroRelease: Ubuntu 18.10
Package: nvidia-driver-390 390.87-0ubuntu1
ProcVersionSignature: Ubuntu 4.18.0-10.11-generic 4.18.12
Uname: Linux 4.18.0-10-generic x86_64
NonfreeKernelModules: nvidia_modeset nvidia
ApportVersion: 2.20.10-0ubuntu13
Architecture: amd64
Date: Wed Oct 24 19:11:15 2018
InstallationDate: Installed on 2018-05-26 (151 days ago)
InstallationMedia: Ubuntu 18.10 "Cosmic Cuttlefish" - Alpha amd64 (20180525)
ProcEnviron:
 TERM=xterm-256color
 PATH=(custom, no user)
 XDG_RUNTIME_DIR=<set>
 LANG=en_AU.UTF-8
 SHELL=/bin/bash
SourcePackage: nvidia-graphics-drivers-390
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Daniel van Vugt (vanvugt) wrote :
tags: added: performance
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Bug confirmed in two separate window managers so far:

  * Mutter / Gnome Shell

  * Metacity

description: updated
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Xorg profile of when I was just moving the glxgears window.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Workaround:

  env __GL_SYNC_TO_VBLANK=0 glxgears

This seems to be why unsynchronized apps like glmark2 are unaffected by the bug.

summary: - Nvidia driver causes Xorg to use 100% CPU, but only when dragging
- glxgears, or any window over glxgears
+ Nvidia driver causes Xorg to use 100% CPU and huge lag when dragging
+ glxgears
summary: Nvidia driver causes Xorg to use 100% CPU and huge lag when dragging
- glxgears
+ glxgears or glxheads
description: updated
Revision history for this message
Daniel van Vugt (vanvugt) wrote : Re: Nvidia driver causes Xorg to use 100% CPU and huge lag when dragging glxgears or glxheads

A video showing the lag.

tags: added: disco
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

The bug is also in nvidia-410.93 and nvidia-418.30 :(

tags: added: nvidia
Revision history for this message
Alexandr Oleynikov (devilspepper) wrote :

I don't think it affects just glxgears, I experience it with pretty much any app that utilizes opengl, like Chromium or any Electron-based app like Slack or Discord.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Yeah, it seems to be a general type of OpenGL application.

Changed in nvidia-graphics-drivers-390 (Ubuntu):
status: New → Confirmed
Changed in nvidia-graphics-drivers-410 (Ubuntu):
status: New → Confirmed
Changed in nvidia-graphics-drivers-418 (Ubuntu):
status: New → Confirmed
summary: Nvidia driver causes Xorg to use 100% CPU and huge lag when dragging
- glxgears or glxheads
+ OpenGL app windows
Revision history for this message
Daniel van Vugt (vanvugt) wrote :
tags: added: focal
removed: cosmic disco
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

This is still affecting focal in driver version 390 but 410 and 418 don't seem to exist anymore(?). It would be interesting to see if later versions still have this bug...

Changed in nvidia-graphics-drivers-410 (Ubuntu):
status: Confirmed → Won't Fix
Changed in nvidia-graphics-drivers-418 (Ubuntu):
status: Confirmed → Won't Fix
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in metacity (Ubuntu):
status: New → Confirmed
Changed in mutter (Ubuntu):
status: New → Confirmed
Changed in nvidia-graphics-drivers-510 (Ubuntu):
status: New → Confirmed
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

On second thoughts this might not be the only "lag" type problem affecting Nvidia in jammy. I can't actually reproduce it with GTK4 apps myself, but can with more traditional OpenGL apps.

Can anyone affected please try:

  * Disabling the 'Desktop Icons NG' extension in the Extensions app; or

  * Logging into 'Ubuntu on Wayland' instead?

Revision history for this message
Kes (mr-kyem) wrote :

Updated today to 22.04 and started noticing this issue as well.

easy to reproduce when chrome have video or any kind of animation happening.
If there are only static pages (like text). There are no lag. This affects all window dragging.

* terminal
* files
* other apps
* also chrome itself

Once chrome tab with animation/video/charts is closed or no longer active, everything start working fast again.

Only interesting err from journal:
```
google-chrome-beta.desktop[5530]: [5695:5695:0507/003622.561907:ERROR:shared_image_manager.cc(228)] SharedImageManager::ProduceSkia: Trying to Produce a Skia representation from a non-existent mailbox.
```

Revision history for this message
Mikael Bendiksen (unk1nd) wrote (last edit ):

Having this issue as same as Kes describes.
Can be reproduced under Xorg environment running Nvidia 510 drivers and Ubuntu 22.04.
Did not have this issue under 20.04.

If I have a youtube video running the chrome window lags and the terminal window lags while moving them. If I have this page open it moves without lag.

I tried to disable Desktop Icons NG, it helped the issue a bit, but there is still extreme lag.
Using Wayland seems to solve the issue, but there are still programs like OBS that I need to use that can't capture the desktop ( not related to this ).

Running glxgears also give me lag while moving the window.

Let me know if you need me to try something specific that might help you get more data out.

INXI dump:

System:
  Host: XXXXXXXXX Kernel: 5.15.0-27-generic x86_64 bits: 64
    Desktop: GNOME 42.0 Distro: Ubuntu 22.04 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: 4021
    date: 08/09/2021
CPU:
  Info: 16-core model: AMD Ryzen 9 5950X bits: 64 type: MT MCP cache:
    L2: 8 MiB
  Speed (MHz): avg: 3400 min/max: N/A cores: 1: 3394 2: 3394 3: 3394
    4: 3394 5: 3394 6: 3394 7: 3394 8: 3394 9: 3394 10: 3394 11: 3394 12: 3394
    13: 3394 14: 3394 15: 3394 16: 3394 17: 3394 18: 3394 19: 3394 20: 3394
    21: 3394 22: 3394 23: 3394 24: 3593 25: 3394 26: 3394 27: 3394 28: 3394
    29: 3394 30: 3394 31: 3394 32: 3394
Graphics:
  Device-1: NVIDIA GA102 [GeForce RTX 3080] driver: nvidia v: 510.60.02
  Display: x11 server: X.Org v: 1.21.1.3 driver: X: loaded: nvidia
    gpu: nvidia resolution: 1: 5120x1440~120Hz
  OpenGL: renderer: NVIDIA GeForce RTX 3080/PCIe/SSE2
    v: 4.6.0 NVIDIA 510.60.02

Sensors:
  System Temperatures: cpu: 34.5 C mobo: 34.0 C gpu: nvidia temp: 33 C
  Fan Speeds (RPM): fan-1: 0 fan-2: 1081 fan-3: 1135 fan-4: 1359
    fan-5: 4753 fan-6: 1227 gpu: nvidia fan: 0%
Info:
  Processes: 529 Uptime: 1d 4h 23m Memory: 31.26 GiB used: 4.54 GiB (14.5%)
  Shell: Bash inxi: 3.3.13

Video:
You can see that the clock at the top locks up when it happens.
https://youtu.be/fbVrXgGpFZI

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

> Using Wayland seems to solve the issue, but there are still programs
> like OBS that I need to use that can't capture the desktop

That was meant to be fixed in OBS Studio 27 (bug 1838967). If it's not working in Ubuntu 22.04 then please open a new bug.

Revision history for this message
riverfr0zen (riverfr0zen) wrote :

There is already a separate report, but it is marked as a duplicate of this issue. Is it supposed to be circular like that?

https://bugs.launchpad.net/ubuntu/+source/nvidia-graphics-drivers-510/+bug/1970413

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

It's not circular. Bug 1970413 is closed because it's a duplicate of this bug 1799679.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Nvidia's latest assessment is that this is indeed a driver bug so we don't need to keep the mutter and metacity tasks open here...

https://gitlab.gnome.org/GNOME/mutter/-/issues/2233#note_1538392

Changed in metacity (Ubuntu):
status: Confirmed → Invalid
Changed in mutter (Ubuntu):
status: Confirmed → Invalid
Changed in nvidia-graphics-drivers-515 (Ubuntu):
status: New → Confirmed
tags: added: jammy
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in nvidia-graphics-drivers-470 (Ubuntu):
status: New → Confirmed
Revision history for this message
Rodrigo (ro-goab) wrote :

Happy 4 years for this bug!

I have a 3070ti, the desktop is empty with nautilus, and moving the window is frustrating, too laggy.
However I can play steam games without problems or train ia models.

Revision history for this message
Dimitris Moraitidis (dimisjim) wrote :

also affects new 520 driver

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

NVIDIA says the fix is coming in driver 525:

https://gitlab.gnome.org/GNOME/mutter/-/issues/2233#note_1575235

Changed in nvidia-graphics-drivers-390 (Ubuntu):
status: Confirmed → Won't Fix
Changed in nvidia-graphics-drivers-470 (Ubuntu):
status: Confirmed → Won't Fix
Changed in nvidia-graphics-drivers-510 (Ubuntu):
status: Confirmed → Won't Fix
Changed in nvidia-graphics-drivers-515 (Ubuntu):
status: Confirmed → Won't Fix
Revision history for this message
Daniel van Vugt (vanvugt) wrote :
Changed in mutter (Ubuntu):
status: Invalid → Fix Committed
tags: added: fixed-upstream
tags: added: fixed-in-mutter-43.1 fixed-in-nvidia-525
Changed in mutter:
status: Unknown → Fix Released
Revision history for this message
Daniel van Vugt (vanvugt) wrote (last edit ):

A proper fix has now been released in NVIDIA driver 525. Confirmed by multiple users.

Changed in nvidia-graphics-drivers-525 (Ubuntu):
status: New → Fix Released
Changed in mutter (Ubuntu):
status: Fix Committed → Opinion
Revision history for this message
Daniel van Vugt (vanvugt) wrote :
Revision history for this message
Rodrigo (ro-goab) wrote :

I am using 545.23.08 and this problem is still affecting me. It's surreal to buy a graphics card for over a thousand dollars and have the drivers be unable to move a window without lag

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Please open a new bug about that because this one is closed.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.