New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Screen sync trouble on Windows 8+ #276

Closed
suxpert opened this Issue Sep 5, 2015 · 13 comments

Comments

Projects
None yet
5 participants
@suxpert

suxpert commented Sep 5, 2015

Hi there,

It seems that PTB screen will disable DWM on windows 7 when a screen is opened. But according to MSDN, DWM could not be disabled anymore after windows 8.

This OS 'feature' or 'bug' does not affect those games, no matter they use OpenGL or Direct3D, most of them can have an fps around or even larger than 60, so why must PTB disable DWM for visual stimuli?

Now after I upgrade the OS to Windows 10, PTB always complain about DWM (see bold text). Can this be fixed?

PTB-INFO: This is Psychtoolbox-3 for Microsoft Windows, under Matlab 64-Bit (Version 3.0.12 - Build date: Aug 13 2015).
PTB-INFO: Support status on this operating system release: Windows version 6.2 partially supported.
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-WARNING: Couldn't even collect one single valid flip interval sample! Sanity range checks failed!
PTB-WARNING: Could be a system bug, or a temporary timing problem. Retrying the procedure might help if
PTB-WARNING: the latter is the culprit.
PTB-WARNING: Couldn't collect valid flip interval samples! Fatal VBL sync failure!
PTB-WARNING: Either synchronization of doublebuffer swapping to the vertical retrace signal of your display is broken,
PTB-WARNING: or the mechanism for detection of swap completion is broken. In any case, this is an operating system or gfx-driver bug!

WARNING: VBL Calibration run No. 1 failed. Retrying...
PTB-WARNING: Couldn't even collect one single valid flip interval sample! Sanity range checks failed!
PTB-WARNING: Could be a system bug, or a temporary timing problem. Retrying the procedure might help if
PTB-WARNING: the latter is the culprit.
PTB-WARNING: Couldn't collect valid flip interval samples! Fatal VBL sync failure!
PTB-WARNING: Either synchronization of doublebuffer swapping to the vertical retrace signal of your display is broken,
PTB-WARNING: or the mechanism for detection of swap completion is broken. In any case, this is an operating system or gfx-driver bug!

WARNING: VBL Calibration run No. 2 failed. Retrying...
WARNING: Will enable VBL busywait-workaround before trying final VBL Calibration run No. 3.
WARNING: This will hopefully work-around graphics driver bugs of the GPU sync-to-retrace mechanism. Cross your fingers!

PTB-INFO: OpenGL-Renderer is NVIDIA Corporation :: GeForce GT 720M/PCIe/SSE2 :: 4.5.0 NVIDIA 353.62
PTB-INFO: VBL startline = 768 , VBL Endline = 768
PTB-INFO: Measured monitor refresh interval from beamposition = 16.664073 ms [60.009340 Hz].
PTB-INFO: Will use beamposition query for accurate Flip time stamping.
PTB-INFO: Measured monitor refresh interval from VBLsync = 16.695246 ms [59.897292 Hz]. 50 valid samples taken, stddev=0.375680 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-WARNING: ==============================================================================================================================
PTB-WARNING: WINDOWS DWM DESKTOP COMPOSITOR IS ACTIVE! ALL FLIP STIMULUS ONSET TIMESTAMPS WILL BE VERY LIKELY UNRELIABLE AND LESS ACCURATE!
PTB-WARNING: STIMULUS ONSET TIMING WILL BE UNRELIABLE AS WELL, AND GRAPHICS PERFORMANCE MAY BE SEVERELY REDUCED! STIMULUS IMAGES MAY NOT
PTB-WARNING: SHOW UP AT ALL! DO NOT USE THIS MODE FOR RUNNING REAL EXPERIMENT SESSIONS WITH ANY REQUIREMENTS FOR ACCURATE TIMING!
PTB-WARNING: ==============================================================================================================================

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.

@kleinerm

This comment has been minimized.

Show comment
Hide comment
@kleinerm

kleinerm Sep 13, 2015

