Graphics glitch Ubuntu 17.04

When viewing a large vector/variable in the workspace the output looks like this. This problem have been consistent on multiple machines running both Ubuntu 16.04 and 17.04, with matlab R2016A, B and 2017A. I have tried the answers from here without any luck (it seemed I was already using a properitary driver). Switching between OpenGL software, hardware and hardwarebasic didn't solve the problem.
Anyone with a solution out there?

3 Comments

Setting the JVM to oracle JRE solved the problem for me. Other versions did not work.
export MATLAB_JAVA=/usr/lib/jvm/java-8-oracle/jre
If you are launching from terminal, add the line to your bashrc, if you have a matlab.desktop file, add sh -c "export MATLAB_JAVA=/usr/lib/jvm/java-8-oracle/jre; matlab -desktop;" in the exec field.
Same issue on Ubuntu 16.04 with R2016b. Your solution works for me. Thanks a lot!
The only difference is that I am using Java openjdk from the offical ubuntu repositories instead of Java-8-oracle.
I did the following:
First
sudo apt-get install default-jdk
Second, I added the line
Exec=sh -c "export MATLAB_JAVA=/usr/lib/jvm/java-8-openjdk-amd64/jre; /usr/local/MATLAB/R2016b/bin/matlab -desktop;"
to my MATLAB.desktop file.
chr
chr on 1 Apr 2019
Edited: chr on 1 Apr 2019
I have a similar issue with Ubuntu 18.04 and MATLAB R2016b. When reporting it to Mathworks they suggested reducing the size of the scroll buffer, and suggested I might look at this issue.
These are my notes on how it went, I think I did manage a workaround.
Previously installed Java: I don't think I had manually installed any previous Java. I guess I'm using the Java that came with the MATLAB installation. Checking the output of 'javaclasspath' gives e.g.: /usr/local/MATLAB/R2016b/java/patch
I then installed java as per above, i.e. using:
sudo apt-get install default-jdk
Note: Just starting MATLAB results in the same 'javaclasspath' as before, so it doesn't pick up the Java installation by default.
Using the installed Java (Java 11): Installing the default JDK results in Java 11 rather than Java 8. There's no corresponding 'jre/'-folder at '/usr/lib/jvm/java-11-opendjdk-amd64/jre', so it didn't work to e.g. start MATLAB using:
export MATLAB_JAVA=/usr/lib/jvm/java-11-openjdk-amd64/bin; /usr/local/MATLAB/R2016b/bin/matlab
MATLAB complains about not finding
/usr/lib/jvm/java-11-openjdk-amd64/bin/lib/amd64/server/libjvm.so
which is installed at
/usr/lib/jvm/java-11-openjdk-amd64/lib/server/libjvm.so
It's a problem that MATLAB assumes it should add '/amd64/server/' when there's no 'amd64/' folder in the Java 11 installation.
It might be possible to work around this by e.g. adding a soft link in the installation folder.
However, to move on I did:
sudo apt install openjdk-8-jre
The MATLAB desktop IDE now starts using this command
export MATLAB_JAVA=/usr/lib/jvm/java-8-openjdk-amd64/jre; /usr/local/MATLAB/R2016b/bin/matlab
Albeit with the following error message:
PostVMInit failed to initialize com.mathworks.mwswing.MJStartupForDesktop
The desktop configuration was not saved successfully
Anyway, doing a very quick test,
disp( (1:10000)' )
indicates that the graphics is working better now.

Sign in to comment.

Answers (0)

Categories

Products

Asked:

on 20 Sep 2017

Edited:

chr
on 1 Apr 2019

Community Treasure Hunt

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

Start Hunting!