Matlab 2021a on Big Sur 11.3 Freeze

I am on M1, Big Sur 11.3 and 2021a. Using run from editor is really slow and often matlab freezes when I run the editor. In general, the editor is very very slow. I see the same thing on my intel mac too (2021a, Big Sur 11.2).
Any help regarding this would be greatly apreciated.
Thanks.

 Accepted Answer

Based on Walter Roberson's answer, making a new desktop alias to the MATLAB executable has worked for me so far:
  1. Open Terminal.
  2. Enter this command: open /Applications/MATLAB_R2021a.app/Contents/MacOS/
  3. In the folder that opened, control-click the MATLAB file and choose Make Alias.
  4. Drag the new alias to your desktop.
  5. From now on, to launch MATLAB, double-click your new alias.
My config:
macOS Big Sur
Version 11.5
Mac mini (M1, 2020)
Chip Apple M1
MATLAB R2021a, downloaded Aug 14, 2021

6 Comments

This helped for me, thank you! Still frustrating that this is necessary though. Hopefully Matlab fix this.
This solution has worked for me also
Matlab R2021b
Big Sur 11.6
MacBook Pro (Retina, 13-inch, Early 2015) 2.9 GHz Dual-Core Intel Core i5
Solves bad MATLAB 2021a and 2021b performance on my MacBook Pro 16" 2019 as well. Thank you very much!
This helps also on R2021b and 11.6.1 on a 2019 iMac. Thank you!
Thank you! This was driving me crazy. MATLAB R2021b wasn't exactly freezing on me but it was unusable. This is at least a band-aid on the problem.
Just updated to r2022b and this continues to be a problem (MATLAB extremely slow to the point of being unusable when opened using the Launcher). Was hoping they would have fixed this in the new version, but alas...

Sign in to comment.

More Answers (3)

From my understanding for you MATLAB is freezing on Big Sur 11.3. This might be due the simultaneous launching of MATLAB Editor at startup. These troubleshooting steps might help you to solve the issue.
1) Initiate MATLAB with -nodesktop flag
2) Run the commands:
>> s = settings;
>> s.matlab.editor.InitializeAtStartup.PersonalValue = 0;
3) Quit -nodesktop MATLAB and launch desktop MATLAB.

20 Comments

I tried it, but the editor still launches at startup. But even then, the editor launch was smooth. But the problem occurs when I run the code in editor. Thats when it slows down completely and takes a lot of time to run.
Same problem with 2020b in Big Sur 11.3 (but weirdly a lot less in 11.2 before updating). MATLAB runs smoothly. But as soon as I execute code, it becomes nearly unresponsive. Lasts for about 10-20 seconds, then snaps back to normal until I run code again.
Same problem here. I have Matlab 2021a in Big Sur 11.4. Code runs very slow, both in the command window and in the editor. The steps suggested above did not improve the situation.
Same problem after updating to Big Sur 11.4. Code takes ages to run because the processes sandboxd and spindump occupie the whole CPU after each command (on the M1 chip in my case) Even when simply directing to another folder in the editor.
I have exactly this same problem and still haven't found a solution. Matlab triggers sandboxd all the time and sometimes also spindump, making it lag and hang randomly.
I have the same issue. I first experienced the problem with R2019B + Big Sur 11.4. Matlab frooze for 3-4 minutes before it snapped back. I upgraded to R2021A (with Big Sur 11.4) earlier today. The problem still occurs every few minutes and matlab hangs for 1.5-2.5 minutes every times. It's practically impossible to make progress with my work. It seems to happen primarily when I do copy and paste in my m-file, but maybe that's just a coincidence since I spend most time in the editor. I have not seen it hang during the execution itself of an m-file.
I fully agree with Niklas Karlsson here, it is just impossible to keep working like that. I contacted customer support and they recommended me to provide full disk access to Matlab and to disable any apps with accessibility privileges. It did not work, after all I still have the same issue, exactly as described by Niklas. As a workaround I force quit sandboxd when Matlab hangs, solving the problem until the issue reappears. It is safe to do so, and I have not experienced any complications, except that it is super annoying to force quit sandboxd every single time, again and again every 4 or 5 minutes. I hope Matlab will solve the problem soon because independently of my love for Matlab my patience with this is honestly growing thinner : (
2021 A is a it better.I did a clean install of my OS on the computer and matlab did not freeze anymore after that. But it is still very slow. Especially editor tabs
Did the same as Siddharth Parida. That works, no sandbox/spindump issues anymore. Still slow editor tabs though, let's hope for a patch with the next update release.
There seem to be at lot of different discussion threads out there about this - been using matlab for 26 years and never had this sort of issue. It is infuriating. Brand new macpro with big sur and MATLAB 2021a is basically unusable. Mathworks have to sort this - licence costs a lot of money, and at the moment matlab is slower than a 1980s casio calculator ...
2021a on Big Sur 11.4, very slow too.
Seems like it takes forever for matlab to do a search, like confirm if a function exists, find the help popup of a funtion. I disable the autohelp when hangover mouse to reduce such search as much as possible but still end up with very slow reaction overall. I guess it might be related to accessing rights. Anything I can do to solve the problem? Thank you!
Same problem here. Not what I have come to expect from MathWorks products.
also same problem. even scrolling and typing in the editor window is sluggish
I'm having the same issue with 2021a on BigSur 11.4. This makes working a real pain. :( Even simple programms take minutes to execute. Is a fix already in sight? Sandboxd is running everytime I start a programm at 100% making my fans go off. I'd like to avoid having to do a fresh install. Thank you!
Experiment with launching matlab from Terminal not icon or dock
Thanks, Walter! That did the trick for me! So far sandboxd hasn't shown itself. I started MATLAB via the shell. You can find the start program under Applications/MATLAB_R2021a/Contents/MacOS/MATLAB. Good luck!
I had the exact same issue, not sure why, but this fixed it!
Sway
Sway on 1 Aug 2021
Edited: Sway on 4 Aug 2021
I'm expriencing teh same issues. I've been experienced the same issues with MATLAB_2021a, and now with MATLAB_2021b after updating. I have a brand new MacBook Pro M1 with 16GB.
This is issues is seriously debilitting. I can't get any work done.
Any news on a patch from Mathworks?
Problem for me happens when I create figures in my script and then click on the close button after the script is done. This is really debilitating.
@Daniel Lau same here. even when i want to just take a screenshot of figure, matlab stops responding. outrageous

Sign in to comment.

Hasan Beytur
Hasan Beytur on 19 Sep 2021
I updated to Big Sur 11.6 and Matlab 2021a Update 5 is running more stable than before.

2 Comments

I did the same and things seems to be okay.
I've got Big Sur 11.6 and just updated to r2022b and MATLAB is still slow to the point of being useless

Sign in to comment.

Categories

Find more on Graphics Performance in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!