You've reached the end. Thanks for reading!
In this post, I'll explain how you can easily fix the cursor not moving when playing games (Valorant, League of Legends, and so on) that use the Vanguard anti-cheat.
This guide assumes you have a host machine running Sunshine and a guest machine using Moonlight to connect to the host machine, and that this setup already works fine.
Vanguard is a kernel-level anti-cheat that is designed to stop aimbots. As most aimbots work by injecting virtual mouse movements, Vanguard simply blocks any mouse movement that doesn't come from a verified, physical hardware device.
Sunshine emulates a mouse using software drivers. The anti-cheat detects this virtual movement as a potential cheat and just ignores the coordinates, leaving the cursor stuck where it last was.
One of the easiest workarounds I found is using USB/IP. This way, you aren't emulating a mouse anymore. You're passing the raw hardware data of your physical mouse over the network. To Vanguard, it looks like you just plugged a real mouse into the motherboard, so it treats the movement as legitimate.
On the guest machine (the machine using Moonlight to connect to the host machine running Sunshine), install usbipd-win.
winget install dorssel.usbipd-win(Alternatively, you can just download the installer from the releases page.)
Now you need to list the USB devices by running the following command.
usbipd listTake note of your mouse's bus ID (e.g. 1-3). Now bind the mouse.
usbipd bind --busid=BUS_IDNoteEnsure your firewall is not blocking port 3240. If it is, enable inbound connections for port TCP 3240.
Now, switch over to the host machine (the remote PC you are using to run Sunshine).
(Alternatively, if you want to skip the hassle of modifying Secure Boot and test signing entirely, you can use the paid VirtualHere client on the host machine instead of doing the steps below.)
First, we need to enable test signing; this allows us to load unsigned or self-signed device drivers. To do this, run the following command in an elevated (administrator) command prompt. Keep in mind that enabling this requires Secure Boot to be turned off. You can search on Google for how to do this on your specific motherboard.
bcdedit /set testsigning onAfter the command runs successfully, reboot your PC.
Next, we need to download the installer for a tool called usbip-win2 from the releases page. Run the installer (your USB devices may briefly disconnect).
Once the installation is complete, you must revert the security changes we made earlier. Vanguard strictly requires Secure Boot to be enabled in order for the game to launch.
Open an elevated command prompt again and run the following command to disable test signing:
bcdedit /set testsigning offAfter running the command, reboot your PC and enter your BIOS settings to turn Secure Boot back on. If you skip this step, Vanguard will give you a compliance error and you will not be able to play.
Now you have the choice of running the downloaded application (USBip) or running some commands from the terminal, whichever you find easier.
NoteEnsure your firewall is not blocking port 3240. If it is, enable outbound connections for port TCP 3240.
Using the app is a bit simpler, as you just need to enter the guest machine's IP address and click on Add devices. After the tool successfully connects to the machine, the bound peripherals appear. Right-click on the mouse and click on Attach. I found that when I leave Moonlight, my cursor just disappears. To fix this, Detach the attached device, and your cursor will work again on the guest machine.
If you'd like to use the CLI version, open up a command prompt and run the following command to list the remote devices.
usbip.exe list -r GUEST_IPReplace GUEST_IP with the IP address of the guest machine and run the command. You should see your peripherals and their bus IDs (e.g. 1-3 and so on).
Now, attach the mouse by using its bus ID.
usbip.exe attach -r GUEST_IP -b BUS_IDDetaching is simple; just select the port from the attach output, for example 0.
usbip.exe detach -p PORTTo get this setup to work as well as possible, you can apply the following advanced optimizations on both your Host and Guest machines.
Network cards usually batch incoming packets together before using the CPU to process them. This reduces processor usage, which is great for downloading large files, but it introduces a slight delay for mouse polling a network.
Windows + X and select Device Manager.Sunshine pushes loads of Mbps worth of video data. USB/IP pushes just a fraction of that, but its packets are much more important. If a Windows networking queue places your mouse movement behind a big video frame, your cursor will stutter.
We can fix this by assigning a DSCP (Differentiated Services Code Point) tag to port 3240, telling Windows to treat USB/IP traffic as highest priority.
Windows + R, type gpedit.msc, and hit Enter.USBIP Priority or something similar, and set the DSCP Value to 46 (which corresponds to Expedited Forwarding, a standard high-priority tag). Click Next.3240. If you are on the Guest machine (Moonlight), set the Source Port to 3240.Windows tries to power down USB devices to save energy. Since the host machine thinks the virtual USB/IP device is physically connected, any background attempt by Windows to suspend idle USB ports can cause your mouse to randomly drop out or stutter upon moving.
When a game like Valorant maxes out a CPU core, Windows might temporarily delay processing usbip.exe packets to handle game logic. This results in input lag precisely when you get into a heavy firefight.
You can fix this by using Task Manager to set the process priority of usbip.exe (on the Host) and usbipd.exe (on the Guest) to High.
If the host machine cannot see or connect to the guest, you can work around this by using Tailscale. By setting it up on both machines (host and guest), both receive a private IP address that you can use to connect them to each other.
Using Tailscale does add a small amount of latency to the connection, so I recommend using it only when necessary and only for USB/IP. Connecting Moonlight to Sunshine with a direct IP address is much faster than using Tailscale.
If you're having difficulties getting past the "Creating restore point" step during the installation, download the MSI installer from Tailscale Packages instead of the EXE installer. Open an elevated command prompt and run:
msiexec /i tailscale-setup-VERSION-amd64.msi MSIFASTINSTALL=1Replace VERSION with the version of Tailscale you downloaded.
This forces the installer to run without creating a restore point, which should fix your issue.
If the mouse you've plugged into the host machine is a gaming mouse, it may use a high polling rate. This determines how often your computer communicates with your device. A polling rate of 1000 Hz means that your device's data is sent to the computer every millisecond. Choosing a lower value, for example, 125 Hz, means that data is sent every 8 milliseconds.
Lowering the polling rate can greatly benefit the performance of USB/IP, as it reduces the amount of data that needs to be sent over the network, resulting in smoother cursor movement.
Most gaming mice have software from which you can control the polling rate.
Vanguard could block all virtual inputs, not just the mouse. If you find your keyboard inputs (like WASD or your abilities) are getting blocked or feeling delayed, Vanguard is likely ignoring your virtual keyboard as well.
To fix this, simply repeat the exact same USB/IP process for your physical keyboard. Find your keyboard's Bus ID using usbipd list, bind it on the guest machine, and attach it on the host machine alongside your mouse.
Because the attach command relies on the local IP address of your guest machine (e.g., 192.168.0.10), it will break if your router assigns a new IP address to your machine or handheld after a reboot.
To make this setup reliable long-term, log into your home router's settings and set a Static IP (often called a DHCP Reservation) for your guest machine. This ensures your guest machine always gets the exact same IP address, so you never have to change your CLI commands or Tailscale setup.
USB/IP can sometimes struggle to properly pass through devices that are plugged into external USB hubs, or pass-through ports on a keyboard.
If usbipd is throwing errors when you try to bind the device, or the host machine fails to attach it, try unplugging your mouse and plugging it directly into a native USB port on your machine's motherboard.
While this method of fixing the frozen cursor works, there are a few trade-offs to keep in mind.
Sending raw mouse data over the network via a separate protocol can result in slightly higher latency compared to Sunshine's native virtual input. For most players, this is negligible, but it is something to consider for highly competitive play.
You must manually attach and detach the mouse for every session. Forgetting to detach can leave your local machine without a working cursor once the Moonlight stream ends, requiring you to navigate via keyboard or a secondary pointing device to fix it.
By bypassing the virtual input blocks with USB/IP, you can pass your physical mouse directly through to the host and regain full control. While the initial setup of configuring firewall ports, disabling Secure Boot, and installing custom drivers might seem a bit tedious, it is currently the most reliable, free way to bypass anti-cheat restrictions for remote streaming in my opinion.
As of writing this post, I have personally tested this entire setup using a Windows 11 25H2 host machine and a Windows 10 22H2 guest machine, and I was successfully able to play League of Legends without any issues.