Webcam Disconnects in Hardened Virtualbox

Discussions related to using VirtualBox on Windows hosts.
Post Reply
Krypt0Burn
Posts: 4
Joined: 2. May 2020, 13:57

Webcam Disconnects in Hardened Virtualbox

Post by Krypt0Burn »

Hello,

I have been encountering a problem using my built-in webcam using the host built-in webcam in Guest (webcam is chosen through Device--> webcams) which keeps disconnecting I guess due face detection issue in an online meeting etc. Extension pack is installed.

I always have to go through Device --> Webcams, click it (remove the tick) then click again so it gets integrated. I tried almost every solution, I even thought of Power Performance yet couldn't find it on host or guest. Eventually, a friend recommended using a USB webcam, and due to shortage of high-end webcams in my area, had to buy a cheap 2.0 USB webcam, and trying to integrate by adding a filter through the plug into the host, add a filter, unplug, run guest until Idle then plug it and voila. Yet, the viola part is missed in my scenario because it says that the device is busy with another app what so ever. It's shown in Dvmgmt as a Webcam (guest) and VirtualBox USB (host)

Now I don't know if I have to look into the built-in issue and why is the face detection flag is raised every now and then, or the 2.0 USB webcam enabling issue. I am listing some USB host and list webcams command outputs for your convenience, 093A:2700 is the USB webcam, 04F2:B5D5 the integrated one.


VBoxManage list usbhost

Host USB Devices:

UUID: e82d14b9-8514-4549-9ec7-76e1b89f954a
VendorId: 0x8087 (8087)
ProductId: 0x0a2a (0A2A)
Revision: 0.3 (0003)
Port: 4
USB version/speed: 2/Full
Manufacturer: Intel Corp.
Address: {e0cbf06c-cd8b-4647-bb8a-263b43f0f974}\0000
Current State: Busy

UUID: b2043180-a59a-4e07-9fb9-912305e94334
VendorId: 0x093a (093A)
ProductId: 0x2700 (2700)
Revision: 1.0 (0100)
Port: 3
USB version/speed: 2/High
Manufacturer: PixArt Imaging Inc.
Product: USB2.0_Camera
Address: {36fc9e60-c465-11cf-8056-444553540000}\0009
Current State: Busy

UUID: 1f65e064-0bdb-48eb-8e7c-fb2df5893384
VendorId: 0x04f2 (04F2)
ProductId: 0xb5d5 (B5D5)
Revision: 38.20 (3820)
Port: 5
USB version/speed: 2/High
Manufacturer: Chicony Electronics Co.,Ltd.
Product: HP TrueVision HD Camera
SerialNumber: 0001
Address: {36fc9e60-c465-11cf-8056-444553540000}\0004
Current State: Busy


UUID: 37855946-42b4-404d-85a6-e3acb20ba26a
VendorId: 0x046d (046D)
ProductId: 0xc534 (C534)
Revision: 41.1 (4101)
Port: 1
USB version/speed: 2/Full
Manufacturer: Logitech
Product: USB Receiver
Address: {36fc9e60-c465-11cf-8056-444553540000}\0013
Current State: Busy

VBoxManage list webcams

Video Input Devices: 2
.1 "HP TrueVision HD Camera"
\\?\usb#vid_04f2&pid_b5d5&mi_00#6&b4d103c&1&0000#{65e8773d-8f56-11d0-a3b9-00a0c9223196}\global
.2 "USB2.0_Camera"
\\?\usb#vid_093a&pid_2700&mi_00#6&3236e025&1&0000#{65e8773d-8f56-11d0-a3b9-00a0c9223196}\global


Kindly help
scottgus1
Site Moderator
Posts: 20945
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: Webcam Disconnects in Hardened Virtualbox

Post by scottgus1 »

I haven't put a Webcam into a guest (I tend to run A/V stuff on the host). But I have put USB devices into a guest.

