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
ls -al ~/.local/share/gnome-shell/extensions
andls -al /usr/share/gnome-shell/extensions
andfree -h
andsysctl vm.swappiness
and a screenshot oftop
.top
and check gnome-shell, and it should be using <3% of CPU. Later, enable ONE extension at a time and rechecktop
.top
output look similar to yours, however that output is misleading, if you check out the full process details usingps -ef | grep gnome-shell
orps -ef | grep <pid>
you'll notice that that is not thegnome-shell
binary (/usr/bin/gnome-shell
) but another binary, probably agjs
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.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 thetop
command, the leftmost column isPID
, take note of the PID of the process that is using up 99+% of your CPU, and do aps -ef | grep 1234
replacing1234
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 casetop
showedgnome-sh...
which was misleading...