Display same image on 2 monitors

Ok, the original poster tuned out. But there is a related question from Tarana in Linux (UBUNTU) + AMD - which card to choose? - #7 by Tarana so lets continue that conversation here…

  1. Ok, I assumed all ViewPixx displays have that connector. Looking at the specs, the EEG variant seems to be a bit of a “light” edition with more limited functionality. An active hardware splitter might work, given that both monitors have same resolution and refresh rate, but I don’t have any practical experience with that specific setup, so no guarantee.

As far as pure software solutions go:

Ok, so the resolution and refresh rate of the console monitor is the same as the Viewpixx, and given that your AMD card uses DisplayPort connectors to drive both monitors, it is conceivable that the display driver will synchronize the video refresh cycles of both monitors if it considers them synchronizable. What model of AMD card is this?

Wrt. xorg.conf, you’d use XOrgConfCreator to create a dual-X-Screen setup, where you assign both monitors DisplayPort-1 and DisplayPort-2 to X-Screen 1. Then the usual XOrgConfSelector, logout + login.

Then you could test if the video outputs are auto-synchronized by running GraphicsDisplaySyncAcrossDualHeadsTestLinux. If that works, then it might work on Ubuntu 20.04.5-LTS. Another visual test is PerceptualVBLSyncTest([],[],[],[],[],0,1); - It should show a tear line somewhere in the middle of the screen, close to where the yellow line appears, and most importantly at the same vertical position on both monitors, ie. not shifted or drifting. On older AMD cards (not AMD Ryzen integrated graphics or AMD Navi cards), one can also run GraphicsDisplaySyncAcrossDualHeadsTestLinux([],[],1) to let Psychtoolbox manually synchronize the video refresh cycles iff the AMD display driver didn’t do it automatically.

→ If cycles are synchronizable without drift, great, Ubunt 20.04 will do.

→ If not, e.g., due to subtle hardware mode timing differences between the monitors, an upgrade to Ubuntu 22.04.1-LTS would be needed. Then you can rerun XOrgConfCreator and choose a new option under “Advanced settings…” by answering “Use AsyncFlipSecondaries mode for multi-display setups” with (y)es. This will make sure to only use vsync synchronization on the “primary monitor” of an X-Screen for proper timing, but run unsynchronized on all other connected non-primary monitors. By assigning your “console monitor” as secondary monitor and the Viewpixx as the primary monitor, you will get proper timing and performance on the Viewpixx and good enough quality with possibly mild tearing on the secondary console monitor.

You’d either have to assign the monitors (in XOrgConfCreator, or by plugging on the graphics card) in an order that makes the Viewpixx monitor the primary monitor, or edit the xorg conf file created by XOrgConfCreator to mark that monitor / video output explicitely as primary monitor. E.g., if “DisplayPort-1” would be connected to the Viewpixx, you’d change the relevant monitor section with a text editor to contain the Option “Primary” true":

Section “Monitor”
  Identifier “DisplayPort-1”
  Option "Primary" "true"
EndSection

After reconfiguring and logout + login etc. the PerceptualVBLSyncTest function mentioned above lets you verify that the Viewpixx shows perfect pictures, whereas the console monitor might either also show perfect pictures, or show slight tearing.

Mirroring can then be done with the PsychImaging('AddTask', 'General', 'MirrorDisplayToSingleSplitWindow') method. Or even without that, by putting both monitors in a mirror configuration, e.g., by replacing Option "RightOf" ... in the xorg.conf monitor sections with Option "Position" "0 0", so all monitors are placed on top of each other and show the same image. This is a tad more efficient for a pure mirror image. The next Psychtoolbox release will have some further enhancements to the mirroring functionality.

-mario