# Matlab + Intel graphics plotting bug again (Was: X screen configuration doesn't work)

**URL:** <https://psychtoolbox.discourse.group/t/matlab-intel-graphics-plotting-bug-again-was-x-screen-configuration-doesnt-work/5177>\
**Category:** Bugs & Features\
**Tags:** linux, gpu\
**Created:** [November 20, 2023, 9:37am UTC](https://psychtoolbox.discourse.group/t/matlab-intel-graphics-plotting-bug-again-was-x-screen-configuration-doesnt-work/5177 "2023-11-20T09:37:08Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![mariokleiner](https://avatars.discourse-cdn.com/v4/letter/m/13edae/32.png) [@mariokleiner](https://psychtoolbox.discourse.group/u/mariokleiner)\
**Post date:** [November 20, 2023, 4:13pm UTC](https://psychtoolbox.discourse.group/t/matlab-intel-graphics-plotting-bug-again-was-x-screen-configuration-doesnt-work/5177/2 "2023-11-20T16:13:01Z")

</div>

This is a Matlab bug on Linux + Intel graphics chips, often reported to Mathworks, never fixed by them. It doesn’t affect Psychtoolbox at all, just plotting in Matlab.

Diagnosis and ok solution see:

> [@MATLAB starts with warning after Psychtoolbox installation](https://psychtoolbox.discourse.group/t/matlab-starts-with-warning-after-psychtoolbox-installation/4661/2):
>
> Background: This is a bug in the Matlab OpenGL hardware accelerated graphics and plotting system of all Matlab versions on Linux. I reported the problem to our Mathworks contact in the past, but the problem wasn’t resolved so far for more than a year. The bug triggers specifically on Intel graphics chips (and the just released Intel “Arc” discrete graphics cards) with the modern Intel iris graphics driver, e.g., as used on Ubuntu 20.04-LTS and later and similar modern distributions. The bug doe…

**Update with a possibly better solution on recent Matlab:**

What also worked for me on Ubuntu 20.04.6-LTS, Intel graphics, Mesa 21.2.6, with Matlab R2023b is the following older approach at fixing it:

> [@Workaround for R2020b plotting brokeness on Linux with modern Intel graphics chips](https://psychtoolbox.discourse.group/t/workaround-for-r2020b-plotting-brokeness-on-linux-with-modern-intel-graphics-chips/3543):
>
> I just tested Matlab R2020b on Ubuntu 20.04-LTS with a modern Intel graphics chip that uses the “new” (well at least a year old by now) iris OpenGL graphics driver. While Psychtoolbox works perfectly as expected, Matlab itself spews some error messages, and plot()ing is broken. Apparently the Mathworks graphics team is just as bad at most basic graphics compatibility testing now as it was 3 years ago when plotting with AMD was broken for a very similar reason - History repeating, sad… Anyway, h…

-mario

---

_[View the full topic](https://psychtoolbox.discourse.group/t/matlab-intel-graphics-plotting-bug-again-was-x-screen-configuration-doesnt-work/5177)._
