15

Sometimes in Ubuntu (running as Xubuntu as guest in a VirtualBox on a Windows as host) the mouse stops working in the sense that mouse clicks are not recognized anymore. The mouse pointer is still visible and keystrokes from the keyboard are still recognized.

Switching VT (as suggested in some similar problem reports) does not resolve the problem.

Rebooting solves the problem however the problem occurs again after some days/hours.

Is there a simpler solution than rebooting and how to prevent this problem from occurring?

1
  • I also happens to me, with little variant: the mouse click does not work inside windows, but it odes outside (I can still move windows by holding click down on their upper bars). To "unlock" it, I just click on one of the apps on the OS bottom bar.
    – Tms91
    Jul 27, 2021 at 9:14

12 Answers 12

31

Update: Try first just a right-click with the mouse. If this does not help, try turning off and on of "Mouse Integration" or try to kill the VirtualBox drag&drop processes (as described below) or try some of the 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.

2
  • You can now drag & drop it by switching to x11. echo $XDG_SESSION_TYPE i am using Ubuntu 21.04 May 3, 2021 at 8:00
  • Savior! This was happening once or so every couple weeks starting recently. Could never figure out what was going on. Only part of the VM window wouldn't accept click messages, but other parts would. This did the trick! no need to restart the VM now. Thank you x1000!
    – drew010
    May 13, 2022 at 20:27
8

I've been having that problem for months, even with drag and drop disabled. Also triggering mouse integration did not help. This FINALLY fixed it for me:

Go to your VM and change the Settings > User Interface to NOT show the mini-toolbar in fullscreen mode

Source: meeas on virtualbox forums

You still can access the menu with a keyboard shortcut: Host + Home

2
  • 2
    This worked for me! Thank you! It must be noted, however, that this solution will work for Linux hosts. The question specifically mentioned that it was for Windows hosts. Nevertheless, your answer was valuable to me.
    – abrac
    May 27, 2023 at 11:20
  • Thanks a lot! It helps me without drag and drop disabling and mouse integration triggering.
    – IStranger
    Feb 7 at 12:32
3

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.

1
  • thx, good hint! Your solution also seems to work on Windows hosts in some cases. About the cause of the problem: it could as well be caused by double-clicking in combination with drag-and-drop, I'll pay attention to this possible cause.
    – Alan Z.
    Jul 27, 2020 at 14:20
2
sudo pkill VBoxClient
sudo VBoxClient-all

That worked for me. I think it is easier than searching processes.

1
  • Hi Şaban, that's indeed easier, at least for all systems where this works. The first part ("sudo pkill VBoxClient") works for me, too. However when trying "sudo VBoxClient-all", I get an error "sudo: VBoxClient-all: command not found" maybe because I've installed my guest additions per apt (and apparently not all of them).
    – Alan Z.
    Sep 19, 2020 at 9:58
1

I tried everything I found but the only thing that worked for me was to change the Graphics Controller setting to VMSVGA in the Display menu.

settings dialog for virtual machine, display submenu, screen tab, graphics controller selection

1

Go to virtual box -> File -> Preferences -> Input

Disable [] Auto Capture Keyboard

It's the only solution worked for me after fiddling a few hours.

VirtualBox version : 6.1
Host : Manjaro Linux 21 ; Kernel 5.10 ; KDE plasma 5.22 ; Wayland ;
Guest : Windows 10
1

For me, Ubuntu 22.04 under VirtualBox 6.1.34, helped uncheck box Nested Paging in VirtualBox Settings->System->Acceleration

0

I had this problem recently and I solved it by just quitting the machine by pressing Host + Q (i.e. RightCtrl + Q in my case). You are given the option to save the machine state so your work won't be lost. When I started it back up, it worked fine.

0

My Situation: Ubuntu 21.04 - > Ubuntu Virtual box instance -> VPN and connected to a windows box via Remmina.

I noticed, the mouse would stop working. I couldn't click on anything within the VM as well as the actual virtual box application on my main ubuntu pc. The only thing I could do is kill the vm session by clicking on the X on the top left. Once I did this ( i saved the state of the vm ). I was able to click in the application once more.

With Ubuntu 21.04. Wayland is the default display server. Switching back to XOrg seems to fix the problem I was experiencing.

0

Arch Linux, KDE Wayland, same issue. After I put the Windows full screen, I am unable to click anywhere. I can't click either on the dialog Window to close the virtual machine.

I think that it is an issue with Wayland. I resolved It by uninstalling VirtualBox and installing VMWare. It works very well.

0
0

https://github.com/dogukankurnaz/virtualbox-fix

git clone https://github.com/dogukankurnaz/virtualbox-fix.git
cd virtualbox-fix
chmod +x ./fix.sh
./fix.sh
2
  • 1
    Simply pasting line 46 of your script here for copy + paste would be much less work and noise, and a lot more usable for those who need it. (The command substitutions look like errors anyway. Or do you really expect the output of kill -15 to be a valid command for the shell to execute?)
    – tripleee
    May 10, 2022 at 12:22
  • (Even more tangentially, see also useless use of grep.)
    – tripleee
    May 10, 2022 at 12:24
0

screenshot settings virtual box

This took me a month or so to resolve on ubuntu 20.4 on vbox 7. Turning off paravirtualization in the settings did it.

You must log in to answer this question.

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