- Force Software OpenGL: Add `-softwareopengl` to the MATLAB shortcut's target to default to software OpenGL.
- Update NVIDIA Drivers: Ensure your NVIDIA drivers are current to avoid compatibility issues.
- Address libstdc++.so.6 Incompatibility: Follow the workaround if you encounter library compatibility issues: https://www.mathworks.com/support/bugreports/1297894
- Use MATLAB with Software OpenGL: If changing the graphics driver isn't an option, start MATLAB with from the Linux Terminal:
How to disable WebGL and use OpenGL
127 views (last 30 days)
Show older comments
Miguel Ángel Bonilla Rojas
on 1 Mar 2024
Edited: Benjamin Kraus
on 18 Jun 2025
I'm trying to use siteviewer for some things, but it times out and doesn't give me anything. Comparing to other PCs that I know they work I've noticed they use a different graphics rendered, OpenGL, while my system uses WebGL. I've tried using commands for changing it such as: opengl('save','software') or matlab -softwareopengl, but it doesn't work. My pc has a 3060Ti and the others don't even have a graphic card and I also tried to change nvidia graphic options but to no avail.
Is there any other form of changing it?
0 Comments
Accepted Answer
Chetan
on 6 Mar 2024
Edited: Chetan
on 6 Mar 2024
It seems like you're encountering problems with `siteviewer` in MATLAB because of a WebGL and OpenGL conflict.
You can follow the following steps to fix this issue:
matlab -softwareopengl
To always start MATLAB in this mode, use the following in the MATLAB Command Window:
opengl('save','software')
To revert, use:
opengl('save','none')
If problems persist, try these workarounds:
Hardware OpenGL Renderer : Create a 'java.opts' file in MATLAB's start directory with:
-Djogl.disable.openglarbcontext=1
Painters Renderer: Start MATLAB with the `-noopengl` option from the terminal:
matlab -noopengl
For further assistance, refer to these MathWorks Documentation links:
Thanks
Chetan
4 Comments
Ferdinando
on 18 Jun 2025
Thank you Walter for your kind reply. I knew that and I thought that by scrapping OpenGL Matlab had found a more clever way to work around graphic acceleration problems, which doesn't seem to be the case. That essentially means that people like me, running Ubuntu on Mac Pros (Ubuntu 22 has exactly the same problem) will be stuck with version R2024b for the foreseeable future, since there it seems to be no way to install AMD drivers (using the amdgpu-install utility and drivers from the AMD site) compatible with WebGL (whic requires graphic acceleration). This is obvioulsy not the ritght place to discuss issues related to how to fix the problem of AMD GPUs in Ubuntu, but people thinking to upgrade to R2025a should be warned about this issue.
Benjamin Kraus
on 18 Jun 2025
Edited: Benjamin Kraus
on 18 Jun 2025
@Ferdinando: Please contact technical support and let them know about the issues you are having with MATLAB R2025a and AMD GPUs on Ubuntu.
More Answers (0)
See Also
Categories
Find more on Graphics Performance in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!