Code Yarns ‍👨‍💻
Tech BlogPersonal Blog

CUDA and Remote Desktop

📅 2011-Feb-03 ⬩ ✍️ Ashwin Nanjappa ⬩ 🏷️ cuda, rdp ⬩ 📚 Archive


If you connect to a CUDA-capable Windows computer using Remote Desktop and run CUDA programs on it, they fail. That is, CUDA programs fail if they are executed under a Remote Desktop Protocol (RDP) session.


In the RDP universe, the CUDA-capable computer is the RDP server and the computer connecting to it is the RDP client. When a Windows computer becomes a RDP server, its graphics driver (say, a NVIDIA driver) is replaced with a RDP graphics driver of Windows.

The RDP graphics driver converts display information into RDP packets and sends it to the client. This is why the display of the RDP server goes blank when it is involved in a RDP session.

At the RDP client, the data in these packets are interpreted as Windows Graphics Device Interface (GDI) information and used to draw the corresponding windows. Thus, RDP is somewhat similar to how X works in the Linux world. This is what gives RDP its speed, performance and other capabilities.

But, this is also why CUDA will not work over RDP. Windows replaces the CUDA-capable NVIDIA graphics driver with its RDP graphics driver. Thus, all CUDA programs fail.


Instead of RDP, pick any alternate solution that does not touch the graphics driver. That is, something that allows the graphics driver to render, and then captures and sends the desktop information as a bitmap to the other end. So, desktop sharing solutions like VNC or TeamViewer work fine with CUDA.

Reference: Remote Desktop Protocol at MSDN

© 2022 Ashwin Nanjappa • All writing under CC BY-SA license • 🐘📧