[bionic][beta][nvidia] gnome-shell high CPU utilization when using Nvidia driver

Bug #1764137 reported by Dmitrii Shcherbakov
46
This bug affects 10 people
Affects Status Importance Assigned to Milestone
Mutter
Confirmed
Medium
gnome-shell (Ubuntu)
Invalid
Undecided
Unassigned
mutter (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

I am experiencing 60% - 200% CPU utilization after an upgrade from ubuntu artful to bionic.

Pretty much any drawing results in a sluggish behavior due to high CPU utilization.

The same combination of kernel/drivers did not result in the issue on 17.10 so gnome-shell seems a good candidate to blame.

ProblemType: Bug
DistroRelease: Ubuntu 18.04
Package: gnome-shell 3.28.0-0ubuntu5
Uname: Linux 4.16.0-041600-generic x86_64
NonfreeKernelModules: nvidia_uvm nvidia_drm nvidia_modeset nvidia
ApportVersion: 2.20.9-0ubuntu4
Architecture: amd64
CurrentDesktop: ubuntu:GNOME
Date: Sun Apr 15 16:53:34 2018
DisplayManager: gdm3
InstallationDate: Installed on 2017-02-27 (412 days ago)
InstallationMedia: Ubuntu 17.04 "Zesty Zapus" - Alpha amd64 (20170227)
SourcePackage: gnome-shell
UpgradeStatus: Upgraded to bionic on 2018-04-15 (0 days ago)
---
ApportVersion: 2.20.9-0ubuntu4
Architecture: amd64
CurrentDesktop: ubuntu:GNOME
DistroRelease: Ubuntu 18.04
InstallationDate: Installed on 2017-02-27 (412 days ago)
InstallationMedia: Ubuntu 17.04 "Zesty Zapus" - Alpha amd64 (20170227)
NonfreeKernelModules: nvidia_uvm nvidia_drm nvidia_modeset nvidia
Package: linux-image-4.16.0-041600-generic 4.16.0-041600.201804012230 [origin: unknown]
PackageArchitecture: amd64
Tags: third-party-packages bionic
Uname: Linux 4.16.0-041600-generic x86_64
UnreportableReason: This is not an official Ubuntu package. Please remove any third party package and try again.
UpgradeStatus: Upgraded to bionic on 2018-04-15 (0 days ago)
UserGroups: adm cdrom dip libvirt lpadmin lxd plugdev sambashare sudo systemd-journal ubridge
_MarkForUpload: True

➜ ~ dpkg -l | grep -P 'ii.*?nvidia'
ii nvidia-390 390.48-0ubuntu0~gpu17.10.2 amd64 NVIDIA binary driver - version 390.48
ii nvidia-opencl-icd-390 390.48-0ubuntu0~gpu17.10.2 amd64 NVIDIA OpenCL ICD
ii nvidia-prime 0.8.7 all Tools to enable NVIDIA's Prime
ii nvidia-settings 396.18-0ubuntu0~gpu17.10.1 amd64 Tool for configuring the NVIDIA graphics driver

Revision history for this message
Dmitrii Shcherbakov (dmitriis) wrote :
Revision history for this message
Dmitrii Shcherbakov (dmitriis) wrote : Dependencies.txt

apport information

tags: added: apport-collected
description: updated
Revision history for this message
Dmitrii Shcherbakov (dmitriis) wrote : ProcCpuinfoMinimal.txt

apport information

Revision history for this message
Dmitrii Shcherbakov (dmitriis) wrote : ProcEnviron.txt

apport information

description: updated
Revision history for this message
Launchpad Janitor (janitor) wrote : Re: [bionic][beta][nvidia] gnome-shell high cpu utilization

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

Changed in gnome-shell (Ubuntu):
status: New → Confirmed
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

See also bug 1716434.

tags: added: nvidia performance
Changed in mutter (Ubuntu):
status: New → Confirmed
summary: - [bionic][beta][nvidia] gnome-shell high cpu utilization
+ [bionic][beta][nvidia] gnome-shell high CPU utilization when using
+ Nvidia driver
Changed in mutter:
importance: Unknown → Medium
status: Unknown → Confirmed
Revision history for this message
Dmitrii Shcherbakov (dmitriis) wrote :

A bit odd that I cannot reproduce this on a fresh 18.04 installation on the same system.

https://paste.ubuntu.com/p/PqYBPfvvKr/

Revision history for this message
Dmitrii Shcherbakov (dmitriis) wrote :

Also, the setup in comment #7 was tested with 4.17-rc4 and 4.17-rc5.

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

Can you confirm the problem is confined to older kernels?

Or more simply, can you please confirm that the problem does not exist in Ubuntu 18.10? :)

Changed in gnome-shell (Ubuntu):
status: Confirmed → Incomplete
Changed in mutter (Ubuntu):
status: Confirmed → Incomplete
Revision history for this message
Mateusz Mikuła (mati865) wrote :

It was long time ago but IIRC after upgrading from Ubuntu 17.10 to 18.04 GDM would try to start on Wayland. With proprietary Nvidia driver it would then fallback to software rendering haence the CPU usage.

Disabling Wayland in /etc/gdm/custom.conf or doing clean install fixes the issue.

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

I'm going to close this since the last response from the original reporter was a year ago, and it was that the problem could not be reproduced.

I am still tracking the same upstream bug in Launchpad bug 1814125 though.

If anyone experiences any other issues then please open a new bug by running:

  ubuntu-bug gnome-shell

Changed in gnome-shell (Ubuntu):
status: Incomplete → Invalid
Changed in mutter (Ubuntu):
status: Incomplete → Invalid
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.