首页 > 其他分享 >matlab 2024a 在只有核显的机器上opengl报错的问题 X11GLXDrawableFactory

matlab 2024a 在只有核显的机器上opengl报错的问题 X11GLXDrawableFactory

时间:2024-06-02 17:57:40浏览次数:24  
标签:java opengl 核显 x11 jogamp 报错 X11GLXDrawableFactory GLContextImpl

com.jogamp.opengl.GLException: X11GLXDrawableFactory - Could not initialize shared resources for X11GraphicsDevice[type .x11, connection :0, unitID 0, handle 0x0, owner false, ResourceToolkitLock[obj 0x37e10dfd, isOwner false, <4dd74231, 25b2e611>[count 0, qsz 0, owner <NULL>]]]
  at jogamp.opengl.x11.glx.X11GLXDrawableFactory$SharedResourceImplementation.createSharedResource(X11GLXDrawableFactory.java:326)
  at jogamp.opengl.SharedResourceRunner.run(SharedResourceRunner.java:297)
  at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.NullPointerException
  at jogamp.opengl.GLContextImpl.makeCurrent(GLContextImpl.java:688)
  at jogamp.opengl.GLContextImpl.makeCurrent(GLContextImpl.java:580)
  at jogamp.opengl.x11.glx.X11GLXDrawableFactory$SharedResourceImplementation.createSharedResource(X11GLXDrawableFactory.java:297)
  ... 2 more

解决办法如下:
I also ran into this issue on my Dell XPS 13 9360 which neither has a NVIDIA or AMD card, but an on-board intel graphics card.
I filed a bug report with MATHWORKS and they proposed two solutions:
Create a file with the name 'java.opts' in the directory where MATLAB is executed (for me this is in '/usr/local/MATLAB/R2020a/bin/glnxa64') with the following line: -Djogl.disable.openglarbcontext=1
If this does not work, then the above solution using export MESA_LOADER_DRIVER_OVERRIDE=i965 is working.
For me both solve my issue.

参考文献:
https://www.cnblogs.com/zbqhc/p/13935817.html

     

标签:java,opengl,核显,x11,jogamp,报错,X11GLXDrawableFactory,GLContextImpl
From: https://www.cnblogs.com/guochaoxxl/p/18227402

相关文章