Gavin Pugh - A Videogame Programming Blog

Using Game Controllers over a Remote Desktop session

3 October, 2018 at 10:22am | Work


Well, it’s been over six years since I last wrote on this blog! The theme could do with updating, it’s screaming “2010” at me.

So, I work from home a fair bit. Be it evenings, weekends, or sometimes during regular work hours. The setup I have for that is much like any other game company: We have a secure VPN into our work network, and we’d use Remote Desktop to control our work PC. My home PC isn’t as beefy as my work PC, so it’s nice to have the power of my work PC when compiling code, or building game data. A PC build of our game runs fine over Remote Desktop, if you size the window down it is pretty decently playable.

We make our game for “the consoles” too, so we’re able to run on those via Remote Desktop, and the platform holders also provide viewing apps to see what’s going on, on said consoles. These work pretty great, and work over a Remote Desktop session. When I’m working at home, I generally don’t find anything lacking about my dev environment (and having no office interruptions is great!). Up until now though, I did have one gripe… Controllers. We can control the PC version of the game with a mouse, but with the console builds over Remote Desktop, you’re stuck with keyboard controls, or other facsimiles of a controller. Being able to use a controller over a Remote Desktop session would be great! I was surprised to find out that it’s possible, but Microsoft for some reason disallow it by default.

Here’s how to get it working…

To be clear, I don’t claim to have come up with this myself. See the “references” section at the bottom of this page for where I found the steps. I’m just largely reproducing that information here in a more palatable form. Things didn’t work first time for me, so here I’m going over the steps in more detail to ensure that you don’t hit the same hurdles that I did.

 

Assumptions and Caveats

  • I’ve only tested this over two Windows 10 computers. It might work with Windows 7, or Windows 8. I’m not sure.
  • I’m told this requires at least Windows 10 Pro on each PC for the RemoteFX system to function and redirect the USB device. There are no known current workarounds for this. If it’s for work, ask your company to expense the Win10 Pro license purchase. The upgrade is a simple license key change, no long install required.
  • I’ve only tested this with controllers connected via USB cables. I don’t think bluetooth-connected controllers will work, but let me know otherwise.
    • The Xbox 360 controller, with the USB wireless dongle does work.
    • Xbox One controllers BSOD my remote PC, I do not know of any workaround for this. For game development an Xbox 360 controller seems to work with Microsoft’s “Xbox One Manager”, and functions as an Xbox One controller.
  • You have reasonable “local” administrative privileges to both computers.
    • If your work/remote computer is locked down by your I.T. department, you might still be ok. You do however need Administrative local privileges for each computer, at least to perform the required setup.

 

Terminology

  • The scenario that I use this setup myself, is to connect from my home computer, to the computer at my office.
  • So, the “local” computer where the gamepad is connected I’ll refer to as the “local home”.
  • The “remote” computer where I want the gamepad input relayed to, I’ll refer to as “remote work”.

 

Step One – GPEdit – Local Home

  • Go to the Start menu, and type “gpedit” – Run the “Edit Group Policy” app.
  • Navigate to this section:
    • Local Computer Policy -> Computer Configuration -> Administrative Templates -> Windows Components -> Remote Desktop Services -> Remote Desktop Connection Client -> RemoteFX USB Device Redirection -> Allow RDP redirection of other supported RemoteFX USB devices from this computer
  • Right-click on the entry, choose “Edit”.
    • Select the “Enabled” radio button.
    • Change the Access Rights drop down to “Administrators and Users”.
    • It should look like this:

    • Click “OK” to apply the settings.
  • Go to the Start menu, find the Command Prompt app – right-click it and “Run As Administrator”
  • At the command line, run:
    • gpupdate /force
  • You should see this output:
Updating policy...

Computer Policy update has completed successfully.
User Policy update has completed successfully.

  • Now, reboot your local home computer.

 

Step Two – GPEdit – Remote Work

NOTE: You can do these steps over a Remote Desktop session, if you wish.

  • Go to the Start menu, and type “gpedit” – Run the “Edit Group Policy” app.
  • Navigate to this section:
    • Local Computer Policy -> Computer Configuration -> Administrative Templates -> Windows Components -> Remote Desktop Services -> Remote Desktop Session Host -> Remote Session Environment -> RemoteFX for Windows Server 2008 R2 -> Configure RemoteFX
  • Right-click on the entry, “Edit”. Choose “Enabled”, then click OK.
  • Back up three levels to “Remote Desktop Session Host”.
  • Navigate to this section:
    • Connections -> Allow users to connect remotely by using Remote Desktop Services
  • Right-click on the entry, “Edit”. Choose “Enabled”, then click OK.
  • Back up two levels to “Remote Desktop Session Host” again.
  • Navigate to this section:
    • Device and Resource Redirection -> Do not allow supported Plug and Play device redirection
  • Right-click on the entry, “Edit”. Choose “Disabled” (yes, DISABLED this time), then click OK.
  • Go to the Start menu, find the Command Prompt app – right-click it and “Run As Administrator”
  • At the command line, run:
    • gpupdate /force
  • You should see this output:
Updating policy...

