MATLAB R2016b graphics bug (Linux)

3 views (last 30 days)
Balz Maag
Balz Maag on 2 Jun 2017
Answered: maxime ferez on 23 Sep 2019
Hey everyone,
I'm facing some weird graphics behaviour when I try to display variables or output variables to the command window. The GUI gets completely messed up, see the screenshot.
I'm using R2016b on Ubuntu 16.04. Opengl seems to work:
Version: '3.0 Mesa 12.0.6'
Vendor: 'Intel Open Source Technology Center'
Renderer: 'Mesa DRI Intel(R) Kabylake GT2 '
MaxTextureSize: 8192
Visual: 'Visual 0xe7, (RGBA 32 bits (8 8 8 8), Z depth 16 bits, Hardware acceleration, Doubl…'
Software: 'false'
HardwareSupportLevel: 'full'
SupportsGraphicsSmoothing: 1
SupportsDepthPeelTransparency: 1
SupportsAlignVertexCenters: 1
Extensions: {231×1 cell}
MaxFrameBufferSize: 8192
Does anyone have clue what the problem could be?
Thanks!

Answers (3)

Kushagr Gupta
Kushagr Gupta on 9 Jun 2017
Use Software OpenGL Instead
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 switch from hardware to software OpenGL, start MATLAB from the command prompt 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 line:
opengl('save','software')
Use OpenGL Compliant Graphics Hardware
For the best results with graphics, use graphics hardware that is compliant with OpenGL 2.1 or later. For more information about the graphics features that different versions of OpenGL support, see System Requirements for Graphics. 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.
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 Comments
Shannon
Shannon on 31 May 2018
I am also trying to use Matlab 2017a with Ubuntu 18.04 and the opengl version does not fix this.
rick_deckard
rick_deckard on 18 Jun 2018
I have the same issue, and terminal already reads "MATLAB is selecting SOFTWARE OPENGL rendering."
Matlab 2017a, debian stretch.

Sign in to comment.


maxime ferez
maxime ferez on 23 Sep 2019
hello everyone, I'm working on ubuntu 18.04.3 LTS and matlab R2017a. I have the same problem. Did someone find the solution to resolve this problem? Because I tried the different answers and it doesn't work
Thanks

Michael
Michael on 26 Jun 2018
This issue was discussed in another post. I had the issue, but was able to solve it. Set the following environment variables (change the XXX to the correct version installed). If it works, add these lines to your .bashrc script.
export J2D_D3D=false export MATLAB_JAVA=/usr/lib/jvm/java-XXX-openjdk/jre
  4 Comments
rick_deckard
rick_deckard on 8 Aug 2018
Michael, can you post a link to the previous discussion that you mention about? And also where did you learn about your fix method of adding that line to .bashrc script?
Michael Corbett
Michael Corbett on 9 Aug 2018
Here is the link .
In the fix, the "export" command is used, which I knew to be a command used in the .bashrc.

Sign in to comment.

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!