2

I'm having some issues with CPU usage when using wireless connection on my laptop.

This has never happened on wired connection, therefore I'm assuming wifi connection is somewhat related.

top says that most resources are used by gnome-shell, browser, and some kworker processes.

Situation also gets worse the more network resources are used (for example if I start a download). Here's an htop screen, as soon as I started a download several gnome-shell processes showed very high cpu usage: enter image description here

Tried using perf to see what uses the CPU most as suggested here: https://askubuntu.com/a/422151/700229 but couldn't find anything that would point me in the right direction, but the output was probably bad:

✓ ~→ sudo perf record -g -a sleep 10
Lowering default frequency rate to 1250.
Please consider tweaking /proc/sys/kernel/perf_event_max_sample_rate.
[ perf record: Woken up 9 times to write data ]
Warning:
Processed 52550 events and lost 2 chunks!

Check IO/CPU overload!

[ perf record: Captured and wrote 7.214 MB perf.data (26167 samples) ]

Here's the output of lspci -v:

3b:00.0 Network controller: Intel Corporation Wireless-AC 9260 (rev 29)
        Subsystem: Intel Corporation Device 4010
        Flags: bus master, fast devsel, latency 0, IRQ 16
        Memory at ed400000 (64-bit, non-prefetchable) [size=16K]
        Capabilities: <access denied>
        Kernel driver in use: iwlwifi
        Kernel modules: iwlwifi

And iwconfig:

lo        no wireless extensions.

br-2d6609084b03  no wireless extensions.

br-7083ba6447c1  no wireless extensions.

docker0   no wireless extensions.

wlp59s0   IEEE 802.11  ESSID:"XXX"
          Mode:Managed  Frequency:5.5 GHz  Access Point: XX:XX:XX:XX:XX:XX
          Bit Rate=650 Mb/s   Tx-Power=22 dBm
          Retry short limit:7   RTS thr:off   Fragment thr:off
          Power Management:on
          Link Quality=45/70  Signal level=-65 dBm
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:7  Invalid misc:113   Missed beacon:0

I've checked that CPU is set to performance in tlp and that wifi battery saver is disabled.

Now I'm kind of lost here what to look for next. Any help is very appreciated because my work depends on resolving this.

UPD Installed gnome extensions:

✓ ~→ ls -al ~/.local/share/gnome-shell/extensions
total 80
drwxrwxr-x 20 sergio sergio 4096 Mar 15 17:33 .
drwx------  3 sergio sergio 4096 Mar 15 17:31 ..
drwxrwxr-x  3 sergio sergio 4096 Jul 24  2019 alternate-tab@gnome-shell-extensions.gcampax.github.com
drwxrwxr-x  3 sergio sergio 4096 Jun 13  2019 appindicatorsupport@rgcjonas.gmail.com
drwxrwxr-x  3 sergio sergio 4096 Mar 15 17:33 apps-menu@gnome-shell-extensions.gcampax.github.com
drwxrwxr-x  4 sergio sergio 4096 Aug  5  2019 auto-move-windows@gnome-shell-extensions.gcampax.github.com
drwxrwxr-x  5 sergio sergio 4096 Jun 13  2019 dash-to-dock@micxgx.gmail.com
drwxrwxr-x  3 sergio sergio 4096 Jul 24  2019 drive-menu@gnome-shell-extensions.gcampax.github.com
drwxrwxr-x  4 sergio sergio 4096 Feb 28 14:25 extensions@abteil.org
drwxrwxr-x  2 sergio sergio 4096 Sep 27 12:22 Hide_Activities@shay.shayel.org
drwxrwxr-x  2 sergio sergio 4096 Jul 24  2019 launch-new-instance@gnome-shell-extensions.gcampax.github.com
drwxrwxr-x  5 sergio sergio 4096 Feb 28 14:25 minimizeall@scharlessantos.org
drwxrwxr-x  3 sergio sergio 4096 Jul 24  2019 native-window-placement@gnome-shell-extensions.gcampax.github.com
drwxrwxr-x  2 sergio sergio 4096 Jun 13  2019 noannoyance@sindex.com
drwxrwxr-x  3 sergio sergio 4096 Jul 24  2019 places-menu@gnome-shell-extensions.gcampax.github.com
drwxrwxr-x  2 sergio sergio 4096 Sep 19 15:35 remove-dropdown-arrows@mpdeimos.com
drwxrwxr-x  4 sergio sergio 4096 Feb 22 16:20 syncthingicon@jay.strict@posteo.de
drwxrwxr-x  4 sergio sergio 4096 Jun 13  2019 update-extensions@franglais125.gmail.com
drwxrwxr-x  3 sergio sergio 4096 Jul 24  2019 user-theme@gnome-shell-extensions.gcampax.github.com
drwxrwxr-x  3 sergio sergio 4096 Aug  5  2019 windowsNavigator@gnome-shell-extensions.gcampax.github.com

