USB passthrough works sporadically

Forum / NoMachine for Mac / USB passthrough works sporadically

Viewing 15 posts - 1 through 15 (of 17 total)
  • Author
    Posts
  • #29935
    RedLetter20
    Participant

    Connecting to Windows 10 from macOS 10.15.7

    I am having an odd issue with USB passthrough from my MacBook Pro to my Windows 10 Desktop. Basically, sometimes it works, and when it works it will usually work fine for a few days straight. Both systems are fully up to date, both no-machine and OS.

    Then it will randomly stop working, no error messages are shown. It does not stop working while im using it though. It will always be after being disconnected for a while, ill come back to it not working anymore.

    What happens is when I click the “connect” button, it seems to be delayed in starting to connect (delay before spinning icon appears over device icon), then it stays on that spinning icon for about a minute before displaying a red exclamation mark over the icon.

    I have no idea what makes it start working again either. it seems to be random.

    I’m not sure what to do, I have already rebooted both computers, and reinstalled NoMachine on the MBP.

    #29949
    RedLetter20
    Participant

    So I just realized its not as sporadic as I thought. the issue is USB passthrough wont work when I connect remotely through my VPN. How can I rectify this?

    #29952
    Giorgi-G.
    Contributor

    Hi,

    Could you please tell us more details:

    1. What machine (Win on Mac) is under a private VPN?

    2. You connect with SSH or NM protocol?

    3. Is the protocol’s corresponding port (22 for SSH and 4000 for NM), or maybe some custom, open in your VPN network?

    4. Is that always reproducible (USB forwarding does not work) if you are connected through a VPN?

    #29954
    RedLetter20
    Participant

    1. What machine (Win on Mac) is under a private VPN?

    The Windows 10 Machine is behind the VPN, and the MacBook Pro is the Client PC.

    2. You connect with SSH or NM protocol?

    The connection is using NX on the default port 4000.

    3. Is the protocol’s corresponding port (22 for SSH and 4000 for NM), or maybe some custom, open in your VPN network?

    Port 4000 is open through the VPN.

    4. Is that always reproducible (USB forwarding does not work) if you are connected through a VPN?

    It appears to be yes. the last 2 times I was on the VPN it did not work, yet now that I’m home (no VPN) its working just fine.

    #29965
    RedLetter20
    Participant

    Ok, I stand corrected. It doesn’t seem to be a VPN issue, that just seemed to have been a coincidence.

    I managed to get it to work yesterday through the VPN for hours, and now im on the local network and cant get it to connect.

    Is there perhaps a log somewhere so I can see if there are any error messages or something?

    #29979
    Giorgi-G.
    Contributor

    Hi,

    1.  Can you please check do you have any conflicting software from those list AR04Q01027 installed on any machine?

    2. Or maybe any other heave software that consumes huge resources of CPU and/or network?

    3. Can you please check the network ping time, is it constantly below 20ms and there are no spikes upper than 200ms?

    4.

     It will always be after being disconnected for a while, ill come back to it not working anymore.

    Have you tried to restart both machines and try again? Does it work?

    5. What type of device you are forwarding?

    6. If it will appear, you can collect logs and pass them to us. Collect them with an open session (with failed device forwarding). To collect logs from both sides use these articles: AR10K00697 and DT10O00163

    #29983
    RedLetter20
    Participant

    1.  Can you please check do you have any conflicting software from those list AR04Q01027 installed on any machine?

    I do have Virtualhere installed on both machines, but it is not running at the same time. I have had virtualhere installed along side NoMachine for years and never had a problem. I also recently tried uninstalling Virtualhere and it made no difference.

     

    2. Or maybe any other heave software that consumes huge resources of CPU and/or network?

    CPU: on the client side no, on the host side I am running Solidworks, but cpu useage is still not very high, and Solidworks isnt open when I am trying to connect.

    NET: Nothing running that would consume much at all.

     

    3. Can you please check the network ping time, is it constantly below 20ms and there are no spikes upper than 200ms?

    Ping times between the 2 locations was consistently under 20ms, average was 17, with a single spike up to 22.

     

    4. Have you tried to restart both machines and try again? Does it work?

    Trouble shooting step number 1, turn it off and back on again. Yes I have tried rebooting both machines.

     

    5. What type of device you are forwarding?

    It is a 3D Connexion Space Mouse Wireless.

     

    6. If it will appear, you can collect logs and pass them to us. Collect them with an open session (with failed device forwarding). To collect logs from both sides use these articles: AR10K00697 and DT10O00163

    I believe I captured the logs correctly. I have attached them, in 2 separate ZIP files.

    #29997
    RedLetter20
    Participant

    Is there any update on this situation? Im not sure what to do from here. The USB passthrough is the main reason I use nomachine.

    For the last couple of days I’ve been having to carry around an old android tablet running virtualhere with an OTG cable in order to get anything done.

    #30001
    Giorgi-G.
    Contributor

    Hi,

    I have found an issue with your Mac logs. It’s definitely about conflicting software KEXT loaded the same time as NM’s KEXTs are loaded.

    To be sure it’s a VirtualHere, I just installed it on our test Mac and were able to reproduce the same behavior and logs at our lab.

    Just run this command at your Mac’s terminal

    kextstat | grep usb | grep -v “apple” 

    And if you see here anything but NoMcahine’s KEXTs – that might be a problem.

    Even after manual stopping of VirtualHere and machine restart I still had VirtualHere’s driver loaded into the system:

    0xffffff7f853f0000 0x4000     0x4000     com.virtualhere.vhusbd (2.3.1) 520E80E7-44CE-3AFF-949D-291C7E817174 <59 6 5 3 1>

    So even having it installed, but not running may be a reason for issues (constant and not).

    The worst thing is that if you remove VirtualHere from Applications its driver will still remain in the system even after a restart of the machine.

    So to completely remove it you need to run the following commands in the terminal with admin rights:

    sudo kextunload -b com.virtualhere.vhusbd

    sudo /Applications/VirtualHereServer.app/Contents/MacOS/vhusbdosx -b uninstall

    sudo /Applications/VirtualHereServer.app/Contents/MacOS/vhusbdosx -u

    sudo rm -rf /Applications/VirtualHereServer.app/

    sudo rm -rf /Library/Extensions/vhhcd.kext

     

    After restart com.virtualhere.vhusbd were not loaded anymore, and NoMachine forwarding worked again.

     

    #30010
    RedLetter20
    Participant

    No matter what I do I cannot get com.virtualhere.vhusbd (2.3.1) to stop loading. I even went as far as to go into the extension folders manually in finder and deleted vhusb.kext and on reboot it still loads.

     

     

    #30011
    RedLetter20
    Participant

    Ok, I finally got the kext to stop loading on boot. However the USB passthrough is still not working.

    I have attached a new set of logs, as well as the terminal output of;

    kextstat | grep usb | grep -v “apple”

     

    Attachments:
    #30027
    Giorgi-G.
    Contributor

    1. In the file log/nxusbd.log I see a couple of more lines comparing with your previous log. It’ most probably appeared before you were able to delete that kext. But to be sure, could you please delete this file and try to reproduce it few more times?

    2. I assume we have a similar problem on the Windows side.

    Could you please check this registry key on Windows:

     Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class\{36fc9e60-c465-11cf-8056-444553540000}\UPPERFILTERS 

    Do you see there something like DCV_USB_HUB_FILTER ? Or it’s the only nxusbf here?

    #30028
    Giorgi-G.
    Contributor

    Meanwhile, I made some tests with VirtualHere on my Windows machine, and looks like, I can forward a device from the Windows to Mac (when Mac is a client), and from the Mac to Windows forwarding do not work.
    That’s probably because VirtualHere leaves some registered resources after it’s uninstallation. I’m investigating this issue.

    Can you confirm that behavior (one direction forwarding) on your side?

    #30032
    RedLetter20
    Participant

    ok. I have attached a new log folder with a fresh copy of nxusbd.log I tried to connect a USB device several times before zipping the log files. I also rebooted before trying.

     

    The Windows registry key has 2 entries;

    UsbDk
    nxusbf

    I can also confirm, and the logs will likely confirm, that I CAN forward a remote device to my Mac, but I cannot forward a device from the Mac to Windows. So yes, I am seeing the same one direction forwarding. For added info, the device I forwarded from the Windows machine (host) to the Macbook (client) was an “Elecom Trackball”.

    Attachments:
    #30034
    RedLetter20
    Participant

    I should also add for clarity. That I did have it working yesterday, once, for several hours. I don’t know how or why, or what happened to allow it to work, but it did. But when I needed to disconnect briefly, and reconnect it has not worked again since, not even after a reboot of macOS.

Viewing 15 posts - 1 through 15 (of 17 total)

This topic was marked as solved, you can't post.