Mouse suddenly stops working in Ubuntu (running as guest in VirtualBox)
Update: As suggested in other answers, as a quick fix first try just right-click with the mouse. If this does not help, try killing the VirtualBox drag&drop processes as described below or in other answers.
Full/Original Answer:
The problem might be caused by VirtualBox drag&drop (d&d) problems. If this is the case, it can be solved by killing the VirtualBox d&d processes.
-
Open a terminal (Ctrl+Alt+t does it for me) and find the d&d processes e.g. by:
ps -ax | grep VBoxClient
, resulting e.g. in (among other entries):1429 ? S 0:00 /usr/bin/VBoxClient --draganddrop
-
Then kill all processes which contain this text:
VBoxClient --draganddrop
e.g. for process number 1429 by:kill 1429
I got some hints for this solution on: https://www.virtualbox.org/ticket/14903
If this does not help, try turning off and on again "Mouse Integration" (via the menu of the VirtualBox).
Further, if the problem keeps recurring, consider disabling VirtualBox drag&drop altogether.
sudo pkill VBoxClient
sudo VBoxClient-all
That worked for me. I think it is easier than searching processes.
I notice this problem since probably the last few months with VBox 6.1.x. I run Xubuntu 20.04 on MacBook Pro. I feel the issue might be related to double clicking mouse somewhere faster than the system can react (why it sometimes reacts slowly I don't know). Once that happens, basically clicking mouse on any place has no effect at all. But one work around I found is to click the "right mouse", in my case the two-finger click, in a terminal or in an editor or some place, then a menu pops up. You then left click elsewhere to dismiss the menu, then the mouse works as normal.
+++++++ Recently as I have been trying to find out about a problem related to slow menu reactions with Android Studio running on Xubuntu, as I documented here, I found the cause of the two issues are one: display scaling with VirtualBox. I've got a solution/workaround which also eliminates this issue.