Bug 1737515

Summary: Abnormally high CPU usage when dragging windows, cursor movement, and applications that cause frequent redraw events
Product: Red Hat Enterprise Linux 7 Reporter: Joe Wright <jwright>
Component: mutterAssignee: Jonas Ådahl <jadahl>
Status: CLOSED ERRATA QA Contact: Desktop QE <desktop-qa-list>
Severity: high Docs Contact:
Priority: unspecified    
Version: 7.6CC: alanm, amike, fmuellner, jraising, mboisver, mkolbas, tpelka
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: mutter-3.28.3-13.el7 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-03-31 19:39:43 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
CPU load when using mutter-3.28.3-4.el7
none
Screencast from reproducing the bug
none
CPU load while using GeForce GTX 760 + mutter-3.28.3-4.el7
none
CPU load while using GeForce GTX 1060 + mutter-3.28.3-4.el7 none

Description Joe Wright 2019-08-05 14:46:47 UTC
Description of problem:
CPU usage for gnome-shell consumes upwards of an entire CPU thread when moving/resizing windows, moving the cursor, or running applications that require frequent redraws

Version-Release number of selected component (if applicable):
- mutter-3.28.3-7.el7_6.x86_64
- gnome-shell-3.28.3-8.el7_6.x86_64
- xorg-x11-server-Xorg-1.20.1-5.3.el7_6.x86_64
- kernel 3.10.0-957.21.3.el7.x86_64

NVIDIA driver info:
- NVIDIA Corporation GK104GL [Quadro K5000] [10de:11ba] (rev a1) (prog-if 00 [VGA controller])
- NVRM version: NVIDIA UNIX x86_64 Kernel Module  418.43  Tue Feb 19 01:12:11 CST 2019
- GCC version:  gcc version 4.8.5 20150623 (Red Hat 4.8.5-36) (GCC)

Model:           Quadro K5000
IRQ:             54
GPU UUID:        GPU-8355f264-25cc-98cf-777a-056339d03c57
Video BIOS:      80.04.50.00.02
Bus Type:        PCIe
DMA Size:        40 bits
DMA Mask:        0xffffffffff
Bus Location:    0000:05:00.0
Device Minor:    0
Blacklisted:     No


How reproducible:
- 100% by customer

Steps to Reproduce:
Any event that seems to trigger frequent redraws seems to do it, such as:
- Drag windows around
- Move cursor around
- Run an application that requires frequent or constant redraws

Actual results:
- CPU load goes abnormally high

Expected results:
- CPU shouldnt be so heavily taxed when a dedicated high-power GPU is available for redraws

Additional info:

Similar issues are noted in 
- https://gitlab.gnome.org/GNOME/mutter/issues/283
- https://gitlab.gnome.org/GNOME/mutter/issues/590

I'm not sure that these aren't the same issue based on what triggers it.

Comment 2 Jonas Ådahl 2019-08-06 14:46:29 UTC
Potential patches that can be backported to rhel7 could be https://gitlab.gnome.org/GNOME/mutter/commit/01e20a6ba9e0 and https://gitlab.gnome.org/GNOME/mutter/commit/bf4ccd21c1be. Many others depend on non-trivial changes to frame scheduling.

Comment 4 Pavlin Georgiev 2019-08-20 14:34:59 UTC
Created attachment 1606108 [details]
CPU load when using mutter-3.28.3-4.el7

TEST SETUP
Distro: RHEL 7.6 Workstation
Component version: mutter-3.28.3-4.el7

Graphics card: NVIDIA Corporation GF100GL [Quadro 4000] [10de:06dd] (rev a3)
NVIDIA driver:
  Version: 390.116
  Release Date: 2019.2.22

NOTE: The newest version 430.40 does not support the tested video card.
There is a warning message during driver installation.

PREPARATION
1. Install RHEL 7.6 Workstation on Dell Precision T5400.
2. Install NVIDIA proprietary driver version 390.116.
3. Run sar utility to track CPU load during the test.

TEST PROCEDURE
1. Set the following startup application via gnome-teaks:
    nautilus
    evince
    firefox
    gnome-terminal
    gedit
2. Log out
3. Log in
4. Resize the window of each application and close it at the end.
5. Get results from sar.

Comment 5 Pavlin Georgiev 2019-08-20 14:38:04 UTC
Created attachment 1606109 [details]
Screencast from reproducing the bug

Comment 6 Pavlin Georgiev 2019-08-22 07:26:08 UTC
I cannot reproduce the bug and raise the CPU load to 100%
by using NVIDIA Corporation GF100GL [Quadro 4000]
with driver version 390.116.

I will try another graphics card and driver.

Comment 7 Pavlin Georgiev 2019-08-22 08:17:00 UTC
Created attachment 1606865 [details]
CPU load while using GeForce GTX 760 + mutter-3.28.3-4.el7

TEST SETUP 2
Distro: RHEL 7.6 Workstation
Component version: mutter-3.28.3-4.el7
Graphics card: NVIDIA Corporation GK104 [GeForce GTX 760] [10de:1187] (rev a1)
NVIDIA driver:
  Version: 430.40
  Release Date: Mon Jul 29, 2019


TEST PROCEDURE 2
Repeat the previous test procedure.

I cannot reproduce the bug with that hardware and software configuration.

Comment 8 Pavlin Georgiev 2019-08-22 09:10:15 UTC
Created attachment 1606880 [details]
CPU load while using GeForce GTX 1060 + mutter-3.28.3-4.el7

TEST SETUP 3
Distro: RHEL 7.6 Workstation
Component version: mutter-3.28.3-4.el7
Graphics card: NVIDIA Corporation GP106 [GeForce GTX 1060 3GB] [10de:1c02] (rev a1)
NVIDIA driver:
  Version: 430.40
  Release Date: Mon Jul 29, 2019
  

TEST PROCEDURE 3
Repeat the previous test procedure.

I cannot reproduce the bug with that hardware and software configuration.

Comment 10 errata-xmlrpc 2020-03-31 19:39:43 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2020:1021