On the M5, the 120 Hz panel skips frames when the other screen redraws
The sync test showed a climbing JS STREAK while the VSYNC pad visibly flashed. Both were right. The page drew every frame on time, Chrome handed every frame to macOS on time, and the window server still left some of them off the screen: the ones due just before the Dell's refresh, whenever the Dell had something to redraw. A plain native app loses frames the same way, so this is macOS and not Chrome. Nothing a page can read reports it, and a page cannot record its own screen well enough to find out, so the fix is a recorder outside the browser that reads the screen and tells the page. With the panel set to a fixed 60 Hz, the same Dell animation costs about one frame every 7 seconds instead of about 13 a second.
Every frame was drawn on time; one in five never appeared
A page draws a small code strip holding its frame counter. A recorder built on ScreenCaptureKit reads the strip from every frame the window server composites, at the display's own rate. For a refresh with nothing new, the window server delivers an explicit idle notice instead of a frame, so a held refresh is observed, not inferred: 417 of the 450 missing frames in this run have that notice in the right place.
The frames are lost after Chrome has handed them over
So the page is not late and Chrome is not late. The window server had the frame and did not use it.
A native app loses them too, and no Chrome flag avoids it
The skips follow the second screen
Repeated five hours later on the fork page itself, interleaved: Dell still 2.6 and 1.3 a second, Dell at 60 fps 37.3 and 25.2. Three more observations tie the skips to the Dell's refresh, not to load in general.
They fall on the Dell's 60 Hz grid
| Run | Skips | Gaps between skips that are a whole number of Dell refreshes |
|---|---|---|
| 2 (Dell as found) | 67 | 66 of 66 |
| 5 (Dell as found) | 24 | 19 of 23 |
| 6 (Dell still) | 22 | 21 of 21 |
| 7 (Dell at 60 fps) | 438 | 432 of 437 |
The built-in panel refreshes twice per Dell refresh. If skips were unrelated to the Dell, half the gaps between them would be odd numbers of 120 Hz refreshes.
A refresh is passed over when a new Dell frame is about to appear, and otherwise not
The Dell is almost never still
Even behind a full-screen still window the Dell was updated about 30 times a second; the changing region was the power and network readouts in its menu bar. With its windows as found, the Dell was updated on every one of its refreshes, over most of its area. The two displays also run on separate clocks: the Dell's period measured 16.6676 ms against 2 × 8.3333 ms, a drift of 56 µs per second, so the position of the Dell's refresh between the built-in panel's refreshes slides through a full cycle every 149 seconds.
The rate swings by the minute
Why nothing in the page saw it
| Signal | What it measures | Sees a frame the window server dropped? |
|---|---|---|
rAF timestamps, performance.now(), dispatch lag | When the page was asked to draw | No. Intervals stayed within 6.3 to 10.3 ms in every run. |
| Post-rAF commit probe, long animation frames | How long the main thread took | No. The page's work took about 0.1 ms a frame. |
presentationTime (Element Timing, paint timing) | Chrome's estimate of the refresh a frame will land on | No. See below. |
The page capturing its own screen (getDisplayMedia) | The composited screen, through Chrome's capture | No. The capture itself loses about one frame in eight. See below. |
| A recorder outside the browser | What the window server showed, refresh by refresh | Yes. |
Chrome 158 exposes a per-frame presentation time to pages, and it is tempting to trust it. On macOS it is not a measurement. Chrome gets no report from the window server; it computes the time from its own commit time and a fixed assumption about how late a commit can be (1.5 ms before a display time) and still make the following refresh (GetDisplaytime, whose comment notes the outcome is inconsistent near that margin). Checked frame by frame against the recording:
| Run | Real skips | Reported by Chrome | Real ones among them | Phantom |
|---|---|---|---|---|
| 7 (Dell at 60 fps) | 450 | 0 | 0 | 0 |
| 2 (Dell as found) | 68 | 4 | 1 | 3 |
| 5 (Dell as found) | 25 | 114 | 10 | 104 |
It misses real skips and, when Chrome's commit time wanders around its assumed margin, reports ones that did not happen. The fork page offers it as an optional readout (Pres probe), labelled as an estimate.
A page cannot record itself either
The first version of the fork shared its own screen and read the strip from the captured frames. Run side by side with the recorder for 20 seconds, the recorder saw 5 frames never shown and the page reported 137. Chrome's screen capture is the reason: asked for 120 frames a second from a display showing 120, it delivered 95 to 107 even when the page only counted the frames and discarded them, and a frame the capture missed looks exactly like a frame the display skipped. That version was withdrawn.
The metric: a recorder outside the browser
One instrument, used two ways. Both read the same code strip with ScreenCaptureKit, at twice the display's rate, from a rectangle just large enough to hold it.
Live, in the page
node tools/frame-truth/live.mjs
Start that in a terminal on the Mac, open http://127.0.0.1:8947/ (the recorder serves the fork page itself) and press Screen check. The Pages copy works too; Chrome then asks once whether the page may access other apps and services on this device, because a web page is reaching a program on the same Mac. The recorder follows the strip above the VSYNC pad and tells the page each time the cadence breaks; the page adds a third HUD line, SCREEN … SKIP n (x/s) … lost m … SHOWN STREAK, flashes the lamp SCREEN SKIP, marks the scope in pink, and matches Saw Jerk against it. Without the recorder the line says SCREEN UNCHECKED, so a long JS STREAK can no longer be read as a clean screen. Checked on the real screen with a 60 fps window on the Dell: in 20 seconds the recorder counted 156 refreshes off cadence and 139 frames never shown, the page showed 156 and 139, and the page's own JavaScript lines showed 0 hard drops.
From the command line, for any page
node tools/frame-truth/measure.mjs --url http://localhost:8936/your-page.html --inject --seconds 300
It opens the page in a plain Chrome window on the built-in display, adds the strip if the page has none, records, and prints frames shown, refreshes held, frames never shown (and how many of them the window server also announced with an idle notice), frames off cadence, the page's own rAF statistics, and for each missing frame whether the page's rAF was late. --other still covers the other display with a still window for the duration; --other anim does the opposite. For the shape pages, compare never shown and off cadence per second between two versions under --other still: what remains above the still-Dell floor (one to three a second in the four runs taken at 120 Hz) is the page's and Chrome's own doing. With two displays the tool also reads both clocks and prints how long they take to realign (about 150 seconds with the panel at 120 Hz, 296 at 60 Hz), what share of that the recording saw, and each kind of break by alignment. A figure for comparison should come from a recording that saw a whole cycle. A stretch where the strip cannot be read, because a window was moved or covered, is cut out and listed.
Set to 60 Hz, the panel shows nearly every frame
On 3 Dec the built-in panel was switched from ProMotion to a fixed 60 Hz (System Settings, Displays, Refresh rate) and the fork page measured again, five minutes per condition. Under the 60 fps animation on the Dell that had cost 4 to 29 frames a second at 120 Hz, the panel lost 44 frames in 328 seconds: 0.13 a second, one frame in 448, against one in 9 at 120 Hz. With the Dell left as found it lost 0.42 a second, and behind a still window 0.49.
The page's part did not change. In the 9 runs at 60 Hz its rAF intervals stayed within 15.5 to 17.8 ms. Of the frames that never appeared, 190 have the page's timing on record and every one of them was drawn on time; the other 182 were older than the page's trace. The live Screen check holds at this rate too: over 30 seconds with the Dell as found the recorder counted 27 refreshes off cadence and 27 frames never shown, the page showed 27 and 27, and its JavaScript lines showed 0 hard drops.
What is left comes one refresh at a time, in two forms
A break at 60 Hz lasts one refresh and costs one frame. In the first form the screen keeps the old frame for a refresh and the frame due then never appears, as at 120 Hz. In the second the next frame appears a refresh early, in place of the one due, and then stays for two. The three five-minute runs had 196 of the first form, 67 of the second, and 23 that combined the two or lasted a refresh longer.
So the cause has not gone; it has become rare. At 120 Hz a refresh that fell 5 to 6 ms before a new Dell frame was passed over about half the time. At 60 Hz, in the worst millisecond of the worst run, 17 refreshes in 1,065 were. The loss still comes in spells, while the clocks pass through that alignment: the run with the Dell as found lost 2.0 frames a second in its worst ten seconds and 0.3 in its median ten.
Why 60 Hz and not 59.94
The two displays do not run at the same rate, and no setting makes them. The system's timing tables (display-timings.py) give the Dell one 60 Hz timing at 3840 × 2160: a pixel clock of 533.25 MHz over a raster of 4000 × 2222, which is 59.9966 Hz. The panel's settings are 60, 59.9401, 50, 48 and 47.952 Hz. Read on the running displays with a display link on each (gtcap clocks; it agrees with the recorder's timestamps to a microsecond), the Dell refreshes at 59.9967 Hz and the panel, set to 60 Hertz, at 60.0001 Hz. Over the half hour of runs both rates wandered against the Mac's clock by 0.5 parts in a million, and together: the panel's gain on the Dell was 56.3 µs a second in each of the 6 runs that read the clocks. That is what two rates taken from one oscillator do, so the difference between them is set by the tables and does not drift.
At that rate each alignment of the two returns after 296 seconds. Set to 59.94 Hertz, the panel would run 0.057 Hz below the Dell instead of 0.0034 Hz above it, and each alignment would return after about 18 seconds: the same spells, about 17 times as often and as much shorter. 60 Hertz is the setting nearest the Dell's rate. The 59.94 setting was not measured.
The price is latency, and a break twice as long
A break at 60 Hz lasts 16.7 ms instead of 8.3. Frames also take longer to arrive. From the rAF timestamp to the refresh that first showed the frame took 1.5 to 4.5 refreshes at 60 Hz, which is 24 to 75 ms, against 20 to 37 ms at 120 Hz (2.4 to 4.4 refreshes). The depth is steady within a run and differs from run to run; why a run settles where it does was not found. Reading the clocks is not the cause: read in the middle of a run, they changed nothing.
What this means for 120 Hz work on this Mac
- At 60 Hz the panel is nearly exempt. With the refresh rate set to 60 Hertz the same Dell activity cost 0.1 to 0.5 frames a second over five minutes, where 120 Hz lost 4 to 29. The price is a break of 16.7 ms instead of 8.3 and up to twice the latency. 59.94 Hertz would not be better than 60.
- A page cannot fix these skips. They happen after its frame has been accepted. A page can only avoid adding its own: late rAF callbacks and long frames are still what the first two HUD lines measure, and they still matter.
- Judge smoothness with the Dell quiet. A window repainting at 60 fps on the Dell cost the built-in panel between one frame in thirty and one in three, depending on the minute. Anything that repaints continuously there (a streaming agent session, a spinner, a video) is a candidate.
- The rate swings. The two displays' clocks drift, and the same Dell activity cost 29 frames a second at one moment and 4 half a minute later. Compare runs taken close together, repeat them, and prefer a run of a few minutes to one of 20 seconds.
- No Chrome setting avoids it. A native app is hit as well. What helps is on the system side: the panel set to 60 Hz, less redrawing on the Dell, or the Dell detached (not tried).
- A streak needs a named layer.
JS STREAKis a statement about the page's scheduling. OnlySHOWN STREAK, with the screen check on, is a statement about the screen.
Not established
- Gaps without the idle notice. For a refresh with nothing new the window server usually sends an idle notice; for some it sends nothing at all. In the first session nearly every gap carried the notice (417 of 450 in run 7); in the second, with other windows active on the built-in display, only about half did. The gaps without it fall on the same refreshes relative to the Dell as the others (190 of 203 in run 10, against 405 of 407 with the notice), so they are counted; the runs table gives both figures.
- The recorder's own cost. Recording a tight rectangle is cheap but not free for the window server. In runs 3 and 4 the whole Dell was logged as well, which adds work to each of its updates, and the counts were higher (16.9 and 14.5 per second); given how far the rate swings by itself, the recorder's share cannot be read off those two runs. The percentages in that figure are upper figures.
- The mechanism inside the window server. The timing says the built-in panel's refresh is passed over when the Dell's refresh is being prepared, at about two positions of the Dell's clock per cycle. Why is not visible from outside.
- A single-display control and other browsers. Not run. The Dell could not be detached from here.
- Your own Chrome profile. The runs used a fresh profile. The two presentation flags that field trials may switch on were tried and change nothing, so this is unlikely to matter.
- A Dell timing of exactly 60 Hz. With one, the two displays would hold one alignment for hours instead of sliding through all of them every five minutes. Over DisplayPort the Dell's table has such a timing only up to 1920 × 1080 (at 60 and 59.94 Hz); another connection may offer one at full resolution. Whether the alignment the displays would then hold is a good one was not tried.
- At 60 Hz: whose the remaining breaks are, and the 59.94 setting. No native control was run at 60 Hz, so the early-frame form may be Chrome's own doing. One cycle of the clocks was recorded per condition, on a machine that other agent sessions were drawing on, so the three rates differ by more than the Dell's state. The 59.94 Hertz setting was reasoned about, not measured.
- 60 fps content on the 120 Hz panel. One run of the fork's 60 Hz mode lost 50 strip frames a second, but in that mode every picture is submitted twice and the strip counts both, so the figure does not say what the eye sees. A count of pictures, not submissions, is still to be made.
The runs
First session, 17:25 to 17:35, nobody at the machine
| Run | Dell | Seconds | Never shown | Per second | With idle notice | rAF interval, ms | rAF over 1.5 refreshes | Caught by Chrome's estimate | Note |
|---|---|---|---|---|---|---|---|---|---|
| 1 | as found | 20.2 | 80 | 3.96 | 30 | 7.30 to 9.40 | 0 | 13 of 80 | |
| 2 | as found | 12.2 | 68 | 5.55 | 61 | 7.34 to 9.33 | 0 | 1 of 68 | Chrome trace recorded |
| 3 | as found | 20.1 | 340 | 16.87 | 294 | 6.33 to 10.34 | 0 | 0 of 340 | Dell recorded too |
| 4 | still window | 20.3 | 295 | 14.51 | 288 | 6.34 to 10.33 | 0 | 0 of 295 | Dell recorded too |
| 5 | as found | 20.4 | 25 | 1.22 | 22 | 6.33 to 10.34 | 0 | 10 of 25 | |
| 6 | still window | 20.1 | 22 | 1.09 | 22 | 6.33 to 10.34 | 0 | 0 of 22 | |
| 7 | 60 fps animation | 20.0 | 450 | 22.53 | 417 | 6.37 to 10.32 | 0 | 0 of 450 |
Second session, 22:44 to 23:00, the owner at the machine with his own windows on both displays
| Run | Dell | Seconds | Never shown | Per second | With idle notice | rAF interval, ms | rAF over 1.5 refreshes | Caught by Chrome's estimate | Note |
|---|---|---|---|---|---|---|---|---|---|
| 8 | as found | 20.6 | 314 | 15.26 | 234 | 7.30 to 9.40 | 0 | n/a | 22:44 |
| 9 | still window | 20.3 | 53 | 2.61 | 21 | 7.30 to 9.40 | 0 | n/a | 22:44 |
| 10 | 60 fps animation | 20.2 | 752 | 37.29 | 411 | 7.20 to 9.40 | 0 | n/a | 22:44 |
| 11 | still window | 20.3 | 26 | 1.28 | 12 | 7.30 to 9.50 | 0 | n/a | 22:47 |
| 12 | 60 fps animation | 20.2 | 509 | 25.25 | 270 | 7.30 to 9.40 | 0 | n/a | 22:47 |
| 13 | 60 fps animation | 20.5 | 346 | 16.90 | 253 | n/a | n/a | n/a | 22:50, native app, no browser |
| 14 | still window | 20.6 | 22 | 1.07 | 21 | n/a | n/a | n/a | 22:50, native app, no browser |
| 15 | 60 fps animation | 19.6 | 590 | 30.09 | 416 | 7.30 to 9.40 | 0 | n/a | 22:51, Chrome with VSyncAlignedPresentation |
| 16 | 60 fps animation | 20.3 | 755 | 37.12 | 567 | 8.20 to 8.50 | 0 | n/a | 22:51, Chrome with CADisplayLinkInGpu |
| 17 | 60 fps animation | 20.1 | 31 | 1.54 | 10 | 7.20 to 9.40 | 0 | n/a | 22:54 |
| 18 | as found | 20.5 | 5 | 0.24 | 4 | 7.30 to 9.40 | 0 | n/a | 22:55, the page also capturing its own screen |
| 19 | 60 fps animation | 179.3 | 2282 | 12.73 | 871 | 7.20 to 9.50 | 0 | n/a | 22:57, three minutes |
Third session, 3 Dec, 09:47 to 10:18, the panel at 60 Hz, the owner at the machine and other agent sessions drawing on both displays
| Run | Dell | Seconds | Never shown | Per second | Kept old frame | Next frame early | Other breaks | rAF interval, ms | JS hard drops | rAF to screen, ms | Started, note |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 20 | 60 fps animation | 19.7 | 3 | 0.15 | 1 | 2 | 0 | 15.6 to 17.7 | 0 | 41 | 09:47 |
| 21 | as found | 7.3 | 1 | 0.14 | 0 | 0 | 1 | 15.6 to 17.7 | 1 | 75 | 09:50, Dell recorded too |
| 22 | 60 fps animation | 328.4 | 44 | 0.13 | 19 | 25 | 0 | 15.5 to 17.8 | 2 | 74 | 09:52, one cycle of the clocks |
| 23 | still window | 291.1 | 142 | 0.49 | 99 | 17 | 14 | 15.6 to 17.8 | 16 | 24 | 10:00, one cycle; 7.9 s left out; page timing for the last minute only |
| 24 | as found | 39.0 | 17 | 0.44 | 13 | 4 | 0 | 15.6 to 17.8 | 1 | 41 | 10:08, clocks read in mid-run |
| 25 | as found | 19.0 | 23 | 1.21 | 7 | 15 | 1 | 15.6 to 17.7 | 1 | 58 | 10:10 |
| 26 | as found | 19.0 | 10 | 0.53 | 10 | 0 | 0 | 15.6 to 17.7 | 1 | 58 | 10:10 |
| 27 | as found | 19.0 | 7 | 0.37 | 7 | 0 | 0 | 15.6 to 17.7 | 2 | 74 | 10:11 |
| 28 | as found | 299.0 | 125 | 0.42 | 78 | 25 | 9 | 15.6 to 17.8 | 1 | 41 | 10:12, one cycle of the clocks |