Q: Top bar, dock, desktop icons not responding to clicks I'm having a weird problem with Ubuntu 20.04.2. After some time logging in I can't switch between applications through the dock because clicking on the icons there has no effect. I can't also access any function on top bar because of the same reason. Desktop icons also don't respond to clicks. I can only switch between apps by alt+tabbing. I have to log out and log back in to solve this problem.
It is probably happening because I have a problematic hard disk. I'm going to replace it with an SSD soon but I want to know how an hard drive failure can cause such a problem.
Note: I don't use any gnome extension.

A: I suspect that you are correct and it's related to the had disk. If the Gnome shell is having trouble accessing data from the drive then it could easily cause the system to become unresponsive over time.
When it happens you could open a shell and run top to check the iowait metric. It's on a line like this:
%Cpu(s):  0.1 us,  0.0 sy,  0.0 ni, 99.8 id,  0.0 wa,  0.0 hi,  0.0 si,  0.0 st
The value in front of wa indicates how much time the CPU is waiting for IO. Unless you're in the process of copying large files it around it should be low. If it's high then that points to the disk.
You could also install the systat package and check with the iostat tool
$ iostat 1 10
This will print disk IO stats every 1 second for 10 seconds. The output will provide metrics for each disk in the system. The first line is an average, you can get just that by running iostat with no args or iostat 1 1
If you want to kick gnome back in to life then you could try pressing ALT + F2 and then r follwed by return. If that doesn't work then killall -HUP gnome-shell should do the trick.

A: The advice from @TuxInvader does the trick in my case:

If you want to kick gnome back in to life then you could try pressing ALT + F2 and then r follwed by return.

