Resolving low-level graphics issues in MATLAB

346 visualizaciones (últimos 30 días)
MathWorks Support Team
MathWorks Support Team el 27 de Ag. de 2014
Editada: MathWorks Support Team el 4 de Mzo. de 2024 a las 22:13
This post is a summary about how to resolve graphics issues which could potentially be caused due to old graphics hardware or outdated graphics drivers.
These issues could occur while creating 2-D or 3-D charts, using a Simulink model that contains scopes, or using GUIs from a MathWorks toolbox.
The steps mentioned in this article serve as debugging steps, as well as potential solutions for graphics-related issues, and should be tried out when experiencing unexpected behavior.

Respuesta aceptada

MathWorks Support Team
MathWorks Support Team el 4 de Mzo. de 2024 a las 0:00
Editada: MathWorks Support Team el 4 de Mzo. de 2024 a las 22:13
1) Use Software OpenGL Instead (Windows and Linux Only)
You can work around many graphics issues by using the software version of OpenGL built into MATLAB instead of using your graphics hardware. In some cases, MATLAB automatically switches to software OpenGL, for example, if it detects known issues such as outdated drivers or graphics virtualization. Software OpenGL does not support some graphics features, such as graphics smoothing.
To determine if you are using hardware or software OpenGL, type:
>> opengl info
The returned information contains the line:
  • "Software: 'false'" if you are using hardware OpenGL, or
  • "Software: 'true'" if you are using software OpenGL.
To switch from hardware to software OpenGL, start MATLAB from the command prompt or terminal on your system using this command:
matlab -softwareopengl
To set your preferences so that MATLAB always starts with software OpenGL on this computer, execute this command at the MATLAB Command Window:
>> opengl('save','software')
These commands work only on Windows and Linux systems. Macintosh systems do not support software OpenGL.
 
2) Use OpenGL Compliant Graphics Hardware
For the best results with graphics, use graphics hardware that is compliant with OpenGL 3.3 or later. For more information about the graphics features that different versions of OpenGL support, see the System Requirements for Graphics:
3) Upgrade Your Graphics Hardware Drivers
Graphics hardware vendors frequently provide updated graphics drivers that improve hardware performance. To help ensure that your graphics hardware works with MATLAB, upgrade your graphics drivers to the latest versions available.
Check your computer manufacturer website for driver updates, for example, Dell or HP. If no updates are provided, then check your graphics hardware vendor website, such as one of the vendors listed below (AMD, NVidia and Intel, respectively):
To determine your vendor, type
>> opengl info
and check the "Vendor" field.
Alternatively, you may be able to check your driver vendor and versions outside of MATLAB. On Windows systems, enter "dxdiag" into the Command Prompt, and look at the "Display" tab. Certain Linux distributions will allow you to use "glxinfo" in the Terminal to see OpenGL and driver information.
If you saved a setting to always start MATLAB with software OpenGL, then after updating your drivers, you can revert that setting by executing:
>> opengl('save','hardware')
Then restart MATLAB.
4) Uninstall and Reinstall the Graphics Drivers
Some low-level graphics issues are directly related incomplete/unproper video driver installations (causing failures with the DKMS compilation in Linux, for example). A full driver reinstall can correct the issue.
5) Update Computer to Latest Version
Some low-level graphics issues are directly related to outdated machine versions. Check to see if there is an update available for your machine and update to that version.
6) Contact Technical Support
If you cannot resolve the issues using the options described here, then you might have encountered a bug in MATLAB. Please contact MathWorks Technical Support at
and provide the following information:
  • Output of executing "opengl info"
  • Whether your code runs without error when using software OpenGL.
  • Whether your code runs without error on a different computer. Please provide the output of "opengl info" for all computers you have tested your code on.
  • Some error messages contain a link to a file with details about the graphics error you encountered. If a link to this file is provided, please include this file with your service request.
  • The full text of the error that appears. If a crash occurs, please provide the crash report generated by MATLAB. You can follow the steps below to locate the crash report:
  2 comentarios
Willi Mutschler
Willi Mutschler el 12 de Abr. de 2020
Hi,
I am on Ubuntu 20.04 beta and running the nvidia on-demand prime profile, and get the same error. I can solve this (see the Archwiki) by starting matlab from terminal:
export MESA_LOADER_DRIVER_OVERRIDE=i965; matlab
Or (additionaly) you can change the EXEC in /usr/share/applications/matlab.desktop to:
Exec=env MESA_LOADER_DRIVER_OVERRIDE=i965 matlab -desktop
Stefanie Schwarz
Stefanie Schwarz el 24 de Mzo. de 2021
If you cannot resolve the issues using the options described here, please contact MathWorks Technical Support.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Graphics Performance en Help Center y File Exchange.

Productos


Versión

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by