# Screen('ConfigureDisplay') issue

**URL:** <https://psychtoolbox.discourse.group/t/screen-configuredisplay-issue/1302>\
**Category:** Hardware\
**Tags:** linux\
**Created:** [May 3, 2018, 11:55pm UTC](https://psychtoolbox.discourse.group/t/screen-configuredisplay-issue/1302 "2018-05-03T23:55:31Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Allen\_Ingling](https://avatars.discourse-cdn.com/v4/letter/a/a183cd/32.png) [@Allen\_Ingling](https://psychtoolbox.discourse.group/u/Allen_Ingling)\
**Post date:** [May 3, 2018, 11:55pm UTC](https://psychtoolbox.discourse.group/t/screen-configuredisplay-issue/1302/1 "2018-05-03T23:55:31Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Sara](https://avatars.discourse-cdn.com/v4/letter/s/a5b964/32.png) [@Sara](https://psychtoolbox.discourse.group/u/Sara)\
**Post date:** [November 17, 2020, 9:55pm UTC](https://psychtoolbox.discourse.group/t/screen-configuredisplay-issue/1302/2 "2020-11-17T21:55:34Z")

</div>

Hi Corey,

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

Thanks,  
Sara

---

<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:** [November 17, 2020, 10:16pm UTC](https://psychtoolbox.discourse.group/t/screen-configuredisplay-issue/1302/3 "2020-11-17T22:16:26Z")

</div>

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

---

<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:** [November 18, 2020, 4:24pm UTC](https://psychtoolbox.discourse.group/t/screen-configuredisplay-issue/1302/4 "2020-11-18T16:24:27Z")

</div>

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:

> **[Psychtoolbox-3 - Contributing to Psychtoolbox](http://psychtoolbox.org/contribute)**

thanks,  
-mario

---

<div class="post-metadata">

**Author:** ![Sara](https://avatars.discourse-cdn.com/v4/letter/s/a5b964/32.png) [@Sara](https://psychtoolbox.discourse.group/u/Sara)\
**Post date:** [November 18, 2020, 6:36pm UTC](https://psychtoolbox.discourse.group/t/screen-configuredisplay-issue/1302/5 "2020-11-18T18:36:23Z")

</div>

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.