Carefully go through USB basics and troubleshooting. If you finish all the steps 1-7 and cannot get your USB device into the guest OS, carefully post the outputs of the commands in step 8 as text in

Code: Select all

 tags, not screenshots. Zip and post the log step 8 calls for, using the forum's Upload Attachment tab.

You posted the 'list usbhost' command already, step 8 asks for a few more diagnosing items.
Krypt0Burn
Posts: 4
Joined: 2. May 2020, 13:57

Re: Webcam Disconnects in Hardened Virtualbox

Post by Krypt0Burn »

I went through some of the steps you kindly provided in that link.

#1: Sharing USB devices
I am not sharing
_______________________________________________________
#2: Capturing a USB device in VirtualBox - On-the-fly and USB filter
With both methods and adding a filter in USB 2.0 and 3.0, with only Name, VID, and PID, then ran guest properly (unplugging/plugging), the webcam is detected in device manager under webcams (guest) VirtualBox USB (host), yet a black screen is shown when starting Camera App.
_______________________________________________________
VBoxManage -version
6.1.2r135662
_______________________________________________________
VBoxManage list extpacks
Extension Packs: 1
Pack no. 0: Oracle VM VirtualBox Extension Pack
Version: 6.1.2
Revision: 135662
Edition:
Description: Oracle Cloud Infrastructure integration, USB 2.0 and USB 3.0 Host Controller, Host Webcam, VirtualBox RDP, PXE ROM, Disk Encryption, NVMe.
VRDE Module: VBoxVRDP
Usable: true
Why unusable:
_______________________________________________________
VBoxManage list usbhost
Host USB Devices:

UUID: 42b77705-d028-4a94-b12f-9f6d61b86c6a
VendorId: 0x8087 (8087)
ProductId: 0x0a2a (0A2A)
Revision: 0.3 (0003)
Port: 4
USB version/speed: 2/Full
Manufacturer: Intel Corp.
Address: {e0cbf06c-cd8b-4647-bb8a-263b43f0f974}\0000
Current State: Busy

UUID: 2ae168a9-f10a-4cf8-926c-892371e1eded
VendorId: 0x093a (093A)
ProductId: 0x2700 (2700)
Revision: 1.0 (0100)
Port: 3
USB version/speed: 2/High
Manufacturer: PixArt Imaging Inc.
Product: USB2.0_Camera
Address: {36fc9e60-c465-11cf-8056-444553540000}\0009
Current State: Busy

UUID: 84488fd9-6a84-435c-8eb0-fe2c32f22db1
VendorId: 0x04f2 (04F2)
ProductId: 0xb5d5 (B5D5)
Revision: 38.20 (3820)
Port: 5
USB version/speed: 2/High
Manufacturer: Chicony Electronics Co., Ltd
Address: {36fc9e60-c465-11cf-8056-444553540000}\0004
Current State: Busy

UUID: 6facdcbb-7cd9-4b0b-bfa7-996ce4680857
VendorId: 0x046d (046D)
ProductId: 0xc534 (C534)
Revision: 41.1 (4101)
Port: 1
USB version/speed: 2/Full
Manufacturer: Logitech
Product: USB Receiver
Address: {36fc9e60-c465-11cf-8056-444553540000}\0013
Current State: Busy
_______________________________________________________
Global USB Device Filters

<none>

