Multiple displays on Win 10

Has anyone got Psychtoolbox to work on a second screen under Win10-64 Version 2004? If so, how?
Please send demo code that works, or else tips or tricks.

My system described below runs fine on one screen but does not let me use PTB on a second screen

The main screen is plugged into the DisplayPort output. The secondary screen is HDMI.

When only one screen is plugged in, everything is fine, and the code below runs without error, and Screen(‘Screens’) returns 0.
When both screens are plugged in, Windows allows only 3 settings:
Extend display, Screen 1 only, or Screen 2 only. Screen(‘Screens’) returns [0,1,2].

In all cases, OpenWindow displays only on the main screen, despite being called with the
screen parameter being set to 2.

Hardware and system versions:

Intel NUC Core-i5-6260U @ 1.80 GHz 32GB memory
Windows 10 Pro Version 2004 (10.0.19041.450)
Displayport and HDMI video outputs
Intel Iris ® Graphics 540
Driver version
OpenGL 4.6, Shader 5.1, OpenCL 2.1

Matlab R2019a fully updated.

System runs all PsychDemo programs tested perfectly, including
DriftDemo6 GarboriumDemo ClutAnimDemo ProceduralSmoothedDiscMaskDemo

It ran with the same failure on last year’s PTB, and it runs the same now after UpdatePsychtoolbox.
Current Psychtoolboxversion is
'3.0.16 - Flavor: beta - Corresponds to SVN Revision 10582 but is locally modified !
Local modifications consist ONLY of National Instruments USB driver.

Test Code to exhibit this behavior


Screen(‘Preference’, ‘SkipSyncTests’, 1); % if set to zero with both screen plugged in, fails with PTB - ERROR: SYNCHRONIZATION FAILURE
scrs = Screen(‘Screens’);
for k=1:length(scrs)
[windowptr, windowrect] = Screen(‘Openwindow’,scrs(k),[0, 50*k, 0], [10, 10, 200, 300]);
disp([k, scrs(k)]);
Screen(‘Close’, windowptr);
% With both screens plugged in, scrs=[0,1,2], but windows are displayed only on main screen.

Your line:

[windowptr, windowrect] = Screen(‘Openwindow’,scrs(k),[0, 50*k, 0], [10, 10, 200, 300]);

defines a non-fullscreen window, covering the area at absolute desktop coordinate space location [10, 10, 200, 300]. So the screen number does not matter for window placement. If you leave that out, then the screen number would define which monitor to cover, and that should work. Also, such fullscreen windows are the only ones with a chance of correct timing.

That said, it is weird that your display settings don’t also allow you to mirror content onto both displays, iow. there should be a 4th option in addition to " Extend display, Screen 1 only, or Screen 2 only." - So this is suspicious. Intel graphics drivers on Windows are pretty buggy in general though, especially wrt. timing. A driver update or downgrade would be worth a try for this reason if problems persist.

Also, Windows-10 2004 isn’t yet tested by myself, and some discussions on the web suggest that Microsoft made changes to the Windows desktop compositor for multi-display setups. Meant to be an improvement, especially if multiple monitors run at different refresh rates, but could also be a bug exchange. Cfe.

That said, i justed the predecessor of Win 2004 on both AMD and NVidia and timing behaviour on multi-display is hit and miss and appears quite non-deterministic even on the same machine and os, depending on weather or phase of moon or whatever.

The best thing to do would be to upgrade to Linux on that machine, where Intel graphics in my experience has excellent timing and multi-display behaviour.



I am having a similar problem with connecting a Win 11 Alienware laptop to a second screen (CRT monitor). The only mode the system appears to work with an additional screen is when I “mirror” things over. Extending the display does not work, and ideally, I would like to present stimuli on the external screen while presenting task information on the laptop’s screen.

Here are the devices that are connected and form our experimental setup

  1. Camera: EyeLink 1000 Camera, monocular + IR Illuminator on Tower Mount

    • Screenshot of EyeLink 1000 User Manual 1.5.0 Section 3.2.1 “Tower Mount Participant Setup, Monocular” and Figure 2-3: “Parts of The EyeLink 1000 Tower Mount”
  2. Host PC (EyeLink Computer):

    • Host and Display PC connected via Ethernet cable
  3. Display PC (Project Laptop): Alienware m15 R4.

    • Display PC and 2nd Display Monitor connected via VGA and VGA to USB-C adapter

We’ve tried updating MATLAB and have tried various versions of psychtoolbox, however, we’re still not able to extend the displays. The Screen(‘Screen’) does not reliably report all the monitors present, and will only present stimulus on the main (in this case our project laptop’s) screen. Only when mirrored, things will present on the external monitor.

Additionally, we have tried matching the framerates of the two monitors and that does not seem to resolve the issue either. I would appreciate it if you could provide any feedback on how to resolve this issue.

Thank you so much in advance for your time.

Kimia Yaghoubi

  • from Aaron Seitz lab at UCR.

If i recall correctly, you need to set your display mode before first calling screen. It enumerates the display surfaces once, and keeps that in memory, so won’t pick up on changing from mirror to extended or back unless you clear screen or restart matlab. So make sure everything is set up as you wish, before you try to enumerate displays. does it now work correctly? Then try to open on screen 2 for the secondary screen

If I had to guess, probably problems caused by Windows11 (officially unsupported by us atm.) + NVidia Optimus if this is a dual-gpu laptop with Intel or AMD iGPU + NVidia dGPU. Both NVidia hw and Optimus is recommended against by us. Windows is problematic for multi-display under the best conditions, dual-graphics will make things much worse.

For futher advice, up to a max of 60 minutes of my time – apart from “upgrade to Linux for probably best results, or at least a chance at salvaging this”, and reading through “help HybridGraphics”, you will need to buy priority support → help PsychPaidSupportAndServices. The most important info for efficiency is the exact laptop model and type of processor graphics chip etc., ideally a link to the manufacturer product description website – there are various models of that Alienware laptop.