Trouble displaying stimuli on second monitor despite setting 'screen = 2' in visual.Window()

1,495 views
Skip to first unread message

Xander Krieg

unread,
Jan 18, 2015, 7:27:52 PM1/18/15
to psychop...@googlegroups.com
Hello All,

I am struggling to display my experiment on the participant's screen in our lab. Everything works perfectly except the experiment shows on the experimenter screen (screen = 1) instead of the participant screen (screen = 2). I am using PsychoPy v1.81.03 on a Mac Mini with the experiment screen connected through the Thunderbolt Port and the participant screen connected through the HDMI port.

In Coder View, I set "screen=2" in visual.Window(), but it always appears in the experimenter screen in full screen. When I change it to "screen = 1" just to test it. It shows part of the window in the upper left-hand corner of the screen (image attached). I assume that there is something wrong with my monitor settings.

When I look into my Monitor Settings, I see that I have four screens (default, testMonitor, Experimenter Screen, and Participant Screen). I completed the Gamma Calibration for both of my monitors and entered the correct resolution. I noticed that every time I calibrate gamma for my participant screen, it shows "screen = 1".

How can I get my experiment to display on the other screen? Is there a way to permanently make a certain screen be the second monitor?

Thank you for your help, and for sharing your knowledge and expertise!

-Xander

Michael MacAskill

unread,
Jan 18, 2015, 9:57:39 PM1/18/15
to psychop...@googlegroups.com

Hi Xander,

The screen numbers are zero-based. Subtract 1 and see what happens.

Regards,

Michael

Xander Krieg

unread,
Jan 18, 2015, 10:21:04 PM1/18/15
to psychop...@googlegroups.com
Hi Michael,

Thank you so much for your reply and your advice. To test this, I entered the numbers 0 - 9 in for "screen = ". Except for "screen = 1", which still does what is depicted in the screenshot on the Experimenter Screen, every other number displays full screen on the Experimenter Screen.

Any other suggestions on what could be causing this?

Thanks again!

-Xander

Michael MacAskill

unread,
Jan 18, 2015, 11:37:56 PM1/18/15
to <psychopy-users@googlegroups.com>
Wow, this is a tricky one. Although I now seem to recall that this OS X issue has been noted before.

(A) I put you wrong on the 0-based thing: Builder subtracts 1 for you, so you should just enter 1 or 2 as required.

(B) On OS X 10.10.1, I could get it to display on the other screen if I deselected “Full screen window” in Builder’s “Experiment settings” dialog.

*** NB this might look alright cosmetically, but I think running in non-fullscreen mode can cause performance issues ***

(C) The only combination I could find to get it on the other screen AND be full-screen was to shift the menu bar to that screen in the Displays panel of System Preferences. OS X defines screen 0 (i.e. 1 in Builder) as the one with the menu bar and the other becomes screen 1 (i.e. 2 in Builder) That is, the numbering isn’t a physical one based on which port the display is connected to. 

It seems that OS X will only allow an app to be fullscreen on the first screen. You can get a menu bar to appear on the second screen as well (oddly enough, via the Mission Control panel -> “Displays have separate spaces", so it isn’t too difficult to drag the Builder window over there and you can run everything as required without the subject seeing it.

 
Does that work for you?

Mike


-- 
Michael R. MacAskill, PhD 66 Stewart St
Research Director, Christchurch 8011
New Zealand Brain Research Institute NEW ZEALAND

Senior Research Fellow, michael....@nzbri.org
Te Whare Wānanga o Otāgo, Otautahi Ph:   +64 3 3786 072
University of Otago, Christchurch http://www.nzbri.org/macaskill



Jonathan Peirce

unread,
Jan 19, 2015, 6:06:10 AM1/19/15
to psychop...@googlegroups.com
Mike is right. Apple have removed support for full-screen mode on your second monitor, as of Mavericks (10.9). So the closest you can get to that now is to make the screen the right size for your second monitor and put screen=1 in the Window arguments

Jon
--
You received this message because you are subscribed to the Google Groups "psychopy-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to psychopy-user...@googlegroups.com.
To post to this group, send email to psychop...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/psychopy-users/728BF9B4-C7FC-4411-BCFE-638BE37B8F00%40otago.ac.nz.
For more options, visit https://groups.google.com/d/optout.

-- 
Jon Peirce
http://www.peirce.org.uk


This message and any attachment are intended solely for the addressee
and may contain confidential information. If you have received this
message in error, please send it back to me, and immediately delete it. 

Please do not use, copy or disclose the information contained in this
message or in any attachment.  Any views or opinions expressed by the
author of this email do not necessarily reflect the views of the
University of Nottingham.

This message has been checked for viruses but the contents of an
attachment may still contain software viruses which could damage your
computer system, you are advised to perform your own checks. Email
communications with the University of Nottingham may be monitored as
permitted by UK legislation.

Dingcai Cao

unread,
Mar 31, 2015, 5:36:05 PM3/31/15
to psychop...@googlegroups.com
This strategy (setting screen=1) for the second monitor only works with Psychopy version 80. It does not work for version 81 or 82, no matter of the OS I tested (Mac OS X 10.6, 10.7, 10.10). Interestingly enough, the monitor center in Psychopy 82 allows to choose which monitor to do gamma calibration (1 for the primary; 2 for the secondary). 

Linus Sun

unread,
Aug 10, 2015, 11:10:01 PM8/10/15
to psychopy-users
Just wanted to chime in also having problems with the monitor settings in psychopy.  Basically psychopy will never draw a window on a the second display no matter if I set screen=0 or screen=1 to the visual.Window  line in the code - it will ONLY display on the "main display" set in Windows 7.  I wanted to have a 'clean' display for the subject rather than have them watch me launch a psychopy GUI, or see any python 'errors' that arise appear on their monitors which can be quite distracting. 

Any tricks to manage this or has this bug been fixed? 

Various manipulations in the 'monitor center' seem irrelevant, any changes that occur to the screen=0 or screen=1 either by direct coding or changing Screen 1 or Screen 2 in Builder->Experiment Settings->Screen tab makes no difference. visual.Window always displays on "main display" of Windows 7. 

Admittedly, my system is a bit unique, I'm running Windows 7 on Bootcamp on a MacPro (1,1) Xeon X5...@3.00 Ghz "Quad-Core" system.  Windows 7 has no trouble changing between "make this my main display" for either of my two monitors. 

I am using the standalone download of PsychoPy 1.82.01

Thanks for your help,
Linus

Kaitlyn Tagarelli

unread,
Jan 28, 2016, 10:53:45 AM1/28/16
to psychopy-users
Hello,

I'm having a similar issue. Following the directions in this thread, I was able to get my experiment to run on a second monitor only if I indicate screen 2 and uncheck "Full-screen window" in the Experiment Settings. However, there is still a bar at the top (i.e., the top of the window). Is there a way to get rid of this window bar so that it displays completely in full-screen mode?

I tried setting the screen number in the visual.window() settings, but the Experiment Settings seem to override that (I'm relatively new to Psychopy).

I also tried playing around with the screen dimensions to see if I could hack it to cut off the very top/bar of the window, but that doesn't seem to work either (and is probably not a great solution anyway).

I am running OS X 10.10.5 and Psychopy v1.83.03. 

Thanks in advance for any advice!

Kaitlyn

Michael MacAskill

unread,
Jan 28, 2016, 5:24:50 PM1/28/16
to psychop...@googlegroups.com
Hi Kaitlyn,

I don't know if there is a wait to set this within the graphical Builder interface, but if you push the "Compile script" button, you'll see a line in the code that Builder generates that looks like this:

win = visual.Window(size=[600, 600], fullscr=False, screen=0, allowGUI=True, allowStencil=False,
monitor=u'testMonitor', color=[0,0,0], colorSpace='rgb',
blendMode='avg', useFBO=True,
)

If you edit that so that allowGUI=False, you should lose the window bar.

Note that Builder regenerates this file afresh each time it runs, so if you want to edit the generated code like this, you should save a copy of the script and then run it from inside the Coder interface.

Best wishes,

Michael




> On 29/01/2016, at 04:19, Kaitlyn Tagarelli <taga...@gmail.com> wrote:
>
> Hello,
>
> I'm having a similar issue. Following the directions in this thread, I was able to get my experiment to run on a second monitor only if I indicate screen 2 and uncheck "Full-screen window" in the Experiment Settings. However, there is still a bar at the top (i.e., the top of the window). Is there a way to get rid of this window bar so that it displays completely in full-screen mode?
>
> I tried setting the screen number in the visual.window() settings, but the Experiment Settings seem to override that (I'm relatively new to Psychopy).
>
> I also tried playing around with the screen dimensions to see if I could hack it to cut off the very top/bar of the window, but that doesn't seem to work either (and is probably not a great solution anyway).
>
> I am running OS X 10.10.5 and Psychopy v1.83.03.
>
> Thanks in advance for any advice!
>
> Kaitlyn
>

Jonathan Peirce

unread,
Jan 29, 2016, 6:44:53 AM1/29/16
to psychop...@googlegroups.com
Kaitlin, I'm afraid in your case this is an issue to do with Mac OSX. Apple decided in their wisdom that second screens should not allow full-screen mode (I know, I have no idea either!). Nothing we can do I'm afraid. On the second screen, creating a window and making it big is your only option. Or using mirrored screens :-(

The problem for the original post here is to do with the X windowing system and, for that, I don't have an answer. We use the pyglet library to handle creation of the window.

Jon
--
You received this message because you are subscribed to the Google Groups "psychopy-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to psychopy-user...@googlegroups.com.
To post to this group, send email to psychop...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

-- 
Jonathan Peirce
University of Nottingham

http://www.peirce.org.uk
Reply all
Reply to author
Forward
0 new messages