Screen Number Definition Behavior

I am having an issue with proper detection of screen numbers in the most up to date version of psychtoolbox. We are running this program on a computer with windows 11, an AMD Ryzen 7 7700X CPU, and Gigabyte GAMING OC Radeon RX 7800 GPU, with two monitors. Currently, the software is detecting our secondary monitor as monitor 1 and our primary monitor as monitor 2. This is opposite to what we were seeing when running a previous version of psychtoolbox 3.0.7.

Is it possible to change the way the toolbox is defining the monitors?

I think PTB simply goes one what is reported by the operating system. Have you checked in Windows monitor centre (or whatever it is called) to see that the monitor numbers are correctly assigned. There is usually an “identify” button to show this. If they are “incorrect” there, alter and try again with PTB.

P

Not sure what decides the monitor order. But if its consistent, then simply swap the screen ids in your code and you’re golden?

Nothing has changed in Psychtoolbox screen numbering code, so it is some change in your computers settings. I think in display settings, you can check a checkbox to mark one monitor of your choice as your “Main monitor” or “Primarey monitor” or similar, to choose the order of numbering.

Thank you everyone for your replies! We have checked the windows monitor center and our primary monitor is labeled 1 and our secondary monitor is labeled 2. Psychtoolbox continues to label our primary monitor as 2 and our secondary monitor as 1. We were hoping to avoid having to edit all of our codes but if it simply isn’t possible to change the way PTB is ordering the monitors that may be the only solution to this issue

There hasn’t been a change to the relevant PTB code in over a decade, and it is certainly not a Psychtoolbox bug, but something weird with your operating system.
There are no workarounds possible with current PTB releases, as the problem never happened and so there wasn’t any need for workarounds.

Have you tried assigning the stimulus monitor as “Primary Monitor”? That is recommended anyway on Windows for proper timing. I think I misremembered how this is handled on Windows, as it differs across OSes. Or rearranging monitors in the display settings GUI by dragging their icons so that left becomes right and right becomes left. Or maybe switching which display is plugged into which physical output connector of your graphics card.