4

I have made hibernation working on my Ubuntu install by following this article: https://medium.com/@lzcoder/enable-hibernate-on-ubuntu-using-uswsusp-s2disk-ae0b71862eb5

What I have noticed is that after I turn on my PC from hibernation, Gnome Shell is taking a lot of CPU power. I have to restart my PC to go back to normal (there are no other cases with such a problem).

What can I do? I haven't found anything useful online. It was mostly GPU driver problem (I have just Intel GPU, so I don't think that is my case).

Output of ls -al ~/.local/share/gnome-shell/extensions

total 52
drwxrwxr-x 13 username username 4096 Jun 22 16:49  ./
drwx------  3 username username 4096 Jun 23 18:23  ../
drwxrwxr-x  8 username username 4096 Jun 15 17:33 '[email protected]'/
drwxrwxr-x  5 username username 4096 Jun 15 17:22 '[email protected]'/
drwxrwxr-x  8 username username 4096 Jun 22 16:49 '[email protected]'/
drwxrwxr-x  3 username username 4096 Jun 15 17:35 '[email protected]'/
drwxrwxr-x  2 username username 4096 Jun 19 14:33 'NotificationCounter@coolllsk'/
drwxrwxr-x  2 username username 4096 Jun 15 17:35 '[email protected]'/
drwxrwxr-x  7 username username 4096 Jun 19 07:59 '[email protected]'/
drwxrwxr-x  4 username username 4096 Jun 19 13:29 '[email protected]@posteo.de'/
drwxrwxr-x  5 username username 4096 Jun 15 17:27 '[email protected]'/
drwxrwxr-x  5 username username 4096 Jun 15 17:25 '[email protected]'/
drwxrwxr-x  4 username username 4096 Jun 15 17:19 '[email protected]'/

Output of ls -al /usr/share/gnome-shell/extensions

total 20
drwxr-xr-x 5 root root 4096 Apr 23 09:35  ./
drwxr-xr-x 7 root root 4096 Jun 15 17:19  ../
drwxr-xr-x 2 root root 4096 Jun 16 20:43 'desktop-icons@csoriano'/
drwxr-xr-x 3 root root 4096 Apr 23 09:35 '[email protected]'/
drwxr-xr-x 3 root root 4096 Jun 19 13:20 '[email protected]'/

Output of free -h

total        used        free      shared  buff/cache   available
Mem:           15Gi       4.4Gi       5.7Gi       1.2Gi       5.4Gi       9.6Gi
Swap:          31Gi       307Mi        30Gi

Output of sysctl vm.swappiness => vm.swappiness = 60

top screenshot

13
  • Edit your question and show me ls -al ~/.local/share/gnome-shell/extensions and ls -al /usr/share/gnome-shell/extensions and free -h and sysctl vm.swappiness and a screenshot of top.
    – heynnema
    Jun 23, 2020 at 16:13
  • Thanks for the info. Go to extensions.gnome.org/local and temporarily disable ALL extensions, and then restart gnome-shell with ALT+F2, then r, then ENTER. Then view top and check gnome-shell, and it should be using <3% of CPU. Later, enable ONE extension at a time and recheck top.
    – heynnema
    Jun 23, 2020 at 17:27
  • Did not help unfortunately. After I restart my machine, it's all back to normal, so I'm not sure whether a extension can cause this.
    – RandomUser
    Jun 23, 2020 at 17:36
  • 1
    I had a very similar issue after resuming from hibernation, my top output look similar to yours, however that output is misleading, if you check out the full process details using ps -ef | grep gnome-shell or ps -ef | grep <pid> you'll notice that that is not the gnome-shell binary (/usr/bin/gnome-shell) but another binary, probably a gjs process spawned by Gnome. In my case it was a script that had something to do with notifications. I was able to kill that process (sudo kill <pid>) without crashing Gnome. I'm not 100% sure but it also seems like Gnome restarted that script.
    – Anthony
    Jun 25, 2020 at 17:00
  • 1
    Killing all gjs processes is a bit overkill, and could even crash Gnome. The important thing for now is to determine the exact binary that is using up CPU time. When you run the top command, the leftmost column is PID, take note of the PID of the process that is using up 99+% of your CPU, and do a ps -ef | grep 1234 replacing 1234 with the PID you noted in the last step. The output will show you what command was used to launch that process. It is important to know which executable it is that is slowing down your system, in my case top showed gnome-sh... which was misleading...
    – Anthony
    Jun 26, 2020 at 21:56

1 Answer 1

2

Wayland

Try this...

You may have a problem with an older computer, with an older GPU. Try this...

sudo -H gedit /etc/gdm3/custom.conf # edit this file

change:

#WaylandEnable=false

to:

WaylandEnable=false

Save the file and quit gedit. Then reboot.

Swap/hibernation

Your swap partition, or /swapfile, is excessive.

Edit your question with the outputs of these commands, use copy/paste, not a screenshot.

cat /etc/fstab

sudo blkid

cat /etc/initramfs-tools/conf.d/resume

grep -i "GRUB_" /etc/default/grub

1
  • 1
    Looks like uncommenting the line with WaylandEnable=false helped. After I go back from hibernation, CPU usage is normal. Thanks.
    – RandomUser
    Jun 29, 2020 at 13:58

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .