The Saga of Microsoft, OpenGL and Remote Desktop

I recently ran into a problem using 12d Model OpenGL views when connected using Remote Desktop Protocol (RDP). I thought I’d explain the problem and how to fix it for anyone else that encounters it.

TL;DR – Disable WDDM for Remote Desktop in the Windows Group Policy Editor, as described here.

Whilst working from home, I tend to work on my laptop (Dell Precision 5510), but connect remotely to it from my desktop computer (custom build) using the Microsoft Remote Desktop Protocol. Why? Well, my desktop setup has a nice triple-monitor setup and I left my dock at the office. I also like to keep my work stuff on the laptop separate from my personal stuff on the desktop.

Updates- what could go wrong?

Anyway, I’d been doing this previously for several months without a hitch, but decided now was a good time to update the drivers on my laptop. It had been a while, so the updates were needed, but I soon found out I had a problem. My OpenGL views in 12d Model no longer worked. The same project I’d used before the updates no longer allowed for using or creating OpenGL views. Oh no….how will I view my beautiful 3d models?!

Hmmmm….what’s the problem here? Tried a restart of 12d Model, but with no luck. Next step, check the Output Window for error messages. Aha! When 12d Model starts up, it does a few checks of your computer’s OpenGL capabilities. Whereas previously I’d had no problems, I now had lots of red error messages.

Screenshot of OpenGL errors in 12d Model over RDP
Screenshot of OpenGL errors in 12d Model over RDP

In search of a solution (Part 1)

That’s not right. Off to Duck Duck Go (Google that doesn’t track you), which lead to a post on StackOverflow as the top result for “rdp opengl”. The heading pretty much sums it up, but I suggest anyone using Remote Desktop and having problems with OpenGL (or graphics in general) to read that post.

OpenGL and Windows Remote don't play along nicely
Heading from StackOverflow question on OpenGL over Windows Remote

Now it’s worth pointing out that even though I’m talking about 12d Model here, the problem isn’t with 12d Model. 12d Model is simply using whatever hardware and API made available to it by Windows. The problem, as illustrated above, is with Windows Remote Desktop and affects all kinds of software relying on OpenGL drivers. That post also offers up several possible solutions of varying complexity and skill level.

The first solution offered in that post mentions something incredibly interesting and appealing.

According to this article it seems that now RDP handles newer versions of Direct3D and OpenGL on Windows 10 and Windows Server 2016, but by default it is disabled by Group Policy.

quetzalcoatl on StackOverflow, “Current state and solutions for OpenGL over Windows Remote”

As per the article, on the host machine (the machine into which you want to remote):

  1. Open up the Group Policy Editor with Administrator rights
    1. From the Control Panel; or
    2. By typing gpedit.msc in the Start menu or Run box (Win+R)
  2. Browse to: Local Computer Policy\Computer Configuration\Administrative Templates\Windows Components\Remote Desktop Services\Remote Desktop Session Host\Remote Session Environment
  3. Find the item “Use the hardware default graphics adapter for all Remote Desktop Services sessions” and enable it.
  4. Restart your computer

1 thought on “The Saga of Microsoft, OpenGL and Remote Desktop

  1. This fixed my issue I was having with Siemens NX CAD. They use OpenGl as well so I thought I would give it a try. Thanks for posting what you found!

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.