Page 1 of 1

[Solved] VirtualBox steals USB mouse and keyboard from the host OS

Posted: 22. Jun 2018, 10:40
by ivico
Hi,

I'm using Virtual Box 5.2.12 running on Windows 10, Guest additions 5.2.12 installed, and on my setup Virtual Box is stealing the USB mouse and keyboard from the Host OS. Which means I can't use the keyboard and mouse in my host.

Is there a way to prevent VBox from taking control automatically over host devices?

I have a Dell laptop which I use with a docking station, many times without even opening the lid, to take advantage of mouse, better keyboard, extra USB ports, extra displays, etc.

The issue is that any time I dock my laptop and awake it from sleep mode I'm unable to unlock/login. Keyboard and mouse are not responding. I have to open the laptop lid and log in using the laptop keyboard and touchpad.
Then I notice that my mouse, keyboard, headphones and any devices connected to the dock's USB are not responding; right clicking on the small USB icon on the bottom right part of the virtual machine window shows me that all those non-responsive devices are displayed there and have the check mark to their left. Which means that Virtual Box has assigned them exclusively to the guest OS (Ubuntu 16.04 LTS in my case).
Which leaves me without keyboard, mouse, headphones etc in my host OS, until I manually un-check them from Virtual Box.

This in my opinion is a bug.

Normally, the virtual machine USB settings allow to select filters which I previously used to have some resources automatically assigned to the VM (e.g. a specific SD card reader, in order to prevent the host from auto-mounting it and thus making it unavailable to the guest). It should have such a filter for devices that should be unavailable to the VM.

So if you were patient enough to read my whole complaint,
Thank you.
And if you have a clue and a solution/workaround for me, then
Thank you twice (which a cherry on top) :D

Re: VirtualBox steals USB mouse and keyboard from the host OS

Posted: 22. Jun 2018, 11:35
by socratis
ivico wrote:This in my opinion is a bug.
Not so fast... "Patience my young Padawan...";)
ivico wrote:Normally, the virtual machine USB settings allow to select filters which I previously used
And one of those USB filter is too broad and captures everything in the known universe, most probably a blank one, i.e. no values defined. If you don't manage to find the rogue filter yourself, post the output of:
  • 
    cd "C:\Program Files\Oracle\VirtualBox"      <-- change it if not the default installation
    VBoxManage list usbfilters
    VBoxManage showvminfo "<Your_Virtual_Machine_Name>"

Re: VirtualBox steals USB mouse and keyboard from the host OS

Posted: 22. Jun 2018, 12:56
by ivico
socratis wrote:And one of those USB filter is too broad and captures everything in the known universe, most probably a blank one, i.e. no values defined. If you don't manage to find the rogue filter yourself, post the output of:

cd "C:\Program Files\Oracle\VirtualBox" <-- change it if not the default installation
VBoxManage list usbfilters
VBoxManage showvminfo "<Your_Virtual_Machine_Name>"
Well - touché, master !
I went directly to my sdcard filters and noticed most of the fields were blank. So I ran
format c:

ok, bad joke. Removed the filters, re-added them from "USB Settings" - "Add new filter", and now they work again. Rogue busted.
So they did get corrupted somehow, sometime during one of the upgrades. And the bug after all was between the keyboard and the chair. Never mind, problem solved.
Thank you! (Cherry included)

Re: VirtualBox steals USB mouse and keyboard from the host OS

Posted: 22. Jun 2018, 13:31
by socratis
ivico wrote:So they did get corrupted somehow, sometime during one of the upgrades.
Can't say that I've heard that one before, I tend to believe that the problem was elsewhere...
ivico wrote:the bug after all was between the keyboard and the chair
PEBKAC! That's the one I was thinking about!!! :lol:
ivico wrote:Thank you! (Cherry included)
The ice-cream is on me then! ;)

Marking as [Solved].

Re: [Solved] VirtualBox steals USB mouse and keyboard from the host OS

Posted: 17. Feb 2020, 20:38
by nkanzari
Hello, I'm running into the same problem here. I'm running the latest to date version of VirtualBox with Debian 9 (Guest) on a Windows 10 machine. Whenever I put my host machine to sleep, all my docking station USB ports (Dell TB16) stop working until I shut down the guest machine. Afterward, I can start the guest VM again with no issues. This also happen when I undock my laptop for longer than 1 min.

I have no corrupted USB filters and I did set up new filters for each of the USB ports as remote but nothing works. My knowledge in VM settings is not what I'll qualify by advanced so I need help guys :cry:

Re: [Solved] VirtualBox steals USB mouse and keyboard from the host OS

Posted: 26. May 2020, 19:26
by Nick is not my name
Thank You so much! I was stressing about it for three days. All I did was remove all the connections to usb and I got my mouse and keyboard back! I haven't added any back yet though, so their might be a larger issue. Hopefully the fresh start fixed this problem as I add them back. It was so frustrating to say the least.

I am using Win 10. as a guest in OS High Sierra.