MATLAB freezes up upon screen lock
Show older comments
When MATLAB is open on my Mac OSX 10.14.3 computer and I lock the screen then after some time I unlock the screen by logging back in and then find that MATLAB has frozen up. I need to kill the MATLAB process in order to restart and use MATLAB again.
9 Comments
Emilio Salazar Cardozo
on 12 Jul 2019
This seems to happen to me most repeatably when I'm connected to an external monitor, lock the screen and then close the laptop. On Mac OSX 10.14.5 and using Matlab R2019a.
Walter Roberson
on 12 Jul 2019
People have reported similar issues with Mac associated with closing a laptop resulting in Suspend. I think I have seen similar issues reported on Windows laptops that are suspended.
Yolande Serra
on 4 Nov 2020
I have the same issue. Matlab 2019b freezes when my MacBook Pro 2017 with Touchbar goes to sleep and Matlab is running on my 2nd LG Ultra HD display. It does not happen when Matlab is running on the MBP display and no other display is connected. Is Mathworks working on a solution? Hard to keep longer jobs running while working from home with this issue going on.
Weidong Lin
on 8 Jan 2021
This happens to me every time when I connect to an external display, does anyone find a solution to fix it?
Philippe
on 3 Oct 2021
Same problem with Matlab2021b and macos 11.6 !!
Older version of matlab does not lead to this problem.
Feng Cheng
on 27 Oct 2021
Edited: Feng Cheng
on 27 Oct 2021
R2018/2019/2020 all have same problem on macos 10 with dual monitors!!
geofo
on 24 Dec 2021
Same problem with a single external monitor, Matlab2021b on Mac Mini with M1 processor. Some solution?
Sean Kenny
on 9 Feb 2022
I've been having this problem for several years. I've reached out to Mathworks and have gotten very little assistance. In the past it was sporadic, but recently, it is happening nightly, which is super aggravating. I'm running R2020b Update 3, on macOS Big Sur ver 11.6.3. MacBook Pro (16 inch, 2019) running two external monitors.
Peter
on 12 Apr 2022
Same here. Given this issue is reported first at least 3 years ago, its unfortunate there is no solution yet.
Answers (1)
Sean Kenny
on 12 Apr 2022
1 vote
I don't know if this will help anyone else, but here's what I did to eliminate this issue. My collegue came up with this as a solution to another Matlab glitch.
I have two monitors connected (laptop closed). One monitor is direct connected via USB-C from the laptop. The second monitor is connected via HDMI using a CalDigit docking station. By running some monitor power off tests, I determined that there was a pattern associated with the matlab "freeze" events.
Monitor 1: directly connected through USB-C
Monitor 2: HDMI connected through docking station
Tests:
- Turn off Monitor 2– No crash (regardless which monitor is showing plot window & command windows )
- Turn off Monitor 1 - CRASH (Monitor 2 is showing plot & command windows)
- Turn off Monitor 1 - No crash ( Monitor 1 is showing plot & command windows)
Seeing this data, my collegue suggested that I change the "Arragement" of the monitor in the Macbook's setting. What I did was to make the HDMI monitor have the “menu bar”. This should be the monitor that the password dialog shows up on when it comes out of sleep mode. The menu bar is the draggable white bar in Settings->Displays->Arrangement.
Hope this helps!!
2 Comments
Peter
on 12 Apr 2022
Thanks Sean. Good diagnostics. However, rejiggering one's desktop every time you put your system to sleep may be nearly as cumbersome to some as having to kill/restart matlab because it froze. So it's a good workaround for some, but not the silver bullet for all. Hopefully your diagnostics give matlab developers some fodder that will help them solve this issue for real!
Sean Kenny
on 12 Apr 2022
Yes, this is something Mathworks should have fixed years ago. Regarding the "fix" I posted, as long as you keep your monitors on the same ports, I don't believe that you'll need to make additional changes to the menu bar. At least this has worked for me, but my system remains mostly stationary, so my use case may not be typical.
Categories
Find more on Startup and Shutdown 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!