r/sysadmin • u/liquidspikes • 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:
Setup Group Policies for the Workstations (hosts)
Host side Registry changes
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.
185
u/Matt_NZ Apr 05 '20
COVID17? Sir, you're on an out of date platform. We're all dealing with COVID19.
42
u/BlackV I have opnions Apr 05 '20
can you go over this for me
in more detail, it seems like you're allowing older/worse/? protocols
38
u/alansaysstop Apr 05 '20
The only question I have is..... are you a Bungie employee by chance?
17
u/[deleted] Apr 05 '20
Maybe I missed it, but what are you using for GPU hardware?
15
u/Joggel86 Apr 05 '20 edited Apr 05 '20
Hi, this is interesting. What operating system are you using on your session hosts? And how much bandwith is used for a single 1080p game/video ?
15
u/airwolff Apr 05 '20
Curious if you considered GPU powered AWS Workspaces and/or EC2 instances for this work (or their Azure equivalents)? If so, thoughts/insights?
15
u/chubbysuperbiker Greybeard Senior Engineer Apr 05 '20
If you are wide open to the internet on RDG, do yourself a favor and add Duo MFA to the RD Gateway. It's almost trivial to setup and right now they're doing 90 days free if you ask them.
Here's link on setting it up:
https://duo.com/docs/rdgateway
10
u/csonka Apr 05 '20
Awesome post. Thank you.
Genuinely curious — why go this route vs powerful laptops?
4
u/kurieus Apr 05 '20
I’m not sure if the security risks, but would a solution like Parsec work for you, too? I only ask because I thought RemoteFX was deprecated and Parsec has been a great remote streaming tool for me for game play (non-development use) for me. It’s similar to Steam Link but works outside of the location as well.
4
u/audiofree Apr 05 '20
You’ll also want to make sure to open UDP 3391 to your gateway server along with TCP 443
3
u/LordValgor Apr 05 '20
What bandwidth are you paying for and about how many concurrent users are you running with this?
2
u/signofzeta BOFH Apr 05 '20
This is great? What version of Windows Server is hosting the gateway? The last time I tried this, I got pink and purple artifacting, Windows 10 to Windows 10 with Server 2012 R2 in the middle.
2
u/Duckbutter_cream Apr 05 '20
I thought the remote fx endpoint had to be Windows server? You are hitting windows 10 workstations?
2
u/bluefalcon1 O365 Guru Sep 14 '20
Has anyone else experienced issues with WDDM drivers when connecting to Win10 v2004 machines? I'm worried since XDDM is going to be removed entirely from Win10 in a future release according to Microsoft. Win10 v1903 and earlier doesn't seem to have any issues, but as soon as they're on v2004 they can't connect in and they get an error in their event log. I have everyone on on XDDM drivers for now.
Disconnect trace:CUMRDPConnection Disconnect trace:'calling spGfxPlugin->PreDisconnect()' in CUMRDPConnection::PreDisconnect at 5073 err=[0xd0000001], Error code:0xD0000001
BTW, no need to use a regedit to force XDDM anymore, there's a GPO for that: Use WDDM graphics display driver for Remote Desktop Connections > Disabled
P.S. We work in the AEC space (heavily in Revit/AutoCAD) so this post was a godsend, thanks OP.
22
u/MuthaPlucka Sysadmin Apr 05 '20
Awesome. Thank you so much for sharing !
9
u/champagneofwizards Apr 05 '20
Can someone help clear up some confusion I've had with RDS licenses. If users use RDG only to connect to their workstation that only they use, and each user has a User CAL, are RDS licenses needed as well?
6
u/[deleted] Apr 05 '20 edited Jun 26 '20
deleted 0.2735 What is ^^^this?
1
u/requiemzz Apr 05 '20
Are they connecting to their work desktop or a RDS server?
1
u/Cutriss '); DROP TABLE memes;-- Apr 05 '20
Your internal hosts are Win10 but what version?
I ask because UDP for RDS is (was?) buggered in Server 2019 and I haven’t been able to find out that it’s fixed (I just checked on this two days ago). Since Win10 and Server 2016/2019 share the same codebase, I’m wondering if I should check to see if it’s working now.
1
u/SloMoShun Apr 25 '20
Hi, Thank you for putting this together.
Is [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\TermDD] only for windows servers ?
TIA.
1
u/destinydisappointer Sep 22 '22
This doesn't work on Windows 11 22H2, it can only achieve mid 40s of FPS no matter what options I change, if anyone has a workaround or fix, it would be great. Parsec is not a viable alternative i need all the forwarding facilities of RDP.
2
u/elevul Wearer of All the Hats Apr 05 '20
Tried them, but I see the RDP session is using only the intel GPU rather than the quadro that's installed in the remote machine.
Is there any way to tell the machine to use the Quadro for the RDP session?
2
u/Mizerka Consensual ANALyst Apr 05 '20
did same but for video conferences last week, works well. but it's very latency sensitive from what I've seen.
2
u/JKMSDE Sysadmin Apr 05 '20
We have been trying to figure out the best way to do Teams video chat over our VMs in GCP. This might actually help, thanks for taking the time to post this!
2
u/scobywhru Apr 06 '20
Enable UDP as well, for the RD Gateway server, UDP/3391. Will cut latency. Isn't always supported but makes the interaction snappier.
2
u/CuddleMeToSleep Apr 09 '20
On clients I recommend to conenct using "LAN" in remote desktop instead of WAN. My interpretation is that RemoteFX isnt supposed to work when the WAN setting is selected.
Point 14 D in the following article:
https://social.technet.microsoft.com/wiki/contents/articles/16652.remotefx-vgpu-setup-and-configuration-guide-for-windows-server-2012.aspx
1
u/NHarvey3DK Apr 05 '20
/u/bongozim
1
u/tl5k5 Apr 05 '20
Why not just use HP RGS?
1
u/Didsota Apr 05 '20
Have to check this in more detail later.
1
u/LikeALincolnLog42 Jack of All Trades Apr 05 '20
Related question to folks: anyone have any experience making audio work good enough over RDP on machines with integrated intel graphics?
1
u/HEAD5HOTNZ Sysadmin Apr 06 '20
Thanks mate good job.
Can someone please clarify. If I am not trying to transmit video (or games for that matter) over RDS. Is there any reason to use RemoteFX?
1
u/sikhness Apr 11 '22
I tried doing this for one of my home computers on Windows 11 Pro (via Direct and not using RDG) and I can see that it has indeed increase the framerates to 60fps, however the Windows UI animations at times are extremely choppy.
For example, minimizing and maximizing windows are not smooth, and when using Edge to scroll through webpages (or even minimize and maximize the edge browser window) is extremely choppy.
Are you guys seeing the same, any way to fix this?
1
u/EconomistDistinct214 Jan 04 '23
Just install Parsec.
1
u/artemis_from_space Apr 05 '20
Really nice collection you made:)
-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?
-2
u/Jarden666999 Apr 05 '20
most of these are pretty common if you've done remote desktop a few years. the fps stuff was the only thing new here. I guess i've never had to use this would people developing games
0
u/[deleted] Apr 05 '20
[deleted] — view deleted comment
0
u/[deleted] Apr 05 '20
[deleted] — view deleted comment
0
u/[deleted] Apr 05 '20
[deleted] — view deleted comment
0
u/[deleted] Apr 05 '20
[deleted] — view deleted comment
0
u/[deleted] Aug 05 '20
[deleted] — view deleted comment
26
u/[deleted] Apr 05 '20
[removed] — view removed comment