gpt4 book ai didi

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

转载 作者:行者123 更新时间:2023-12-04 15:18:24 41 4
gpt4 key购买 nike

将我的操作系统升级到 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='export GTK_PATH=/usr/lib/x86_64-linux-gnu/gtk-2.0;导出 MESA_LOADER_DRIVER_OVERRIDE = i965;/usr/local/MATLAB/R2020b/bin/matlab'

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

matlab

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

更多请看这里: https://www.mathworks.com/matlabcentral/answers/342906-could-not-initialize-shared-resources-for-x11graphicsdevice#answer_270207

关于升级到 ubuntu 20.4 后的 Matlab opengl 软件渲染 - 低级图形问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/63885278/

41 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com