gnome-shell uses high CPU when simply moving windows

Bug #1799266 reported by Fredrik Öhrström
28
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Mutter
Fix Released
Unknown
gjs (Ubuntu)
Fix Released
Undecided
Unassigned
Bionic
Fix Released
Undecided
Unassigned
Cosmic
Fix Released
Undecided
Unassigned
Disco
Fix Released
Undecided
Unassigned
gnome-shell (Ubuntu)
Invalid
Medium
Daniel van Vugt
mutter (Ubuntu)
Fix Released
Medium
Daniel van Vugt

Bug Description

After doing a stock install Ubuntu 18.04.1 LTS on an imac 27" 2010
8G ram, Intel® Core™ i7 CPU 870 @ 2.93GHz × 8

Simply moving a window around on the screen increases the cpu usage
by gnome-shell to 44%. When displaying a movie, totem takes 10%, gnome-shell takes 22%.
etc etc

System: Host: oldie Kernel: 4.15.0-36-generic x86_64 bits: 64 Desktop: Gnome 3.28.3
           Distro: Ubuntu 18.04.1 LTS
Machine: Device: desktop System: Apple product: iMac11 3 v: 1.0 serial: N/A
           Mobo: Apple model: Mac-F2238BAE v: iMac11 3 serial: N/A
           UEFI: Apple v: IM112.88Z.0057.B01.1112090906 date: 12/09/11
CPU: Quad core Intel Core i7 870 (-MT-MCP-) cache: 8192 KB
           clock speeds: max: 2927 MHz 1: 1271 MHz 2: 1206 MHz 3: 1374 MHz 4: 1271 MHz 5: 1377 MHz 6: 1266 MHz
           7: 1693 MHz 8: 1279 MHz
Graphics: Card: Advanced Micro Devices [AMD/ATI] Broadway PRO [Mobility Radeon HD 5850]
           Display Server: x11 (X.Org 1.19.6 ) driver: radeon Resolution: 2560x1440@59.95hz
           OpenGL: renderer: AMD JUNIPER (DRM 2.50.0 / 4.15.0-36-generic, LLVM 6.0.0) version: 3.3 Mesa 18.0.5
Audio: Card-1 Intel 5 Series/3400 Series High Definition Audio driver: snd_hda_intel
           Card-2 Advanced Micro Devices [AMD/ATI] Juniper HDMI Audio [Radeon HD 5700 Series]
           driver: snd_hda_intel
           Sound: Advanced Linux Sound Architecture v: k4.15.0-36-generic
Network: Card-1: Broadcom Limited NetXtreme BCM5764M Gigabit Ethernet PCIe driver: tg3
           IF: enp2s0 state: up speed: 1000 Mbps duplex: full mac: c4:2c:03:30:ce:8e
           Card-2: Qualcomm Atheros AR928X Wireless Network Adapter (PCI-Express) driver: ath9k
           IF: wls1 state: down mac: d8:30:62:67:2a:19
Drives: HDD Total Size: 2500.5GB (38.0% used)
           ID-1: /dev/sda model: WDC_WD1001FALS size: 1000.2GB
           ID-2: USB /dev/sdb model: MK1059GSM size: 1000.2GB
           ID-3: USB /dev/sdd model: Elements_10B8 size: 500.1GB
Partition: ID-1: / size: 226G used: 125G (58%) fs: ext4 dev: /dev/sda2
           ID-2: /home size: 701G used: 876M (1%) fs: btrfs dev: /dev/sda4
RAID: No RAID devices: /proc/mdstat, md_mod kernel module present
Sensors: System Temperatures: cpu: 56.0C mobo: N/A
           Fan Speeds (in rpm): cpu: 936
Info: Processes: 342 Uptime: 3:07 Memory: 2087.3/7967.4MB Client: Shell (bash) inxi: 2.3.56

ProblemType: Bug
DistroRelease: Ubuntu 18.04
Package: gnome-shell 3.28.3-0ubuntu0.18.04.2
ProcVersionSignature: Ubuntu 4.15.0-36.39-generic 4.15.18
Uname: Linux 4.15.0-36-generic x86_64
ApportVersion: 2.20.9-0ubuntu7.4
Architecture: amd64
CurrentDesktop: ubuntu:GNOME
Date: Mon Oct 22 19:09:59 2018
DisplayManager: gdm3
GsettingsChanges:
 b'org.gnome.shell' b'disable-user-extensions' b'true'
 b'org.gnome.shell' b'app-picker-view' b'uint32 1'
 b'org.gnome.shell' b'favorite-apps' redacted by apport
 b'org.gnome.desktop.interface' b'gtk-im-module' b"'gtk-im-context-simple'"
