PDA

View Full Version : [ubuntu] 18.04 gnome-shell resource hog, very high CPU loads



werner-thieprojects
May 8th, 2018, 06:03 PM
I observe gnome-shell hogging resources, out of 24 hours of only having the machine sit idle I see



VIRT RES SHR S %CPU %MEM TIME+ COMMAND
5731324 1.168g 97420 S 32.8 7.6 66:53.61 gnome-shell


High CPU loads are specially annoying as they trigger fans on notebooks, CPU peaking at 180-200% for simple tasks like moving windows

Searching the net reveals a lot of people having that issue all with wild speculations about a cure.

Anybody out there who can shine a light on the problem or is this just the cancerous growth of a piece of SW gone wrong?

Frogs Hair
May 8th, 2018, 06:11 PM
Hello and Welcome!

Please add some information about your hardware.

deadflowr
May 8th, 2018, 06:19 PM
This

inxi -F
should get you along he way for hardware details.
post back the results.

if not install

sudo apt install inxi

werner-thieprojects
May 8th, 2018, 06:28 PM
System: Host: xxxx Kernel: 4.15.0-20-generic x86_64 bits: 64 Desktop: Gnome 3.28.1 Distro: Ubuntu 18.04 LTS
Machine: Device: laptop System: Dell product: XPS 15 9560 serial: N/A
Mobo: Dell model: 05FFDN v: A00 serial: N/A UEFI: Dell v: 1.7.1 date: 01/25/2018
Battery BAT0: charge: 95.9 Wh 100.0% condition: 95.9/97.0 Wh (99%)
CPU: Quad core Intel Core i7-7700HQ (-MT-MCP-) cache: 6144 KB
clock speeds: max: 2800 MHz 1: 1600 MHz 2: 1600 MHz 3: 1599 MHz 4: 1600 MHz 5: 1600 MHz 6: 1600 MHz
7: 1600 MHz 8: 1600 MHz
Graphics: Card-1: Intel Device 591b
Card-2: NVIDIA GP107M [GeForce GTX 1050 Mobile]
Display Server: x11 (X.Org 1.19.6 ) drivers: modesetting,nvidia (unloaded: fbdev,vesa,nouveau)
Resolution: 3840x2160@60.00hz, 3840x2160@60.00hz
OpenGL: renderer: llvmpipe (LLVM 6.0, 256 bits) version: 3.3 Mesa 18.0.0-rc5
Audio: Card Intel CM238 HD Audio Controller driver: snd_hda_intel Sound: ALSA v: k4.15.0-20-generic
Network: Card: Intel Wireless 8265 / 8275 driver: iwlwifi
IF: wlp2s0 state: up mac: f8:94:c2:8e:bc:6e
Drives: HDD Total Size: 512.1GB (47.3% used)
ID-1: /dev/nvme0n1 model: PM961_NVMe_SAMSUNG_512GB size: 512.1GB
Partition: ID-1: / size: 332G used: 226G (72%) fs: ext4 dev: /dev/nvme0n1p8
RAID: No RAID devices: /proc/mdstat, md_mod kernel module present
Sensors: System Temperatures: cpu: 53.0C mobo: N/A gpu: 50C
Fan Speeds (in rpm): cpu: N/A
Info: Processes: 308 Uptime: 15:23 Memory: 4503.7/15764.6MB Client: Shell (bash) inxi: 2.3.56

deadflowr
May 8th, 2018, 07:07 PM
Unfortunately I cannot help beyond pointing out that the graphics drivers are bonkers.
But we can now get an idea of why it's loading so high.
It's running the llvmpipe drivers, which run everything through the cpu.
llvmpipe is a fallback driver that runs when the proper drivers have some issue or another that prevents them from running cleanly.


Seems to be a common issue with hybrid cards.
I'm not sure if you might be able to glean anything helpful from here:
https://ubuntuforums.org/showthread.php?t=2385770
(Or if any of the information contained within is even still relevant)

werner-thieprojects
May 8th, 2018, 08:28 PM
Hmm, that's good information, for 17.10 I did the whole shenanigan of compiling the graphic driver support from scratch, which gave me an absolutely perfect (silent) workplace. But pressing that upgrade button towards 18.04 left me with a completely botched system which didn't even boot any more. Two days and about fifty reboots later I'm up again, but as you point out with failing graphic drivers. Seems I have to dig out my notes from the 17.10 installation (which even allowed me to run Julia code without the fans kicking in too much).

