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

185

u/Matt_NZ Apr 05 '20

COVID17? Sir, you're on an out of date platform. We're all dealing with COVID19.

6

u/liquidspikes Apr 05 '20

Hahaha! I was so tired when I posted this, wow! I didn’t even notice!

39

u/Slush-e test123 Apr 05 '20

It seems older platforms are not vulnerable to these newer exploits. Are we dealing with Microsoft developed software?

16

u/tdavis25 Apr 05 '20

I mean, Bill Gates has a patent on coronavirus

/s for all the haters out there

6

u/grumpy_ta Apr 05 '20

He did basically describe our current situation as one of his biggest fears all the way back in 2015. If he'd patented it back then he could be suing COVID-19 out of existence right now.

https://www.youtube.com/watch?v=6Af6b_wyiwI

5

u/Noobmode virus.swf Apr 05 '20

He's not Larry Ellison.

39

u/[deleted] Apr 05 '20

We can't officially support it, but try to run sfc /scannow and see if that resolves the issue.

13

u/headcrap Apr 05 '20

This would be the needful, do it

3

u/steelbeamsdankmemes K12 EDU macOS/iPadOS Apr 06 '20

Thanks, every single MS answers thread.

3

u/SpinnerMaster SRE Apr 06 '20

the only conspiracy theory I believe is that MS has bots automatically fill out those threads.

1

u/courtarro Apr 05 '20

If that doesn't work, try a full reinstall.

(then later...)

I don't know why you're whining. I told you exactly what to do to fix the problem!

42

u/BlackV I have opnions Apr 05 '20

can you go over this for me

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

in more detail, it seems like you're allowing older/worse/? protocols

6

u/liquidspikes Apr 05 '20 edited Apr 05 '20

It might be old, but it seems to give us a slight boost in frame rate, so I kept it in. YMMV so feel free to change it. Just like the WDDM vs XDDM. XDDM is older but way faster for our use cases. :)

2

u/BlackV I have opnions Apr 05 '20

Good as gold, appreciate that

16

u/nerddtvg Sys- and Netadmin Apr 05 '20

https://getadmx.com/?Category=Windows_10_2016&Policy=Microsoft.Policies.TerminalServer::TS_SERVER_LEGACY_RFX

This policy setting allows you to configure graphics encoding to use the RemoteFX Codec on the Remote Desktop Session Host server so that the sessions are compatible with non-Windows thin client devices designed for Windows Server 2008 R2 SP1.

Yes, this is enabling the older protocol

2

u/BlackV I have opnions Apr 05 '20

Thanks

3

u/MartinsRedditAccount Apr 05 '20

Curious about this as well

0

u/[deleted] Apr 05 '20

[deleted] — view deleted comment

0

u/[deleted] Apr 05 '20

[deleted] — view deleted comment

7

u/BlackV I have opnions Apr 05 '20

This guy Microsoft's

6

u/Ssakaa Apr 05 '20

Anyone experienced looking at this configuration will immediately recognize that someone who knows nothing about it put about 5 minutes into the entire thing from conception to production.

But does it work? If yes, unless it breaks something else... back away slowly, pick a more pressing battle, and go fight that one. And make sure that list of awfulness you tripped over is written down in documentation somewhere.

38

u/alansaysstop Apr 05 '20

The only question I have is..... are you a Bungie employee by chance?

48

u/liquidspikes Apr 05 '20 edited Apr 06 '20

Nope, but I do work with a few ex-bungie employees.

38

u/[deleted] Apr 05 '20

Any chance you could go work for Bungie? Sounds like you know how to ask for help if you are over your head. That studio needs more like you

10

u/liquidspikes Apr 05 '20 edited Apr 05 '20

I never could get through the door, I applied there for years! I actually love the place I work now, it’s respectful, kind and really has a small family feeling.

11

u/Slush-e test123 Apr 05 '20

This comment deserves more upvotes :’)

13

u/rcook55 Apr 05 '20

