Matlab editor sluggish on Linux

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 个评论

I have tried that and the other one you linked in the comments there too (https://uk.mathworks.com/matlabcentral/answers/429959-typing-in-the-live-editor-is-slow-on-linux)
Neither seem to change anything unfortunately.
I have this same issue on 2021b with Ubuntu 21.10. MATLAB 21a's text editor is very snappy for all of my code. 21b is so bad I've gone to editing code in vi. The MATLAB editor has random lag even with things like moving the cursor using arrow keys. I'm not a fast typist, but I'm frequently way ahead of the text showing up on the screen.
And agreed... it's even on small files. I found the same results you did where on older versions with large files, it was sluggish. This is just always sluggish.
Same issue with Ubuntu 22.04.
I have the same issue with R2022a and Ubuntu 20.04. Typing in the command window is fine but typing in the Editor is inconvenient, i.e. very slow respond to typing and scrolling. For the moment I will switch back to an older Matlab version.
I can confirm. R2022a editor on ubuntu linux is slow responding and not usable.
I am having the same issue. The R2022a editor is obmixiously slow on my Ubuntu machine
I'm also having this issue. I'll probably move back to r2021a unless this is resolved.
It feels like using dial up internet.
I am having the same issue with Ubuntu 20.04 and MATLAB R2022a.
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.
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.

请先登录,再进行评论。

回答(1 个)

ma os
ma os 2022-7-15
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 个评论

Sublime-text is faster and works with Matlab.
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.

请先登录,再进行评论。

类别

帮助中心File Exchange 中查找有关 Startup and Shutdown 的更多信息

产品

版本

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by