USB on VM disconnecting, USB using USB extender via RJ45


Recommended Posts

Hi.  My NAS is a bit far away, 20 Meters more or less.  I use a USB extension via RJ45.  While gaming, occasionally, the keyboard and mouse will disconnect.  I have to go back to libvirt hotplug usb, and attach the keyboard and mouse.  The cable hasn't been moved a bit.  I assigned 4 cores to this VM, as far as I know, it's not being maxed out.  

 

Sometimes, 3 days goes by without a problem, then this happens. 

 

How do I find the problem?  Any tool to detect?

Link to comment
16 hours ago, jonathanm said:

Try adding a powered USB hub to the extender. I've had better luck with extenders if they have extra signal.

noted.  Will inject power to my usb portable usb hub.  It has power input slot.  Is this supposed to be 5v dc?  

 

BTW, other than that, is there any logs we can check for reason of disconnection?

Link to comment
  • 1 month later...

Hi.  Just to update, put an adaptor to my USB hub, and it still disconnects.  Troubleshooting steps I've done:

 

1.  Changed the RJ45 port the USB extender is using, with same results.  Up to 3 RJ-45 ports, meaning 3 different Cat5e cables (in wall).  Sometimes, it quickly disconnects after a few minutes, sometimes whole day passes by without issue.

 

2.  Ordered, and replaced USB extender to a diferent one, though still generic, unbranded, with same results.

 

3.  Changed where the physical USB type A is connected on my NAS, different USB ports, with same results.  

 

Upon following steps by Spaceinvaderone though, I found out that all the USB ports that are currently exposed on my nas, are from the same controller.  2 usb 3.0 at the back of MB, 2 usb 2.0 at tha back of MB, 1 USB 3.0 from motherboard (internal) to case's side.  

 

My next step is to order USB bracket, to internal motherboard 10-pin connection, and plugged it directly to 2 more internal ports in the motherboard.  These may actually be different controllers as I can see my motherboard has 3.  All of the above exposed ports only come from 1. 

 

31vTH9zj3iL._AC_.jpg.f3bed615b29eed19438cd5bd56e6feaa.jpg

 

Any other steps I can take to troubleshoot while waiting USB bracket to arrive?

Link to comment

Is it possible because currently, my keyboard and mouse are both plugged into the single USB controller where Unraid is also plugged?  

 

I've lowered the memory, and cores previously, down to 8 GB and 2 cores, 4 threads.  I've since increased the gaming VM to have 16 GB memory, and assigned 4 cores, 8 threads to the VM, even if I do not see it as necessary.  A fresh reboot, still the problem persists.  

 

The following are the only items on my USB:

 

Bus 001 Device 001:ID 1d6b:0002 Linux Foundation 2.0 root hub

Bus 001 Device 002:ID 8087:800a Intel Corp.

Bus 002 Device 001:ID 1d6b:0002 Linux Foundation 2.0 root hub

Bus 002 Device 002:ID 8087:8002 Intel Corp.

Bus 003 Device 001:ID 1d6b:0002 Linux Foundation 2.0 root hub

Bus 003 Device 002:ID 03eb:0902 Atmel Corp. 4-Port Hub

Bus 003 Device 003:ID 0781:5571 SanDisk Corp. Cruzer Fit Unraid

Bus 003 Device 005:ID 0557:7000 ATEN International Co., Ltd Hub

Bus 003 Device 007:ID 0557:2419 ATEN International Co., Ltd

Bus 003 Device 009:ID 0409:005a NEC Corp. HighSpeed Hub

Bus 003 Device 010:ID 03f0:0024 Hewlett-Packard KU-0316 Keyboard- the keyboard passed through to VM

Bus 003 Device 011:ID 046d:c077 Logitech, Inc. M105 Optical Mouse- the mouse that is passed through to VM

Bus 004 Device 001:ID 1d6b:0003 Linux Foundation 3.0 root hub

 

Hope someone can help me make sense of it all.

tower-diagnostics-20200513-2151 (1).zip

Edited by jang430
Link to comment
  • 4 weeks later...

Hi.  Still am not able to resolve my usb keyboard and mouse disconnecting intermittently.  