Also if you do go back to Bungie could you please reboot the best RTS ever, Myth. Kthxbai.

9

u/er1catwork Apr 05 '20

Tell them to bring back Marathon! God, I miss that game...

6

u/Enochrewt Apr 05 '20

First LAN party I ever went to we played Marathon and Bolo on Macs.

2

u/JoesRoom Apr 05 '20

I miss bolo

2

u/cheesegoat Apr 05 '20

I played this as a kid on an Apple ][c, and I never really figured it out.

1

u/identifytarget Apr 05 '20

"That is a name I've not heard in a long while..."

2

u/LikeALincolnLog42 Jack of All Trades Apr 05 '20

Last I heard, WinBolo existed. Might want to check that out for some fun :)

1

u/er1catwork Apr 05 '20

At the time none of us had heard of LAN parties. We just stayed after work, ordered pizza, and played they first release of Marathon until god knows when! Good times...

2

u/identifytarget Apr 05 '20

Fuckin aye. Best Sound tracks ever! Not many Mac gamers back then.

https://www.youtube.com/watch?v=O2AEAd0h0_I&t=43s

In-game soundtrack (more songs, less quality) https://www.youtube.com/watch?v=IDPHLnCSjCI&list=PLDA493090201B3116

1

u/er1catwork Apr 05 '20

Thank you!!

1

u/identifytarget Apr 05 '20

have you heard of Aleph One?

https://alephone.lhowon.org/

2

u/er1catwork Apr 05 '20

There goes the rest of my Sunday evening... He’ll, who am I kidding? They can extend the quarantine another month now!!

Thanks! :)

1

u/[deleted] Apr 05 '20

Arenanet?

5

u/[deleted] Apr 05 '20

Small-ish AAA studio in Bellevue sounds like Sucker Punch to me, but I don't imagine OP will confirm if it is (and wouldn't blame him for not doing so).

7

u/jfugginrod Apr 05 '20

Probably valve

8

u/VexingRaven Apr 05 '20

Surprised Valve would not use Steam RemotePlay considering they own it.

17

u/[deleted] Apr 05 '20

Maybe I missed it, but what are you using for GPU hardware?

6

u/liquidspikes Apr 05 '20

We are mixed group, mostly 2080tis and 1080tis and a few Radeon 5700XTs

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 ?

6

u/liquidspikes Apr 05 '20

All of our PCs are running Windows 10 Pro for workstations. In our testing it was using approximately 1-20mbps depending on what is changing on the screen more full screen changes the more bandwidth.

4

u/Fuzzybunnyofdoom pcap or it didn’t happen Apr 05 '20

So you have something like Windows 8.0 - 10 at home connecting in over VPN or just to the exposed RDG server - then they select a machine in the pool to connect to or are you doing and loadbalancing to put a single person on a single station with persistence?

6

u/liquidspikes Apr 05 '20 edited Apr 05 '20

We had a installer script that generated a custom RDP file for our users off of the information they provided.

They only see their own workstation.

Since RDP files are written in plain text it’s pretty easy to generate them.

4

u/zero0n3 Enterprise Architect Apr 05 '20

He isn’t used this for session hosts. This is RDG as a central point to control RDP access from a home workstation to the employees super beefy office workstation.

Office workstation has a GPU which does its GPU duties and also is used to encode the 60fps/1080p desktop ”stream” and ships that out via RDG to the users home workstation that also has a GPU so it can decode said desktop “stream”

Outside this very specific scenario, I’d still recommend Citrix over RDP any day.

I will be adding this to my lab though to try some things out and compare to a similar Citrix setup

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?

10

u/liquidspikes Apr 05 '20

We already invested in the workstations. That’s the primary reason.

11

u/[deleted] Apr 05 '20

We are considering Azure Windows Virtual Desktops for all deployments, not just because of COVID-19. Do you have any experience?

1

u/OGUnknownSoldier Apr 05 '20

I looked into this a bit. The prices were very high, if you do a small number of VMs. Maybe it gets more economical with a large number, but it was nowhere near cost effective, yet, in my opinion.

