Sync failure on a dual display setup

As a diagnostic aid in the three most recent PTB 3.0.17 betas since february 2021, there is one new visual way for a human observer (but not for PTB itself) to find out if sync failure is due to interference by the desktop compositor on Windows-10, or if the reason is a different one, e.g., generally bad/noisy system timing or other display driver bugs:

Screen('Preference','Visualdebuglevel', 6);

If the compositor is at work, and thereby the root cause of timing problems, the window will turn invisible - ie. you see the usual ptb output in the command window, but nothing on the screen, just the regular desktop GUI. This will, e.g., happen on HiDPI or mixed DPI displays if something is not optimal, on multi-display setups if something is not optimal, if Windows has a bad hair day, or if on an otherwise working multi-display setup the compositor kicks in in the middle of a session, e.g., because the user clicked on some gui window, the matlab window etc. ie. interacted in any way with the desktop GUI on the other monitor.

-mario