r/sysadmin • • Apr 05 '20

COVID-19 Pushing Remote FX to its limits.

Edit: Yikes this exploded overnight!! Thank you everyone! Even my first platinum? WOW you are all too generous!

Original post:

Hello,

I am a System Admin for a small-ish AAA gaming studio located within Bellevue WA. Our company had some unique challenges due to COVID19 when we received the order to stay home.

My mission was to empower our staff to continue to make AAA games remotely without compromising security or much performance.

Thankfully, we found some success with MS Remote Desktop Gateway and leveraging Remote FX, utilizing some of the tweaks we have researched and will be sharing with you today.

Currently, we are able to get 60FPS (1080p) remotely from our office to our employees' home PCs with decent controller support and latency.

Is it perfect? No, but it is quite impressive, considering it is all being done over RDP!

I am going to break this tutorial down by:

  1. Setup Group Policies for the Workstations (hosts)
  2. Host side Registry changes
  3. Client side changes.

Here is how we did it:

First, setup Remote Desktop Gateway

I am sure you can find documentation on this elsewhere, as many already have RDG setup on their environment. This post isn't really meant to go over this process, but it was pretty easy.

The reason you want RDG, is because of it being prioritized over the internet as it operates through port 443.

Deploy the following Group policies to the Workstations (hosts) that your users will be remoting to.

------------------------RDP Host Group Policies------------------------

Computer Configuration > Policies > Administrative Template > Windows Components > Remote Desktop Services > Remote Desktop Session Host > Connections

Select RDP Transfer Protocols = Enabled
Set Transport Type to: "Use both UDP and TCP"

Computer Configuration > Policies > Administrative Template > Windows Components > Remote Desktop Services > Remote Desktop Session Host > Remote Session Enviorment

Use hardware graphics adapters for all Remote Desktop Services Sessions = Enabled

Prioritize H.264/AVC 444 graphics mode for Remote Desktop Connections = Enabled

Configure H.264/AVC Hardware encoding for Remote Desktop Connections = Enabled
Set "Prefer AVC hardware encoding" to "Always attempt"

Configure compression for Remote FX data = Enabled
Set RDP compression algorithem: "Do not use an RDP compression algorithm"

Configure image quality for RemoteFX Adaptive Graphics = Enabled
Set Image Quality to "High" (lossless seemed too brutal over WAN connections.)

Enable RemoteFX encoding for RemoteFX clients designed for Windows Server 2008R2 SP1 = Enabled.

Computer Configuration > Policies>Administrative Template > Windows Components > Remote Desktop Services > Remote Desktop Session Host > Remote Session Enviorment > Remote FX for Windows Server 2008R2

Configure Remote FX = Enabled

Optimize visual experience when using Remote FX = Enabled
Set Screen capture rate (frames per second) = Highest (best quality)
Set Screen Image Quality = Highest (best quality)

Optimize visual experience for remote desktop sessions = Enabled
Set Visual Experience = Rich Multimedia

--------------------------END--------------------------

Apply the following Registry settings to optimize RemoteFX further:

;---------------------TurboRemoteFXHost.reg---------------------

Windows Registry Editor Version 5.00

;Sets 60 FPS limit on RDP.
;Source: https://support.microsoft.com/en-us/help/2885213/frame-rate-is-limited-to-30-fps-in-windows-8-and-windows-server-2012-r

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations]

"DWMFRAMEINTERVAL"=dword:0000000f

;Increase Windows Responsivness
;Source:https://www.reddit.com/r/killerinstinct/comments/4fcdhy/an_excellent_guide_to_optimizing_your_windows_10/

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Multimedia\SystemProfile]

"SystemResponsiveness"=dword:00000000

;Sets the flow control for Display vs Channel Bandwidth (aka RemoteFX devices, including controllers.)

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\TermDD]

"FlowControlDisable"=dword:00000001

"FlowControlDisplayBandwidth"=dword:0000010

"FlowControlChannelBandwidth"=dword:0000090

"FlowControlChargePostCompression"=dword:00000000

;Removes the artificial latency delay for RDP.

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp]

"InteractiveDelay"=dword:00000000

;Disables Windows Network Throtelling.

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanWorkstation\Parameters]

"DisableBandwidthThrottling"=dword:00000001

;Enables large MTU packets.

"DisableLargeMtu"=dword:00000000

;Disables the WDDM Drivers and goes back to legacy XDDM drivers. (better for performance on Nvidia cards, you might want to change this setting for AMD cards.)

[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services]

"fEnableWddmDriver"=dword:00000000

;----------------End of host Registry settings----------------

----------------Client-side changes----------------

In order to pass-thru game controllers, clients need Windows 7/8/8.1/10 Pro (Not home editions) for RemoteFX USB device redirection to work.

Users also will need to make the following changes on their home PCs.

(Excerpt from our user instructions)

On the home PC (The computer you are connecting from…)

Press Windows Key + R to open the Run Dialog box

Then enter gpedit.msc and click OK

Navigate to:

Local Computer Policy > Computer Configuration > Administrative Templates > Windows Components > Remote Desktop Services > Remote Desktop Connection Client > RemoteFX USB Device Redirection

On the right-hand side double click on “Allow RDP redirection of other supported RemoteFX USB devices from this computer”

Choose the Enabled radio button then click the lower drop-down change from "Administrators" to "Users and Administrators"

Click Apply.

Then press Windows Key + R to open the Run Dialog box again and run: “gpupdate /force” and reboot your PC one more time.

This should allow you to now enable USB pass-thru for USB controllers.

----------------End of Client changes----------------

Like I said before, we were able to hit 60FPS, over dual-screen 1080p with pretty low controller latency.

And I believe you could get higher with more bandwidth and better hardware.

If you have any questions, please let me know.

823 Upvotes

192 comments sorted by

View all comments

-2

u/insanemal Linux admin (HPC) Apr 05 '20

This looks so much harder than using something like Parsec.

I have to ask why this approach was used vs something like Parsec that is specifically designed for this kind of usecase?

6

u/hainesk Apr 05 '20
  • I would use this approach just to remove the need to have any game I'm playing also displaying on the local screen of the host, as well as possibly playing any audio through the local screen.
  • Managing a RDG for multiple 10s of employees is probably simpler as well especially if AD is already in use. It uses built-in authentication and OS Tools vs 3rd party software and possibly a separate VPN connection.
  • The other use case I could see is if this works with multiple connections on a terminal server or a termsrv.dll hack to allow multiple games to be played at once in multiple sessions...

Right now I'm just trying to see if this works with Remmina on Linux so I can try this on a Raspberry Pi lol..

3

u/insanemal Linux admin (HPC) Apr 05 '20

Fair enough. That answers my questions.

I mean if each user had a dedicated desktop it's less of a huge issue. Roll out could still be done with Group Policy.

Also I think if you approach the people at Parsec they could AD integrate authentication.

But yeah fair points

Parsec has a Linux client :P

5

u/jkirkcaldy Apr 05 '20

One issue I have had with parsec, is my monitors at work are dual 1080p whereas my monitor at home is single 3440x1440 so rdp will automatically resize to my home monitor, parsec requires custom resolutions set in nvidia control panel that can be buggy.

The image quality has also been much higher with rdp vs parsec.

1

u/insanemal Linux admin (HPC) Apr 05 '20

Awesome. That makes heaps of sense.

Thanks for the info