Typing in the live editor is slow on Linux

I just installed MATLAB R2018b on Linux Mint 19. I am used to using it on Windows, where the Live Editor works great.
On Linux however, there is a very annoying latency when typing. Whether it's in a text area or code block, there is maybe ~0.25s between the time I type and when something happens on screen. I tried disabling the Datatips, which didn't help.
What's going on, and is there any way to fix this? I am running on a fast computer, so performance should not be an issue.

댓글 수: 10

Antonio Sala
Antonio Sala 2019년 2월 8일
You are not alone... sluggish mlx execution and the editor latency you refer to, in my brand new i9-9900k with Ubuntu 18.10. A Windows-10 PC i5 with R2017a does not have such latency.
Related posts:
Mika Mäki
Mika Mäki 2019년 3월 11일
편집: Mika Mäki 2019년 5월 8일
Confirmed on two computers running Kubuntu 18.04 with freshly installed MATLAB R2018b. As a result of the typing latency, the live editor is nearly unusable. This is especially annoying since our university currently has a course where all the answers must be submitted as live editor files (.mlx), and no other file formats are allowed.
The latency has been confirmed on the following hardware
  • Core i7-930, GTX 760, 24 GB RAM
  • Core i7-3517U, integrated graphics, 8 GB RAM
Edit: the bug is still present in R2019a and affects Kubuntu 19.04 as well.
Mikhail
Mikhail 2019년 4월 2일
This is a not really helpfull comment, but "me too".
There are two painful points in MATLAB on Linux: the Help Browser, which is slow to the point of inusability (I prefer online Help) and the Live Editor (to the point that I avoid using it by all means).
Viktor Marinkov
Viktor Marinkov 2019년 5월 3일
이동: Walter Roberson 2025년 3월 17일
I also confirm very laggy behaviour on Matlab 2018b and Ubuntu 19.04. Has there been any workaround?
Antonio Sala
Antonio Sala 2019년 5월 20일
이동: Walter Roberson 2025년 3월 17일
Well, I just installed Update 2 and the problem seems still present on my Ubuntu 19.04 machine. Are you, Mikhail, on Linux?
Kevin Cutler
Kevin Cutler 2019년 6월 5일
편집: Kevin Cutler 2019년 6월 5일
Same, I hope this is solved soon. I'm on 18.04 running R2019a, and it is terribly slow.
sdkfjqsdkmfj mmkjmkjml
sdkfjqsdkmfj mmkjmkjml 2019년 10월 11일
이동: Walter Roberson 2025년 3월 17일
Same here, with Matlab R2017a under Linux Mint 19 on my Dell Laptop. This is absolutely horrible, so laggy that I cannot even use MATLAB, this worked so well under an older Linux Mint, I'm running crazy.
That's a shame, please fix ! I will not buy Matlab 2019 and install kernel 5.x (Linux Mint is stil on 4.x) just because of Mathworks devs !!
Thx.
PS : any community workaround would appreciated.
Mikhail
Mikhail 2019년 10월 14일
이동: Walter Roberson 2025년 3월 17일
Even though Linux Mint is still on kernel 4.x, you can install a newer kernel (you need at least 5.2) using "Ukuu" utility. More info here: https://www.omgubuntu.co.uk/2017/02/ukuu-easy-way-to-install-mainline-kernel-ubuntu
Panya Sukphranee
Panya Sukphranee 2020년 7월 15일
이동: Walter Roberson 2025년 3월 17일
The issue seems to be with some package conflicts in Linux. My Liveeditor was running smoothly until I installed some MP4 codecs for screen recording. The entire Liveeditor is extremely slow to render.
Oliver
Oliver 2025년 3월 17일
I have the exat same issue as you Mikhail, and I am running R2024b on opensuse in 2025, have you found a potential fix? (I know this post is old, but I have been searching for a solution for months)

댓글을 달려면 로그인하십시오.

답변 (5개)

Mikhail
Mikhail 2021년 10월 21일

5 개 추천

MATLAB R2021b now uses the same technology for regular scripts and files, not just Live Scripts. Now all editing/scrolling is painfully slow, not just in Live Editor.

댓글 수: 3

