Bug: When using second screen, graphics window is positioned incorrectly

When a second screen is used with fullscr=True, the second screen’s graphics window is positioned incorrectly. As a result there is a dark rectangle along the top of the screen and the “Hit Q to quit” message which should be at the bottom is cut off.

A minimal example is [this code] (Psychopy: When fullscr, second screen is positioned incorrectly · GitHub), which is a lightly-modified version of the gabor.py demo. In contrast, when the same monitor is used as the primary screen, this problem does not occur, see next photo:

The same problem occurs on two different machines here, both with PsychoPy v2023.2.3 and other recent versions of PsychoPy.

Below is some of the output of sysInfo.py:

PsychoPy 2023.2.3
have shaders: True

OpenGL info:
vendor: Apple
rendering engine: Apple M1 Pro
OpenGL version: 2.1 Metal - 83.1
(Selected) Extensions:
True GL_ARB_multitexture
True GL_EXT_framebuffer_object
True GL_ARB_fragment_program
True GL_ARB_shader_objects
True GL_ARB_vertex_shader
True GL_ARB_texture_non_power_of_two
True GL_ARB_texture_float
False GL_STEREO
max vertices in vertex array: 1048575
1.4974 WARNING Monitor specification not found. Creating a temporary one…
3.0054 WARNING Couldn’t measure a consistent frame rate!

  • Is your graphics card set to sync to vertical blank?
  • Are you running other processes on your computer?

################ Experiment ended with exit code 0 [pid:74875] #################

Are you using height units?

What are the resolutions of your two monitors? I’m guessing that the issue is related to the parameters for one monitor being used for both.

Thanks for your comment! The code is essentially the same as the gabor.py demo, so the units are the default (and never really used).
About monitor resolution, they are indeed different so that’s conceivably related , but seems highly unlikely because the code only ever attempts to open a window on the second screen. But I will try later to use a setup with the same resolution on both screens.