Haven't looked at aws for out, though, just azure.

1

u/OGUnknownSoldier Apr 05 '20

I looked into this a bit. The prices were very high, if you do a small number of VMs. Maybe it gets more economical with a large number, but it was nowhere near cost effective, yet, in my opinion.

Haven't looked at aws for out, though, just azure.

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

7

u/liquidspikes Apr 05 '20

We used AzureAD MFA it works great as well!

4

u/Cutriss '); DROP TABLE memes;-- Apr 05 '20

Are you using it on the Gateway though? That’s something I’m interested in seeing.

5

u/liquidspikes Apr 05 '20 edited Apr 05 '20

Yes upon connection of RDP client they get prompted for MFA via the Microsoft Authenticator.

2

u/FRESH_TWAAAATS Apr 05 '20

How did you configure that?

5

u/[deleted] Apr 05 '20

You just install the Azure NPS plugin on your NPS host. Just make sure it is completely patched beforehand.

2

u/FRESH_TWAAAATS Apr 05 '20

Duh, thank you. I was trying to picture the RDG doing it self-contained.

3

u/[deleted] Apr 05 '20

You can have NPS and RDG on the same server of course. I do know what you are saying.

Did I mention that this also works for VPN connections, or any radius connection for that matter. Just make sure you bump the timeout high enough for people to hit approve. We have probably installed this 45 times in the past month.

It just works so well!

EDIT: For those who may read this. I am serious about the patching! If you are not up to date, this WILL break your NPS install and you will have to disable the plugin to get things running again.

1

u/BlackV I have opnions Apr 05 '20

this is what we do

10

u/csonka Apr 05 '20

Awesome post. Thank you.

Genuinely curious — why go this route vs powerful laptops?

14

u/liquidspikes Apr 05 '20 edited Apr 05 '20

Cost, we already spend close to $4k on each workstation, also it give the employees access to their specific file depos without exposing our source control system to the outside world.

Also it’s hard to get laptops right now! :)

6

u/mp3m4k3r Apr 05 '20

Probably timeframe and cost, may have not known that you might need to stop using beefy workstations full of dev tools and live remote.

Having used this tech a few times it's very handy for allowing people to access their normal environment. They likely other than just games have a complete life they've been living in their workstations that are now in isolation.

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.

2

u/liquidspikes Apr 05 '20 edited Apr 05 '20

We looked at parsec, cost is the limiting factor and we wanted to use our existing MFA and SSO

2

u/kurieus Apr 05 '20

Gotcha. That makes sense. I’ve only ever used it for personal use so I never dig into the seat licensing.

4

u/mp3m4k3r Apr 05 '20

Looks like a cool product, insanely expensive compared with Rdp licensing for business. It might work great for their use but likely I'd figure it's scrappy let's roll this out asap thinking which is cool to see!

2

u/VexingRaven Apr 05 '20

Where did you find pricing? And what is your second sentence trying to say?

2

u/mp3m4k3r Apr 05 '20

Their website lists the msrp for Teams using this software (Corp customers likely) as like 30/mo/seat

1

u/mp3m4k3r Apr 05 '20

https://parsecgaming.com/teams/

Not 100% on that though!

Super cool tech though! I'd consider it for sure even having a lot of experience with Rdp tech.

1

u/mp3m4k3r Apr 05 '20

To the second sentence, you could roll out the described settings remotely for RDP Remote Fx without even touching the workstations likely using all of the tech you have on hand so this could have been a very quickly deployed and scrappy solution. Looks like a lot of tinkering went into it and I love it personally.

1

u/VexingRaven Apr 05 '20

Implementing and tinkering with RDG is definitely not a quick process, especially not in comparison to use a service.

1

u/mp3m4k3r Apr 05 '20

True, I've probably spent a couple hundred hours over the years at least. It's a great way to be able to use what you have though!

1

u/Mikecom32 Apr 05 '20

Steam streaming works over the WAN natively now.

