psychopy.org | Reference | Downloads | Github

No Window on 2nd monitor with screen=1 (dual-head Linux)

screen

#1

Hi,

i have a dual-head 1920x1200 each (HDMI, DVI) setup running linux with “zaphodheads” in radeon as independent monitors.

If in Coder I define a visual.Window with option “screen=0” it works.
If I try “screen=1” I get a Warning: “Requested an unavailable screen number - using first available”.
Ok, Coder sees only a single monitor, the first.

But if I start the Coder on the second Monitor with

DISPLAY=:0.1 psychopyApp.py

then also here the window, no matter of screen number (same Warning as above if!=0), opens on first Monitor. While I would expect it to open on the same, that is the second monitor.

Also screen=10 or 11 does not work (the offset of xorg)

Please: How can I open the window on my second monitor?
Thanks a lot!


#2

Hi, I don’t know if my reply will help you, but your message helped me figure out an issue of mine so I thought I’d chime in. I would also be interested in finding out if you ever made progress on this problem on your own, sometime in the past 30 days.

In my case, I was able to get our task running on the second monitor (with a similar display configuration to yours) with a line like:

DISPLAY=:1.1 python myTaskFile.py

In other words, I run the task directly without opening it in PsychoPy Coder first. And also, at least in our setup, the main display number was 1, not 0, although this is likely going to be different for different people. (We are on Ubuntu 16.04 and using an NVidia graphics card, but with a similar zaphodheads-style setup.)

It is worth noting that PsychoPy still only seems to be aware of a single monitor (i.e. whichever one matches what you have set the DISPLAY environment variable to) – our task doesn’t work with any screen number higher than 0. But as long as we set DISPLAY equal to the correct X display for our monitor, that is OK for our purposes.

Hope I was clear – let me know if any questions.

Cheers,
Matt


#3

Hi Matt,

thanks a lot for your answer! Sorry for the delay, i had no access to the computer, but now.

Unfortunately your solution does not solve my issue, even starting from command line with
DISPLAY=:0.1 python
directly, the stimulus window does not appear on the 2nd screen (stimulus monitor), but always on the first (control monitor), no matter of screen=0 or 1 in win(). But, funny enough, the resulting graphics window, e.g. timing accuracy does show up on the second. Weird.

Any more ideas?

Best,
Uli


#4

Same same on different machine with different graphics nouveau, Zaphodheads, DVI&HDMI.


#5

I am also currently experiencing this issue - doesn’t matter what screen number was set (tested from 0 to 12), the window keeps appearing on the main screen. Anyone managed to resolve this yet?


#6

I also have exactly the same issue. I cannot show stimuli on 2nd monitor in ubuntu. The ‘screen=1’ option gives the warning: “Requested an unavailable screen number - using first available”.

Further, the option “DISPLAY=:0.1 python mypsychopyscript.py” still shows stimuli only on 1st screen, though this only happens with psychopy code; e.g. if I use “DISPLAY=:0.1 xload”, this shows normally on 2nd monitor). I appreciate if anybody can offer a suggestion!

Thank you,
Dimitrios


#7

I believe I have found a solution. I enabled Xinerama in my xorg.conf file:

Section “ServerLayout”
Identifier “Layout0”
Screen 0 “Screen0” 0 0
Screen 1 “Screen1” RightOf “Screen0”
InputDevice “Keyboard0” “CoreKeyboard”
InputDevice “Mouse0” “CorePointer”
Option “Xinerama” “1”
EndSection


#8

Hi Dimitrios,

thanks for trying!

But xinerama is not recommended at all in order to get proper
independent and accurate timing for the two monitors. Sorry.

Best,
Uli


#9

Hi again,

I realized that downgrading from pyglet 1.3.x to 1.1.4 solves the problem! (without xinerama).

Best,
Dimitrios