VBL Sync and Beamposition Error when running PTB DualMoviesDemo

Hi All,


While troubleshooting a program of ours that works on a Windows 7 PC but not on a new Windows 10 PC I came across a strange situation where I'm not sure what to do next.  


Our in-house program uses Gstreamer, PTB and Matlab... but, essentially it's very similar to DualMovieDemo. When testing the PTB DualMovieDemo in Matlab or Octave, it would fail and output either of the following 2 errors. (listed at the end)


Although, when I run the PTB test PerceptualVBLSyncTest.m and BeampositionTest.m (Found in C:\toolbox\Psyctoolbox\PsychTests\) in Octave prior to running DualMoviesDemo, DualMoviesDemo runs fine despite the output complaining about VBL sync.


Alternatively, this workaround does not work in Matlab. Interestingly enough (and I don't know if this means anything) the "tel" output from the BeampositionTest.m in Matlab was always over 1.0 (tel = 1.3296) while Octave always produced a number below 1.0.


Migrating to Octave or linux is not an option, so I'm not sure how to proceed from here. Would performing a clean installation of the video drivers help? Might an older model video card be a viable option?


Any input would be greatly appreciated.


Thanks,

Will.




Here is a copy of the output from Matlab from "Both" runs:


*********************************************************************************************************************


>> PlayDualMoviesDemo



PTB-INFO: This is Psychtoolbox-3 for Microsoft Windows, under Matlab 64-Bit (Version 3.0.13 - Build date: May 31 2016).

PTB-INFO: Support status on this operating system release: Windows version 10.0 supported and tested to some limited degree.

PTB-INFO: Type 'PsychtoolboxVersion' for more detailed version information.

PTB-INFO: Most parts of the Psychtoolbox distribution are licensed to you under terms of the MIT License, with

PTB-INFO: some restrictions. See file 'License.txt' in the Psychtoolbox root folder for the exact licensing conditions.


PTB-INFO: Will disable DWM because a regular fullscreen onscreen window is opened -> We want best timing and performance.

PTB-INFO: The detected endline of the vertical blank interval is equal or lower than the startline. This indicates

PTB-INFO: that i couldn't detect the duration of the vertical blank interval and won't be able to correct timestamps

PTB-INFO: for it. This will introduce a very small and constant offset (typically << 1 msec). Read 'help BeampositionQueries'

PTB-INFO: for how to correct this, should you really require that last few microseconds of precision.

PTB-INFO: Btw. this can also mean that your systems beamposition queries are slightly broken. It may help timing precision to

PTB-INFO: enable the beamposition workaround, as explained in 'help ConserveVRAMSettings', section 'kPsychUseBeampositionQueryWorkaround'.



PTB-INFO: OpenGL-Renderer is NVIDIA Corporation :: Quadro K2200/PCIe/SSE2 :: 4.5.0 NVIDIA 376.62

PTB-INFO: VBL startline = 1024 , VBL Endline = 1023

PTB-INFO: Measured monitor refresh interval from beamposition = 16.661379 ms [60.019043 Hz].

PTB-INFO: Will use beamposition query for accurate Flip time stamping.

PTB-INFO: Measured monitor refresh interval from VBLsync = 16.660302 ms [60.022922 Hz]. (50 valid samples taken, stddev=0.131972 ms.)

PTB-INFO: Reported monitor refresh interval from operating system = 16.666667 ms [60.000000 Hz].

PTB-INFO: Small deviations between reported values are normal and no reason to worry.

PTB-INFO: ==============================================================================================================================

PTB-INFO: WINDOWS DWM DESKTOP COMPOSITOR IS ACTIVE. On this Windows-10 or later system, Psychtoolbox can no longer reliably detect if

PTB-INFO: this will cause trouble for timing and integrity of visual stimuli or not. You might be just fine, or you could be in trouble.

PTB-INFO: Use external measurement equipment and independent procedures to verify reliability of timing if you care about proper timing.

PTB-INFO: ==============================================================================================================================

PTB-ERROR: Statechange failed with GST_STATE_CHANGE_FAILURE!

PTB-ERROR: Could not open movie file [C:\Users\stimpy2\Documents\MATLAB\DualDiscs.mov] for playback! No such moviefile with the given path and filename.

PTB-ERROR: The specific file URI of the missing movie was: file:///C:\Users\stimpy2\Documents\MATLAB\DualDiscs.mov.

PTB-ERROR: GStreamer movie playback engine reports this error:

           Error from element source: GStreamer error: state change failed and some element failed to post a proper error message with the reason for the failure.

           Additional debug info: gstbasesrc.c(3356): gst_base_src_start (): /GstPlayBin:ptbmovieplaybackpipeline/GstURIDecodeBin:uridecodebin0/GstFileSrc:source:

Failed to start.


PTB-ERROR: Could not open movie file [C:\Users\stimpy2\Documents\MATLAB\DualDiscs.mov] for playback! No such moviefile with the given path and filename.

PTB-ERROR: The specific file URI of the missing movie was: file:///C:\Users\stimpy2\Documents\MATLAB\DualDiscs.mov.

PTB-ERROR: GStreamer movie playback engine reports this error:

           Error from element source: GStreamer error: state change failed and some element failed to post a proper error message with the reason for the failure.

           Additional debug info: gstbasesrc.c(3356): gst_base_src_start (): /GstPlayBin:ptbmovieplaybackpipeline/GstURIDecodeBin:uridecodebin0/GstFileSrc:source:

Failed to start.


Error in function OpenMovie: Usage error

In OpenMovie: Opening the movie failed I. Reason given above.



*****************************************************************************************


Alternate output


*****************************************************************************************


>> PlayDualMoviesDemo



PTB-INFO: This is Psychtoolbox-3 for Microsoft Windows, under Matlab 64-Bit (Version 3.0.13 - Build date: May 31 2016).

PTB-INFO: Support status on this operating system release: Windows version 10.0 supported and tested to some limited degree.

PTB-INFO: Type 'PsychtoolboxVersion' for more detailed version information.

PTB-INFO: Most parts of the Psychtoolbox distribution are licensed to you under terms of the MIT License, with

PTB-INFO: some restrictions. See file 'License.txt' in the Psychtoolbox root folder for the exact licensing conditions.


PTB-INFO: Will disable DWM because a regular fullscreen onscreen window is opened -> We want best timing and performance.

PTB-INFO: The detected endline of the vertical blank interval is equal or lower than the startline. This indicates

PTB-INFO: that i couldn't detect the duration of the vertical blank interval and won't be able to correct timestamps

PTB-INFO: for it. This will introduce a very small and constant offset (typically << 1 msec). Read 'help BeampositionQueries'

PTB-INFO: for how to correct this, should you really require that last few microseconds of precision.

PTB-INFO: Btw. this can also mean that your systems beamposition queries are slightly broken. It may help timing precision to

PTB-INFO: enable the beamposition workaround, as explained in 'help ConserveVRAMSettings', section 'kPsychUseBeampositionQueryWorkaround'.



PTB-INFO: OpenGL-Renderer is NVIDIA Corporation :: Quadro K2200/PCIe/SSE2 :: 4.5.0 NVIDIA 376.62

PTB-INFO: VBL startline = 1024 , VBL Endline = 1023

PTB-INFO: Measured monitor refresh interval from beamposition = 16.661405 ms [60.018948 Hz].

PTB-INFO: Will use beamposition query for accurate Flip time stamping.

PTB-INFO: Measured monitor refresh interval from VBLsync = 16.662876 ms [60.013649 Hz]. (50 valid samples taken, stddev=0.212208 ms.)

PTB-INFO: Reported monitor refresh interval from operating system = 16.666667 ms [60.000000 Hz].

PTB-INFO: Small deviations between reported values are normal and no reason to worry.

PTB-INFO: ==============================================================================================================================

PTB-INFO: WINDOWS DWM DESKTOP COMPOSITOR IS ACTIVE. On this Windows-10 or later system, Psychtoolbox can no longer reliably detect if

PTB-INFO: this will cause trouble for timing and integrity of visual stimuli or not. You might be just fine, or you could be in trouble.

PTB-INFO: Use external measurement equipment and independent procedures to verify reliability of timing if you care about proper timing.

PTB-INFO: ==============================================================================================================================


WARNING: Couldn't compute a reliable estimate of monitor refresh interval! Trouble with VBL syncing?!?



----- ! PTB - ERROR: SYNCHRONIZATION FAILURE ! ----


One or more internal checks (see Warnings above) indicate that synchronization

of Psychtoolbox to the vertical retrace (VBL) is not working on your setup.


This will seriously impair proper stimulus presentation and stimulus presentation timing!

Please read 'help SyncTrouble' for information about how to solve or work-around the problem.

You can force Psychtoolbox to continue, despite the severe problems, by adding the command

Screen('Preference', 'SkipSyncTests', 1); at the top of your script, if you really know what you are doing.


*********************************************************************************************






XX---In PSYCHTOOLBOX@yahoogroups.com, <uno2.geo@...> wrote :

Hi All,


While troubleshooting a program of ours that works on a Windows 7 PC but not on a new Windows 10 PC I came across a strange situation where I'm not sure what to do next.  


Our in-house program uses Gstreamer, PTB and Matlab... but, essentially it's very similar to DualMovieDemo. When testing the PTB DualMovieDemo in Matlab or Octave, it would fail and output either of the following 2 errors. (listed at the end)


Although, when I run the PTB test PerceptualVBLSyncTest.m and BeampositionTest.m (Found in C:\toolbox\Psyctoolbox\PsychTests\) in Octave prior to running DualMoviesDemo, DualMoviesDemo runs fine despite the output complaining about VBL sync.


Alternatively, this workaround does not work in Matlab. Interestingly enough (and I don't know if this means anything) the "tel" output from the BeampositionTest.m in Matlab was always over 1.0 (tel = 1.3296) while Octave always produced a number below 1.0.


-> The sync failure can be either your Windows 10 system having such noisy execution timing that it causes the sync test to fail (reported stddev > 0.2 msecs would fail the test), or the Windows desktop compositor DWM is active and interfering, in which case there wouldn't be anything you could do - the system would not be trustworthy for anything that requires precise visual timing or visual stimulus integrity -> That's why it outputs that large disclaimer wrt. the Windows DWM, a new unsolvable problem we didn't have quite that badly on Windows-7. If it is the former then you can try to somehow make the system less noisy (see "help SyncTrouble"), like updating or downgrading the graphics drivers, stopping virus scanners or search indexers, closing background applications, disconnecting network etc. etc. Maybe playing with power management/performance settings for the cpu or gpu. Obviously you can just skip the sync tests if you don't care about timing.


-> Wrt. the GStreamer problem i don't know. All kind of weird failures with Matlab on Windows are sadly expected. But Octave on Windows so far didn't have problems. Maybe you should upgrade to 64-Bit Octave-4.2 for Windows and Psychtoolbox-3.0.14, as your PTB is outdated? GStreamer movie playback was successfully tested with Octave-4.2 on Windows. Other than that, no idea. Maybe your GStreamer installation is incomplete (You did select a "complete" install, right?) Or maybe whatever GStreamer version you installed has some bug? Try with a different one?


Migrating to Octave or linux is not an option, so I'm not sure how to proceed from here. Would performing a clean installation of the video drivers help? Might an older model video card be a viable option?


-> Why isn't it an option? I'm always interested in good reasons that hold people back - actionable reasons that is, where i can try to improve things, because "we don't want to" is not something i could do anything about it.


-mario


Any input would be greatly appreciated.


Thanks,

Will.




Here is a copy of the output from Matlab from "Both" runs:


*********************************************************************************************************************


>> PlayDualMoviesDemo



PTB-INFO: This is Psychtoolbox-3 for Microsoft Windows, under Matlab 64-Bit (Version 3.0.13 - Build date: May 31 2016).

PTB-INFO: Support status on this operating system release: Windows version 10.0 supported and tested to some limited degree.

PTB-INFO: Type 'PsychtoolboxVersion' for more detailed version information.

PTB-INFO: Most parts of the Psychtoolbox distribution are licensed to you under terms of the MIT License, with

PTB-INFO: some restrictions. See file 'License.txt' in the Psychtoolbox root folder for the exact licensing conditions.


PTB-INFO: Will disable DWM because a regular fullscreen onscreen window is opened -> We want best timing and performance.

PTB-INFO: The detected endline of the vertical blank interval is equal or lower than the startline. This indicates

PTB-INFO: that i couldn't detect the duration of the vertical blank interval and won't be able to correct timestamps

PTB-INFO: for it. This will introduce a very small and constant offset (typically << 1 msec). Read 'help BeampositionQueries'

PTB-INFO: for how to correct this, should you really require that last few microseconds of precision.

PTB-INFO: Btw. this can also mean that your systems beamposition queries are slightly broken. It may help timing precision to

PTB-INFO: enable the beamposition workaround, as explained in 'help ConserveVRAMSettings', section 'kPsychUseBeampositionQueryWorkaround'.



PTB-INFO: OpenGL-Renderer is NVIDIA Corporation :: Quadro K2200/PCIe/SSE2 :: 4.5.0 NVIDIA 376.62

PTB-INFO: VBL startline = 1024 , VBL Endline = 1023

PTB-INFO: Measured monitor refresh interval from beamposition = 16.661379 ms [60.019043 Hz].

PTB-INFO: Will use beamposition query for accurate Flip time stamping.

PTB-INFO: Measured monitor refresh interval from VBLsync = 16.660302 ms [60.022922 Hz]. (50 valid samples taken, stddev=0.131972 ms.)

PTB-INFO: Reported monitor refresh interval from operating system = 16.666667 ms [60.000000 Hz].

PTB-INFO: Small deviations between reported values are normal and no reason to worry.

PTB-INFO: ==============================================================================================================================

PTB-INFO: WINDOWS DWM DESKTOP COMPOSITOR IS ACTIVE. On this Windows-10 or later system, Psychtoolbox can no longer reliably detect if

PTB-INFO: this will cause trouble for timing and integrity of visual stimuli or not. You might be just fine, or you could be in trouble.

PTB-INFO: Use external measurement equipment and independent procedures to verify reliability of timing if you care about proper timing.

PTB-INFO: ==============================================================================================================================

PTB-ERROR: Statechange failed with GST_STATE_CHANGE_FAILURE!

PTB-ERROR: Could not open movie file [C:\Users\stimpy2\Documents\MATLAB\DualDiscs.mov] for playback! No such moviefile with the given path and filename.

PTB-ERROR: The specific file URI of the missing movie was: file:///C:\Users\stimpy2\Documents\MATLAB\DualDiscs.mov.

PTB-ERROR: GStreamer movie playback engine reports this error:

           Error from element source: GStreamer error: state change failed and some element failed to post a proper error message with the reason for the failure.

           Additional debug info: gstbasesrc.c(3356): gst_base_src_start (): /GstPlayBin:ptbmovieplaybackpipeline/GstURIDecodeBin:uridecodebin0/GstFileSrc:source:

Failed to start.


PTB-ERROR: Could not open movie file [C:\Users\stimpy2\Documents\MATLAB\DualDiscs.mov] for playback! No such moviefile with the given path and filename.

PTB-ERROR: The specific file URI of the missing movie was: file:///C:\Users\stimpy2\Documents\MATLAB\DualDiscs.mov.

PTB-ERROR: GStreamer movie playback engine reports this error:

           Error from element source: GStreamer error: state change failed and some element failed to post a proper error message with the reason for the failure.

           Additional debug info: gstbasesrc.c(3356): gst_base_src_start (): /GstPlayBin:ptbmovieplaybackpipeline/GstURIDecodeBin:uridecodebin0/GstFileSrc:source:

Failed to start.


Error in function OpenMovie: Usage error

In OpenMovie: Opening the movie failed I. Reason given above.



*****************************************************************************************


Alternate output


*****************************************************************************************


>> PlayDualMoviesDemo



PTB-INFO: This is Psychtoolbox-3 for Microsoft Windows, under Matlab 64-Bit (Version 3.0.13 - Build date: May 31 2016).

PTB-INFO: Support status on this operating system release: Windows version 10.0 supported and tested to some limited degree.

PTB-INFO: Type 'PsychtoolboxVersion' for more detailed version information.

PTB-INFO: Most parts of the Psychtoolbox distribution are licensed to you under terms of the MIT License, with

PTB-INFO: some restrictions. See file 'License.txt' in the Psychtoolbox root folder for the exact licensing conditions.


PTB-INFO: Will disable DWM because a regular fullscreen onscreen window is opened -> We want best timing and performance.

PTB-INFO: The detected endline of the vertical blank interval is equal or lower than the startline. This indicates

PTB-INFO: that i couldn't detect the duration of the vertical blank interval and won't be able to correct timestamps

PTB-INFO: for it. This will introduce a very small and constant offset (typically << 1 msec). Read 'help BeampositionQueries'

PTB-INFO: for how to correct this, should you really require that last few microseconds of precision.

PTB-INFO: Btw. this can also mean that your systems beamposition queries are slightly broken. It may help timing precision to

PTB-INFO: enable the beamposition workaround, as explained in 'help ConserveVRAMSettings', section 'kPsychUseBeampositionQueryWorkaround'.



PTB-INFO: OpenGL-Renderer is NVIDIA Corporation :: Quadro K2200/PCIe/SSE2 :: 4.5.0 NVIDIA 376.62

PTB-INFO: VBL startline = 1024 , VBL Endline = 1023

PTB-INFO: Measured monitor refresh interval from beamposition = 16.661405 ms [60.018948 Hz].

PTB-INFO: Will use beamposition query for accurate Flip time stamping.

PTB-INFO: Measured monitor refresh interval from VBLsync = 16.662876 ms [60.013649 Hz]. (50 valid samples taken, stddev=0.212208 ms.)

PTB-INFO: Reported monitor refresh interval from operating system = 16.666667 ms [60.000000 Hz].

PTB-INFO: Small deviations between reported values are normal and no reason to worry.

PTB-INFO: ==============================================================================================================================

PTB-INFO: WINDOWS DWM DESKTOP COMPOSITOR IS ACTIVE. On this Windows-10 or later system, Psychtoolbox can no longer reliably detect if

PTB-INFO: this will cause trouble for timing and integrity of visual stimuli or not. You might be just fine, or you could be in trouble.

PTB-INFO: Use external measurement equipment and independent procedures to verify reliability of timing if you care about proper timing.

PTB-INFO: ==============================================================================================================================


WARNING: Couldn't compute a reliable estimate of monitor refresh interval! Trouble with VBL syncing?!?



----- ! PTB - ERROR: SYNCHRONIZATION FAILURE ! ----


One or more internal checks (see Warnings above) indicate that synchronization

of Psychtoolbox to the vertical retrace (VBL) is not working on your setup.


This will seriously impair proper stimulus presentation and stimulus presentation timing!

Please read 'help SyncTrouble' for information about how to solve or work-around the problem.

You can force Psychtoolbox to continue, despite the severe problems, by adding the command

Screen('Preference', 'SkipSyncTests', 1); at the top of your script, if you really know what you are doing.


*********************************************************************************************