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