Screen('ConfigureDisplay') issue


I am having an issue using Screen('ConfigureDisplay') on a Linux machine. Specifically, when I enter the code directly below I get the error pasted below:


[window,windowRect] = Screen('OpenWindow',0,[],[],32,2);
Screen('ConfigureDisplay', 'Scanout', window,windowRect,1280,1024);


Error:

Error in function ConfigureDisplay: Wrong size argument supplied
Discrepancy between a specified and supplied argument:
Specified Argument Description:
direction: Input
position: 3
presence:
formats allowed:
double
minimum M: 1
maximum M: 1
minimum N: 1
maximum N: 1
minimum P: 1
maximum P: 1
Provided Argument Description:
direction: Input
position: 3
presence: present
format:double
number of dimensions: 2
M: 1
N: 4
P: 1


I haven't come across solutions elsewhere, and I'm unsure what to change based on the error output.

I used Screen('Resoluions') to verify that the dimensions I am trying to change to are supported and confirmed this isn't causing the issue.


OS: ubuntu 16.04 LTS (dual-booted on a Lenovo ideapad 720S-14IKB)
Matlab: 9.4.0.813654 (R2018a) 64 bit
PTB version: 3.0.14



Any help would be much appreciated - thank you!


Sincerely,


Corey


Hi Corey,

I’m facing the same problem. Did you find any solutions for it?

Thanks,
Sara

Can you provide more info, like exact error message, Linux distribution and version, gfx card and driver and version, matlab version, and ptb version?

1 Like

That’s the wrong syntax for the command. You specified a window handle and a rect where a screen number and output number was expected. E.g., for screen 0 (X-Screen 0) and video output 0 (primary output):

currentSettings = Screen('ConfigureDisplay', 'Scanout', 0, 0)
or
oldSettings = Screen('ConfigureDisplay', 'Scanout', 0, 0, 1280, 1024)

to switch the primary monitor to 1280x1024 resolution.

You’d also do this call before ‘OpenWindow’, as otherwise calibrations of OpenWindow would apply to the old resolution, not the new one, which might change timing.

If you found this tip useful, please consider asking your lab to contribute financially to Psychtoolbox’ upkeep in a small manner, by buying a community membership with priority support:

thanks,
-mario

1 Like

Thank you for your replies. My problem was that I assumed the outputID started from 1. Thanks to Mario’s examples my issue was resolved.