gnome-shell using lot of CPU (costantly 30% - often up to 100%) making my system quite slow

Bug #1889377 reported by Mirko
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
gnome-shell (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

I've read it might be an issue related to NVidia running on noveaux drivers.
Actually this is my configuration (NVidia G92 [GeForce 9600 GSO]) with noveaux because if I install proprietary NVidia drivers, I cannot boot (system freezes on purple screen at boot before asking for login) even with all the proper configurations(nomodeset on grub, WaylandEnable=false in /etc/gdm3/custom.conf)

1) Ubuntu release: Ubuntu 20.04.1 LTS

2) apt-cache policy gnome-shell
gnome-shell:
  Installed: 3.36.3-1ubuntu1~20.04.2
  Candidate: 3.36.3-1ubuntu1~20.04.2
  Version table:
 *** 3.36.3-1ubuntu1~20.04.2 500
        500 http://it.archive.ubuntu.com/ubuntu focal-updates/main amd64 Packages
        100 /var/lib/dpkg/status
     3.36.1-5ubuntu1 500
        500 http://it.archive.ubuntu.com/ubuntu focal/main amd64 Packages

3) System running quick

4) System very slow

ProblemType: Bug
DistroRelease: Ubuntu 20.04
Package: gnome-shell 3.36.3-1ubuntu1~20.04.2
Uname: Linux 5.7.10-050710-generic x86_64
ApportVersion: 2.20.11-0ubuntu27.4
Architecture: amd64
CasperMD5CheckResult: skip
Date: Wed Jul 29 10:31:30 2020
DisplayManager: gdm3
GsettingsChanges:

InstallationDate: Installed on 2020-07-16 (12 days ago)
InstallationMedia: Ubuntu 20.04 LTS "Focal Fossa" - Release amd64 (20200423)
RelatedPackageVersions: mutter-common 3.36.3-0ubuntu0.20.04.1
SourcePackage: gnome-shell
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Mirko (mirkos1973) wrote :
description: updated
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

1. Please run the 'Extensions' app and remove/disable any extensions not provided by Ubuntu.

2. If you are using indicator-multiload then please uninstall that (bug 784055).

3. If the problem still persists after rebooting then please run these commands:

   lspci -k > lspcik.txt
   gsettings list-recursively org.gnome.shell > settings.txt
   journalctl -b0 > journal.txt
   sudo apt install mesa-utils
   glxinfo > glxinfo.txt

   and attach the resulting text files here.

tags: added: performance
Changed in gnome-shell (Ubuntu):
status: New → Incomplete
Revision history for this message
Mirko (mirkos1973) wrote :

Hi Daniel, thanks for your answer.
Please find below mi answers to your points (after >>>):
1. Please run the 'Extensions' app and remove/disable any extensions not provided by Ubuntu.
>>> if you mean Gnome extensions, I don't have any (see attachment Tweaks2020-07-29 11-30-17.png)

2. If you are using indicator-multiload then please uninstall that (bug 784055)
>>> I have no indicator-multiload installed also checked with sudo apt list --installed | grep "indicator-multiload" which returns an empty list

3. If the problem still persists after rebooting then please run these commands:

   lspci -k > lspcik.txt
   gsettings list-recursively org.gnome.shell > settings.txt
   journalctl -b0 > journal.txt
   sudo apt install mesa-utils
   glxinfo > glxinfo.txt

   and attach the resulting text files here
>>> find attached the 4 files

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

In future if you need to configure or analyse extensions, please use the Extensions app (gnome-shell-extension-prefs) and not Gnome Tweaks. But it looks like the list of extensions is still nice and short.

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

I found the problem. Your system only has one GPU (GeForce 9600) which it needs the 'nouveau' driver to use. But you have disabled the 'nouveau' driver in your kernel command line:

  nouveau.modeset=0

and so gnome-shell is using software rendering, hence high CPU. So this is not a bug.

Please remove that option from your kernel command line (/etc/default/grub) then run:

  sudo update-grub

and reboot.

Separately, I suggest you will get much better performance using the proprietary Nvidia driver. It seems your GPU requires Nvidia driver version 340. To install that please open the 'Additional Drivers' app.

Changed in gnome-shell (Ubuntu):
status: Incomplete → Invalid
Revision history for this message
Mirko (mirkos1973) wrote :

