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 Kommentare

Mikhail
Mikhail am 4 Dez. 2021
Although it didn't fix the problem for me, some people reported it has helped them.
Max Riddings
Max Riddings am 4 Dez. 2021
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.
Jared
Jared am 2 Feb. 2022
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.
Raphaël Candelier
Raphaël Candelier am 14 Feb. 2022
Same issue with Ubuntu 22.04.
ma os
ma os am 4 Apr. 2022
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.
Dominik
Dominik am 7 Apr. 2022
I can confirm. R2022a editor on ubuntu linux is slow responding and not usable.
Federico Targa
Federico Targa am 8 Mai 2022
I am having the same issue. The R2022a editor is obmixiously slow on my Ubuntu machine
Matthew Robinson
Matthew Robinson am 10 Jun. 2022
I'm also having this issue. I'll probably move back to r2021a unless this is resolved.
It feels like using dial up internet.
Eduardo Salazar Hidalgo
Eduardo Salazar Hidalgo am 14 Nov. 2022
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.
Frank Niessen
Frank Niessen am 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.

Melden Sie sich an, um zu kommentieren.

Antworten (1)

ma os
ma os am 15 Jul. 2022

0 Stimmen

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 Kommentare

Claudio Iturra
Claudio Iturra am 27 Mär. 2023
Sublime-text is faster and works with Matlab.
Rik
Rik am 28 Mär. 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.

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Startup and Shutdown finden Sie in Hilfe-Center und File Exchange

Produkte

Version

R2021b

Gefragt:

am 3 Dez. 2021

Kommentiert:

am 27 Jun. 2023

Community Treasure Hunt

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

Start Hunting!

Translated by