High CPU usage in gnome-shell & Xorg when using gnome-system-monitor's Resources tab

Bug #1773502 reported by Yuri
46
This bug affects 10 people
Affects Status Importance Assigned to Milestone
gnome-shell (Ubuntu)
Triaged
Low
Unassigned
gnome-system-monitor (Ubuntu)
Triaged
Low
Unassigned

Bug Description

gnome-shell or X.org using high cpu
My fanless nettop use a Intel Celeron 847 CPU. On around 1 boot on 3, the CPU of one core is kept at 100 % by a process, this high CPU usage start few second after the boot. It seems related to the graphical system.

ProblemType: Bug
DistroRelease: Ubuntu 18.04
Package: gnome-shell 3.28.1-0ubuntu2
ProcVersionSignature: Ubuntu 4.15.0-22.24-generic 4.15.17
Uname: Linux 4.15.0-22-generic x86_64
ApportVersion: 2.20.9-0ubuntu7
Architecture: amd64
CurrentDesktop: ubuntu:GNOME
Date: Sat May 26 09:52:20 2018
DisplayManager: gdm3
GsettingsChanges:
 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'"
 b'org.gnome.desktop.interface' b'clock-show-date' b'true'
InstallationDate: Installed on 2018-04-29 (26 days ago)
InstallationMedia: Ubuntu 18.04 LTS "Bionic Beaver" - Release amd64 (20180426)
ProcEnviron:
 TERM=xterm-256color
 PATH=(custom, no user)
 XDG_RUNTIME_DIR=<set>
 LANG=fr_BE.UTF-8
 SHELL=/bin/bash
SourcePackage: gnome-shell
UpgradeStatus: No upgrade log present (probably fresh install)
---
ApportVersion: 2.20.9-0ubuntu7
Architecture: amd64
CurrentDesktop: ubuntu:GNOME
DisplayManager: gdm3
DistroRelease: Ubuntu 18.04
GsettingsChanges:
 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'"
 b'org.gnome.desktop.interface' b'clock-show-date' b'true'
InstallationDate: Installed on 2018-04-29 (26 days ago)
InstallationMedia: Ubuntu 18.04 LTS "Bionic Beaver" - Release amd64 (20180426)
Package: gnome-shell 3.28.1-0ubuntu2
PackageArchitecture: amd64
ProcEnviron:
 TERM=xterm-256color
 PATH=(custom, no user)
 XDG_RUNTIME_DIR=<set>
 LANG=fr_BE.UTF-8
 SHELL=/bin/bash
ProcVersionSignature: Ubuntu 4.15.0-22.24-generic 4.15.17
Tags: bionic
Uname: Linux 4.15.0-22-generic x86_64
UpgradeStatus: No upgrade log present (probably fresh install)
UserGroups: adm cdrom dip lpadmin plugdev sambashare sudo
_MarkForUpload: True

Revision history for this message
Yuri (linux-colombi) wrote :
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

1. Are you running any apps when the CPU usage is high?

2. What does 'top' show when the CPU usage is high?

Changed in gnome-shell (Ubuntu):
status: New → Incomplete
Revision history for this message
Yuri (linux-colombi) wrote :

The CPU seems taken by Xorg (see screen shot). When the gnome-shell proc take most of the CPU, the overall CPU seems to be reduced after some seconds.

Revision history for this message
Yuri (linux-colombi) wrote :

I was running Thunderbird, Firefox, System Monitor (and a console with the top command). But it happen too with no app launched or just Firefox.

Revision history for this message
Yuri (linux-colombi) wrote : Dependencies.txt

apport information

tags: added: apport-collected
description: updated
Revision history for this message
Yuri (linux-colombi) wrote : ProcCpuinfoMinimal.txt

apport information

Revision history for this message
Daniel van Vugt (vanvugt) wrote : Re: High CPU usage

OK. Please reduce the problem down to a single app, like just Firefox. Now, please let us know:
  1. The version of Firefox; and
  2. What web page(s) cause the biggest problem.

I think my list of planned fixes for Ubuntu 18.10 [1] will be the best avenue for helping you because the Celeron 847 has a passmark [2] of 936, and I estimate gnome-shell presently requires a CPU with passmark around 5000 or more to run smoothly. Obviously we need to get that number down a lot by optimizing gnome-shell in future...

[1] https://trello.com/c/pe5mRmx7
[2] https://www.cpubenchmark.net/cpu_list.php

tags: added: performance
Revision history for this message
Yuri (linux-colombi) wrote :

I use Firefox Quantum 60.0.1 (64 bits)for Ubuntu with the modules eid Belgium (issue was already present before installing this module) and uBlock Origin. The module Open H264 Video Codec provided by Cisco 1.7.1 is installed.

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

