Matlab editor sluggish on Linux

65 views (last 30 days)
Max Riddings
Max Riddings on 3 Dec 2021
Commented: Frank Niessen on 27 Jun 2023
I have recently installed MATLAB 2021b on Ubuntu 20.04 and the editor seems to be very sluggish (slow text highlighting/typing etc.). I have tried reinstalling multiple times which does not seem to fix it. I have also tried installing 2021a which does seem to work fine but I need some of the new 2021b functions for the project I am working on.
Looking at other threads, people have had similar issues but theirs seem to be dependant on the size of the project which is not the case here as my .m file is only 10 lines. On those threads they have suggested kernel or package incompatabilites but I have no idea how to debug those sorts of issues as I am relatively new to linux. I have also tried out all of the fixes that they suggest, none of which have worked. Is there any way I can debug this/figure out what is causing it as it makes using 2021b very difficult?
  11 Comments
Brandon Caasenbrood
Brandon Caasenbrood on 23 Mar 2023
I found a possible solution that seems to improve the sluggish editor from Matlab R2022 and on. (tested on R2023a/R2022a). Navigate to MATLAB startup directory. For example
cd /usr/local/MATLAB/R2023a/bin/glnxa64
create and open a file called java.opts
sudo nano java.opts
add following line:
-Dsun.java2d.pmoffscreen=false
Save and exit, reboot matlab.
Frank Niessen
Frank Niessen on 27 Jun 2023
Having the same issue here for 2022b and 2023a - none of the suggested fixes work.
This is quite embarrasing for MATLAB - great way to give up on the developer community and accelerate the move to Python. I am going back to R2020b for the things I have left to do in MATLAB.

Sign in to comment.

Answers (1)

ma os
ma os on 15 Jul 2022
I can't offer a real solution to the problem. After some testing on different environments, I can at least somewhat confine the problem and provide some helpful information. I found that the sluggish editor behaviour exists for:
  • when MATLAB is launched via "ssh -X" on an external server (I tested Ubuntu 20.04 as well as Red Hat Enterprise Linux Server 7.9)
  • and only for releases R2021b and R2022a, in older versions the issue has not occured in my case
Workarounds are to avoid "ssh -X" by using MATLAB directly, i.e. not via remote access, or e.g. via VNC.
Another option might be to use R2021a or earlier.
I have also contacted the MathWorks Technical Support Department and am very grateful for their kind assistance. Unfortunately, no solution is currently available, but they are working on fixing the problem in a future release.
  2 Comments
Claudio Iturra
Claudio Iturra on 27 Mar 2023
Sublime-text is faster and works with Matlab.
Rik
Rik on 28 Mar 2023
Comment posted as flag by @ma os:
This comment is not helpful. Using an alternative editor does not help to resolve the sluggish behavior of MATLAB's editor.

Sign in to comment.

Categories

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

Products


Release

R2021b

Community Treasure Hunt

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

Start Hunting!