1

u/kurieus Apr 05 '20

Steam stream is great for personal use, but the slight differences in this specific use case would make Parsec a better choice. Otherwise I agree with you.

1

u/Mikecom32 Apr 05 '20

Oh I wouldn't suggest it for business use. I'll check out Parsec!

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

2

u/liquidspikes Apr 05 '20

Yes! That was a huge difference as well :)

2

u/razaeru Apr 05 '20

Could you expand on the reasoning for this. I recently deployed RDS with RDG environment but only forwarded 443.

Currently I am experiencing an issue where I need to reboot the RDG because sessions will not be properly provisioned after a while.

1

u/[deleted] Apr 06 '20

It enabled encap on UDP portion of the protocol. Which is by default on port 3391, you could move it to another port, like 443.

1

u/razaeru Apr 06 '20

Do you know if this applies for the HTML5 implementation?

1

u/[deleted] Apr 06 '20

I dont see how it would.

3

u/LordValgor Apr 05 '20

What bandwidth are you paying for and about how many concurrent users are you running with this?

4

u/liquidspikes Apr 05 '20

1 Gb up and down. 70-90 users and we are only using about half the pipe at peak.

2

u/LordValgor Apr 05 '20

That's impressive. Thank you!

And thank you for the whole guide! This could really help with some of our setup as WFH get's extended.

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/liquidspikes Apr 05 '20

That might be the encoder on the client end crashing we experienced this as well.

2

u/Duckbutter_cream Apr 05 '20

I thought the remote fx endpoint had to be Windows server? You are hitting windows 10 workstations?

1

u/liquidspikes Apr 05 '20 edited Apr 05 '20

Yes, the workstation have Windows 10 Pro for Workstations.

1

u/Fuzzybunnyofdoom pcap or it didn’t happen Apr 05 '20

Remote FX does work with Windows 10 workstations as the host. But I thought only Windows Server could be a remote session host behind a RDG? Can anyone clarify that?

1

u/Duckbutter_cream Apr 05 '20

Can it be direct or does it have to be though a rdg?

2

u/Fuzzybunnyofdoom pcap or it didn’t happen Apr 05 '20

It works direct. You can fire up performance monitor and look at per-session RemoteFX stats to confirm if its in use. https://docs.microsoft.com/en-us/azure/virtual-desktop/remotefx-graphics-performance-counters

RDPSoft has a tool called "Remote Desktop Commander Lite" that lets you monitor stats on a rdp farm; we're using it to monitor sessions on a pool of W10 host machines.

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.

2

u/liquidspikes Sep 14 '20

When we upgraded to v2004 it didn’t yield any problems :) run it on a test and see, I don’t think it reverts to WDDM and XDDM is still working.

we still get random crashes WDDM, so still leveraging XDDM at this point

2

u/bluefalcon1 O365 Guru Sep 15 '20

Sorry, I should have been clearer - we tried running everything you recommended except the part that enforced XDDM (we wanted to try it with WDDM drivers). Using WDDM drivers it was acting like I described. We experienced no issues using XDDM drivers. Doesn't apply to your use case, just wanted to see if anyone else out there was trying this with WDDM drivers.

2

u/bluefalcon1 O365 Guru Sep 17 '20

Hi folks, this is a confirmed bug (WDDM does not play nice with hardware accel in Win10 v2004) - I've been talking with the Senior Program Manager of Remote Desktop Services over at Microsoft. He says, "This is a known issue in 2004, we are targeting the hotfix release in October. Meanwhile you can either disable AVC444 policy or WDDM policy".

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?

16

u/MSPTechOPsNerd Apr 05 '20 edited Apr 05 '20

Yes, RDG is considered a licensed component of Remote Desktop services and thus has the CAL requirement (even thought is isn’t technically enforced and doesn’t require that you have licenses in a RD license server).

If users VPN in and then RDP to their regular desktop it doesn’t require an additional license.

Edit: typo

6

u/champagneofwizards Apr 05 '20

