16

I am encountering a problem wherein, after using Ubuntu 20.04 for awhile, non-focused windows stop responding to mouse clicks (and thus do not gain focus). Furthermore the title bar of even the focused window doesn't recognize the mouse, so I can't, for example, move or close the window by clicking on the title bar. While I can switch between windows with Alt-Tab, the desktop itself (including the launcher) is completely unresponsive. Locking the screen does not help; however, logging out does. (So to turn the computer off using the GUI, I first have to log out with Ctrl-Alt-Del, and then am able to select Power Off from the greeter.) Also, hover actions work correctly (except on the desktop and title bars); it is just clicks that don't work.

(By the way, I have just noticed that two-finger scrolling works even without focus (my "mouse" is really a touchpad), but clicking on the scrollbar doesn't. And now I've just noticed that the "title bar" of "Files" (nautilus) works as long as the window has focus, and the launcher responds to Super+#.)

If anyone knows how to fix this I would be most appreciative.

Alexis Wilke
  • 2,707
Travis Kidd
  • 431
  • 1
  • 3
  • 8
  • 1
    I'm searching for a solution right now about this -- also on Ubuntu 20.04. I can only alt-tab to other windows but cannot select another app window until I alt-tab to it. I have a usb mouse and normal keyboard -- no touchpad. – raddevus Dec 09 '20 at 17:00
  • 1
    Also cannot select any item on the Gnome task bar. The mouse works fine once I alt-tab to the window. Gnome v 3.36.3 – raddevus Dec 09 '20 at 17:04

4 Answers4

17

I'm still not sure what causes the issue, but I was able to solve it by killing gnome-shell. A new gnome-shell is automatically restarted, and it appears nothing about my session is lost in the process.

killall -3 gnome-shell

How can I restart GNOME Shell, after it freezes or becomes unresponsive?

matwilso
  • 228
Travis Kidd
  • 431
  • 1
  • 3
  • 8
  • 1
    Would you happen to be running remmina (remote desktop) at the time?
    I can recreate the problem.... with the following:
    1. remmina is running (i'm connected to remote desktop that swallows keyboard commands)

    2)I attempt to take screenshot when over the remote (remmina) window using the following command => $ gnome-screenshot -acf /home/fakepath/Pictures/1.png & Notice it is started as a background process. When I accidentally do this I get into that odd extra shell state and I cannot click the taskbar.
    Maybe you're doing something that isn't the same, but is similar?

    – raddevus Jan 18 '21 at 18:44
  • I've had this same issue and the same solution, but I'm not running remmina. In fact it happens immediately on boot. – Vala Feb 09 '22 at 11:55
  • killall -3 gnome-shell does this without losing application state. – matwilso Jul 13 '22 at 01:36
13

Wow, I think I may have at least found a workaround fix. I went to system monitor found the Gnome shell and killed it...

One of the Gnome shells was not accessible to me so I killed the other one. Once I did, I could see my two monitors flash and then my mouse started working again and I could click the Gnome task bar items again. This is odd, but I thought I'd at least document it. Gnome version 3.36.3

system monitor

EDIT - My Attempt to Explain How I Get Into This State

I can recreate the problem with the following steps...

  1. remmina is running (i'm connected to remote desktop that swallows keyboard commands)
  2. I attempt to take screenshot when over the remote (remmina) window using the following command => $ gnome-screenshot -acf /home/fakepath/Pictures/1.png &

Note: I have a keyboard shortcut that fires the gnome-screenshot command (when I'm floating over the Remmina window that also attempts to grab the keyboard input) I believe this is the issue, because my cursor gets changed into a cross-hair (waiting for the screen grab) but I can never take the screen-grab.

Notice the script runs as a background process. When I accidentally do this I get into that odd extra shell state and I cannot click the taskbar.

Update

This occurred again today when I was running Remmina and I had to go to System Monitor and kill the gnome-shell so my clicks would be recognized again. But I noticed an additional thing: When I kill the gnome-shell Remmina is also stopped. My Remmina remote desktop windows close.

Not casting aspersions upon Remmina because it is a great program, just attempting to add info to see if someone with more info sees the issue and is able to fix it.

UPDATE 2 (Feb. 2022) - 21.04 & Gnome 3.38.5

I moved to Ubuntu 21.04 (which includes Gnome 3.38.5) 6 months ago or so & since then I have not seen this problem again.

raddevus
  • 1,800
  • 1
    Thanks. I'll check out this solution next time I have this problem. – Travis Kidd Dec 11 '20 at 17:25
  • 1
    Just to add, I was also able to recreate this problem taking a selection screenshot with shift+ctrl+prtscn, is there an issue somewhere we can add these too? Can also confirm killing gnome-shell solved the issue without losing my session – Jordan Mackie May 04 '21 at 11:12
  • 1
    @JordanMackie Thanks for confirming that this problem seems to occur during screenshot --I wasn't sure if it was something related to my specific shell script. – raddevus May 04 '21 at 12:33
  • 1
    I'm not using Remina, but I am running VMWare Desktop. The common thing is screenshots. There's something about how the cursor changes to the cross-hair that gives the problem. – Shannon Lowder Jun 24 '21 at 15:30
  • 1
    Interesting to see others running into the same problem. I also am running Remmina and screenshot at the same time when this happens. – Stéphane Aug 18 '21 at 09:51
  • Running Ubuntu 20.04.3 (Gnome 3.36.8), I'm facing the same issue when connected to remote terminal via Remmina and taking a screenshot. Killing gnome-shell fixes the issue. – Mindaugas Aug 23 '22 at 12:14
  • this happens for me sometimes, it hink its when i use the native screenshot app and then cancel. very happy for this fix. – gorav Sep 30 '22 at 15:11
7

I had the same issue after trying to take a screenshot (Shift+PrtSc) when a drop-down element is open in Chrome.

Restarting Gnome helped: Alt+F2rEnter

Your screen will blink and the mouse will start working.

Bulat
  • 361
2

Same happened to me. I started a Firefox over SSH and tried to take a screen shot. I pressed Ctrl+Shift+PrintScr and my mouse stopped working on the taskbar. Killing gnome-shell fixed for me also. Ubuntu 20.04.

Zanna
  • 70,465
eSzeM
  • 21