_______________________________________________________
VBoxManage showvminfo "vm0"
Name: vm0
Groups: /
Guest OS: Windows 10 (64-bit)
UUID: 2b8a4974-7474-4624-b081-4ae04cccd115
Config file: D:\windowsvm\vm0\vm0.vbox
Snapshot folder: D:\windowsvm\vm0\Snapshots
Log folder: D:\windowsvm\vm0\Logs
Hardware UUID: 2b8a4974-7474-4624-b081-4ae04cccd115
Memory size 2048MB
Page Fusion: disabled
VRAM size: 128MB
CPU exec cap: 100%
HPET: enabled
CPUProfile: host
Chipset: ich9
Firmware: BIOS
Number of CPUs: 2
PAE: enabled
Long Mode: enabled
Triple Fault Reset: disabled
APIC: enabled
X2APIC: disabled
Nested VT-x/AMD-V: disabled
CPUID Portability Level: 0
CPUID overrides: None
Boot menu mode: message and menu
Boot Device 1: Floppy
Boot Device 2: DVD
Boot Device 3: HardDisk
Boot Device 4: Not Assigned
ACPI: enabled
IOAPIC: enabled
BIOS APIC mode: APIC
Time offset: 0ms
RTC: local time
Hardware Virtualization: enabled
Nested Paging: enabled
Large Pages: enabled
VT-x VPID: enabled
VT-x Unrestricted Exec.: enabled
Paravirt. Provider: Legacy
Effective Paravirt. Prov.: None
State: powered off (since 2020-05-02T13:10:09.000000000)
Graphics Controller: VBoxSVGA
Monitor count: 1
3D Acceleration: disabled
2D Video Acceleration: disabled
Teleporter Enabled: disabled
Teleporter Port: 0
Teleporter Address:
Teleporter Password:
Tracing Enabled: disabled
Allow Tracing to Access VM: disabled
Tracing Configuration:
Autostart Enabled: disabled
Autostart Delay: 0
Default Frontend:
VM process priority: default
Storage Controller Name (0): SATA
Storage Controller Type (0): IntelAhci
Storage Controller Instance Number (0): 0
Storage Controller Max Port Count (0): 30
Storage Controller Port Count (0): 2
Storage Controller Bootable (0): on
SATA (0, 0): C:\Sysv\vm0.vdi (UUID: 8b4bead8-3ab0-452a-b14a-c751dbf6103c)
SATA (1, 0): C:\WindowsisO\Windows.iso (UUID: a8a734d5-7efb-4181-8553-f9b6f251708c)
NIC 1: MAC: 6CF0491A6E12, Attachment: NAT, Cable connected: on, Trace: off (file: none), Type: 82540EM, Reported speed: 0 Mbps, Boot priority: 0, Promisc Policy: deny, Bandwidth group: none
NIC 1 Settings: MTU: 0, Socket (send: 64, receive: 64), TCP Window (send:64, receive: 64)
NIC 2: disabled
NIC 3: disabled
NIC 4: disabled
NIC 5: disabled
NIC 6: disabled
NIC 7: disabled
NIC 8: disabled
NIC 9: disabled
NIC 10: disabled
NIC 11: disabled
NIC 12: disabled
NIC 13: disabled
NIC 14: disabled
NIC 15: disabled
NIC 16: disabled
NIC 17: disabled
NIC 18: disabled
NIC 19: disabled
NIC 20: disabled
NIC 21: disabled
NIC 22: disabled
NIC 23: disabled
NIC 24: disabled
NIC 25: disabled
NIC 26: disabled
NIC 27: disabled
NIC 28: disabled
NIC 29: disabled
NIC 30: disabled
NIC 31: disabled
NIC 32: disabled
NIC 33: disabled
NIC 34: disabled
NIC 35: disabled
NIC 36: disabled
Pointing Device: USB Tablet
Keyboard Device: PS/2 Keyboard
UART 1: disabled
UART 2: disabled
UART 3: disabled
UART 4: disabled
LPT 1: disabled
LPT 2: disabled
Audio: enabled (Driver: DSOUND, Controller: HDA, Codec: STAC9221)
Audio playback: enabled
Audio capture: enabled
Clipboard Mode: disabled
Drag and drop Mode: disabled
VRDE: disabled
OHCI USB: enabled
EHCI USB: enabled
xHCI USB: disabled

USB Device Filters:

Index: 0
Active: yes
Name: USB2.0_Camera [0100]
VendorId: 093a
ProductId: 2700
Revision:
Manufacturer:
Product:
Remote:
Serial Number:

Bandwidth groups: <none>

Shared folders:<none>

Capturing: active
Capture audio: not active
Capture screens: 0
Capture file: D:\windowsvm\vm0\vm0.webm
Capture dimensions: 1024x768
Capture rate: 512kbps
Capture FPS: 25kbps
Capture options: vc_enabled=true,ac_enabled=false,ac_profile=med

Guest:

Configured memory balloon size: 0MB

__________________________________________________

I am attaching both vboxlog and hardened one, as well the one you stated earlier because I don't know which would be beneficial to you. In addition, how can I know what has been happening to the built-in webcam which makes it disconnect or crash? because a message of mouse integration always pops up along with a sound of the built-in camera disconnecting in guest

Kindly let me know if anything needed from my end as my expertise is limited in such stuff.

Thanks for your time and effort
Attachments
VBox.rar
(26.86 KiB) Downloaded 7 times
VBoxSVC.rar
(1.74 KiB) Downloaded 5 times
VBoxHardening.rar
(21.36 KiB) Downloaded 6 times
scottgus1
Site Moderator
Posts: 20945
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: Webcam Disconnects in Hardened Virtualbox

Post by scottgus1 »

I wouldn't know how to troubleshoot the built-in Webcam, someone else will have to try that.

You have a good guest USB filter, and the device enters the guest:
00:01:35.689414 VUSB: Attached '0000000006337df0[proxy 093a:2700]' to port 1 on RootHub#0 (HighSpeed)
00:02:12.020034 VUSB: Detached '0000000006337df0[proxy 093a:2700]' from port 1 on RootHub#0
So everything seems to work. Does the guest OS have device drivers for the device?

What does this refer to?
00:00:02.535761 [/Devices/acpi/0/Config/] (level 4)
00:00:02.535764 DsdtFilePath <string> = "D:\VM\HARDENLOADER\data\ACPI-DSDT.bin" (cb=38)
00:00:02.535777 SsdtFilePath <string> = "D:\VM\HARDENLOADER\data\ACPI-SSDT.bin" (cb=38)
......
00:00:02.535899 [/Devices/pcbios/0/Config/] (level 4)
00:00:02.535901 BiosRom <string> = "D:\VM\HARDENLOADER\data\pcbios386.bin" (cb=38)
.......
00:00:02.535977 [/Devices/vga/0/Config/] (level 4)
00:00:02.535978 BiosRom <string> = "D:\VM\HARDENLOADER\data\vgabios386.bin" (cb=39)
......
00:00:02.535981 LogoFile <string> = "D:\VM\HARDENLOADER\data\splash.bmp" (cb=35)
Is it this? https://github.com/hfiref0x/VBoxHardenedLoader If so, a modified Virtualbox is not fully diagnosable.

Try the same with a fully stock, not modified or hardened guest.
Krypt0Burn
Posts: 4
Joined: 2. May 2020, 13:57

Re: Webcam Disconnects in Hardened Virtualbox

Post by Krypt0Burn »

scottgus1 wrote:I wouldn't know how to troubleshoot the built-in Webcam, someone else will have to try that.
I'd rather rectify this issue first, because why would it a built-in crash, forcing me to disable/enable again.!

You have a good guest USB filter, and the device enters the guest:
00:01:35.689414 VUSB: Attached '0000000006337df0[proxy 093a:2700]' to port 1 on RootHub#0 (HighSpeed)
00:02:12.020034 VUSB: Detached '0000000006337df0[proxy 093a:2700]' from port 1 on RootHub#0
So everything seems to work. Does the guest OS have device drivers for the device?
I tried to solve this problem for a few days now. I've read some good discussions and continued to struggle to achieve. The guest states that drivers are up-to-date!