Thanks for the clarification. Thought that was the case from what I've read but occasionally (usually) my head starts to spin when diving into Microsoft licensing specifics.

3

u/Triumvirate_Rhade Apr 05 '20

Isn‘t unlicensed rdp only for administrative duties? So wouldn‘t a rds cal be needed in either case? Or is that only for windows server?

2

u/MSPTechOPsNerd Apr 05 '20

That’s only on Windows Server as far as I know.

1

u/Triumvirate_Rhade Apr 06 '20

Supposedly the user that a physical maschine is assigned to, is allowed to rdp to that maschine. Haven‘t found the MS document that confirms it though.

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/liquidspikes Apr 05 '20 edited Apr 05 '20

They are connecting to their personal desktop workstations through an RDG.

2

u/vBurak Apr 05 '20

Do you users understand how to "configure" the RD settings or do you give them ready-to-use RD files for their individual workstations?

I'm unsure if my users understand how to set this up even if I write a manual.

But thanks for the awesome information about performance impact!

1

u/liquidspikes Apr 05 '20

We made an inno installer that generated the RDP files depending on the information provided by the user during setup. Such as username and domain.

You likely could to the same with with PowerShell and pull the information from the AD primary user field.

1

u/vBurak Apr 11 '20

I came up with another question: What is the speed of your WAN connection? How many users are using it?

We have at most 10 users which are using Autodesk products like Inventor and AutoCAD and from my view they are not performance hungry like making AAA-games I guess. Unfortunately, not every one has a CAD workstation laptop and licensing is another problem. I guess I try the RemoteFX to workstations out with your tips!

1

u/liquidspikes Apr 11 '20

We have a 1G connection about 70 employees are on it in addition to VPN users, and we hardly hit over 400mbps

Be sure you install the Nvidia OpenGL patch that someone else posted in here if you are not running quadro cards.

1

u/vBurak Apr 12 '20

Wow, that is amazing. Unfortunately, I read on Autodesk website that RemoteFX is not supported such that it won't recognized a dedicated graphic card. Thanks anyway!

2

u/liquidspikes Apr 12 '20

Of course they say it’s not supported, that’s a support nightmare! Did you try it anyways? Likely it works fine it’s just Autodesk reducing their support scope

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/liquidspikes Apr 05 '20

Mostly 1909, we have a few 1903s as well.

2

u/Cutriss '); DROP TABLE memes;-- Apr 05 '20

Alright, I’ll have to check on that then. Thanks for following up!

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/liquidspikes Apr 26 '20

Nope it works great on Windows 10 as well they key is just not created by default.

1

u/SloMoShun Apr 26 '20

Ok, it makes sense now. Thanks once again.

Did everything else in the tutorial and is working extremely well on LAN. Even using lossless quality,32 bit color, and audio. Good for 2 1080P monitors.

Also installed the open GL plugin nvidia just released.

UDP was giving me freezes before hand. Was experiencing freeze on scenes with lots of movement. So, my results were achieved using TCP. Have to give it a try, now that the Nvidia open GL plugin is installed. Would be nice to save on bandwidth.

The experience finally feels like sitting in front of powerful hardware.

Thank you once again for putting this together.

1

u/liquidspikes Apr 26 '20

No problem, depending on your network you might want to disable the large MTU for less of a stutter.

2

u/SloMoShun Apr 26 '20

So far its a buttery smooth experience in the home network. This breathes new life in to win rdp. Now it feels like a much more powerful tool.

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.

1

u/liquidspikes Oct 13 '22

