Cannot use two USB cameras simultaneously

Greetings. I have a licensed copy of VirtualHere Server 4.3.2-1432 running on a Synology DS120j using DSM version 7.0.1-42218 Update 2. This NAS has two USB ports, and I have two identical 1080p webcams with IR night vision plugged into the NAS. On the client side, I am running a Dell workstation with a Core i7-2120 (older, but still capable), 8GB RAM and gigabit ethernet with Windows 10 Home 21H2 64-bit. All current system and security updates as of April 2022 are installed on the workstation. On the workstation, I am running the VirtualHere Client version 5.3.2 64-bit installed as a service. Both cameras show up in the client as "in use by you", and they both show up in Device Manager under the VirtualHere USB host controller. I am attempting to use the cameras with the security DVR program iSpy version 7.2.1.0 64-bit. However, it is not allowing me to use both cameras simultaneously. I can use either one or the other, but not both. In addition, while VirtualHere is running, the "Safely Remove Hardware" icon keeps rapidly and repeatedly appearing and disappearing in the system tray. The only error I'm finding so far are entries from VirtualHere in the Event Log that simply say "Incorrect function".

Both the NAS and workstation are currently connected to the same 16-port gigabit ethernet switch. I have tried disabling the Windows firewall, but with no effect. I have tried plugging the cameras into a powered USB 3.0 hub in case it was lack of power, but again no help. No matter what I try, I just simply cannot get both cameras working simultaneously through VirtualHere.

I already know for a fact that iSpy can use both cameras simultaneously when they are plugged directly into the workstation, so it is not a problem with iSpy. but the workstation is going to be moved to a different location, thus my desire to use VirtualHere with the cameras.

Any ideas as to how I can remedy this? I appreciate any assistance that you can provide regarding this issue.

Thank you.

#2

Correction on the workstation CPU: It is a Core i7-2600, not a 2120.

#3

That's convenient, just by chance i have that exact synology with that exact DSM version that i use for testing.

I plugged two cameras into it, each works by itself fine by virtualhere but i see that both at once dont work.

I ssh'ed to the synology and ran this

dmesg --follow

when the second camera is about to be used via virtualhere, the synology DSM runs out of memory inside the kernel. It returns the error

page allocation failure: order:7, mode:0x24040c0

Its a bit compicated to explain but basically if you know a bit about Linux you can change the flags in the kernel like this:

sudo sysctl -w vm.min_free_kbytes=4096

I stopped using the cameras, then used them again and the two cameras seemed to work ok for me.

#4

I shall try that the next time I have access to the NAS and workstation, which'll be a few days. Then I'll report back with the results. Thanks for the suggestion!

#5

Unfortunately, this did not work for me. I tried the sysctl command you provided, and it didn't help. In fact, it made things worse, because now NEITHER camera will work, even individually.

Running dmesg --follow shows hundreds (and I mean HUNDREDS) of log entries similar to the following:

[10474.631328] usb 1-1: reset high-speed USB device number 2 using xhci-hcd
[10475.127301] usb 3-1: reset high-speed USB device number 2 using orion-ehci
[10485.327319] usb 1-1: reset high-speed USB device number 2 using xhci-hcd
[10485.839278] usb 3-1: reset high-speed USB device number 2 using orion-ehci
[10496.035319] usb 1-1: reset high-speed USB device number 2 using xhci-hcd
[10496.547322] usb 3-1: reset high-speed USB device number 2 using orion-ehci
[10506.811317] usb 1-1: reset high-speed USB device number 2 using xhci-hcd
[10507.399297] usb 3-1: reset high-speed USB device number 2 using orion-ehci
[10512.367278] usb 3-1: reset high-speed USB device number 2 using orion-ehci
[10512.875328] usb 1-1: reset high-speed USB device number 2 using xhci-hcd
[10522.703310] usb 1-1: reset high-speed USB device number 2 using xhci-hcd
[10523.207324] usb 3-1: reset high-speed USB device number 2 using orion-ehci
[10534.207308] usb 1-1: reset high-speed USB device number 2 using xhci-hcd
[10534.719285] usb 3-1: reset high-speed USB device number 2 using orion-ehci

I've tried restarting the NAS, but the same continues to happen. Perhaps VirtualHere just isn't up to the task of doing what I am requiring (running two 1080p cameras simultaneously)?

#6

VirtualHere works fine for my two cameras on my ds120j. What model cameras are they?

(My test cameras are logitech c920 and c930e)

#7

They really have no brand/model, they're generic USB cameras we bought because they also have IR night vision. They are both identical, however, which is this camera: https://www.amazon.com/gp/product/B088QWBVZ5

They work perfectly when plugged directly into the workstation (but since the workstation is being moved soon, that is no longer an option), but they just don't seem to work with VirtualHere.