Request for Priority Support: Multiple Displays on Windows 11

Authorization Token: ACYTFQUA-202233164350:dec79a112af647d0d2d4130adc88abbf770c63104f0763dd091bd74b5661f044

This a follow-up of this post.

ISSUE:

  • We would like to display our stimuli on a second screen (CRT monitor) while presenting task information on the laptop screen.
  • The issue is that when we try this using “extend” mode, the PTB Onscreen window launches as if to start the experiment, but doesn’t display automatically on the second screen. If we click on the tab to bring up the window, the window comes up as a blank dark screen and doesn’t proceed. Clicking anywhere on that screen results in “MATLAB is not responding”.
  • The experiment is able to proceed in “PC screen only”, “Duplicate”, or “Second screen only”.

HARDWARE:

Some things we’ve tried:

  • matching frame rates of the laptop and CRT monitors.
  • different versions of MATLAB and Psychtoolbox
  • different adapters connecting the monitors

Updates from the previous post:

  • Screen(‘Screen’) does seem to report the correct monitors.
  • Per dcnieho’s comment, we do set our display mode (“Extend”) before first calling screen (running the experiment), still the same issue. Let me know if I am misunderstanding this step.
  • It doesn’t look like we have a hybrid or dual graphics.
    image

Please let us know if there’s any other information you need to help with this issue.

Best wishes,
Andrew Sun

Ok, so the product description page says in the “Technical Specifications” → “Display” subsection “… 15.6” FHD (1920 x 1080) 144Hz 3ms 300-nits 100% sRGB color gamut + NVIDIA G-SYNC & Advanced Optimus …" → “Advanced Optimus” is a rather new variant of NVidia Optimus.

So this is a Optimus laptop with all the potential dual-gpu nightmares expected on Windows, in addition to all the multi-display trouble on Windows. I would strongly recommend Linux as operating system for the kind of usage scenario you try to do. We also strongly recommend against NVidia for optimal Linux use (you’d want to have AMD graphics for best performance and features and quality), but with the qualification that at least a classic Optimus laptop generally can be less problematic on Linux than on Windows, thanks to some new experimental code just released in one of the latest PTB betas.

However, in your case, because this is “Advanced Optimus” instead of classic “Optimus”, you may get lucky, assuming the info in this article What is Nvidia Advanced Optimus? | Trusted Reviews is accurate.

“Advanced Optimus” means that a video multiplexer is used, so the internal laptop flat panel can be dynamically switched from the integrated Intel gpu as provider to the NVidia gpu. This should mean the system can be configured to power down the Intel gpu and only use the NVidia for both internal and external display – effectively the laptop becomes a less problematic single NVidia gpu laptop if configured properly and no operating system or driver bugs interfere.

According to that article, the default setting is for the operating system to decide if the NVidia or Intel is to be used for an application and in general for driving the laptop panel. I hope that that is what is causing your problems. The OS will probably decide on gpu choice based on the performance needs of the running graphics application. It would likely decide to use the NVidia for PTB’s OpenGL use, but the decision will only happen after all display enumeration, choice of target display, configuration of the target display and opening of the PTB fullscreen window has happened. If this isn’t implemented in the OS and drivers transparently, something like your symptoms would be likely.

Long story short: You must configure the system to always and unconditionally switch to use of only the NVidia gpu whenever Matlab or Octave gets started and until it gets terminated again, ie. take the decision away from the operating system, so that this becomes an “NVidia only” laptop already before the first Psychtoolbox command or Matlab/Octave plotting command is executed.

That article states: “You can play with the settings for the Nvidia Advanced Optimus feature if you wish, picking between three modes: ‘Automatic Select’ (default) will detect your workloads and switch to the most appropriate GPU, ‘Optimus’ will switch to the integrated GPU and ‘Nvidia GPU Only’ will switch to the discrete GPU.”

So you want to find that setting and set it to “NVidia GPU Only”. The NVidia control panel used to have a settings section where you can set such settings on a per-application basis, so you’d create custom entries for Matlab or Octave with this. This way the laptop will still use the power-efficient Intel gpu for day to day operation, and only force the Nvidia for Matlab/Octave. I think Windows-11 and the latest Windows-10 editions may have changed this for the worse, and the gpu selection may no longer exist in the NVidia control panel. In that case, there is an equivalent selection in the general Windows10/11 system settings → Display → Graphics options, where you can define a selection entry specifically for Matlab or Octave. See this for more details:

My experience with those settings is that they have become more buggy on recent Windows 10 editions from late 2021 though, and i don’t have any multi-gpu test machines for Windows 11 for testing this. If it doesn’t work, in my experience, random permutations of changing and reapplying settings, replugging the display, quitting and restarting Matlab between changes or rebooting the laptop may help in such a case. I have spent miserable hours doing this and at some points it worked for no apparent reasons, just as it failed before for no apparent reasons.

If this doesn’t fix it, then the only other explanation is graphics driver or operating system bug and you can try to upgrade or downgrade your graphics drivers or Windows operating system and hope for the best.

It is certainly not a PTB bug or issue and nothing further we could do about it. After that you will still have to fight with the various bugs/quirks/limitations of multi-display use on Windows 10/11, which can ruin the timing, as described often here and in our docs. E.g., clicking on any GUI element or Window on the laptop display, or ALT-Tabbing to the Matlab window, while the session is running would be a good way to destroy any reliable timing. Upgrading to Linux is recommended, however i don’t know how well something like “Advanced Optimus” would be handled, given this is a very new NVidia feature, only used in very few recent laptops.

Hope it helps,
-mario

[Priority support for 2022 almost used up: 53 minutes out of a maximum of 60 minutes]