gnome-shell very high %CPU usage while moving mouse on Ubuntu 20.04

Bug #1900760 reported by Pavils Jurjans
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
gnome-shell (Ubuntu)
Incomplete
Undecided
Unassigned

Bug Description

After upgrade from 18.04 to 20.04 I discovered that gnome-shell occasionally starts eating up unreasonably large CPU %. After some head scratching why on earth i thappens, it was clear that moving my mouse energetically I can get it as close to 100% as I want.

If this is relevant, the mouse model is Corsair Harpoon wireless BT. I am reading some speculation that the cause of the problem is high polling rate for mouse location (?).

It is suggested in this bug entry (https://bugs.launchpad.net/bugs/1848951) that this issue is fixed on late march. But this is october and I still experience this problem on an updated PC.

gnome-shell version on my system: 3.36.4-1ubuntu1~20.04.2
---
ProblemType: Bug
ApportVersion: 2.20.11-0ubuntu27.9
Architecture: amd64
CasperMD5CheckResult: skip
CurrentDesktop: ubuntu:GNOME
DisplayManager: gdm3
DistroRelease: Ubuntu 20.04
InstallationDate: Installed on 2018-08-18 (794 days ago)
InstallationMedia: Ubuntu 18.04.1 LTS "Bionic Beaver" - Release amd64 (20180725)
NonfreeKernelModules: lkp_Ubuntu_5_4_0_48_52_generic_72 nvidia_modeset nvidia
Package: gnome-shell 3.36.4-1ubuntu1~20.04.2
PackageArchitecture: amd64
ProcVersionSignature: Ubuntu 5.4.0-48.52-generic 5.4.60
RelatedPackageVersions: mutter-common 3.36.6-1ubuntu0.20.04.2
Tags: focal
Uname: Linux 5.4.0-48-generic x86_64
UpgradeStatus: Upgraded to focal on 2020-10-04 (16 days ago)
UserGroups: adm cdrom dialout dip docker kvm lpadmin plugdev sambashare sudo vboxusers
_MarkForUpload: True

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

1. Bugs like this are usually due to extensions. So first please try disabling any extensions.

2. Please run this command to send us more information about the system:

   apport-collect 1900760

3. I have actually seen one possible cause for this in recent code changes, but it would only happen after locking and unlocking the machine. Is that what you find?.. https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1459 is fixed in gnome-shell 3.38.2.

Changed in gnome-shell (Ubuntu):
status: New → Incomplete
Revision history for this message
Pavils Jurjans (passiday) wrote : Dependencies.txt

apport information

tags: added: apport-collected
description: updated
Revision history for this message
Pavils Jurjans (passiday) wrote : GsettingsChanges.txt

apport information

Revision history for this message
Pavils Jurjans (passiday) wrote : ProcCpuinfoMinimal.txt

apport information

Revision history for this message
Pavils Jurjans (passiday) wrote : ProcEnviron.txt

apport information

Revision history for this message
Pavils Jurjans (passiday) wrote : ShellJournal.txt

apport information

Revision history for this message
Pavils Jurjans (passiday) wrote : monitors.xml.txt

apport information

Revision history for this message
Pavils Jurjans (passiday) wrote :

Whoa, there's a lot of info in those apport files. I hope those are relevant.

I don't use any fancy Gnome shell extensions. Here's an output of `ls /usr/share/gnome-shell/extensions/`:

desktop-icons@csoriano <email address hidden> <email address hidden>

That's about it.

It's hard to tell right now if the problem surfaces only after locking/unlocking routine. I can confirm that when I was submitting this bug report, the system has indeed went through several sleep and wake-up cycles, and, of course, there was a lock screen every time a wake-up happened.

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

Thanks for all that.

It appears the main CPU hog here is bug 1849142, which has a fix coming soon. So to exclude that bug and see if it is the main problem, please:

 1. Open the Extensions app

 2. Disable 'Ubuntu AppIndicators'

 3. Reboot.

 4. If the problem happens after that then please again run:

    apport-collect 1900760

Revision history for this message
Pavils Jurjans (passiday) wrote :

Did that, now it's much better. Although I was deferring from system updates, reluctant to restart, so this was not a clean test.

Moving mouse quickly still makes the Xorg process consume signifficant CPU% (up to 25%), but gnome-shell doesn't get near to the level it used to consume.

It's a weird combo, a bug related to Discord app and mouse movement processing, causing the said CPU hog.

Thanks for the fix, I guess.

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

OK let's call this a duplicate of bug 1849142. Yes it is weird that would be mouse-related...

Bug 1848951 is still open to cover the high CPU in Xorg.

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.