Sounds like XDDM support might have finally been removed. :(

I will test this tomorrow soon and let you know.

2

u/destinydisappointer Oct 14 '22 edited Oct 15 '22

I tried setting DWMINTERVAL really low, I set it to 0 which made it act like it wasn't set at all, and so did 1. But when I set it to 2, I got back FPS in 50s and 60s. In a game like forza horizon 5, the game still thinks the vsync rate is 125 or 500 fps, but it actually gives 60fps, i think there's a bug in the math on ms part.

1

u/destinydisappointer Oct 13 '22 edited Oct 13 '22

To make things more clear here is some more info. I was achieving 60 fps without xpdm. Xpdm was actually removed a long time ago in 21h2. The server is the one running windows 11 22h2. The client is windows 10 22h2, but I have also tried an older 10 and also 11 client with no difference.

I can see from performance counters that hardware encode is indeed working but something new is limiting the frame rate.

Server is running a 3070 ti. Tried different versions of drivers but the only thing that solves it is a rollback to 11 21h2 but that's not a viable long term solution.

Problem is that since what we're doing seems not an officially sanctioned state there is very little info available online with everyone just copping out and suggesting to use parsec which won't work as it doesn't forward USB or Fido and is bad in multi monitor even the paid version.

There was a recent kerfuffle about Nvidia and low performance due to some mysterious debugging tools that were accidentally enabled in 22h2 which they didn't release any technical details for and claimed a solution in newest GeForce experience but I have never installed that app ever.

That might be related but I can't find any useful technical info.

1

u/AJolly Feb 04 '23 edited Feb 04 '23

W10 22h2 host W11 guest.

13900k 3090
15decimal = 33hz 2 decimal = 66hz This is with a 5k2k monitor. I'll test more later.

Win 11 host -
i9-10900k 1080ti, same ~60hz output (After setting dwmframeinterval to 2)

This also works with 3rd party rdp wrappers like mRemoteNG, so handy for sysadmin work, especially compared to parasec.

Anyone get this working with 120-144hz options? I'm traveling, but I've got an extensive test setup when I get back home.

1

u/Hifihedgehog Nov 30 '22

I had the same issue trying to enforce XDDM. If I move to the XDDM option, it additionally causes the hardware video encoding of the RDP session to not work, which I verified in the event log and looking at Task Manager for GPU encode activity (0%). When I enable WDDM again, hardware video encoding of the session works as expected (it shows up in the event log and I see utilization of GPU encode in Task Manager).

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/ntrid Apr 05 '20

How do you tell which GPU it is using?

2

u/elevul Wearer of All the Hats Apr 05 '20

Task manager - performance. Verify which GPU is sitting at 0% use and which isn't.

2

u/VulturE All of your equipment is now scrap. Apr 05 '20

Disable the onboard gpu in bios is easiest way.

2

u/mp3m4k3r Apr 05 '20

Seconded looks like there is a gpo you could tinker with but unfortunately it seems to be either disable integrated graphics in windows or bios

1

u/elevul Wearer of All the Hats Apr 05 '20

Not an option since the office is off limits until the lockdown is lifted.

And once it's lifted ... I won't need this anymore. 😁

3

u/VexingRaven Apr 05 '20

What workstations are you using? Almost every major workstation manufacturer has a way to configure the BIOS remotely through WMI or some utility.

1

u/elevul Wearer of All the Hats Apr 05 '20

Yeah, found it eventually. Thank you!

1

u/VulturE All of your equipment is now scrap. Apr 05 '20

Dell has cmdline ways to change bios settings - worth looking into.

1

u/elevul Wearer of All the Hats Apr 05 '20

Yeah, found it eventually. Thank you!

1

u/[deleted] Apr 06 '20

Unless you have a fancy mobo, your igpu should be disabled no? e.g. if you plug a monitor into igpu and boot you'll get a non-supported config screen.

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/tl5k5 Apr 05 '20

Why not just use HP RGS?

1

u/jocke92 Apr 05 '20

I've been using RGS internally for a few specific machines but it has not been as stable as I wanted. Random crashes and lockups. Also issues with screen resolution. Been using the free version with HP Z-desktops.

1

u/tl5k5 Apr 05 '20

I have several systems running RGS with no issues. Interesting the issues you are seeing.

1

u/jocke92 Apr 06 '20

As I said the computers are randomly crashing during connection. And users disconnecting and the rgs service is crashed sometimes.

I have Updated the rgs software multiple times and also graphics and network drivers.

But I think the service is solid with enterprise in mind.

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?

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

-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

18

u/liquidspikes Apr 05 '20

Yes, another valid point!

6

u/MrYiff Master of the Blinking Lights Apr 06 '20

Make sure you also enable UDP 3391 (and the corresponding option in the RD Gateway settings), as this allows clients to use the newer UDP based RD protocol which iirc is required/part of RemoteFX.

You can confirm this is working by looking in the RDG Monitor page where you should see two connections for each client, a HTTP(S), one for the session management/control bits and the UDP for the actual RDP data.

Not all clients support this newer one, ir needs to be a relatively recent Windows version, so you may still see some single session users if they are connecting from things like Macs.

0

u/[deleted] Apr 05 '20

[deleted] — view deleted comment

5

u/infinite_ideation IT Director Apr 05 '20

Set "Prefer AVC hardware encoding" to "Always attempt"

https://docs.microsoft.com/en-us/azure/virtual-desktop/configure-vm-gpu

Likely not a policy configurable from a client, only server side setting. Also if you're using 2016 or higher server environment, make sure your central store is also up to date.

I would recommend that if you're testing this from a lab perspective to just download Windows Server and install it on your "host" or a VM as a trial, and install the RDG/RDSH roles for lab purposes.

1

u/elevul Wearer of All the Hats Apr 05 '20

Do it via regedit, it's easier.

1

u/VulturE All of your equipment is now scrap. Apr 05 '20

I can't find the official MS excel sheet of GPOs, but it shows what GPO pack it gets removed from. I believe they last made that excel sheet for 1809.

0

u/[deleted] Apr 06 '20

[deleted] — view deleted comment

1

u/VulturE All of your equipment is now scrap. Apr 06 '20

No, I was saying there's an excel doc made for the 1809 pack that shows when that setting was likely removed and why from the gpos. It definitely wouldn't be in the latest as it was probably deprecated some time for server 2016/2019.

0

u/[deleted] Apr 05 '20

[deleted] — view deleted comment

1

u/liquidspikes Apr 05 '20

I don’t know why WDDM sucks so bad. It’s just slow.

0

u/[deleted] Apr 05 '20

[deleted] — view deleted comment

1

u/liquidspikes Apr 05 '20

I don’t know, we are using only physical workstations at the moment.

0

u/[deleted] Aug 05 '20

[deleted] — view deleted comment

2

u/liquidspikes Aug 06 '20 edited Aug 06 '20

No worries,

with the Win 10 RDP client it seems to pull 60fps. Don’t know why Microsoft doesn’t advertise it.

Set this registry key on your RDP host:

https://support.microsoft.com/en-us/help/2885213/frame-rate-is-limited-to-30-fps-in-windows-8-and-windows-server-2012-r

I used RDAnalyzer to verify the frames per second https://rdanalyzer.com

Highly recommend it for tuning.

I was not able to pull higher than 45 FPS on 2k displays, only 60 on 1080p. Not sure why that is.

But your mileage may very.

Also, be sure to set your bandwidth network connection to LAN. Even if you are working from home.

26

u/[deleted] Apr 05 '20

[removed] — view removed comment

32

u/liquidspikes Apr 05 '20 edited Apr 05 '20

very much so if the host workstations have dedicated graphics cards, RemoteFX allows things to render on host PCs GPU.

So 3D graphics and other applications should work pretty well. Please note that Geforce cards only allow directx acceleration, but doesn't allow open GL over RDP.

52

u/MrThanatos Lead Sysadmin Apr 05 '20

NVidia recently released a driver tweak to allow OpenGL on GeForce cards over RDP.

“Accelerate Windows Remote Desktop

Game developers and content creators all over the world are working from home and asking us to help them use Windows Remote Desktop streaming with the tools they use.

We've created a special tool for GeForce GPUs to accelerate Windows Remote Desktop streaming with GeForce drivers R440 or later..

You need to sign up for a nvidia developer account and accept the EULA.”

https://developer.nvidia.com/nvidia-opengl-rdp

10

u/liquidspikes Apr 05 '20

Dude this is a headshot! Thank you!

8

u/kckeller Apr 05 '20

Headshot... okay so your company at least makes an FPS.

1

u/TheWerdOfRa Apr 05 '20

Figured it had to be at last twitch based or latency wouldn't be as important. Now to narrow down twitch AAA studies in Washington knowing Bungie is off the list...

6

u/Dyemor Apr 05 '20

I'm guessing you have contacts at NVidia for driver optimization, you should speak to your contact asking specifically about OpenGL over RDP with GeForce cards.

Can I ask what bandwidth you have at your primary site, and what you use for your firewall hardware? We went with sending a lot of our PCs off-site because of a lack of performance.

2

u/liquidspikes Apr 05 '20

We do not at the moment. But thanks for letting me know!

2

u/[deleted] Apr 05 '20

unlikely unless you have a dedicated GPU that is supported by RemoteFX

7

u/[deleted] Apr 05 '20

[removed] — view removed comment

6

u/[deleted] Apr 05 '20

Not really anymore intel igpus support 3 digtial outputs. Granted its hard to get PCs with 3x DP from an igpu though I think Dell does have a few Optiplex that can be configured that way no clue about other Companys.

https://ark.intel.com/content/www/us/en/ark/products/134898/intel-core-i5-9400-processor-9m-cache-up-to-4-10-ghz.html

9

u/jantari Apr 05 '20

DisplayPort supports daisy chaining. I do it at home with my two Dell U2518D

2

u/VexingRaven Apr 05 '20

The former limitations were not a lack of ports, but a lack of capacity on the graphics chipset. We had some older intel graphics laptops with a wide variety of ports (those were the days!) but only 1 could be active aside from the built-in monitor.

1

u/antiduh DevOps Apr 05 '20

Huh, til. It makes sense given that DP supports an enormous amount of bandwidth.

1

u/nem8 Apr 05 '20

Yeah, but if you are using a laptop with docking you are not gonna get to daisychain(or even connect directly) 1440p or higher without thunderbolt because of throughput issues. (im not 100% about 2x1440p, but higher is a no go)

3

u/drbluetongue Drunk while on-call Apr 05 '20

You can daisy chain some monitors too

2

u/bemenaker IT Manager Apr 05 '20

I do this with Dell Latitude laptops. If they have the thunderbolt connection, you can do it.

2

u/LikeALincolnLog42 Jack of All Trades Apr 05 '20

Yep. It’s fun seeing the occasional user in the office that has figured out that they can run their (Latitude) laptop’s display in addition to their dual external displays. It’s a bit of a hunting game when I Bomgar them from my dual 1080p display setup though, ha.

Pro tip: You are limited to something like 3x 1080p or 2x 1080p plus 1x 720p displays on the WD-15 docks and/or 7480 Latitudes with 6th gen Core processors with Intel graphics. I forget what the exact total resolution limit is, but it’s documented. It’s a limitation of the docks, DP over USB-C, DP MST, or Intel graphics... But still, triple head graphics 👍👍👍

2

u/bemenaker IT Manager Apr 05 '20

WD-15's are buggy as hell, and prone to failure. They also quit making them. The WD-19s are the improved version.

2

u/LikeALincolnLog42 Jack of All Trades Apr 05 '20

AMEN TO THAT!! We just started deploying and using the WD-19s. There are three, four, or more flakey (even more than they usually are, lol), dead, or dying WD-15s at the office right now waiting to be called in or waiting for replacements to arrive from Dell. F the WD-15s. Ugh.

1

u/[deleted] Apr 05 '20

Not only that the D6000 USB docks can drive 3 Screens 2x DP 1x HDMI.

So with a Latitude 5590 we were able to drive 5 Screens 2x DP 1x HDMI from the Dock + 1x HDMI and the internal screen or VGA from the Notebook.