Windows RDP (Remote Desktop) can I force to disregard GPU?

I want to remote desktop into a Windows 10 host but want to force the rdp host service to only consume CPU resources not the GPU at all. When I generally rdp into my host machine I can see that there are GPU resources consumed. I do not want that as I reserve the GPUs in my machine for machine learning purposes that peruse the GPUs.

Can I force Windows' RDP to not consume GPU resources?

Thanks

enter image description here


Solution 1:

RDP before Windows 10 had its own graphics driver to convert the rendered screen into network packets to send to the client, which used exclusively the CPU. Window 8 was the first to start using the GPU.

Since Windows 10 build 1511 and Windows Server 2016, RDP uses the AVC/H.264 codec in order to support larger screens than full HD. This codec uses the GPU, but only under certain conditions and for full desktop sessions, but otherwise falls back to using the CPU as before.

Using AVC/H.264 is now the default, but you may disable it using the Group Policy Editor (gpedit.msc) and drilling down to :
Computer Configuration -> Administrative Templates -> Windows Components -> Remote Desktop Services -> Remote Desktop Session Host -> Remote Session Environment.

Set the following policies to Disabled, to disable the use of the AVC/H.264 codec :

  • Configure H.264/AVC hardware encoding for Remote Desktop connections
  • Prioritize H.264/AVC 444 Graphics mode for Remote Desktop connections

In any case, non-full desktop sessions should not currently use the GPU (but this could change without notice).

References :

  • Remote Desktop Protocol (RDP) 10 AVC/H.264 improvements in Windows 10 and Windows Server 2016 Technical Preview

  • Configure H.264/AVC hardware encoding for Remote Desktop Connections

The last reference contains this text :

This policy setting lets you enable H.264/AVC hardware encoding support for Remote Desktop Connections. When you enable hardware encoding, if an error occurs, we will attempt to use software encoding. If you disable or do not configure this policy, we will always use software encoding.

Solution 2:

The Windows desktop, regardless of it is used by RDP or locally always consumes some GPU resources on the primary GPU.
It just is designed that way.
The only way I know of to get both your GPU's used dedicated for your machine learning project is to add a 3rd GPU and make sure that one is the primary. This can be a very cheap basic GPU or the build-in Intel HD graphics if your CPU happens to have that.
You may have to fiddle with Bios settings and/or the order of the GPU's in the PCIe slots to get the desired effect regarding the order of the cards. In case of using the Intel HD graphics this usually is automatically the primary GPU, but some motherboards won't enable the Intel GPU at all if there is another GPU present.