# Screen becomes black after experiment ends

**URL:** <https://psychtoolbox.discourse.group/t/screen-becomes-black-after-experiment-ends/5659>\
**Category:** Hardware\
**Tags:** windows, gpu\
**Created:** [March 4, 2025, 3:20pm UTC](https://psychtoolbox.discourse.group/t/screen-becomes-black-after-experiment-ends/5659 "2025-03-04T15:20:53Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![antimo](https://avatars.discourse-cdn.com/v4/letter/a/3bc359/32.png) [@antimo](https://psychtoolbox.discourse.group/u/antimo)\
**Post date:** [March 4, 2025, 3:20pm UTC](https://psychtoolbox.discourse.group/t/screen-becomes-black-after-experiment-ends/5659/1 "2025-03-04T15:20:53Z")

</div>

Hi everyone,

I have a strange issue with one of my PTB installations. After running an experiment, the screen that displays the stimuli becomes black. The only way to go back to normal is to close Matlab. Running Screen(‘CloseAll’) won’t do anything. If the screen is still black and I run another experiment, it will display the stimuli correctly.

I have a dual screen setup with a DATAPixx3 attached. But I have the same problem without it.

This is my PC setup:

Windows 11 Pro, VER. 23H2  
12th Gen Intel(R) Core™ i7-12700 2.10 GHz  
RAM 32 GB  
AMD Radeon Pro WX 3200 Series  
DATAPixx3  
Matlab 2023b  
PTB 3.0.19 - Flavor: beta

Thanks,

Antimo

---

<div class="post-metadata">

**Author:** ![dcnieho](https://avatars.discourse-cdn.com/v4/letter/d/779978/32.png) [@dcnieho](https://psychtoolbox.discourse.group/u/dcnieho)\
**Post date:** [March 4, 2025, 4:19pm UTC](https://psychtoolbox.discourse.group/t/screen-becomes-black-after-experiment-ends/5659/2 "2025-03-04T16:19:47Z")

</div>

I have seen this, but not with PTB. What works for me in that case is  
to press cntr+alt+del and then exit out of that screen again, seems to  
close the black screen.

---

<div class="post-metadata">

**Author:** ![antimo](https://avatars.discourse-cdn.com/v4/letter/a/3bc359/32.png) [@antimo](https://psychtoolbox.discourse.group/u/antimo)\
**Post date:** [March 4, 2025, 4:37pm UTC](https://psychtoolbox.discourse.group/t/screen-becomes-black-after-experiment-ends/5659/3 "2025-03-04T16:37:59Z")

</div>

Ah! If I press cntr+alt+del and then go back to Matlab, the monitor turns on again.

OK, so this might be a fix, but is there an underlying issue I should be aware? This is the only machine in my lab where I see this behavior (and they have fairly similar installations).

Thanks!

Antimo

---

<div class="post-metadata">

**Author:** ![pgerhardstein](https://avatars.discourse-cdn.com/v4/letter/p/dc4da7/32.png) [@pgerhardstein](https://psychtoolbox.discourse.group/u/pgerhardstein)\
**Post date:** [March 5, 2025, 7:31pm UTC](https://psychtoolbox.discourse.group/t/screen-becomes-black-after-experiment-ends/5659/4 "2025-03-05T19:31:11Z")

</div>

Are you embedding your script into a ‘try—catch’ statement? Sounds like an error is not being handled?  
try {  
…(everything)  
{  
catch ME  
disp(ME.message);  
ppdev\_mex(‘Close’, 1);  
ShowCursor;  
sca;  
end  
}

---

<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:** [March 6, 2025, 12:21am UTC](https://psychtoolbox.discourse.group/t/screen-becomes-black-after-experiment-ends/5659/5 "2025-03-06T00:21:18Z")

</div>

I’ve seen this occasionally, on Windows-10 with dual-screen, can’t remember if with AMD, NVidia or both. What is pretty certain is that it is not a Psychtoolbox bug, but either a bug in MS-Windows, or in the AMD or NVidia display drivers. Not fixable by us.

But yeah, as Diederick said, the CTRL-ALT-DEL trick was the one reliable way to get the black screen unstuck again.
