Matlab 2024b on Linux with Intel Meteor Lake and Iris graphics: jogamp.opengl.x11.glx.X11GLXDrawableFactory
조회 수: 40 (최근 30일)
이전 댓글 표시
Starting Matlab 2024b on Linux with a recent Intel Meteor Lake, Iris graphics and Wayland gives the following error
com.jogamp.opengl.GLException: X11GLXDrawableFactory - Could not initialize shared resources for X11GraphicsDevice[type .x11, connection :0, unitID 0, handle 0x0, owner false, ResourceToolkitLock[obj 0x4814c5f, isOwner false, <648eebc0, 5d2fa144>[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)
I already read the following related posts:
- OpenGL Rendering in Matlab R2024b on Ubuntu LTS 24.04 fails: com.jogamp.opengl.GLException: X11GLXDrawableFactory - Could not initialize shared resources for ...
- Error displayed when starting MATLAB on Linux systems using NVIDIA OR AMD graphics hardware
- When launching matlab I get the following error: MESA-LOADER: failed to open iris:
and tried the following steps without success
- adding -Djogl.disable.openglarbcontext=true to ~/java.opts
- linking /usr/local/MATLAB/R2024b/sys/os/glnxa64/libstdc++.so.6 to my system's libstdc++.so.6.32
- starting Matlab with "export MESA_LOADER_DRIVER_OVERRIDE=iris; matlab"
If I run "rendererinfo" in Matlab after a normal start, I get
>> rendererinfo
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.
ans = struct with fields:
GraphicsRenderer: 'OpenGL Hardware'
Vendor: ''
Version: ''
RendererDevice: 'None'
Details: [1×1 struct]
Surprisingly, if I start Matlab with "export MESA_LOADER_DRIVER_OVERRIDE=i965; matlab", I get "MESA-LOADER: glx: failed to open i965: driver not built!" on the terminal, but after that Matlab starts without an error and "rendererinfo" yields
>> rendererinfo
ans = struct with fields:
GraphicsRenderer: 'OpenGL Software'
Vendor: 'Mesa'
Version: '4.5 (Compatibility Profile) Mesa 24.2.6'
RendererDevice: 'llvmpipe (LLVM 18.1.8, 256 bits)'
Details: [1×1 struct]
How do I solve the issue and get HW-accelerated gaphics output?
Some information about my system:
$ lspci -v -s 00:02.0
00:02.0 VGA compatible controller: Intel Corporation Meteor Lake-P [Intel Graphics] (rev 08) (prog-if 00 [VGA controller])
Subsystem: Lenovo Device 231e
Flags: bus master, fast devsel, latency 0, IRQ 161, IOMMU group 0
Memory at 4058000000 (64-bit, prefetchable) [size=16M]
Memory at 4000000000 (64-bit, prefetchable) [size=256M]
Expansion ROM at 000c0000 [virtual] [disabled] [size=128K]
Capabilities: [40] Vendor Specific Information: Len=0c <?>
Capabilities: [70] Express Root Complex Integrated Endpoint, IntMsgNum 0
Capabilities: [ac] MSI: Enable+ Count=1/1 Maskable+ 64bit+
Capabilities: [d0] Power Management version 3
Capabilities: [100] Null
Capabilities: [110] Process Address Space ID (PASID)
Capabilities: [200] Address Translation Service (ATS)
Capabilities: [420] Physical Resizable BAR
Capabilities: [320] Single Root I/O Virtualization (SR-IOV)
Capabilities: [400] Latency Tolerance Reporting
Kernel driver in use: i915
Kernel modules: i915, xe
$ glxinfo -B
name of display: :0
display: :0 screen: 0
direct rendering: Yes
Extended renderer info (GLX_MESA_query_renderer):
Vendor: Intel (0x8086)
Device: Mesa Intel(R) Graphics (MTL) (0x7d45)
Version: 24.2.6
Accelerated: yes
Video memory: 15763MB
Unified memory: yes
Preferred profile: core (0x1)
Max core profile version: 4.6
Max compat profile version: 4.6
Max GLES1 profile version: 1.1
Max GLES[23] profile version: 3.2
OpenGL vendor string: Intel
OpenGL renderer string: Mesa Intel(R) Graphics (MTL)
OpenGL core profile version string: 4.6 (Core Profile) Mesa 24.2.6
OpenGL core profile shading language version string: 4.60
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
댓글 수: 1
답변 (1개)
Kautuk Raj
2024년 12월 4일
I was also facing the same Java error while using a similar setup. A workaround to overcome this is to use the new desktop of MATLAB. You can try to download and use the new MATLAB desktop by following the steps below:
- In MATLAB, go to "Home > Add-Ons" and search for "New Desktop for MATLAB (Beta)".
- Click "Install" and follow the instructions to install the new desktop.
- Restart MATLAB.
More about the New Desktop for MATLAB can be gathered from the MathWorks documentation page here: https://www.mathworks.com/help/matlab/matlab_env/beta-new-desktop-for-matlab.html
댓글 수: 1
참고 항목
카테고리
Help Center 및 File Exchange에서 Graphics Performance에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!