I have just installed psychtoolbox and am trying to run the example 3 from the sound cookbook (https://github.com/Psychtoolbox-3/Psychtoolbox-3/wiki/Cookbook:-sound-example-3). When I run the script, my screen turns white and for ~2 seconds a welcome message shows up: ‘Welcome to the Psychtoolbox. Please wait a few seconds while we test your graphics driver. The FAQ page at the website explains how to skip this screen test.’ After this, the text disappears and the screen remains white for at least a few minutes. Typing sca does not work to exit this window, nor does pressing esc. Only ctrl+alt+delete and switching user or shutting down the pc works. Have I done something wrong during installation? I hope you can help.
-3.0.16 - Flavor: beta - Corresponds to SVN Revision 10420
-Intel® HD Graphics 630, drivers up-to-date
The first time you run, fonts on your PC will be indexed (upon the first time a text function is called). This takes a long time, could be quite a few minutes. So give it time. Should be just the first time.
Thank you for the quick reply. I let the white screen stay for an hour, and still no changes. Upon closing the screen, I got the following error:
PTB-INFO: This is Psychtoolbox-3 for Microsoft Windows, under Matlab 64-Bit (Version 3.0.16 - Build date: Jan 30 2020).
PTB-INFO: OS support status: Windows 10 (Version 10.0) supported and tested to some limited degree.
PTB-INFO: Type ‘PsychtoolboxVersion’ for more detailed version information.
PTB-INFO: Most parts of the Psychtoolbox distribution are licensed to you under terms of the MIT License, with
PTB-INFO: some restrictions. See file ‘License.txt’ in the Psychtoolbox root folder for the exact licensing conditions.
PTB-INFO: The detected endline of the vertical blank interval is equal or lower than the startline. This indicates
PTB-INFO: that i couldn’t detect the duration of the vertical blank interval and won’t be able to correct timestamps
PTB-INFO: for it. This will introduce a very small and constant offset (typically << 1 msec). Read ‘help BeampositionQueries’
PTB-INFO: for how to correct this, should you really require that last few microseconds of precision.
PTB-INFO: Btw. this can also mean that your systems beamposition queries are slightly broken. It may help timing precision to
PTB-INFO: enable the beamposition workaround, as explained in ‘help ConserveVRAMSettings’, section ‘kPsychUseBeampositionQueryWorkaround’.
PTB-INFO: OpenGL-Renderer is Intel :: Intel® HD Graphics 630 :: 4.4.0 - Build 188.8.131.5242
PTB-INFO: VBL startline = 1080 , VBL Endline = 1080
PTB-INFO: Measured monitor refresh interval from beamposition = 16.682736 ms [59.942207 Hz].
PTB-INFO: Will use beamposition query for accurate Flip time stamping.
PTB-INFO: Measured monitor refresh interval from VBLsync = 16.667736 ms [59.996149 Hz]. (50 valid samples taken, stddev=0.168424 ms.)
PTB-INFO: Reported monitor refresh interval from operating system = 16.949153 ms [59.000000 Hz].
PTB-INFO: Small deviations between reported values are normal and no reason to worry.
PTB-INFO: WINDOWS DWM DESKTOP COMPOSITOR IS ACTIVE. On this Windows-10 or later system, Psychtoolbox can no longer reliably detect if
PTB-INFO: this will cause trouble for timing and integrity of visual stimuli or not. You might be just fine, or you could be in trouble.
PTB-INFO: Use external measurement equipment and independent procedures to verify reliability of timing if you care about proper timing.
Error using KbQueueCreate (line 178)
Keyboard queue for device NaN already in use by GetChar() et al. Use of GetChar and keyboard queues is mutually exclusive!
Error in Reaction_time (line 10)
KbQueueCreate; %creates cue using defaults
PTB-INFO: Enforcing script abortion and restoring desktop by executing Screen(‘CloseAll’) now!
PTB-INFO: Please ignore the false error message (INTERNAL PSYCHTOOLBOX ERROR) caused by this…
By the way, I only need PTB for measuring reaction times to a sound stimulus. Is it necessary in that case to make sure the screen-part of the toolbox works, or is there some workaround I could use?
Ok, so the failure is due to the KbQueueCreate error, and that is actually a bug in the sound example 3 sample script you used. I guess that script was written and tested on a Mac or Linux with Matlab, where it would work like that. But on Windows, ListenChar/GetChar et al always have to piggyback on KbQueueCreate, so simultaneous use is not possible.
As that script only uses ListenChar() to suppress keyboard input spilling into Matlab’s window, the most simple solution is to only request that, ie. replace ListenChar(2) with ListenChar(-1) at the beginning of the script. I’ve hopefully fixed that in those cookbook tutorials now, although there is other room for improvements in those samples…
But to answer you question, you don’t need to use Screen() et al. at all if you only want auditory stimulation and response collection, so also no need to open a window at all.
20 minutes is much longer than quite a long time. Use psychdebugconfiguration so that you can step through the code and see exactly where it hangs. Openscreen is some wrapper around psychtoolbox i guess, not a function we provide, so you should check out what happens inside it