This answer workd for me (R2021b // Debian Bullseye) :
$ matlab -cefdisablegpu
Mikhail
Mikhail 2021년 12월 27일
I've noticed that the situation becomes much better when i change screen resolution from HiDPI (which is native for my display) to e.g. 1920x1080.
Can somebody who still experience with problem confirm they are using HiDPI display?
Mikhail
Mikhail 2021년 12월 27일
In fact, simply resizing the documentation browser window four times makes it work much smoother.

댓글을 달려면 로그인하십시오.

Mikhail
Mikhail 2019년 5월 20일

3 개 추천

No way!
MathWorks have fixed this in R2019a Update 2.
Not only Live Editor now works fine, but also Help Browser runs very smooth.

댓글 수: 12

Mikhail
Mikhail 2019년 5월 21일
편집: Mikhail 2019년 5월 21일
Ok, it is related to one of the system updates (libraries or drivers, not MATLAB Update), because R2018b now also works flawlessly.
I'll investigate.
Mikhail
Mikhail 2019년 5월 21일
I was able to narrow it down to this specific kernel update: upgraded linux (5.0.13.arch1-1 -> 5.1.2.arch1-1).
This is really strange that kernel has to do with it. But I'm sure this is really it, since I've reproduced the problem (or rather disappearance of the problem) with this specific atomic kernel package upgrade.
I'm running Arch Linux, but I'm sure you can try the 5.1 kernel with Ubuntu and see how it works.
Josh G.
Josh G. 2019년 5월 21일
Can you post your kernel configuration for both kernels? It would be useful to try to narrow down whether this was fixed by a change in configuration or some difference between the 5.0 and 5.1 kernels. I'm running Fedora 30 with Linux 5.0.16 and am still seeing lag in the live editor on R2019a update 2 (I can type six letters before one shows up on screen).
Mikhail
Mikhail 2019년 5월 21일
편집: Mikhail 2019년 5월 21일
You can find configurations for both kernels here: https://git.archlinux.org/svntogit/packages.git/log/trunk?h=packages/linux
It will be hard to pin point which configuration option might have caused this. There were a lot of changes: https://git.archlinux.org/svntogit/packages.git/commit/trunk?h=packages/linux&id=d706a3e8a2deddc677303b029c5df81378948f75
Johan Thor
Johan Thor 2019년 7월 1일
Hi, I can confirm that upgrading Ubuntu 18.04 from kernel 4.x to v5.1.15 (I did so through the UKUU-tool available via apt) solved this problem for me. Running Matlab 2019a.
Thanks a lot Mikhail for pointing me in this direction!
Kevin Cutler
Kevin Cutler 2019년 7월 1일
Thank you for posting this fix - linux v5.1.15 on Ubuntu 18.04 and MATLAB R2019a (update 3) work for me. Very glad to have this fixed!
John Goulet
John Goulet 2019년 7월 9일
Fixed using Linux v5.1.16 on Ubuntu 18.04 and MATLAB R2019a update 3.
Mikhail
Mikhail 2019년 7월 12일
With Linux 5.2 kernel Help Browser and Live Editor work fine, too.
LeChat
LeChat 2019년 8월 13일
Linux 19.10 Kernel 5.2 Matlab R2019a update4:
the Live Script editor seems fo be much more fluid (~90% compared to the reactivity of any other typing window, like what I am currently writing). Not perfect, but at least much more usable :)
Mikhail
Mikhail 2021년 10월 21일
Oh god, I even forgotten that I found this kernel version dependency.
Things have changes since then. On one system, MATLAB R2021a works fine, while MATLAB R2021b works absolutely horribly! This still might have to do with the kernel, though. I've tried running MATLAB in Debian-based chroot (like I described in https://wiki.archlinux.org/title/MATLAB#MATLAB_in_a_systemd-nspawn), but even in a supposedly supported distribution MATLAB is still slow. It might be a kernel issue, because systemd-nspawn still uses host's kernel (i.e. the one from Arch), even though the whole userland is debian's
Mikhail
Mikhail 2021년 10월 21일
편집: Mikhail 2021년 10월 21일
I can tell that I've tried both linux-5.14 and linux-5.10. MATLAB R2021a works fine, R2021b works horribly in both cases.
I could try to fire up Debian's kernel here, but ffs, there is no guarantee it will work and that it is kernel that is a problem. It's easier to run MATLAB in a Windows VM - where it probably belongs anyway (and works way faster than in host Linux).
Felix
Felix 2021년 11월 1일
I can confirm the same experience: The Matlab R2021a editor works just fine, while with R2021b it became very slow.
In R2021b, for any action in the editor (press page down, or move cursor, or scroll with mouse wheel, etc), I get a lag of about 300 ms if the system is idle, and a good 2 seconds if I use a few cores in other processes (say 3 out of 16, so still plenty of free resources, and all other programs work fine). It's impossible to use the editor this way.
System runs Ubuntu 20.04, Linux kernel version is 5.11.

댓글을 달려면 로그인하십시오.

Hiroyuki Oya
Hiroyuki Oya 2022년 5월 20일

1 개 추천

Slow matlab edior problm is confirmed on my Ubuntu 22 machine.
R2021a does not have such lagging editor issue.
R2021b and R2022a has slow editor problem. I am going back to R2021a.
LeChat
LeChat 2019년 8월 13일

0 개 추천

I found a work around for Mac a couple years ago (here), by installing Matlab kernel into Jupyther. Check references therein for Linux and Windows.
Antonio Sala
Antonio Sala 2019년 10월 12일

0 개 추천

The problem seems to be solved in R2019b... at least it does work for me on Ubuntu 19.04 and 10.10 with that release. They didn't seem to announce it (or I am not aware of it) but the issue seems no longer present in my case.

댓글 수: 3

Johan Thor
Johan Thor 2019년 10월 12일
Ubuntu 19.04 seems to have kernel 5.0, so according to the above solution, that could also be the solution in your case. One needs to try 2019b with a kernel < 5 to see if Mathworks has addressed the issue or not.
Johan Thor
Johan Thor 2019년 10월 13일
I have now rebooted into a series 4-kernel (4.15.0-65 on Ubuntu to be specific) and on this configuration, Matlab 2019b seems to solve this issue, Antonio said above. Live editor works just as on kernel version 5.
sdkfjqsdkmfj mmkjmkjml
sdkfjqsdkmfj mmkjmkjml 2019년 10월 13일
편집: sdkfjqsdkmfj mmkjmkjml 2019년 10월 13일
Well, so Mathworks will alllow me to move to Matlab R2019b for FREE, right, as I can no longuer use the release I b-o-u-g-h-t ?
If not, I would like a FIX for this issue, that's a f*** shame.

댓글을 달려면 로그인하십시오.

카테고리

도움말 센터File Exchange에서 Startup and Shutdown에 대해 자세히 알아보기

제품

릴리스

R2018b

질문:

2018년 11월 15일

이동:

2025년 3월 17일

Community Treasure Hunt

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

Start Hunting!

Translated by