Forum / NoMachine for Mac / USB passthrough works sporadically
- This topic has 16 replies, 2 voices, and was last updated 4 years, 1 month ago by Giorgi-G..
-
AuthorPosts
-
October 15, 2020 at 08:33 #29935RedLetter20Participant
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.
October 15, 2020 at 14:52 #29949RedLetter20ParticipantSo 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?
October 15, 2020 at 16:43 #29952Giorgi-G.ContributorHi,
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?
October 16, 2020 at 09:07 #29954RedLetter20Participant1. 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.
October 16, 2020 at 16:28 #29965RedLetter20ParticipantOk, 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?
October 19, 2020 at 10:43 #29979Giorgi-G.ContributorHi,
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
October 19, 2020 at 16:21 #29983RedLetter20Participant1. 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.
Attachments:
October 21, 2020 at 15:45 #29997RedLetter20ParticipantIs 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.
October 22, 2020 at 09:18 #30001Giorgi-G.ContributorHi,
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.
October 22, 2020 at 15:04 #30010RedLetter20ParticipantNo 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.
October 22, 2020 at 15:04 #30011RedLetter20ParticipantOk, 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:
October 23, 2020 at 11:43 #30027Giorgi-G.Contributor1. 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?
October 23, 2020 at 11:43 #30028Giorgi-G.ContributorMeanwhile, 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?
October 23, 2020 at 15:38 #30032RedLetter20Participantok. 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
nxusbfI 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:
October 23, 2020 at 15:41 #30034RedLetter20ParticipantI 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.
-
AuthorPosts
This topic was marked as solved, you can't post.