Unable to reduce input lag with VSYNC OFF and uncapped FPS with DLP projector.

Everything about latency. Tips, testing methods, mouse lag, display lag, game engine lag, network lag, whole input lag chain, VSYNC OFF vs VSYNC ON, and more! Input Lag Articles on Blur Busters.
LagIsTooDamnHigh
Posts: 10
Joined: 13 Jun 2021, 08:18

Re: Unable to reduce input lag with VSYNC OFF and uncapped FPS with DLP projector.

Post by LagIsTooDamnHigh » 16 Jun 2021, 18:09

Update:

I recorded my VSYNC Tester at ~400fps on my DLP with VSYNC OFF using a Mac (does not seem possible to disable Triple Buffering caused by Windows DWM because I can't get exclusive fullscreen).

The image is now identical to what the LCD monitor produces:
Screenshot 2021-06-16 at 23.53.01.jpg
Screenshot 2021-06-16 at 23.53.01.jpg (89.22 KiB) Viewed 2185 times
What I noticed was that the displayed content does not change until a color cycle is complete, so the frame that contains the tearlines is being shown for 16ms (while cycling through all the colors on the color wheel). Does this mean it takes 16ms for the DLP to buffer the frame from the cable? So you can't "race the beam" on DLP but can still have tearlines (and sub-refresh cycle latency for the bottom frames (if the color of the updated content corresponds to an early colorwheel?)

User avatar
Chief Blur Buster
Site Admin
Posts: 11647
Joined: 05 Dec 2013, 15:44
Location: Toronto / Hamilton, Ontario, Canada
Contact:

Re: Unable to reduce input lag with VSYNC OFF and uncapped FPS with DLP projector.

Post by Chief Blur Buster » 16 Jun 2021, 22:42

LagIsTooDamnHigh wrote:
16 Jun 2021, 18:09
What I noticed was that the displayed content does not change until a color cycle is complete, so the frame that contains the tearlines is being shown for 16ms (while cycling through all the colors on the color wheel). Does this mean it takes 16ms for the DLP to buffer the frame from the cable? So you can't "race the beam" on DLP but can still have tearlines
Yes, that's right.

You're only "tearing" / "racing the beam" to the DLP's memory. Metaphorically, the DLP is effectively emulating a traditional raster display in its RAM. The resulting refresh cycle is the same as what you see on a CRT/LCD, it's just not synchronously displayed between signal and photons.

Tearlines generally only occur on the signal-side (to display's memory buffer), not from display memory buffer to actual photons. To a display, it's still a full frame refresh cycle (even if the computer spliced many frameslices into the refresh cycle). What effectively happened is that as the computer -- is splicing new frameslices into the same refresh cycle -- but the whole refresh cycle is buffered into the DLP projector's memory. So the tearing is "stored" in the projector's RAM effectively (as a single image with offsets) not real-time to displayed. Kind of like a memory version of that photograph.

When that buffer is output to the display, it is refreshed via multiple near-instantaneous passes of temporal dithering.

So the scanout sync is lost; and you're getting those weird latency differences for different frameslices.

That does not happen on scanout-sync'd displays such as CRTs, LCDs, and OLEDs, where signal scanout is in sync with visible scanout.

Try testing out RTSS Scanline Sync with a DLP (tearingless VSYNC OFF), it usually "feels" more consistent for laggy DLPs. That way, you at least keep top/center/bottom latencies equal, WHILE keeping it also as low as the laggy DLP technology will allow.
Head of Blur Busters - BlurBusters.com | TestUFO.com | Follow @BlurBusters on Twitter

Image
Forum Rules wrote:  1. Rule #1: Be Nice. This is published forum rule #1. Even To Newbies & People You Disagree With!
  2. Please report rule violations If you see a post that violates forum rules, then report the post.
  3. ALWAYS respect indie testers here. See how indies are bootstrapping Blur Busters research!

User avatar
Chief Blur Buster
Site Admin
Posts: 11647
Joined: 05 Dec 2013, 15:44
Location: Toronto / Hamilton, Ontario, Canada
Contact:

Re: Unable to reduce input lag with VSYNC OFF and uncapped FPS with DLP projector.

Post by Chief Blur Buster » 16 Jun 2021, 22:48

LagIsTooDamnHigh wrote:
13 Jun 2021, 19:09
And I can't see evidence of multiple frames being collected in the DLP's "first framebuffer" because of an issue with TestUFO/Browser/VSYNC behaviour?
Browser behavior.

Browsers do not officially properly support VSYNC OFF.

The "VSYNC OFF" mode in browser options is really just triple buffering. It is usually extremely hard to force a browser to do true VSYNC OFF that's not force-triplebuffered.

Browsers are a software DWM-like layer on top of DWM! So when you try to force VSYNC OFF in a web browser (even if your DWM is turned off, like an old copy of Windows XP), the browser software layer is already forcebuffering (DWM style) internally. You must FIGHT a lot of layers just to trick one specific brand of browser to remotely do something resembling true VSYNC OFF with the expected spray of tearlines. It's a very onion layere'd fight.

This is why I complained (a long time ago) in this git text: https://github.com/w3c/html/issues/375

I've already squealed an advocacy article out on this matter: VSYNC API access for browsers. I've already made a modification to a HTML standard (git commit for HTML 5.2 section 7.1.4.2 to mandate requestAnimationFrame() matches refresh rate).

With all the success convincing browser vendors to support high=Hz operation (240fps TestUFO is possible thanks to some of my work collaborating in the FireFox/Chromium bug tracking systems), the hill of VRR as well as VSYNC OFF, is a tall hill especially for browser developers more experienced with 60Hz DELL desktop monitors.

My famous Year 2013 High Hz Browser Tests trailblazed a fair bit of optimizing at multiple browser vendors. Now it's at the point where Chrome is (usually) extremely TestUFO friendly, and so reliable that even www.testufo.com/frameskipping is trusted by monitor overclockers, because of its ability to self-detect browser stutters.

If you would like to help me do a custom open source Chromium fork to allow me to add support to VSYNC OFF & VRR in a way that is compatible to TestUFO.
...I might create a paid BountySource for you. Yes. For realz. Paid money for you if you can get proper tearlines in a web browser.

For such a BountySource, I could probably budget a BountySource of an approximate ballpark 500 dollars for a true tearline in a web browser, and 1000 dollars for tearlines + VRR. It's a long source of frustration that I can't do TestUFO VRR, nor I can't do TestUFO VSYNC OFF -- because of standards limitations.

For you or other readers reading this -- private contracts are possible (inquire within: mark [at] blurbusters.com) if you've got a well vetted LinkedIn/resume -- but would require it to be open source, in a license compatible with my projects. It's not something Blur Busters currently can afford a full time team for, but can throw a high three-figure or low four-figure budget to incentivize, even if it's a private nonstandardized Chromium fork just to support TestUFO-VRR and TestUFO-VSYNC-OFF modes.

Nominally, my easiest goal is that I'd build a self contained TestUFO.exe that runs the said custom-modified web browser (in a fashion similar to Chromium Embedded Framework), and allow the user to configure VSYNC ON, VSYNC OFF, and VRR.

It's crazy the amount of nonstandard heuristics I need to do in TestUFO, just to detect a single framedrop to automatically invalidate scientifically frame-pacing critical tests such as www.testufo.com/frameskipping and others ... There's no APIs that tells me a dropped frame.

(P.S. Self aside. Hell, beamracing in JavaScript would be a crazy exercise to abuse a browser for! Assuming there's an added JavaScript call or flag to turn on/off VSYNC (not necessary for the aforementioned bounty, just a bonus)-- then I think I can actually can port my Tearline Jedi into JavaScript via theoretical modified web browser with adequate VSYNC-access APIs. Javascript powered beam racing -- ha, ha. Javascript API to turn VSYNC ON briefly, measure the monitor Hz to an exact amount like I already do at www.testufo.com/refreshrate ... then call theoretical JavaScript API to VSYNC OFF. Then use extrapolated prediction of VSYNC, use now() microsecond counter to decide when to create raster-positioned tearlines. Albiet Meltdown/Spectre timer-fuzzing may kill that precision, though 20 microsecond fuzz still allows me to place tearlines within a few pixels of its intended vertical position. JavaScript performance should be performant enough on lightly loaded systems in theory, running in Performance Mode rather than Battery Saver or Balanced Mode. Though the browser's own power management may still futz things up, like it already sometimes do to TestUFO, making framepacing less precise than it should be in TestUFO.)

For now, standalone executables is the only way to reliably do these sorts of tests. You did the correct move.

/vent (at web browsers)
Head of Blur Busters - BlurBusters.com | TestUFO.com | Follow @BlurBusters on Twitter

Image
Forum Rules wrote:  1. Rule #1: Be Nice. This is published forum rule #1. Even To Newbies & People You Disagree With!
  2. Please report rule violations If you see a post that violates forum rules, then report the post.
  3. ALWAYS respect indie testers here. See how indies are bootstrapping Blur Busters research!

User avatar
RealNC
Site Admin
Posts: 3741
Joined: 24 Dec 2013, 18:32
Contact:

Re: Unable to reduce input lag with VSYNC OFF and uncapped FPS with DLP projector.

Post by RealNC » 18 Jun 2021, 00:49

LagIsTooDamnHigh wrote:
16 Jun 2021, 18:09
I recorded my VSYNC Tester at ~400fps on my DLP with VSYNC OFF using a Mac (does not seem possible to disable Triple Buffering caused by Windows DWM because I can't get exclusive fullscreen).
Windows 10 uses a new mode instead of exclusive fullscreen by default. DWM is disabled in that mode unless an overlay is showing (like the Windows volume bar.) To force the old mode, disable "fullscreen optimizations" in the "compatibility" tab of the file properties of your executable. But you don't actually need this. As I said, the new mode runs without DWM, unless something needs to be shown on top of the fullscreen application's output.
SteamGitHubStack Overflow
The views and opinions expressed in my posts are my own and do not necessarily reflect the official policy or position of Blur Busters.

LagIsTooDamnHigh
Posts: 10
Joined: 13 Jun 2021, 08:18

Re: Unable to reduce input lag with VSYNC OFF and uncapped FPS with DLP projector.

Post by LagIsTooDamnHigh » 18 Jun 2021, 03:55

@RealNC: In my Windows 10 version (20H2) DWM and Triple Buffering are on by default despite the NVIDIA settings. The "Disable fullscreen optimizations" and "High DPI scaling override" compatibility also make no difference.

Do you have any source on Windows changing DWM behaviour (and when it was introduced)?
Last edited by LagIsTooDamnHigh on 18 Jun 2021, 04:05, edited 1 time in total.

LagIsTooDamnHigh
Posts: 10
Joined: 13 Jun 2021, 08:18

Re: Unable to reduce input lag with VSYNC OFF and uncapped FPS with DLP projector.

Post by LagIsTooDamnHigh » 18 Jun 2021, 04:05

@Chief thanks a lot for confirming the tearing/buffering issue on the DLP - makes me feel at least a little bit better of knowing how the stuff works inside. :D

Great work also on the VSYNC API. Being able to have finer grained access to and information about refresh timings would be awesome. I never realized that spectre timer-fuzzing could actually meddle with the precision of the beamracing.

I would love to test RTSS Scanline Sync but both programs I work with (PyGame and Chrome) will open in "borderless fullscreen sized windows" on Windows and thus force DWM and triple buffering on.

How long would it take for you to create a Chromium fork in exclusive fullscreen/with tearlines? It would be very useful, please open a BountySource for it - I'd surely contribute to it!

User avatar
RealNC
Site Admin
Posts: 3741
Joined: 24 Dec 2013, 18:32
Contact:

Re: Unable to reduce input lag with VSYNC OFF and uncapped FPS with DLP projector.

Post by RealNC » 18 Jun 2021, 08:15

LagIsTooDamnHigh wrote:
18 Jun 2021, 03:55
Do you have any source on Windows changing DWM behaviour (and when it was introduced)?
https://devblogs.microsoft.com/directx/ ... mizations/

However, note that in your code you should actually implement a fullscreen context, not a borderless window that's the size of the desktop. Otherwise DWM will always be active.
SteamGitHubStack Overflow
The views and opinions expressed in my posts are my own and do not necessarily reflect the official policy or position of Blur Busters.

User avatar
Chief Blur Buster
Site Admin
Posts: 11647
Joined: 05 Dec 2013, 15:44
Location: Toronto / Hamilton, Ontario, Canada
Contact:

Re: Unable to reduce input lag with VSYNC OFF and uncapped FPS with DLP projector.

Post by Chief Blur Buster » 18 Jun 2021, 17:11

LagIsTooDamnHigh wrote:
18 Jun 2021, 04:05
How long would it take for you to create a Chromium fork in exclusive fullscreen/with tearlines? It would be very useful, please open a BountySource for it - I'd surely contribute to it!
How much would you contribute?

250 is the minimum total pledges accumulated, for me to begin a dollar-match bounty. I generally create BountySources once there's enough demand. I actually create them (RetroArch rolling-scan CRT emulator, $492 bounty, still unclaimed).

Generally, I prefer to see at least 250 dollars of volunteer pledges to start dollar-matching promoting them (with our own 250 dollars), as I want to start the reserve at no less than 500 for any newly created Blur Busters bounties. In other words, no bounties under approximately 500 at Blur Busters from now on (unless it's essentially a one-liner type thing).

There's a shocking number of cheap DIY refresh rate race projects that can be done as DIY, including some tools projects that helps future generic LCD 1000Hz+ projects, but are currently missing open source components.

The thought is that there are too many projects Blur Busters can afford to do concurrently (we have to cherrypick and put food on multiple people's tables.).

However, I can work on multiplier factors like starting initiatives (X-prizes / advocacy / bounties) to incentivize maybe an order of magnitude more open source projects than we can do alone.

Long-term, a better move is that I am thinking of starting a Blur Busters X-Prize section of Blur Busters, to incubate maybe 10+ different projects. Even if it succeeds on getting 2-3 off the ground, then it's a success.
Head of Blur Busters - BlurBusters.com | TestUFO.com | Follow @BlurBusters on Twitter

Image
Forum Rules wrote:  1. Rule #1: Be Nice. This is published forum rule #1. Even To Newbies & People You Disagree With!
  2. Please report rule violations If you see a post that violates forum rules, then report the post.
  3. ALWAYS respect indie testers here. See how indies are bootstrapping Blur Busters research!

Post Reply