✓ ~→ ls -al /usr/share/gnome-shell/extensions
total 48
drwxr-xr-x 12 root root 4096 Aug  5  2019 .
drwxr-xr-x  6 root root 4096 Jan 15 06:59 ..
drwxr-xr-x  2 root root 4096 Jun 13  2019 alternate-tab@gnome-shell-extensions.gcampax.github.com
drwxr-xr-x  2 root root 4096 Jun 13  2019 apps-menu@gnome-shell-extensions.gcampax.github.com
drwxr-xr-x  2 root root 4096 Jun 13  2019 auto-move-windows@gnome-shell-extensions.gcampax.github.com
drwxr-xr-x  2 root root 4096 Jun 13  2019 drive-menu@gnome-shell-extensions.gcampax.github.com
drwxr-xr-x  2 root root 4096 Jun 13  2019 launch-new-instance@gnome-shell-extensions.gcampax.github.com
drwxr-xr-x  2 root root 4096 Jun 13  2019 native-window-placement@gnome-shell-extensions.gcampax.github.com
drwxr-xr-x  2 root root 4096 Jun 13  2019 places-menu@gnome-shell-extensions.gcampax.github.com
drwxr-xr-x  2 root root 4096 Jun 13  2019 user-theme@gnome-shell-extensions.gcampax.github.com
drwxr-xr-x  2 root root 4096 Jun 13  2019 window-list@gnome-shell-extensions.gcampax.github.com.bak
drwxr-xr-x  2 root root 4096 Jun 13  2019 windowsNavigator@gnome-shell-extensions.gcampax.github.com

UPD2 htop in idle state: enter image description here

UPD3 free mem and swappiness:

✓ ~→ free -h
              total        used        free      shared  buff/cache   available
Mem:            30G        2.4G         24G        782M        3.6G         27G
Swap:           16G          0B         16G

✓ ~→ sysctl vm.swappiness
vm.swappiness = 10

2 Answers2

0

Holy !@#$% Batman. You've got WAY too manu GNOME Shell extensions, and many of them are duplicated in both places where extensions should exist.

System extensions are seen with ls -al /usr/share/gnome-shell/extensions should only contain these (19.10):

drwxr-xr-x 2 root root 4096 Nov  2 14:36 desktop-icons@csoriano
drwxr-xr-x 3 root root 4096 Nov  2 14:36 ubuntu-appindicators@ubuntu.com
drwxr-xr-x 3 root root 4096 Mar 12 16:22 ubuntu-dock@ubuntu.com

User extensions are normally seen via ls -al ~/.local/share/gnome-shell/extensions.

Remove the duplicates in /usr/share/gnome-shell/extensions.

Then restart GNOME Shell, or better yet, just reboot.

Then temporarily turn OFF ALL remaining extensions at https://extensions.gnome.org/local/ and retest your system. Turn ON only one extension at a time during testing. Monitor the top command, and GNOME Shell CPU usage should be less than 2%. The goal would be to only have 5-6 extensions enabled max. Ditch the rest.

Then restart GNOME Shell, or better yet, just reboot.

heynnema
  • 73,649
0

I have the same issue. Turn on Airplane mode and reactivate wifi. That worked for me.