InstallationDate: Installed on 2018-10-22 (0 days ago)
InstallationMedia: Ubuntu 18.04.1 LTS "Bionic Beaver" - Release amd64 (20180725)
ProcEnviron:
 TERM=xterm-256color
 PATH=(custom, no user)
 XDG_RUNTIME_DIR=<set>
 LANG=sv_SE.UTF-8
 SHELL=/bin/bash
SourcePackage: gnome-shell
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Fredrik Öhrström (oehrstroem) wrote :
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Thanks for the bug report.

I happen to be working on fixes for this right now, and had not yet created a bug for it. So let's use this bug.

The relevant fixes I have so far are:
https://gitlab.gnome.org/GNOME/mutter/merge_requests/189
https://gitlab.gnome.org/GNOME/gjs/merge_requests/236
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/265
https://gitlab.gnome.org/GNOME/mutter/merge_requests/270

tags: added: performance
Revision history for this message
Launchpad Janitor (janitor) wrote :

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

Changed in gnome-shell (Ubuntu):
status: New → Confirmed
Changed in gnome-shell (Ubuntu):
assignee: nobody → Daniel van Vugt (vanvugt)
status: Confirmed → In Progress
Changed in mutter (Ubuntu):
assignee: nobody → Daniel van Vugt (vanvugt)
status: New → In Progress
Changed in gjs (Ubuntu):
assignee: nobody → Daniel van Vugt (vanvugt)
status: New → In Progress
Revision history for this message
Fredrik Öhrström (oehrstroem) wrote :

Thank you! After reading through the reference bugs, it seems like you have a bit of a handful here.

I have temporarily switch back to unity since the stuttering of movies and general slugginesh due to gnome-shell is not bearable. But let me know if you need testing and I will switch back and test any solutions you have created.

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

The GJS fix is now in 19.04 here:
https://launchpad.net/ubuntu/+source/gjs/1.54.2-1

Changed in gjs (Ubuntu):
assignee: Daniel van Vugt (vanvugt) → nobody
status: In Progress → Fix Released
summary: - gnome-shell uses 44% cpu when simply moving windows
+ gnome-shell uses high CPU when simply moving windows
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

The gjs tasks are effectively tracked via bug 1803271.

Changed in gnome-shell (Ubuntu Bionic):
status: New → Confirmed
Changed in gnome-shell (Ubuntu Cosmic):
status: New → Confirmed
Changed in mutter (Ubuntu Bionic):
status: New → Confirmed
Changed in mutter (Ubuntu Cosmic):
status: New → Confirmed
Changed in gjs (Ubuntu Bionic):
status: New → Fix Released
Changed in gjs (Ubuntu Cosmic):
status: New → Fix Released
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

I think it's too early for this to be a release bug. A bunch of fixes are still awaiting upstream review, some require more upstream work by me, and the final one needs to be rewritten completely after so re-profiling. Lots of upstream work to do before considering this for distro.

no longer affects: gnome-shell (Ubuntu Bionic)
no longer affects: gnome-shell (Ubuntu Cosmic)
no longer affects: gnome-shell (Ubuntu Disco)
no longer affects: mutter (Ubuntu Bionic)
no longer affects: mutter (Ubuntu Cosmic)
no longer affects: mutter (Ubuntu Disco)
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Now tracking the required fixes here:
https://gitlab.gnome.org/GNOME/mutter/issues/590

Changed in mutter:
status: Unknown → New
Changed in gnome-shell (Ubuntu):
milestone: none → ubuntu-20.03
Changed in mutter (Ubuntu):
milestone: none → ubuntu-20.03
tags: added: champage focal
tags: added: champagne
removed: champage
Changed in gnome-shell (Ubuntu):
importance: Undecided → Medium
Changed in mutter (Ubuntu):
importance: Undecided → Medium
Changed in gnome-shell (Ubuntu):
status: In Progress → Invalid
Changed in mutter (Ubuntu):
status: In Progress → Triaged
tags: added: fixed-in-3.35.90 fixed-upstream
Changed in mutter (Ubuntu):
status: Triaged → Fix Released
Changed in mutter:
status: New → Fix Released
Changed in gnome-shell (Ubuntu):
milestone: ubuntu-20.03 → none
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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