Skip to content

Mac: the display link adds ~20 ms of input lag on fixed-rate screens, and fullscreen latency 2 applies to every screen #822

Closed

Description

@dpadr

Environment

Mac MacBook Air Mac14,2, Apple M2
Screen built-in Liquid Retina, 60 Hz fixed rate (minimumRefreshInterval = maximumRefreshInterval = 1/60 s)
macOS 27
nxnative 635e8008 (main) and PR #684's branch
Game Lollipop Chainsaw RePOP 0100DD301A686000 (PR #684's profile), --platform mac-app

Symptom

Controls feel slightly unresponsive, in fullscreen especially. The game holds 60 fps.

Measurements

All runs are fullscreen, along the profile's smoke route from a new save, with DM_NVN_TSV. Rows are counted from 40 s on.

Display link, latency 2 (fullscreen default) Display link, DM_PRESENT_LATENCY=1 DM_PRESENT_LINK=0
Game present call → on screen, p50 50 ms 50 ms 29 ms
p5 / p95 37 / 53 ms 39 / 57 ms 19 / 45 ms
@link_lead_ms p50 32.8 ms 32.8 ms —
On-screen intervals off 16.7 ± 2 ms 0.3% 0.3% 0.3%
Frame step changes none none none
  • The 50 ms figure matches the log's own game enqueue to target display p50 50.2 ms.
  • Dropped frames after loading: 27 in about 7,200 with the link at latency 2, and 20 with the link off.
  • At latency 1, 70 and 184 presents were shown a refresh late in two runs. Almost all of them came in one stretch of about 10 s while the game loaded from its menu. After that the rate matched latency 2.

Problems

  1. Fullscreen frame latency 2 applies to every screen (f748a05, Mac: on a ProMotion built-in display the frame step drops to 30 / 20 fps on frames that are not expensive; at a fixed 60 Hz it does not #347). It was measured only on built-in ProMotion screens. On this fixed-rate screen the link lead is 33 ms at both latencies, so it adds nothing here.
  2. **The display link adds about 20 ms of input lag on a%2

Activity

  1. seedds commented on Nov 1, 2026

    @seedds
    Owner

    The fullscreen latency policy is corrected in cadd4be6.

    This is a general correction in the shared presentation path. Confidence in the policy fix is high; the existing ProMotion workaround remains a workaround for the system's missed presents.

    Validation: the full graphics suite passed, including 64 display-link checks with the Metal lifecycle test; all 185 iOS sources compiled; C/Objective-C lint had no new findings; all 11 documentation tests passed. The focused display-link and documentation checks also passed after rebasing onto current main. Physical fixed-rate gameplay validation is still pending.

    Regression risk was judged moderate because shared Mac presentation state changes. The selected fullscreen comparisons were TotK (the original workaround), BotW (another affected frame-step profile), and Pokemon Scarlet (a different engine), all named by regress.py impact. They were stopped at the maintainer's request during shader/host preparation, before gameplay comparisons; no game regression result is claimed.

    The remaining roughly 20 ms of presentation delay is unresolved. Your measurements show the same 50 ms median with latency 1 and 2, so narrowing the policy does not establish a fix for that delay. Its cause and fix remain explicitly open in the reference finding. Closing this issue for the policy correction does not mark that timing investigation as resolved.

    Thanks for the measurements and diagnosis; they are credited in the commit with a co-author trailer.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions