psychopy.org | Reference | Downloads | Github

Difficulty with Multi-Monitor Support and Resolution

I’m having two confusing issues using the PsychoPy module.

Issue #1: When creating a window, using screen = 1 rather than screen = 0 displays an open black window on my second monitor, however it does not draw any of the visual stimulus on this monitor despite this window being selected. I was wondering if this is a known issue and if a work around is present.

Issue #2: When setting a resolution of either display, I get the same error message:

WARNING 	User requested fullscreen with size [2560 1600], but screen is actually [1440, 900]. Using actual size

Despite my monitor resolution actually being 2560x1600.

Here is the function that creates my window (resolution would be the tuple containing 2560, 1600) :

def openWindow(resolution):
    win = visual.Window(
        size=resolution, fullscr=True, screen=0,
        allowGUI=False, allowStencil=False, units='deg',
        monitor='', color='black', colorSpace='rgb',
        blendMode='avg', useFBO=True)

    win.recordFrameIntervals=True
    # store frame rate of monitor if we can measure it
    TASK_INFO['frameRate'] = win.getActualFrameRate()
    if TASK_INFO['frameRate'] != None:
        frameDur = 1.0 / round(TASK_INFO['frameRate'])
    else:
        frameDur = 1.0 / 60.0  # could not measure, so default 60 Hz

    # Add multiple shutdown keys "at once".
    for key in ['q', 'escape']:
        event.globalKeys.add(key, func=core.quit)

    return win

And here is a short snippet of code that creates a welcome stimulus (Which only displays when screen=0 is selected in the previous code. Assume the window parameter inputted is the window object created by openWindow().

Welc = visual.TextStim(win=window, name='Welc',
        text=u'Get Ready!', units='norm',
        font=u'Arial', height=0.1, wrapWidth=None, ori=0,
        color=u'white', colorSpace='rgb', opacity=1,
        languageStyle='LTR',
        depth=0.0);

    event.Mouse().setVisible(False) #Hide mouse
    saveDataFrame() #Make sure folder and file are created.

    Welc.draw()
    window.flip()

Other miscellaneous info: Running the latest version of PsychoPy on Python 3.6.13

I’ve never been able to make fullscreen work on a multi-monitor setup, regardless of which screen I was trying to present on. Try it with fullscr=False on both windows and see if it is better-behaved.

Thanks for the advice! I tried running it with fullscreen disabled and resolution and screen settings appears to be working. When I disable the menu bar it works well enough for me.

Try adding winType='glfw' and see if that clears things up. I suspect the resolution issue might stem from how PsychoPy handles HiDPI displays.

Thank you, unfortunately when trying this it says ‘failed to load GLFW3 shared library’. We have to run our task off PsychoPy’s runner application as we don’t have admin access on these machines so unfortunately I’m unable to tinker and add dependencies.

Right it’s Ubuntu, that library doesn’t ship with the glfw interface.