Because this is not primarily about performance but about accurate and trustworthy visual timing and timestamping. The DWM degrades performance and increases latency, also in video games. That's why it is also bad for a video game if the DWM is active during game play. The biggest problem for us is that it makes accurate visual stimulus onset timing and trustworthy/precise visual stimulus onset timestamping impossible. This problem does affect us badly as many neuro-science studies require precise timing, but it doesn't matter much or at all for video games. A game just takes your joystick input, computes updated game state, redraws the graphics and tells the gpu to show the new image as soon as possible. It doesn't care when that is exactly, neither does it collect timestamps of when that happened, and it doesn't collect reaction times, or needs to synchronize with research equipment or other modalities. The DWM is always bad for high performance applications, but it is catastrophic for neuro-science apps if timing is of concern.

There is simply no way to trust your script timing-wise if the DWM is on, that's why we try to force it off. What MDSN docu actually states is that you/we can't force it off anymore in Windows-8 or later. Now in theory the DWM should disable itself automatically under certain conditions, e.g., for fullscreen games on a single monitor, because the DWM is bad for game performance, which is why PTB should continue to work ok under such certain conditions. The problem is that those conditions are not always given. E.g., on a multi-display setup stuff usually falls apart, so only a single active display is allowed. High DPI "Retina" displays seem to enforce use of the DWM on Windows, so those high-res monitors will cause failure, unless one manages to suppress that behaviour.

There isn't any way to avoid these problems at the moment, except avoiding MS-Windows, or multi-display setups on Windows. Your best bet is to use Linux, where most things work mostly well if the system is configured properly, and where we can gradually improve suboptimal things or fix bugs.

But things like hybrid-graphics are almost always problematic timing-wise atm. unless you get very lucky with your choice of hardware. Linux has the best chance of getting this fixed at some point in the future, but it is a complex problem and progress is slow.

And no we won't remove those warnings. People should get warned when they are about to use a system that is broken for use for neuro-science experiments. The warning you posted here denotes the worst case: DWM not auto-disabling as it should, not even on a single display setup with a PTB fullscreen window. This setup would be hopeless for any vision science experiment that requires frame accurate timing or precise timestamping.

kleinerm commented Sep 13, 2015

Because this is not primarily about performance but about accurate and trustworthy visual timing and timestamping. The DWM degrades performance and increases latency, also in video games. That's why it is also bad for a video game if the DWM is active during game play. The biggest problem for us is that it makes accurate visual stimulus onset timing and trustworthy/precise visual stimulus onset timestamping impossible. This problem does affect us badly as many neuro-science studies require precise timing, but it doesn't matter much or at all for video games. A game just takes your joystick input, computes updated game state, redraws the graphics and tells the gpu to show the new image as soon as possible. It doesn't care when that is exactly, neither does it collect timestamps of when that happened, and it doesn't collect reaction times, or needs to synchronize with research equipment or other modalities. The DWM is always bad for high performance applications, but it is catastrophic for neuro-science apps if timing is of concern.

There is simply no way to trust your script timing-wise if the DWM is on, that's why we try to force it off. What MDSN docu actually states is that you/we can't force it off anymore in Windows-8 or later. Now in theory the DWM should disable itself automatically under certain conditions, e.g., for fullscreen games on a single monitor, because the DWM is bad for game performance, which is why PTB should continue to work ok under such certain conditions. The problem is that those conditions are not always given. E.g., on a multi-display setup stuff usually falls apart, so only a single active display is allowed. High DPI "Retina" displays seem to enforce use of the DWM on Windows, so those high-res monitors will cause failure, unless one manages to suppress that behaviour.

There isn't any way to avoid these problems at the moment, except avoiding MS-Windows, or multi-display setups on Windows. Your best bet is to use Linux, where most things work mostly well if the system is configured properly, and where we can gradually improve suboptimal things or fix bugs.

But things like hybrid-graphics are almost always problematic timing-wise atm. unless you get very lucky with your choice of hardware. Linux has the best chance of getting this fixed at some point in the future, but it is a complex problem and progress is slow.

And no we won't remove those warnings. People should get warned when they are about to use a system that is broken for use for neuro-science experiments. The warning you posted here denotes the worst case: DWM not auto-disabling as it should, not even on a single display setup with a PTB fullscreen window. This setup would be hopeless for any vision science experiment that requires frame accurate timing or precise timestamping.

@kleinerm kleinerm closed this Sep 13, 2015

@suxpert

This comment has been minimized.

