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

Discussions related to using VirtualBox on Windows hosts.
Post Reply
ivico
Posts: 2
Joined: 22. Jun 2018, 10:13

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

Post 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
Last edited by socratis on 22. Jun 2018, 13:32, edited 1 time in total.
Reason: Marked as [Solved].
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

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

Post 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>"
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
ivico
Posts: 2
Joined: 22. Jun 2018, 10:13

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

Post 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)
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

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

Post 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].
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
nkanzari
Posts: 1
Joined: 17. Feb 2020, 20:28

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

Post 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:
Nick is not my name
Posts: 103
Joined: 25. May 2020, 04:21

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

Post 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.
Post Reply