Why does MATLAB crash when plotting in Linux with Nvidia drivers?
조회 수: 7 (최근 30일)
이전 댓글 표시
MathWorks Support Team
2017년 7월 27일
편집: MathWorks Support Team
2023년 12월 8일
MATLAB crashes when I try creating plots with the crash log below. Why is this happening?
Stack Trace (from fault):
[ 0] 0x00007f9b156558fa /usr/lib64/libstdc++.so.6+00686330 _ZSt28_Rb_tree_rebalance_for_erasePSt18_Rb_tree_node_baseRS_+00000474
[ 1] 0x00007f98ec185ca4 /opt/matlab/R2016b/bin/glnxa64/libmwosgserver.so+02296996
[ 2] 0x00007f98ee7b6f6c /opt/matlab/R2016b/bin/glnxa64/libmwhandle_graphics.so+21462892 _ZN2hg16CompositeCommand7executeEPNS_23CommandExecutionContextE+00000044
[ 3] 0x00007f98ec1905e1 /opt/matlab/R2016b/bin/glnxa64/libmwosgserver.so+02340321 _ZN2hg19OsgSceneServerProxy14executeCommandEiPNS_7CommandE+00000033
[ 4] 0x00007f9abcce212e /opt/matlab/R2016b/bin/glnxa64/libnativehg.so+00045358 Java_com_mathworks_hg_peer_JavaSceneServerPeer_doExecuteCommand+00000030
[ 5] 0x00007f9ad79bdd98 <unknown-module>+00000000
[ 6] 0x00007f9ad79b1058 <unknown-module>+00000000
[ 7] 0x00007f9ad79b1706 <unknown-module>+00000000
[ 8] 0x00007f9ad7fa4224 <unknown-module>+00000000
채택된 답변
MathWorks Support Team
2023년 12월 7일
편집: MathWorks Support Team
2023년 12월 8일
This crash is caused by a bug in the NVIDIA Linux drivers.
NVIDIA is reporting and we have confirmed that the crash is addressed starting in version 390.67 of NVIDIA's long-lived driver branch and it is also addressed starting in version 396.24 of NVIDIA's short-lived driver branch.
In order to address the crashes, consider the following two workarounds:
1. Download and install the most recent graphics driver for your graphics card.
The 396.24 driver release can be found here:
https://www.nvidia.com/Download/driverResults.aspx/133859/
The 390.67 driver release can be found here:
https://www.nvidia.com/Download/driverResults.aspx/134859/
Please note that these two driver releases above may not be the most recent, but they should be sufficient for resolving this crash.
2. Consider starting MATLAB with the "-softwareopengl" flag in the command line. See the documentation page below for further details:
https://www.mathworks.com/help/matlab/ref/opengl.html
댓글 수: 2
LeChat
2018년 6월 6일
편집: MathWorks Support Team
2021년 6월 24일
Should we update to this version:
or this one:
which seems more recent (I updated last week to the v390.59 which just came out but the issue persisted...)?
LeChat
2019년 5월 1일
FYI, in case an update of your Linux is causing weird issues, I would recommand to remove the GPU driver (I have an Nvidia) and reinstall it from scratch. Here are the commands I recently used when I switched to Ubuntu 19.04 (from Ubunut 18.10):
sudo apt purge --autoremove '*nvidia*'
sudo apt-get update
sudo apt-get upgrade
ubuntu-drivers devices
nvidia-settings
sudo apt install nvidia-settings
sudo reboot
Hope this helps.
추가 답변 (1개)
LeChat
2018년 6월 6일
편집: MathWorks Support Team
2021년 5월 19일
As previously said, this crash is caused by the Linux Nvidia driver. As a general rule, update the driver of your Nvidia GPU to late version (see https://www.nvidia.com/Download/index.aspx?lang=en-us).
A workaround option is to use opengl, which you can do by opening Matlab using the following command in the Terminal:
matlab -softwareopengl
If you want to use this "workaround option" on a more durable basis, you can save the following in Matlab command window:
opengl('save','software')
so you do not need the "-softwareopengl" flag everytime you open Matlab.
To switch back to the "normal mode", which would be to use the Nvidia driver, then do:
opengl('save','hardware')
Hope this helps.
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Introduction to Installation and Licensing에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!