Show comment
Hide comment
@suxpert

suxpert Sep 24, 2015

I have to say, even using Windows 10, on the PC with GT630, VBLSyncTest gives a pretty good plot; Even using Linux, on the hybrid graphics laptop (as you know, most of notebook are using hybrid graphics for power saving nowadays), ScreenTest may fail; even if it is hybrid graphics, some laptop can work well; even another laptop do have the same hardware and OS, it do fail too much...

What I mean in the previous post is, even if there are no way to disable DWM on windows 10, there should have some way to obtain a high-precise timing.

suxpert commented Sep 24, 2015

I have to say, even using Windows 10, on the PC with GT630, VBLSyncTest gives a pretty good plot; Even using Linux, on the hybrid graphics laptop (as you know, most of notebook are using hybrid graphics for power saving nowadays), ScreenTest may fail; even if it is hybrid graphics, some laptop can work well; even another laptop do have the same hardware and OS, it do fail too much...

What I mean in the previous post is, even if there are no way to disable DWM on windows 10, there should have some way to obtain a high-precise timing.

@kleinerm

This comment has been minimized.

Show comment
Hide comment
@kleinerm

kleinerm Sep 25, 2015

As i said, hybrid-graphics depends on the specific way that Laptop implements hybrid graphics. Most implement it in a way that is incompatible with precise timing, some do it in a way that doesn't cause problems. The method that is bad for us is cheaper and lower effort to implement for the Laptop manufacturer, therefore better in terms of money saved for them. Given that laptop manufacturers don't make much money with neuroscientists, they won't care for our special needs as long as big customers don't complain.

There's no easy way to find out beforehand, so the best thing to do is to stay away from those hybrid graphics laptops. If you have special needs for your equipment then you have to select your equipment carefully and not just buy whatever lies on the shelf in front of you, it is that simple.

Wrt. to "should have some way to obtain precise timing" - same thing: Almost nobody except neuroscience needs high precision timing, and we don't create much revenue for MIcrosoft, so they won't care. That's why Linux is the route of choice, because that's a system that is made for/by tinkerers and for applications outside the normal desktop computer use cases, so they care much more about such exotic stuff. Also there i can fix many things myself, or with the help of other open-source developers. Hybrid graphics is unfortunately very difficult to do right wrt timing, people in the Linux field are working on it, but progress is slow.

kleinerm commented Sep 25, 2015

As i said, hybrid-graphics depends on the specific way that Laptop implements hybrid graphics. Most implement it in a way that is incompatible with precise timing, some do it in a way that doesn't cause problems. The method that is bad for us is cheaper and lower effort to implement for the Laptop manufacturer, therefore better in terms of money saved for them. Given that laptop manufacturers don't make much money with neuroscientists, they won't care for our special needs as long as big customers don't complain.

There's no easy way to find out beforehand, so the best thing to do is to stay away from those hybrid graphics laptops. If you have special needs for your equipment then you have to select your equipment carefully and not just buy whatever lies on the shelf in front of you, it is that simple.

Wrt. to "should have some way to obtain precise timing" - same thing: Almost nobody except neuroscience needs high precision timing, and we don't create much revenue for MIcrosoft, so they won't care. That's why Linux is the route of choice, because that's a system that is made for/by tinkerers and for applications outside the normal desktop computer use cases, so they care much more about such exotic stuff. Also there i can fix many things myself, or with the help of other open-source developers. Hybrid graphics is unfortunately very difficult to do right wrt timing, people in the Linux field are working on it, but progress is slow.

@AnneMarike

This comment has been minimized.

Show comment
Hide comment
@AnneMarike

AnneMarike Aug 9, 2016

I have similar issues:

%%%
PTB-WARNING: Couldn't determine end-line of vertical blanking interval for your display! Trouble with beamposition queries?!?
PTB-WARNING: Detected end-line is 1080, which is either lower or more than 1.250000 times higher than vbl startline 1620 --> Out of sane range!