What does this refer to?
00:00:02.535761 [/Devices/acpi/0/Config/] (level 4)
00:00:02.535764 DsdtFilePath <string> = "D:\VM\HARDENLOADER\data\ACPI-DSDT.bin" (cb=38)
00:00:02.535777 SsdtFilePath <string> = "D:\VM\HARDENLOADER\data\ACPI-SSDT.bin" (cb=38)
......
00:00:02.535899 [/Devices/pcbios/0/Config/] (level 4)
00:00:02.535901 BiosRom <string> = "D:\VM\HARDENLOADER\data\pcbios386.bin" (cb=38)
.......
00:00:02.535977 [/Devices/vga/0/Config/] (level 4)
00:00:02.535978 BiosRom <string> = "D:\VM\HARDENLOADER\data\vgabios386.bin" (cb=39)
......
00:00:02.535981 LogoFile <string> = "D:\VM\HARDENLOADER\data\splash.bmp" (cb=35)
Is it this? https://github.com/hfiref0x/VBoxHardenedLoader If so, a modified Virtualbox is not fully diagnosable.
Indeed, however, a colleague smoothly runs his USB webcam and even uses the same modified VirtualBox! That's what keeps me wondering.

Try the same with a fully stock, not modified, or hardened guest.
Kindly be aware that by not adding a filter USB filter, I can integrate it through guest's Menu bar, Device ==> Webcams, and works well, yet doesn't with a filter, although it's a USB device. In addition, I've been trying to change the 80ee:0030 which appears next to the webcam's name whenever I tested it and failed to know-how.
scottgus1
Site Moderator
Posts: 20945
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: Webcam Disconnects in Hardened Virtualbox

Post by scottgus1 »

Krypt0Burn wrote:by not adding a filter USB filter, I can integrate it through guest's Menu bar, Device ==> Webcams, and works well, yet doesn't with a filter, although it's a USB device.
If "it" is the integrated webcam, then I wouldn't be able to say yeah or nay, I don't have a PC that has an integrated webcam that I could also run Virtualbox on.

According to USB basics and troubleshooting some USB devices can be inserted into the guest without a filter. Sometimes the same device on a different run does not insert and the "busy with previous request" or other such errors happen. The filter arrangement is more reliable.

Also some USB devices require an unplug from the host so the host OS drops its connection and allows the USB filter to take the device when it is plugged in again. Meaning if you can't unplug the device it may not be reliably able to insert into the guest even if there is a filter. And computers do boot up differently sometimes or stop doing things they did before. Cosmic ray flips a bit, bad update, etc. I've seen it happen.

So, as far as I could go, I see the removable USB webcam device entering the guest in the 'vbox.rar' log. After mention of the DLLs that Virtualbox uses to try to insert an integrated webcam, there is no mention of "webcam" in the log. So I am not sure if the integrated webcam is being inserted. Further I see this:
00:00:02.491247 Guest OS type: 'Windows10_64'
00:00:02.493986 File system of 'D:\windowsvm\vm0\Snapshots' (snapshots) is unknown
00:00:02.494000 File system of 'C:\Sysv\vm0.vdi' is ntfs
00:00:02.494517 File system of 'C:\WindowsisO\Windows.iso' (DVD) is ntfs
.....
00:00:06.003696 VMMDev: Guest Log: BIOS: Booting from CD-ROM...
.....
00:01:35.689414 VUSB: Attached '0000000006337df0[proxy 093a:2700]' to port 1 on RootHub#0 (HighSpeed)
00:02:12.020034 VUSB: Detached '0000000006337df0[proxy 093a:2700]' from port 1 on RootHub#0
As I read the log the guest is booting from a CD-ROM, not an installed OS. Unless there is something really weird, like a Windows 10 LiveCD (?) being used, the log does not show boot to an installed OS. Therefore no drivers can be loaded for a webcam, integrated or USB, and no idea if anything is working or not. I may be wrong...
Post Reply