And what web pages are good examples of high CPU usage?

Some web pages should yield zero CPU usage, so this question matters :)

summary: - High CPU usage
+ High CPU usage in gnome-shell & Xorg when using Firefox
Revision history for this message
Yuri (linux-colombi) wrote : Re: High CPU usage in gnome-shell & Xorg when using Firefox

I restarted my computer 3 time.I launched FF and the top command. The home page of FF is https://www.bing.com/?cc=be. I opened a second tab with maps.google.com. Everything was find. I lauched system monitor and then, the CPU of one core jumped to 100 %, even after closing the maps.google.com tab (see screenshot).
When I'm in system monitor, the tab Ressources take 100 % of 1 CPU. If I switch to the tab Processes and change the ordering of the list, it goes down. When I come back to the Ressources tab, it reaches again the top. Same thing if I go from the Ressources view to the File System tab and back to the Resources tab (see screenshot from 11:50 AM).

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

Oooh... that makes sense now, thanks.

The problem you are seeing is with mutter/gnome-shell being inefficient at frequently-updating software rendered windows. This is a known problem, but until now we only knew of Eclipse triggering it (bug 1756508), and the older pre-Quantum versions of Firefox (bug 1696305).

What you are seeing is a known performance problem, but you have discovered a great test case for it in the Resources tab. So thanks.

As I suspected, this is not a problem with the new Firefox at all (which is hardware rendered). It's a problem with gnome-system-monitor, or any frequently-redrawing software rendered (e.g. Gnome) app.

I only have two more questions: What is your display resolution, and are you using Wayland or Xorg? Both of these can be answered by running 'xrandr' and sending us the output.

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

Nevermind, it's obvious you're using Xorg sessions.

At what resolution though? Please just run 'xrandr' and send us the output.

summary: - High CPU usage in gnome-shell & Xorg when using Firefox
+ High CPU usage in gnome-shell & Xorg when using gnome-system-monitor's
+ Resources tab
Changed in gnome-shell (Ubuntu):
importance: Undecided → Medium
status: Incomplete → Triaged
Revision history for this message
Yuri (linux-colombi) wrote :

Resolution: 1920 X 1080 (16:9), with a refresh rate of 60,00 Hz, I use an HDMI connection:

yuri@DS47:~$ xrandr
Screen 0: minimum 320 x 200, current 1920 x 1080, maximum 8192 x 8192
VGA-1 disconnected (normal left inverted right x axis y axis)
HDMI-1 disconnected (normal left inverted right x axis y axis)
DP-1 disconnected (normal left inverted right x axis y axis)
HDMI-2 connected primary 1920x1080+0+0 (normal left inverted right x axis y axis) 509mm x 286mm
   1920x1080 60.00*+ 50.00 59.94
   1920x1080i 60.00 50.00 50.00 59.94
   1600x1200 60.00
   1680x1050 59.88
   1400x1050 59.95
   1280x1024 75.02 60.02
   1440x900 74.98 59.90
   1280x960 60.00
   1360x768 60.02
   1152x864 75.00
   1280x720 60.00 50.00 59.94
   1024x768 75.03 70.07 60.00
   832x624 74.55
   800x600 72.19 75.00 60.32 56.25
   720x576 50.00
   720x576i 50.00
   720x480 60.00 59.94
   720x480i 60.00 59.94
   640x480 75.00 72.81 66.67 60.00 59.94
   720x400 70.08
DP-2 disconnected (normal left inverted right x axis y axis)

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

Thanks. That explains a lot. I think gnome-shell is presently too slow to be able to handle 1080p on a Celeron 847. But we are working on a bunch of different optimizations that should help in future.

Revision history for this message
Magosányi Árpád (mag-magwas) wrote :

I have this bug, triggered by eclipse on latest Bionic.
I do not see any gnome shells running though.
Do we know any workarounds?

Revision history for this message
Magosányi Árpád (mag-magwas) wrote :

If I run eclipse from a docker container (with -v /tmp/.X11-unix:/tmp/.X11-unix ), then no cpu overuse.
It might related to that in this case eclipse cannot connect to dbus.

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

^^^
Moved to bug 1756508

Changed in gnome-shell (Ubuntu):
importance: Medium → Low
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

AFAIK, gnome-system-monitor is one of those rare apps which are software rendered (because GTK) but also try to animate at a smooth frame rate.

It's a rare combination and a useful test case.

Changed in gnome-system-monitor (Ubuntu):
status: New → Triaged
importance: Undecided → Low
tags: added: groovy
tags: removed: groovy
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.