PTB-INFO: OpenGL-Renderer is Intel :: Intel(R) HD Graphics 520 :: 4.4.0 - Build 20.19.15.4444
PTB-INFO: VBL startline = 1620 , VBL Endline = 1080
PTB-INFO: Beamposition queries unsupported or defective on this system. Using basic timestamping as fallback: Timestamps returned by Screen('Flip') will be less robust and accurate.
PTB-INFO: Measured monitor refresh interval from VBLsync = 16.694740 ms [59.899106 Hz]. (50 valid samples taken, stddev=0.279935 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.

%%%

Do you have any recommendations what I could try on this laptop to make it work?
Does down-grading to Windows 7 hold ony promise, or is it simply that this display will never bring any joy?
If all fails, do you have a clear recommendation which laptops DO work? (I'm not keen to buy a second laptop, but I need a working system after all)

Best wishes,
Marike

AnneMarike commented Aug 9, 2016

I have similar issues:

%%%
PTB-WARNING: Couldn't determine end-line of vertical blanking interval for your display! Trouble with beamposition queries?!?
PTB-WARNING: Detected end-line is 1080, which is either lower or more than 1.250000 times higher than vbl startline 1620 --> Out of sane range!

PTB-INFO: OpenGL-Renderer is Intel :: Intel(R) HD Graphics 520 :: 4.4.0 - Build 20.19.15.4444
PTB-INFO: VBL startline = 1620 , VBL Endline = 1080
PTB-INFO: Beamposition queries unsupported or defective on this system. Using basic timestamping as fallback: Timestamps returned by Screen('Flip') will be less robust and accurate.
PTB-INFO: Measured monitor refresh interval from VBLsync = 16.694740 ms [59.899106 Hz]. (50 valid samples taken, stddev=0.279935 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.

%%%

Do you have any recommendations what I could try on this laptop to make it work?
Does down-grading to Windows 7 hold ony promise, or is it simply that this display will never bring any joy?
If all fails, do you have a clear recommendation which laptops DO work? (I'm not keen to buy a second laptop, but I need a working system after all)

Best wishes,
Marike

@kleinerm

This comment has been minimized.

Show comment
Hide comment
@kleinerm

kleinerm Aug 10, 2016

Hi Marike,

first of all describe your setup in detail: Exact Name/Model of the Laptop, what is the display setup (seems to be dual-display), is it a HiDPI "Retina" display and what is its resolution? Matlab or Octave version? Full output of PTB from start to end, not just parts of it? I assume this is a laptop with a single Intel graphics chip, not some hybrid graphics laptop ("NVidia Optimus" or "AMD Enduro")?

kleinerm commented Aug 10, 2016

Hi Marike,

first of all describe your setup in detail: Exact Name/Model of the Laptop, what is the display setup (seems to be dual-display), is it a HiDPI "Retina" display and what is its resolution? Matlab or Octave version? Full output of PTB from start to end, not just parts of it? I assume this is a laptop with a single Intel graphics chip, not some hybrid graphics laptop ("NVidia Optimus" or "AMD Enduro")?

@haendelb

This comment has been minimized.

Show comment
Hide comment
@haendelb

haendelb Aug 18, 2016

While searching for a small laptop to be used for visual stimulation I found this thread. It actually seems not trivial nowadays to find a laptop which is not using hybrid graphics or at least has two graphics cards. So my question would be if there is a possibility to disable the embedded (intel) graphics card and always drive the "big one"? And would that solve the problem?
I also wouldn’t mind a suggestion for a 13-14’’ laptop with only one good (psychtoolbox capable) graphics card, if that exists.
Thanks a lot,
Barbara

haendelb commented Aug 18, 2016

While searching for a small laptop to be used for visual stimulation I found this thread. It actually seems not trivial nowadays to find a laptop which is not using hybrid graphics or at least has two graphics cards. So my question would be if there is a possibility to disable the embedded (intel) graphics card and always drive the "big one"? And would that solve the problem?
I also wouldn’t mind a suggestion for a 13-14’’ laptop with only one good (psychtoolbox capable) graphics card, if that exists.
Thanks a lot,
Barbara

@kleinerm

This comment has been minimized.

Show comment
Hide comment
@kleinerm

kleinerm Aug 23, 2016

Hi Barbara,

nope, you usually can't disable the Intel and use the big one on Windows. There may be some unknown Laptop models which would allow this, but those would be the ones where the problem doesn't exist in the first place. Usually this was the case for old Laptops, maybe made sometime before year 2010-2012.

What you can do is disable the big one and only use the Intel iGPU. Of course that means you just wasted a few hundred euros for extra weight and power consumption and won't get any advantage, at least not for neuroscience. The powerful gpu would still be usable for video games. I'm just testing NVidia Optimus with a 1.5 year old laptop under Windows-10 and there you can set per application, which gpu should be used, so one can specifically block Matlab or Octave from using the NVidia. I spent over 8 hours using every trick in the book to get the NVidia to cooperate and it was all complete failure with timing errors in the +/- 33 msecs range. The problem with Intel integrated gpu's is that their Windows drivers are often very buggy and give timing themselves, even without Optimus or HiDPI displays etc. This one required all kind of tweaks to get it working at all and then it still failed in 1/3rd of all PTB demos timing-wise.

However, the recommended operating system for Psychtoolbox is Linux and there is light at the end of the tunnel. I'm currently testing hybrid graphics under Linux and things look mostly good for many hybrid graphics configurations - at least the ones i can test here. With the proper choice of hardware and maybe some installation of beta software - or waiting for a few more months - hybrid graphics should be a solved problem if you run Linux.

kleinerm commented Aug 23, 2016

Hi Barbara,

nope, you usually can't disable the Intel and use the big one on Windows. There may be some unknown Laptop models which would allow this, but those would be the ones where the problem doesn't exist in the first place. Usually this was the case for old Laptops, maybe made sometime before year 2010-2012.

What you can do is disable the big one and only use the Intel iGPU. Of course that means you just wasted a few hundred euros for extra weight and power consumption and won't get any advantage, at least not for neuroscience. The powerful gpu would still be usable for video games. I'm just testing NVidia Optimus with a 1.5 year old laptop under Windows-10 and there you can set per application, which gpu should be used, so one can specifically block Matlab or Octave from using the NVidia. I spent over 8 hours using every trick in the book to get the NVidia to cooperate and it was all complete failure with timing errors in the +/- 33 msecs range. The problem with Intel integrated gpu's is that their Windows drivers are often very buggy and give timing themselves, even without Optimus or HiDPI displays etc. This one required all kind of tweaks to get it working at all and then it still failed in 1/3rd of all PTB demos timing-wise.

However, the recommended operating system for Psychtoolbox is Linux and there is light at the end of the tunnel. I'm currently testing hybrid graphics under Linux and things look mostly good for many hybrid graphics configurations - at least the ones i can test here. With the proper choice of hardware and maybe some installation of beta software - or waiting for a few more months - hybrid graphics should be a solved problem if you run Linux.

@haendelb

This comment has been minimized.

Show comment
Hide comment
@haendelb

haendelb Aug 31, 2016

Dear Mario,
thank you so much for your informative reply.

I definitely will go for Linux this time. I actually now have found the following solution:
TUXEDO Book XC1406 - 14" with NVIDIA Geforce GTX 970M, Intel Core i7 Quad-Core and 16GB RAM
this should be more than sufficient and I was assured that the Intel graphics card can be disabled via the NVIDIA Control Center.

I'm very curious if this will work out.
Thanks again for your input,
Barbara

haendelb commented Aug 31, 2016

Dear Mario,
thank you so much for your informative reply.

I definitely will go for Linux this time. I actually now have found the following solution:
TUXEDO Book XC1406 - 14" with NVIDIA Geforce GTX 970M, Intel Core i7 Quad-Core and 16GB RAM
this should be more than sufficient and I was assured that the Intel graphics card can be disabled via the NVIDIA Control Center.

I'm very curious if this will work out.
Thanks again for your input,
Barbara

@kleinerm

This comment has been minimized.

Show comment
Hide comment
@kleinerm

kleinerm Aug 31, 2016

Barbara,

have you explained them your requirements for precise timing? I am a bit doubtful the NVidia will work without tearing or timing trouble at this point. It would only work if that laptop has a hardware multiplexer (mux). The product info on their website isn't clearly pointing towards or against the existence of such a mux. They might be right that it just works, or it might be that it only works ok for typical desktop use, but not for the requirements of visual stimulation in a neuroscience setting. Would be hard to blame them for not understanding the specific strict needs.

I will probably e-mail them and ask for specifics, as that seems to be a very interesting supplier for Linux laptops in germany/europe.

NVidia has been working on a high quality solution for laptops without a mux throughout the last year. They will give a talk about it in 3 weeks at XDC 2016 in Helsinki. It is currently in early beta test though, i haven't managed to get it working yet at all on a test machine here, and i don't expect that to become easily available with the autumn Linux distro updates, they probably won't make the deadline for that. So it could be until spring 2017 until this will be working in a beginner friendly way, earlier if one wants to deal with compilers and source code.

You might be stuck with the Intel onboard graphics for a while if the laptop is indeed muxless, just as on Windows. However, in my experience the Intel graphics drivers on Linux usually work much better than their Windows counterparts, and the performance of modern Intel graphics is quite good, so that may be sufficient for your use.

Let me know how it is going once you receive it. Also possible to test and tweak it a bit, depending on how exactly that hardware works.

kleinerm commented Aug 31, 2016

Barbara,

have you explained them your requirements for precise timing? I am a bit doubtful the NVidia will work without tearing or timing trouble at this point. It would only work if that laptop has a hardware multiplexer (mux). The product info on their website isn't clearly pointing towards or against the existence of such a mux. They might be right that it just works, or it might be that it only works ok for typical desktop use, but not for the requirements of visual stimulation in a neuroscience setting. Would be hard to blame them for not understanding the specific strict needs.

I will probably e-mail them and ask for specifics, as that seems to be a very interesting supplier for Linux laptops in germany/europe.

NVidia has been working on a high quality solution for laptops without a mux throughout the last year. They will give a talk about it in 3 weeks at XDC 2016 in Helsinki. It is currently in early beta test though, i haven't managed to get it working yet at all on a test machine here, and i don't expect that to become easily available with the autumn Linux distro updates, they probably won't make the deadline for that. So it could be until spring 2017 until this will be working in a beginner friendly way, earlier if one wants to deal with compilers and source code.

You might be stuck with the Intel onboard graphics for a while if the laptop is indeed muxless, just as on Windows. However, in my experience the Intel graphics drivers on Linux usually work much better than their Windows counterparts, and the performance of modern Intel graphics is quite good, so that may be sufficient for your use.

Let me know how it is going once you receive it. Also possible to test and tweak it a bit, depending on how exactly that hardware works.

@juliusverrel

This comment has been minimized.

Show comment
Hide comment
@juliusverrel

juliusverrel May 19, 2017

Hi Mario and everybody,

In my experiments I usually do not specify an exact required presentation time of the stimuli, but I send a trigger to the external hardware (e.g., EEG or motion capture) immediately after calling Screen('Flip'). Will even this be compromised given the PTB warning (copied below form the first message), or can I assume that screen flip (i.e. stimulus presentation) and trigger occur with a minimal delay?

Many thanks, Julius

PTB-WARNING: ==============================================================================================================================
PTB-WARNING: WINDOWS DWM DESKTOP COMPOSITOR IS ACTIVE! ALL FLIP STIMULUS ONSET TIMESTAMPS WILL BE VERY LIKELY UNRELIABLE AND LESS ACCURATE!
PTB-WARNING: STIMULUS ONSET TIMING WILL BE UNRELIABLE AS WELL, AND GRAPHICS PERFORMANCE MAY BE SEVERELY REDUCED! STIMULUS IMAGES MAY NOT
PTB-WARNING: SHOW UP AT ALL! DO NOT USE THIS MODE FOR RUNNING REAL EXPERIMENT SESSIONS WITH ANY REQUIREMENTS FOR ACCURATE TIMING!
PTB-WARNING: ==============================================================================================================================

juliusverrel commented May 19, 2017

Hi Mario and everybody,

In my experiments I usually do not specify an exact required presentation time of the stimuli, but I send a trigger to the external hardware (e.g., EEG or motion capture) immediately after calling Screen('Flip'). Will even this be compromised given the PTB warning (copied below form the first message), or can I assume that screen flip (i.e. stimulus presentation) and trigger occur with a minimal delay?

Many thanks, Julius

PTB-WARNING: ==============================================================================================================================
PTB-WARNING: WINDOWS DWM DESKTOP COMPOSITOR IS ACTIVE! ALL FLIP STIMULUS ONSET TIMESTAMPS WILL BE VERY LIKELY UNRELIABLE AND LESS ACCURATE!
PTB-WARNING: STIMULUS ONSET TIMING WILL BE UNRELIABLE AS WELL, AND GRAPHICS PERFORMANCE MAY BE SEVERELY REDUCED! STIMULUS IMAGES MAY NOT
PTB-WARNING: SHOW UP AT ALL! DO NOT USE THIS MODE FOR RUNNING REAL EXPERIMENT SESSIONS WITH ANY REQUIREMENTS FOR ACCURATE TIMING!
PTB-WARNING: ==============================================================================================================================

@kleinerm

This comment has been minimized.

Show comment
Hide comment
@kleinerm

kleinerm May 19, 2017

Julius, you can assume that your approach is just as compromised, and the time you send your trigger has not much to do with when the stimulus actually shows up on the screen. There can be errors of multiple frame durations, and in principle stimuli might not show up at all in certain scenarios. The only way to do this reliably in your case would be to attach a photo-diode to your monitor and use its signal as trigger signal, or more like multiple photo-diodes to encode some tag into your stimuli that allow to clearly find out what showed up when. The only reliable approach is using Linux, or maybe Windows-7 single-display setup only. Sometimes Windows-10 seems to behave a bit better with dual-display, but single-display visual stimulation, although PTB can't detect compositor interference on Windows 8/8.1/10 at all anymore.

kleinerm commented May 19, 2017

Julius, you can assume that your approach is just as compromised, and the time you send your trigger has not much to do with when the stimulus actually shows up on the screen. There can be errors of multiple frame durations, and in principle stimuli might not show up at all in certain scenarios. The only way to do this reliably in your case would be to attach a photo-diode to your monitor and use its signal as trigger signal, or more like multiple photo-diodes to encode some tag into your stimuli that allow to clearly find out what showed up when. The only reliable approach is using Linux, or maybe Windows-7 single-display setup only. Sometimes Windows-10 seems to behave a bit better with dual-display, but single-display visual stimulation, although PTB can't detect compositor interference on Windows 8/8.1/10 at all anymore.

@juliusverrel

This comment has been minimized.

Show comment
Hide comment
@juliusverrel

juliusverrel May 23, 2017

Hi Mario, thank you for the bad news :-). Unfortunately I can't switch to linux because some people in my lab are still relying on NeuroBS/Presentation. We are using a single screen, and I will get a photo diode.

Just to be sure I understand correctly, because I think you didn't explicitly reply to this aspect: Is even the time at which the Screen/Flip call returns, and at/after which I immediately send a trigger to the EEG system completely unspecified relative to the actual screen flip? Even on a single-monitor setup??

juliusverrel commented May 23, 2017

Hi Mario, thank you for the bad news :-). Unfortunately I can't switch to linux because some people in my lab are still relying on NeuroBS/Presentation. We are using a single screen, and I will get a photo diode.

Just to be sure I understand correctly, because I think you didn't explicitly reply to this aspect: Is even the time at which the Screen/Flip call returns, and at/after which I immediately send a trigger to the EEG system completely unspecified relative to the actual screen flip? Even on a single-monitor setup??

@kleinerm

This comment has been minimized.

Show comment
Hide comment
@kleinerm

kleinerm May 24, 2017

Yes. The time when Screen Flip returns is not guaranteed to correlate with stimulus onset. Could return one or more frames earlier, or later. If you got the warning message you got, then that is the most likely outcome.

Upgrading to Windows 10 might get better behavior on a single display setup, although PTB can't detect if things are fine or not at all. But testing with two different gpu's suggests Win 10 is less broken than Win 8.

Of course you can also dual-boot Linux from another partition or disc drive, or even install and run it on an external USB drive.

kleinerm commented May 24, 2017

Yes. The time when Screen Flip returns is not guaranteed to correlate with stimulus onset. Could return one or more frames earlier, or later. If you got the warning message you got, then that is the most likely outcome.

Upgrading to Windows 10 might get better behavior on a single display setup, although PTB can't detect if things are fine or not at all. But testing with two different gpu's suggests Win 10 is less broken than Win 8.

Of course you can also dual-boot Linux from another partition or disc drive, or even install and run it on an external USB drive.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment