Matlab opengl软件渲染后升级到ubuntu 20.4-底层图形问题



在我将操作系统升级到ubuntu 20.04后,我在matlab渲染方面遇到了问题。当我打开程序时,我会收到以下消息:

MATLAB is selecting SOFTWARE OPENGL rendering.
Gtk-Message: 14:38:28.776: Failed to load module "canberra-gtk-module"

程序运行正常,但在绘图时崩溃(当我说崩溃时,我的意思是一切都关闭了,没有给我错误消息(。

我读了很多关于这个问题的文章,并试图遵循其他用户的建议,但没有成功:

我试图从带有标志的终端打开matlab:

matlab -nosoftwareopengl

这给了我终端中的以下错误

libGL error: MESA-LOADER: failed to open iris (search paths /usr/lib/x86_64-linux-gnu/dri:$${ORIGIN}/dri:/usr/lib/dri)
libGL error: failed to load driver: iris
libGL error: MESA-LOADER: failed to open iris (search paths /usr/lib/x86_64-linux-gnu/dri:$${ORIGIN}/dri:/usr/lib/dri)
libGL error: failed to load driver: iris
libGL error: MESA-LOADER: failed to open swrast (search paths /usr/lib/x86_64-linux-gnu/dri:$${ORIGIN}/dri:/usr/lib/dri)
libGL error: failed to load driver: swrast

以及在Matlab:中

MATLAB has experienced a low-level graphics error, and may not have drawn correctly.
Read about what you can do to prevent this issue at Resolving Low-Level Graphics Issues then restart MATLAB.
To share details of this issue with MathWorks technical support,
please include this file with your service request.
Couldn't create JOGL canvas--using painters
Couldn't create JOGL canvas--using painters
Couldn't create JOGL canvas--using painters
Couldn't create JOGL canvas--using painters

解决低级图形问题的建议包括将opengl设置为"软件",这让我回到了最初的问题。

另一个建议是升级我的图形硬件驱动程序,但既然我刚刚升级了我的Ubuntu,他们不应该在这个过程中升级吗?

我真不敢相信我已经花了这么多时间在这上面了,所以我们非常感谢任何帮助!

问候,

转到/home/user/.bashrc并添加此行:

alias matlab='导出GTK_PATH=/usr/lib/x86_64-linux-gnu/GTK-2.0;导出MESA_LOADER_DRIVER_OVERRIDE=i965/usr/local/MATLAB/R220b/bin/tablab'

保存并打开一个新的终端窗口,然后执行

matlab

看看它是否有效。您可能需要在最后一部分更改您的matlab版本,您可以在matlab终端中使用matlabroot进行检查。

有关更多信息,请查看此处:https://www.mathworks.com/matlabcentral/answers/342906-could-not-initialize-shared-resources-for-x11graphicsdevice#answer_270207

最新更新