Ubuntu – Ubuntu 18.04 gnome-shell high CPU usage

cpucpu loadgnomegnome-shell

I installed 18.04 from 17.04 (passing briefly through 17.10, didn't test it and jumped to 18.04) and I am experiencing a high cpu usage on gnome-shell, it takes almost all available CPU time:

$ top

top - 06:23:01 up 40 min,  3 users,  load average: 3,30, 2,85, 2,09
Tareas: 249 total,   1 ejecutar,  195 hibernar,    0 detener,    0 zombie
%Cpu(s): 24,4 usuario,  3,8 sist,  0,0 adecuado, 71,4 inact,  0,2 en espera,  0,0 hardw int,  0,3 softw int,  0,0 robar tiempo
KiB Mem :  8059572 total,  3489680 libre,  2041520 usado,  2528372 búfer/caché
KiB Intercambio:  9868284 total,  9868284 libre,        0 usado.  5901376 dispon Mem 

PID USUARIO   PR  NI    VIRT    RES    SHR S  %CPU %MEM     HORA+ ORDEN                                                                                                                                  
23946 lealore   20   0 4043344 454724  98808 S  89,1  5,6   5:37.02 gnome-shell                                                                                                                            
24598 root     -51   0       0      0      0 S  30,0  0,0   1:43.28 kidle_inject/2                                                                                                                         
24596 root     -51   0       0      0      0 S  29,8  0,0   1:43.73 kidle_inject/0                                                                                                                         
24597 root     -51   0       0      0      0 S  29,8  0,0   1:43.56 kidle_inject/1                                                                                                                         
24599 root     -51   0       0      0      0 S  29,4  0,0   1:43.16 kidle_inject/3                                                                                                                         
23769 root      20   0  936456 168344  69492 S   3,0  2,1   0:12.22 Xorg                                                                                                                                   
24154 lealore   20   0  657992  25260  19100 S   1,4  0,3   0:04.05 indicator-multi                                                                                                                        
23900 lealore   20   0   51196   5724   3932 S   0,7  0,1   0:02.29 dbus-daemon                                                                                                                            
24659 lealore   20   0  741896  41592  30524 S   0,4  0,5   0:01.01 gnome-terminal-                                                                                                                        
  265 root      19  -1  167208  56740  55524 S   0,2  0,7   0:02.97 systemd-journal                                                                                                                        

I first used nvidia drivers, then I switched to intel graphics, and still the same behavior. It only stops when switching to Unity shell, but for some reason in Unity I have no sound (!). I saw several reports here and on Reddit, but none provided a solution, not even a clue of what it might be happening. I have no other gnome-shell extension than those that comes with a default 18.04 install, if any.

$ inxi -F
System:    Host: lealore Kernel: 4.15.0-20-generic x86_64 bits: 64 Desktop: Gnome 3.28.1
           Distro: Ubuntu 18.04 LTS
Machine:   Device: desktop Mobo: MSI model: H61M-P20 (G3) (MS-7788) v: 1.0 serial: N/A
           BIOS: American Megatrends v: V1.3 date: 01/04/2012
CPU:       Quad core Intel Core i5-2310 (-MCP-) cache: 6144 KB
           clock speeds: max: 3200 MHz 1: 1596 MHz 2: 1596 MHz 3: 1596 MHz 4: 1596 MHz
Graphics:  Card: Intel 2nd Generation Core Processor Family Integrated Graphics Controller
           Display Server: x11 (X.Org 1.19.6 ) drivers: vesa (unloaded: modesetting,fbdev)
           Resolution: 1920x1200@0.00hz
           OpenGL: renderer: llvmpipe (LLVM 6.0, 256 bits) version: 3.3 Mesa 18.0.0-rc5
Audio:     Card Intel 6 Series/C200 Series Family High Definition Audio Controller driver: snd_hda_intel
           Sound: Advanced Linux Sound Architecture v: k4.15.0-20-generic
Network:   Card: Realtek RTL8101/2/6E PCI Express Fast/Gigabit Ethernet controller driver: r8169
           IF: eth0 state: up speed: 100 Mbps duplex: full mac: 8c:89:a5:a1:ea:02
Drives:    HDD Total Size: 1820.4GB (65.9% used)
           ID-1: /dev/sda model: WDC_WD5000AAKX size: 500.1GB
           ID-2: /dev/sdb model: WDC_WD10EZEX size: 1000.2GB
           ID-3: /dev/sdc model: WDC_WD3200AAJS size: 320.1GB
Partition: ID-1: / size: 23G used: 16G (70%) fs: ext4 dev: /dev/sda1
           ID-2: /home size: 427G used: 217G (54%) fs: ext4 dev: /dev/sda5
           ID-3: swap-1 size: 10.11GB used: 0.00GB (0%) fs: swap dev: /dev/sda6
RAID:      No RAID devices: /proc/mdstat, md_mod kernel module present
Sensors:   System Temperatures: cpu: 94.0C mobo: 27.8C
           Fan Speeds (in rpm): cpu: N/A
Info:      Processes: 251 Uptime: 36 min Memory: 2268.7/7870.7MB Client: Shell (bash) inxi: 2.3.56 

Best Answer

My problem has been solved by disabling clock seconds. Maybe it has problem with anything with fast refresh rate.

gsettings set org.gnome.desktop.interface clock-show-seconds false
Related Question