Screen('OpenWindow') and PsychImaging('OpenWindow') produce black screen

Hi all,

When we run Screen(‘OpenWindow’) or PsychImaging(‘OpenWindow’) the screen will go entirely black and we cannot exit out of it without alt-tabbing and closing MATLAB. MATLAB nor the terminal are not producing any errors after running the commands. This was consistent across multiple PTB-3 demos and scripts that had run on other machines successfully. This issue persists on both our Datapixx projector and Dell monitor.

Our current driver is Mesa Intel(R) Graphics (ADL-S GT1). We have had previous success with combination of integrated graphics card, driver, MATLAB and PTB version on a different machine. The only slight difference was that the other machine was running Kubuntu 21.10 instead, but we do not suspect this mattered since they are the same kernel.

Some of the potential fixes we have tried include reinstalling Ubuntu, MATLAB and PsychToolBox and the necessary packages.

Relevant information:

  • Psychtoolbox version 3.0.18 Beta
  • Linux (Ubuntu 21.10)
  • MATLAB 2021b
  • Integrated graphics card is Intel UHD Graphics 770
  • Mesa Intel(R) Graphics (ADL-S GT1)

Intel Alderlake-S is a very new cpu + graphics architecture, only a few months old, so driver bugs or limitations are to be expected for a while. I think Ubuntu 21.10 only contains the most early and minimal support for this gpu generation.

I think step one would be upgrading to Ubuntu 22.04-LTS which is to be released this Thursday and should have improved support for Alderlake, although that still won’t be enough to fix all known Alderlake limitations. PTB 3.0.18.4 for octave is contained in that release. Step 2 would be getting paid support for any further advice on this new hardware from myself → PsychPaidSupportAndServices.

-mario

Hi Mario,

Thank you so much for getting back to us. But fortunately, we figured out a solution just earlier today. The first change we made was changing our DVI to display port adapter for our DataPixx to a DisplayPort to DVI dual link active adapter from StarTech.com. We suspect that this alone did not solve our problem, but for whatever reason, changing the adapter made MATLAB output an error which led us to install the freeglut3 package.

This seems to have fixed our issue. Not only is Screen no longer producing a black screen, as we were able to run some PTB demos, but it now also gave appropriate responses from BitsPlusIdentityClutTest, DataPixxGPUDitherPatternTest and VBLSyncTest.

Thank you again for your help!

Ok, so it was user error, not an Alderlake graphics problem.

The advice to upgrade to Ubuntu 22.04-LTS soon still stands though, as there are known performance improvements available in 22.04-LTS’s Linux 5.15 kernel, with more improvements in future kernels, like 5.17 and later. The latest PTB 3.0.18.7 from today should provide basic compatibility with Ubuntu 22.04-LTS, although only a future release will be fully tuned, tested and optimized for it.

And buying a support membership is still appreciated, to support all the work going into PTB’s development and maintenance.

Thanks,
-mario

Update: While the above change seemed to have temporarily fixed our problem, the same problem came back after we restarted the computer.

We were able to fix it by signing out and before signing back in, clicking on the gear icon in the lower right, and then clicking on “Ubuntu on XOrg.” After changing this, Psychtoolbox has run very well for the past week.

According to Mario, the reason for this is because by default, Ubuntu uses a Wayland GUI which is incompatible with Psychtoolbox. Switching to XOrg disables this, as shown by the ‘IsWayland’ command which outputs 0 if Wayland is disabled.

In addition to the above change we also reinstalled with Ubuntu 22.04 and went through the normal MATLAB and Psychtoolbox installation and again forced the computer to use the ADL-S GT1 driver.

Yes. This problem was resolved as a paid support request off-list, thanks for summarizing the final solution on the forum. I think the default GUI session type was changed to Wayland starting with Ubuntu 21.10 for new installations or new users, so anybody starting with a freshly installed Ubuntu 22.04, or creating a new user account on such a machine, will run into this, at least under Matlab.

To make things easier in the future, the latest PTB 3.0.18.8 release from yesterday therefore now detects this scenario and aborts, while giving troubleshooting advice to login into a X-Server based GUI instead.

Wayland, while maybe ok for standard desktop use cases, is still in insufficient shape for many (most?) non-trivial neuroscience applications, as of Ubuntu 22.04, and I expect it to stay that way possibly for years to come. Lots of functionality for non-mainstream use cases like ours is still missing, with relevant protocol design discussions sometimes drawing out over years.

PTB on Octave on Ubuntu 22.04 would switch to our experimental Wayland backend, which on second thought, as I am writing this, is probably not the smartest thing to do by default. I will have to reverse that behavior and make Wayland strictly opt-in in one of the next PTB releases. Nobody should use Wayland with PTB yet, apart from myself for testing… Current PTB isn’t yet fine-tuned for Ubuntu 22.04, but hopefully soon.

EDIT: Fix released for consistent behaviour on Octave and Matlab with PTB 3.0.18.9.

However, the new X11/XOrg X-Server 21.1 shipping in Ubuntu 22.04 gained some useful improvements for neuroscience applications, a few of them contributed by myself in the 2nd half of last year.

-mario