Hi Daniel, and thanks.
Let me give you some history to explain why I had configured it like that, in order to understand if you could help me or router me to the proper support.

I've been using Ubuntu for around 4 years now and I've collected some background on my GeForce 9600 GPU and the issues that are coming with it.
I installed (freshly new) Ubuntu 20.04 around 10 days ago (after an HD failure without the need to restore any OS data/configuration) and I tried all I knew to make the GPU working:
1) installing the proprietary drivers + putting nomodeset in grub + uncommenting WaylandEnable=false in /etc/gdm3/custom.conf --> result: the system doesn't boot. It keeps staying on the purple/black screen before asking for login credentials

2) I restored the nouveau drivers, removed nomodeset in grub and commented back WaylandEnable=false in /etc/gdm3/custom.conf --> result: the system boots but periodically and randomly, when I do activities like browsing with Chrome, maximizing a window, playing a video (the list is not exhaustive as the problem is not deterministic) the graphic environment freezes for very long time (also minutes in some case), only the mouse is moving and the system may be accessed without delays of performance issues via SSH; killing the process that presumebly originated the problem from SSH gives back control.
In logs, the error I got when this occurred was the following:
[ 3529.626679 < 2306,035088>] nouveau 0000:01:00.0: fifo: CACHE_ERROR - ch 9 [Xorg[2370]] subc 0 mthd 0060 data beef0201
[ 3628.765241 < 99,138562>] ATL1E 0000:02:00.0 enp2s0: NIC Link is Down
[ 3629.628288 < 0,863047>] [TTM] Buffer eviction failed

3) to solve problem 2 I have put nouveau.modeset=0 in grub and it addressed the problem (I'm not experiencing anymore that annoying freeze) but, I learn now, originated the problem heading me to you

Do you have any idea (or can me route to the proper solving group) on what I can do to address problem 1 or, in case not, problem 2?

Thanks again for your support.
Mirko

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

1) Make sure you are using the nvidia-340 driver, which is what your card requires. Newer Nvidia drivers probably won't work with that card. If you still get stuck with a system that doesn't boot properly then please open a new bug about that.

2) The freezes appear to be bugs in the nouveau driver, which is a common problem. It's not a stable and reliable driver for many cards. That why I recommended the Nvidia proprietary driver.

A simpler solution, perhaps, is to just get a newer Nvidia card that is supported by the current Nvidia drivers.

Revision history for this message
Mirko (mirkos1973) wrote :

1) Yes, sure, I have installed nvidia-340 but I get the described result :-( --> do you know anything I could do to detect what goes wrong and to repair it?

2) I know and that's why I also would prefer option 1, but not working I went for option 3 (which is less worse than 2)

Thanks.

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

We would need to see the system log from one of those failed boots. To do that please:

1. Reproduce a failed boot with nvidia-340.

2. Uninstall nvidia-340 and after rebooting collect the log from the previous failed boot. For example, to collect the last three boots run:

   journalctl -b-1 > prevboot-1.txt
   journalctl -b-2 > prevboot-2.txt
   journalctl -b-3 > prevboot-3.txt

and then please open a new bug with those logs attached.

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

You might want to consider the current cheapest Nvidia cards for sale:

 * GeForce GT 710 (2x as fast as the GeForce 9600)

 * GeForce GT 1030 (7x as fast as the GeForce 9600)

Both of those also support the latest Nvidia drivers (version 450).

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

Also you might have been hitting bug 1872159. To work around that try removing 'splash' from the kernel command line.

Revision history for this message
Mirko (mirkos1973) wrote :

I tried to reinstall drivers and now I'm getting another error (see attachment), in particolar it seems there is some compatibility issue with the last version of kernel:

ERROR (dkms apport): kernel package linux-headers-5.7.10-050710-generic is not supported
Error! Bad return status for module build on kernel: 5.7.10-050710-generic (x86_64)

thanks for the hints on the new GPUs to consider, I'll check to see if they're in line with my budget; I also have to check if they're compatible with my P5QL Pro Motherboard.

Thx
Mirko

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

Yes, kernel 5.7 is too new for nvidia-340. You will need to go back to the official Ubuntu kernel (5.4) first.

Revision history for this message
Mirko (mirkos1973) wrote :

I've done the suggested procedure and opened bug 1889541

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.