0
votes

I wrote a compiled MATLAB GUI that we run on a remote machine via Remote Desktop. Overall it runs fine, but sometimes the GUI will blank out many of the control objects (buttons, table, popups). It seems to happen after the screen of the client computer has been locked or after the GUI has been minimized.

If you move the mouse over the buttons, popups, or table headers, they reappear. The table cells will reappear if they are selected. The GUI hasn't crashed and still works fine, but the objects just disappear until you make them reappear again. I have only seen this happen when using remote desktop (Windows-Windows using Remote Desktop Connection).

How can I get this to stop happening? It isn't really breaking anything, but it is very annoying.

I don't know if this is an issue with MATLAB or with the Remote Desktop configuration, so I posted this question here. Feel free to move this to superuser if you think it's more appropriate.

2
Related: "Which graphics card is used when working with OpenGL shaders over RDP?" (MATLAB uses OpenGL). One answer says: "Your usual consumer GPU with standard drivers will not provide any HW acceleration for the RDP whatsoever and you'll drop into a SW emulation mode." - Wai Ha Lee

2 Answers

1
votes

Remote Desktop has issues with handling low level rendered graphics, and interacting with graphics cards. In our experience (we use Nvidia GPU's for rendering and computation engines on multiple projects/applications) we have found remote desktop to fail in so many cases, that we have ditched it for a third party tool.

I suspect this is what you are running into.

One option I would consider, is forcing Matlab to do software rendering, if this fixes the problem, then for certain it's the graphics cards. The first hit on a google search for "matlab software rendering" returns the matlab command opengl. Reading the documentation page for that, gives the command:

opengl software
1
votes

It sounds like the remote desktop minimization is causing it. For efficiency, Windows will disable various graphics when a Remote Desktop window is minimized on the client computer. To prevent this, create and set a DWORD RemoteDesktop_SuppressWhenMinimized to 2 at the following registry location:

HKEY_LOCAL_MACHINE\Software\Microsoft\Terminal Server Client

After doing this minimizing and locking your screen shouldn't do anything to the RDP session. I doubt it's a graphics card issue, as Windows 10 Creator's Edition allowed remote sessions to use the remote graphics card just like as if you were running locally.