Computer Policy update has completed successfully.
User Policy update has completed successfully.

  • Now, reboot your remote work computer.
    • If you’re using Remote Desktop to do this, you can restart by typing this at the command line:
    • shutdown /r

 

Step Three – Connect from Local Home

  • Ensure your gamepad controller is connected via USB to your local home computer.
    • Open up “Control Panel -> Devices and Printers”

    • Ensure the gamepad is listed here. If it isn’t, reconnect it. If it still doesn’t work… It’s beyond the scope of this post – go try Googling!
    • You can right-click on the controller, and choose “Game Controller Settings”. Then click “Properties”, to test that your controller is functional.
  • Find “Remote Desktop Connection” in your Start Menu. Run it.
    • Click “Show Options” at the bottom.
    • Go to the “Local Resources” tab.
    • Click “More…” at the bottom. The dialog looks like this:

  • If you did everything correctly in the “Step One – GPEdit – Local Home” steps for your Home PC, you’ll see a “Other Supported RemoteFX USB Devices” section. Good stuff!
    • If you do not see “Other Supported RemoteFX USB Devices”, then you likely made a mistake on the “Step One – GPEdit – Local Home” section. Go back and try again.
  • My Dualshock 4 controller is listed as “USB Input Device (HID-compliant game controller)”, so I have selected that. Select whatever gamepad(s) you are using.
  • Connect to your remote work PC.

 

Step Four – Profit?

  • Upon connection to your Remote Work PC, navigate to “Control Panel -> Devices and Printers”:

  • If all went well, you should see your gamepad listed here!
    • If it isn’t listed here, you likely made a mistake on the “Step Two – GPEdit – Remote Work” section. Go back and try again.
  • Your gamepad should be fully usable over your Remote Desktop session.
  • Enjoy!

 
Let me know in the comments section below, if there’s anything useful I have missed in this HOWTO post. I can’t provide any technical support if these steps don’t work for you. But it’s good to know if I can make any improvements to this post – to help out other folks that might run into problems that I didn’t have myself.

Cheers.

NOTE: (March 2020) Just to reiterate, I can’t provide any technical support.

 

References

  • https://www.freesoftwareservers.com/display/FREES/Enable+RemoteFX+USB+Redirection+-+Share+USB+Devices+like+Xbox+360+Controller+over+RDP+-+Remote+Desktop+Protocol+-+Windows+10
  • https://stackoverflow.com/questions/33719489/how-to-enable-usb-redirection-in-windows-10
  • https://superuser.com/questions/1257223/share-gamepad-over-network
  • Comments

  • Jeremy says:

    Worked like a charm for me using SteamLink. Thanks!

  • radu says:

    just a small correction: administrator privileges are not necessarily required to connect to the server, provided you also select, in step one, Administrators and Users, besides Enabled:
    https://social.msdn.microsoft.com/Forums/en-US/d71a1dfe-63cf-466a-abe0-1c352280221b/printers-and-remotefx-usb-redirection?forum=os_windowsprotocols
    <>

    See also KB 2653326 https://support.microsoft.com/en-us/help/2653326/some-usb-devices-are-not-available-through-remotefx-usb-redirection , in case you need to manually enable a device class for redirection.

  • Faraj says:

    I tried this and for some reason my remote PC gets BSOD when trying to connect with my Xbox ONE controller connected to my local PC and I have the option checked to enable the controller.

  • Eric Milota says:

    Thanks for the info Gavin! I’ve shared this with my work mates.

  • Gavin says:

    @Faraj – Yeah, also getting the same now with a XBox One controller. This was working for me sometime in 2019, perhaps it broke with some recent Win10 upgrade?

    FWIW, (if you’re a gamedev), an Xbox 360 Controller seems to work ok with “Xbox One Manager”.

  • Andy Pennell says:

    I can confirm that Windows can blue-screen if you try this with an Xbox One controller, but 360 controllers are just fine. The crash is under active investigation by the driver team. This post was super-helpful in unblocking games developers trying to work from home, thank you Gavin.

  • Ahmad says:

    Great,
    thanks for your Sharing MAN

  • Nathan says:

    What an amazing tutorial! Nice work. Made my son very happy! Thank you!

  • Lukas says:

    Xbox One Controller with RemoteFX and latest firmware and latest updates on both client and server machines still crashes Remote Desktop connections on the remote computer with a BSOD to this day

  • Tim says:

    Thank you and God bless you all of your days! This saved me hours of pain!

  • Will says:

    This worked perfectly for me. Thanks a stack for sharing this.

  • Mal says:

    Works absolutely perfectly, no hiccups whatsoever. Works on windows 11 and at the time of writing this post build (KB5016691)

  • igor says:

    Thanks a lot! Works!

  • Seth says:

    Thank you so much! Thanks to you, I finally have it working with MSFS 2020.

  • MildaGenius says:

    Hello, thanks for sharing.

    This was working for me in Windows 11.

  • Olin Georgescu says:

    Still referencing this in 2023. Shouts to you, Gavin. Hope you’re well.

  • Dan says:

    Works for Windows 11 !!!

  • Leave a Reply

    Your email address will not be published. Required fields are marked *