I'd like to state my setup once again.  I am using Monitor, keyboard and mouse away from Unraid.  20M away.  Hence I bought HDMI extender via RJ45 (this requires 2 UTP cable), and works without flaw.  

 

hdmi.thumb.jpg.ec8cb809e680c1c4719e97f6ff126c47.jpg

 

I also use USB extender over RJ45, such as this:

usb.thumb.jpeg.9ce6c0bf24e30b85b72674e5e211e93f.jpeg

 

And these are the ones giving me problems.  Not these brands though.  They are pretty generic.  I use a simple Aten USB hub I have from before, and have mouse and keyboard connected to the same hub, then to the USB extender shown above.  

 

Troubleshooting steps I've done, and their results are below:

 

1.  Gave the USB hub 5V power- disconnected, no visible improvement regarding connection

 

2. Added another USB extender to separate the keyboard and mouse, one of the usb devices keep disconnecting.  It's always 1 that is disconnecting.  1 is more reliable than the other.  I finally had to choose whether It's keyboard or mouse I'm willing to disconnect regularly .  

 
3. Since I have a working HDMI extender using 2 cat5e cables, I rotated each of those cables to use with my USB extender, and vise versa.  Original USB cat5e cables, when used with HDMI extender, works flawlessly.  The HDMI cables on the other hand, (one at a time) when used on the USB extender still experienced the same problems.  In some cases, more frequently.  But since this is intermittent, cannot really say how often, and every how many minutes this occurs.  

 

4. Changed the USB port on my NAS that the USB extender is connected to.  Upon checking, I seem to have 3 USB controllers.  NEC 3.0, and other 2.  But they all had the same results.  No matter where I connect, it keeps disconnecting.

 

Since this VM is used for gaming, you can imagine how frustrating when in game, it suddenly disconnects . Specially when in a ranked game.  Only way for me to reconnect is to use the USB hotplug I found here.  But even with hotplug, I have to go to Unraid page, and click on the USB device that disconnected, then attach to the VM.  This takes about 5 seconds or more.  

 

I've tried to see how I can connect to a separate USB controller that is not in use by Sandisk (Unraid) and have that USB controller passed through to the VM, but after following video instructions, it doesn't seem to be possible to be decoupled with the other USBs.  

 

Am at wits' end on how to solve this.  Anyone have suggestions?

 

Link to comment

Hi all If you go on your windows VM and goto Power settings then Advanced Power settings then to Usb settings/Usb selective suspend settings then click disable should stop the usbs from sleeping hence stopping your screen glitching out but that doesn't mean your screen resolution wont go weird time from time cause believe me it does lol Try This Before Spending Money.....

Edited by Dava2k7
Link to comment
  • 3 weeks later...

@Dava2k7

 

FYI, I have since moved my NAS to where my monitor and keyboard is at right now, and plug it directly to the NAS.  No disconnection happened in days.  So I can conclude that when keyboard and mouse directly attached, nothing happens.  

 

I experimented today using the USB extender, and got a random length RJ45 cable (7 Meters or so), and plug it to the NAS, and BAM! It disconnected. 

 

If that is the scenario, it seems there's nothing to do with Power settings in USB.  

 

Right now, there's a possibility that the USB Hub is the problem, or just the USB extender.  Will isolate further.

Edited by jang430
Link to comment
  • 1 month later...

***UPDATE***

 

Just wanted to put some recent updates here.  For those who are experiencing the same, or have solutions for this.  As shared in above post, I am now currently directly connected to the NAS, for both keyboard and mouse.  This works without problems.  Recently, I tried connecting Nintendo Swich Pro controller to the NAS, for game use.  The Pro controller has USB-C interface, and I have a short USB-C to USB type A cable.  But since this is about 2 feet only, it won't be enough.  I extended the cable with a 1 Meter long USB-A male to USB-A female such as this.

 

image.thumb.png.b8db0cbff9bb2f944de230ec0b2ec4e0.png

and I was able to use it for a while, and the same disconnecting behavior happened.  At this point in time, I think it's fair to say any extension, whether through lan, or through a simple cable such as this, causes USB disconnection.  I don't know why though.  I'd still like to find this out.  I still want to move my NAS out of my room.

 

Link to comment
  • 2 years later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.