Mahalo for pointing me the right way!

werner-thieprojects
May 8th, 2018, 09:42 PM
While fiddling around with prime-select I noticed that I had missing config files for OpenGL parts. I then decided to scrub the whole borked graphic driver setup and go with the


sudo apt-get purge nvidia*
sudo add-apt-repository ppa:graphics-drivers

Updating and installing the latest NVIDIA stuff


sudo apt-get update
sudo apt-get install nvidia-390

showed quite some difference, I'm running a quiet notebook again for daily work with Intels driver active and prime-select allowing me to switch.

inxi -F now shows


System: Host: xxxx Kernel: 4.15.0-20-generic x86_64 bits: 64 Desktop: Gnome 3.28.1 Distro: Ubuntu 18.04 LTS
Machine: Device: laptop System: Dell product: XPS 15 9560 serial: N/A
Mobo: Dell model: 05FFDN v: A00 serial: N/A UEFI: Dell v: 1.7.1 date: 01/25/2018
Battery BAT0: charge: 95.9 Wh 100.0% condition: 95.9/97.0 Wh (99%)
CPU: Quad core Intel Core i7-7700HQ (-MT-MCP-) cache: 6144 KB
clock speeds: max: 2800 MHz 1: 1600 MHz 2: 1600 MHz 3: 1600 MHz 4: 1600 MHz 5: 1600 MHz 6: 1600 MHz
7: 1600 MHz 8: 1600 MHz
Graphics: Card-1: Intel Device 591b
Card-2: NVIDIA GP107M [GeForce GTX 1050 Mobile]
Display Server: x11 (X.Org 1.19.6 ) drivers: modesetting,nvidia (unloaded: fbdev,vesa,nouveau)
Resolution: 3840x2160@60.00hz, 3840x2160@60.00hz
OpenGL: renderer: Mesa DRI Intel HD Graphics 630 (Kaby Lake GT2) version: 4.5 Mesa 18.0.0-rc5
Audio: Card Intel CM238 HD Audio Controller driver: snd_hda_intel Sound: ALSA v: k4.15.0-20-generic
Network: Card: Intel Wireless 8265 / 8275 driver: iwlwifi
IF: wlp2s0 state: up mac: f8:94:c2:8e:bc:6e
Drives: HDD Total Size: 512.1GB (46.9% used)
ID-1: /dev/nvme0n1 model: PM961_NVMe_SAMSUNG_512GB size: 512.1GB
Partition: ID-1: / size: 332G used: 224G (72%) fs: ext4 dev: /dev/nvme0n1p8
RAID: No RAID devices: /proc/mdstat, md_mod kernel module present
Sensors: System Temperatures: cpu: 46.0C mobo: N/A
Fan Speeds (in rpm): cpu: N/A
Info: Processes: 276 Uptime: 8 min Memory: 1981.3/15764.6MB Client: Shell (bash) inxi: 2.3.56



With the hope that this clears a lot of the confusion around multimode notebook graphic drivers.

Mahalo nui loa, Werner

deadflowr
May 9th, 2018, 05:39 PM
Did the cpu usage drop to a reasonable level?
With the fan quieted down, I would guess yes.
If all is good now, please mark this thread as solved
(https://wiki.ubuntu.com/UnansweredPostsTeam/SolvedThreads)

e10
May 17th, 2018, 12:28 PM
While fiddling around with prime-select I noticed that I had missing config files for OpenGL parts. I then decided to scrub the whole borked graphic driver setup and go with the


sudo apt-get purge nvidia*
sudo add-apt-repository ppa:graphics-drivers

Updating and installing the latest NVIDIA stuff


sudo apt-get update
sudo apt-get install nvidia-390

Hi folks.
I got the same problem with my desktop PC. Everything was smooth with 17.10, and now at lest 50% CPU usage permanently.

I did these commands up here, and then in terminal:

sudo apt-get upgrade
and now the CPU usage drops to 10-20%. Not perfect but better. Waiting for this bug to be sprayed.