figures suddenly very slow

63 views (last 30 days)
Jason Doyle
Jason Doyle on 28 Oct 2021
Suddenly, it takes ~15 seconds to render even one point in a figure. There was some update to the machine over the weekend and I also recently installed 2021a. I'd try 2017 again, but 2017 says my license is no good now.
>> memory
Maximum possible array: 50646 MB (5.311e+10 bytes) *
Memory available for all arrays: 50646 MB (5.311e+10 bytes) *
Memory used by MATLAB: 2315 MB (2.427e+09 bytes)
Physical Memory (RAM): 32520 MB (3.410e+10 bytes)
>> tic; plot(1); toc
Elapsed time is 0.016784 seconds.
This opens a figure right away. However, the console is unresponsive and the plot doesn't show data for another 15 seconds
If I run it again and re use the figure it is fast.
So I tried running 'bench' and it crashes the matlab console all together. But not always.
>> bench
Exception in thread "AWT-EventQueue-0": java.lang.RuntimeException: Waited 5000ms for: <19db8c0b, 532b36d3>[count 2 [ add. 0, orig 2], qsz 0, owner <Startup Class Loader>, add.owner Startup Class Loader-SharedResourceRunner] - <AWT-EventQueue-0>
at jogamp.common.util.locks.RecursiveLockImpl01Unfairish.lock(RecursiveLockImpl01Unfairish.java:198)
at com.jogamp.opengl.GLProfile.initSingleton(GLProfile.java:199)
at com.jogamp.opengl.GLProfile.getDefaultDevice(GLProfile.java:2003)
at com.jogamp.opengl.GLCapabilities.<init>(GLCapabilities.java:84)
at com.mathworks.hg.peer.GLCanvasPeerFactory.getCaps(GLCanvasPeerFactory.java:22)
at com.mathworks.hg.peer.GLCanvasPeerFactory.createHGCanvasPeerWithComponent(GLCanvasPeerFactory.java:88)
at com.mathworks.hg.peer.GraphicsPeerWithComponent.createJOGLCanvas(GraphicsPeerWithComponent.java:19)
at com.mathworks.hg.peer.GraphicsPeer.doCreateCanvas(GraphicsPeer.java:119)
at com.mathworks.hg.peer.GraphicsPeer.access$100(GraphicsPeer.java:16)
at com.mathworks.hg.peer.GraphicsPeer$1.run(GraphicsPeer.java:174)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758)
at java.awt.EventQueue.access$500(EventQueue.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.awt.EventQueue$3.run(EventQueue.java:703)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:728)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
Exception in thread "AWT-EventQueue-0": java.lang.RuntimeException: Waited 5000ms
How can I debug this? Is it a Java version problem? Is it a Nvidia driver problem? Opengl? And I don't have admin rights on my machine so some of my options are limited. Doing a re-install or moving to 2021b is a big hassle for me.
  2 Comments
Walter Roberson
Walter Roberson on 28 Oct 2021
I would first tend to suspect a graphics driver problem. Not necessarily NVIDIA as maybe you have more than one graphics card; use opengl info to see what it thinks about your graphics cards.
My suspicion after that would be the possibility that a different JAVA version got linked in.
Jason Doyle
Jason Doyle on 28 Oct 2021
Thank you for replying

Sign in to comment.

Accepted Answer

Jason Doyle
Jason Doyle on 28 Oct 2021
Edited: Jason Doyle on 30 Oct 2021
MATLAB GRAPHICS MIGHT NOT WORK PROPERLY OVER REMOTE DESKTOP BY DEFAULT
when I was using the remote desktop:
'opengl info' reports that it is using microsoft SW drivers
'opengl hardware' didn't work
In Windows device manager display adapters I can see my Nvidia T1000 GPU, and I can also see a Windows Remote device.
I drove to work and retrieved the laptop. Now that Windows Remote device is not listed in device manager and the problem is gone. 'opengl info' shows my Nvidia HW.
  3 Comments
Walter Roberson
Walter Roberson on 29 Oct 2021
The abbreviation I was looking for is TCC vs WDDM. In TCC mode remote rendering is supported, but not opengl, so this must be something different than what I linked to above about OpenGL.
I am not able to find documentation to confirm that the t1000 supports TCC. It "should" since it is quadro, but...
I do find that a utility program named GPU-Z is able to print out information about tcc support. I have not used GPU-Z but I have used CPU-Z and it is a useful program.

Sign in to comment.

More Answers (2)

Jason Doyle
Jason Doyle on 30 Oct 2021
Tech support got back to me and gave me the following instructions, which solved the lag problem.
My name is Matti. I am writing in reference to your Technical Support Case #05174718 regarding 'figure rendering is broken'.
I read your MATLAB Answers post and understand that you are facing an issue with plotting in MATLAB while using Windows Remote Desktop Connection. Unfortunately, we do not officially support remote workflows such as running MATLAB via Microsoft remote desktop. As such, we may only be able to provide limited support for this issue, but there are a few potential workarounds. It appears to be a graphics driver issue that may be able to be resolved by opening MATLAB with a different graphics driver.
First, you can try to open MATLAB on your remote desktop via the following command in the command window (type cmd in the lower left search bar of your screen to open the command window):
matlab -softwareopenglmesa
After opening MATLAB, see if simple plot creation remains slow.
You may also try to clear any default figure renderer settings by following the steps below:
(1) Run the following commands in the MATLAB command window:
>> set(groot,'DefaultFigureRenderer','painters');
>> set(groot,'DefaultFigureRenderer', 'opengl');
>> opengl('save','none');
(2) Close MATLAB
(3) Restart a MATLAB session using the -noopengl startup option via the Command Window:
matlab -noopengl
If neither of these two methods resolved the issue, please provide the following:
1. Collect the system information
(1) Execute 'dxdiag' command in Windows Command Prompt to launch "DirectX Diagnostic Tool".
(2) In "DirectX Diagnostic Tool", click "Save All Information" button and generate the text file.
(3) Forward the text file to me.
When you execute 'dxdiag' on the target system, it needs to be executed when sitting at the machine and not run remotely otherwise the graphics information will not be accurate.

Ali Özgür Argunsah
Ali Özgür Argunsah on 18 Aug 2023
If the "Parallel Pool" is running, it takes longer to make figures.

Categories

Find more on Startup and Shutdown in Help Center and File Exchange

Products


Release

R2021a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!