Hello there. I recently moved to a new computer that has Windows 11 installed, and NVIDIA GeForce RTX 4070 as GPU. I’m using PTB for a passive-viewing experiment where I just show some pre-programmed movies. Each movie consists of 120 frames, which I present to a 60 Hz Philips 273V monitor, 1080x1920 resolution. This is my main monitor. Besides of this monitor I have another one that I use for running Matlab, interacting with its environment, running other software, etc…, but not for stimulus presentation. Here’s what happens, with a snippet of a code I use (comments are useful, especially in the final ‘DrawTexture’ part):
% initialization
Screen('Preference', 'SkipSyncTests', 0);
oldLevelVisual = Screen('Preference', 'VisualDebugLevel', 3);
oldLevelVerbosity = Screen('Preference','verbosity',0);
win = Screen('OpenWindow',1);
% create textures
for ff=1:length(file_list)
this_file = fullfile(file_list(ff).folder,file_list(ff).name);
this_png = imread(this_file);
textures(ff) = Screen('MakeTexture',win,this_png);
end
% inter-frame interval
wait_time = Screen('GetFlipInterval',win,1000);
% this part is just for a single movie presentation, but consider
% I have a sequence with many of them
for frame=1:length(textures)
Screen('DrawTexture',win,textures(frame))
vbl=Screen('Flip',win,vbl(end) + wait_time);
end
Together with this code I have some few lines (not shown) that allow me to keep track of the actual timing between each frame and the next one, and store this information within a vector. This is used to later check that the period between each frame matches exactly the refresh rate of my main monitor (the one from where I present the stimuli). However, sometimes when I run this code I get a jitter in the recorded inter-frame interval (i.e., some frames last 0.01667 sec - 1/60Hz -, which is the period I want, but many others have different durations, so it’s not stable). On top of this problem theres’s another one: after I run the code and display the movies, interacting with the computer via the second monitor (for example running another software for brain recording) causes an immediate change in the inter-frame interval, which shortens the stimulus duration from 2 seconds to 1.3 seconds (this is also revealed in the vector storing the inter-stimulus interval, mentioned a few lines back).
I have no clue of what is happening. I had a look at the PTB SyncTrouble help page, but I failed to see systems bugs. The only thing which was recommended from the help file was to keep the “Vertical Sync” setting of my GPU to “Application controlled” or “Application controlled, default to on”, but I don’t have that option (so I’m keeping it to “on”).
Any help would be much appreciated!