Repository navigation
Description
What happened?
On SDR 23.976 sources with Match Frame Rate on, a very short burst of pink/magenta noise sometimes appears over the black screen before the first video frame (speckle-like, not a solid full-screen colour, and not blocks inside the video picture; 3 of 6 logged starts, plus 2 more seen without a log; random). The engine writes rate-only criteria, sees the switch start, and releases the play gate 50 to 135 ms later through the rate-only criteria already satisfied exit, because the display link already reads the requested rate. tvOS has not reported the end of the switch at that point. When the gate does wait for modeSwitchEnd on this panel, tvOS reports switches of 2.5 s (Match Frame Rate off, panel stays at 50 Hz) and 2.9 s (Dolby Vision, range and rate). So the first frame and playback most likely go out while the TV is still re-locking HDMI.
Expected: no picture until the TV has finished the switch, as on the HDR path.
Controls on the same TV and media:
- Match Frame Rate off: no noise in any start.
- Another tvOS player app, Match Frame Rate on: no noise in about 6 starts.
- Dolby Vision sources (gate waits for
modeSwitchEndor the cap): no noise.
The host mounts AetherPlayerSurface over a black background with nothing drawn over it, so the only things on screen before the first frame are the surface's black background and the player layer.
In #885 the exact-rate exit is described as correct ("released ... because the panel already measured the requested 23.976 Hz, before tvOS delivered the end notification"). This report is the visible cost of that exit on this panel: the display link reads the new cadence as soon as the compositor runs at it, and the HDMI sink re-locks well after.
Steps to reproduce
- Match Content on with Match Frame Rate on; home screen in its default 50 Hz SDR mode.
load()an SDR 23.976 source (native route, loopback HLS), resume position or start.- Leave the player (
stop(), which resets the criteria), and load again. Repeat 5 to 10 times. - Watch the TV right before the first frame. Some starts show the pink noise over black.
AetherEngine version or commit SHA
7.53.1
Host app
Custom / my own integration
Platform
tvOS
OS version
tvOS 27.2
Device / chip
Apple TV 4K (3rd gen, 2022), AppleTV14,1
Playback path
Native AVPlayer
Source media
MKV, H.264 Main 1920x1080 23.976 fps SDR, E-AC-3 5.1 (stream-copied as ec-3)
Error codes / log lines
A start that showed the noise:
11:25:35.768 [DisplayCriteria] panel readout before apply: currentEDR=1.00 potentialEDR=1.00 headroomLimit=unspecified switching=no matching=on hdrEligible=yes provenHDR=no
11:25:35.768 [DisplayCriteria] SET: format=sdr codec=hvc1 rate=23.976 extensions=none
11:25:35.859 [NativeAVPlayerHost] #1 load url=http://127.0.0.1:50723/<redacted>/master.m3u8 startPos=1088.70s headers=none
11:25:35.920 [DisplayCriteria] rate-only criteria already satisfied (start pre-gate (start notification, before gate entry) 88ms before gate entry, total 52ms, panel 23.976Hz, the requested rate; released 5948ms before the 6000ms cap)
11:25:36.055 [NativeAVPlayerHost] #1 layer.isReadyForDisplay=true t+0.20s
11:25:36.148 [NativeAVPlayerHost] #1 timeControlStatus=playing reason=- t+0.29s
11:25:39.712 [DisplayCriteria] mode check (native): content=23.976 requested=23.976 panel=23.977Hz (nominal 23.977) player=13.067fps
The same switch when the gate waits for the end (Match Frame Rate off, so the panel stays at 50 Hz; and a DV start):
11:38:08.812 [DisplayCriteria] switch settled via modeSwitchEnd (start pre-gate (start notification, before gate entry) 10ms before gate entry, total 2544ms, switch 2506ms end to end, panel 50.001Hz, neither the requested rate nor a multiple of it)
11:35:01.340 [DisplayCriteria] switch settled via modeSwitchEnd (start pre-gate (start notification, before gate entry) 2052ms before gate entry, total 842ms, switch 2885ms end to end, panel 23.976Hz, the requested rate)
Six logged SDR starts, Match Frame Rate on:
| Start | Pink noise | Switch start before gate entry | Gate released after | First frame after SET |
|---|---|---|---|---|
| A | yes | 88 ms | 52 ms | 287 ms |
| B | no | 9 ms | 105 ms | 166 ms |
| C | yes | 135 ms | 51 ms | 293 ms |
| D | no | 10 ms | 102 ms | 204 ms |
| E | no | 64 ms | 51 ms | 165 ms |
| F | yes | 51 ms | 50 ms | 202 ms |
Noisy and clean starts overlap in every timing, so whether a start shows the noise looks like a race inside the TV's re-lock. What they share is that the picture always goes out within 300 ms of the switch starting, long before tvOS reports any switch on this panel as finished.
Anything else
Suggested direction (your call): when a switch start was observed for this write, do not settle on an .exact reading alone; wait for modeSwitchEnd or the cap as the HDR path does, or require a dwell past the sink's re-lock. Keep the fast exit when no switch started (panel already at the rate, the #449 case). #348's overlap of load and switch would keep the startup cost down.
Output chain: LG C2 OLED, Apple TV connected directly over HDMI (no AVR or soundbar).
Activity
fix(display): a superseded load cannot stop the newer load's pre-writ…
Merge pull request #952 from superuser404notfound/fix/950-rate-switch…
superuser404notfound commentedon Nov 1, 2026
Thanks for the detailed report. The table and the two
modeSwitchEndcontrols showed where to look.Fixed on
mainin #952 (mergeefa95c17). It is not in a release yet.Cause. The reporter's suggested distinction ("keep the fast exit when no switch started") does not separate the two cases on its own. In the #449 case the panel is already at the requested rate, and tvOS still posts a
modeSwitchStartthere and never an end. Both cases look the same in the notifications. What differs is the cadence the panel ran before the write.Change.
modeSwitchEnd, the in-progress flag clearing, or the cap, as the HDR path does. On VOD the cap is the 6 sawaitObservedEndbudget, so on this panel the gate should hold for about 2.5 s.New log lines.
SET:now ends withbefore write: panel …Hz, ….[DisplayCriteria] #950: …line. Theswitch settled via modeSwitchEndline that follows shows how long the switch actually took.Known limits.
.standardcap, so a live zap that changes rate can still release before a ~2.5 s re-lock.stop()can read the old rate while the panel is still switching back to the home mode, and then takes the old path.Retest, once there is a release. The same 5 to 10 SDR 23.976 starts from the 50 Hz home screen, plus one capture with:
before write:reading 50 Hz,#950:line,modeSwitchEndsettle line.If the noise is gone and first frame arrives after the end, it is solved. If the noise still shows after
modeSwitchEnd, the cause is on the sink side after the end notification and needs a different approach.fix(display): a rate the panel switched to waits for the switch end (s…
superuser404notfound commentedon Nov 1, 2026
Released in 7.54.0 (
ee5027c).secunit404 commentedon Nov 7, 2026
Still seen on 7.58.0 (Apple TV 4K 3rd gen, tvOS 27.2, LG C3, native AVPlayer route, SDR HEVC 23.976 from a 50 Hz menu). There are two cases.
1. A start whose switch settles correctly still shows pink noise, about 1 time in 4. These are four fresh starts of the same file, each one 10 s or more after the previous stop. Only the second showed the noise:
The engine logs look the same for the clean and the noisy start, so my guess is that on this TV the sink is still re-locking for a moment after
modeSwitchEnd. A short settle margin after the end notification may be what's missing.2. A restart within about 2 s of a stop releases the gate on the reset's switch, at the old rate. The new
SETlands while the switch thatRESETstarted (back to 50 Hz) is still running. The gate ends on that switch, with no start notification for the new one:The same thing happened three more times: settled after 876 ms and 1024 ms with the panel at 50.001 Hz, and after 1187 ms reading 23.976 Hz.
Expected: when a switch is already in flight at
SET, the gate waits for the switch to the requested mode, or re-checks the panel rate once the in-flight switch ends.Merge pull request #1003 from superuser404notfound/fix/950-inherited-end
superuser404notfound commentedon Nov 8, 2026
Thanks for the retest. Both cases are fixed on
mainin #1003 (mergecb9a5d28). Not in a release yet.Case 2, restart within ~2 s of a stop. The cause was what the capture showed: the criteria write landed while the reset's switch back to 50 Hz was still running, this write got no start notification of its own, and the reset's
modeSwitchEndsettled the gate.apply()now records whether a switch was already in flight at the write.SET:then ends with, a switch already in flight.[DisplayCriteria] #950: a switch was in flight at the write ...line, which says how the old switch ended and what the panel read at that moment.Case 1, noise after a correctly observed end. As you suggested, there is no signal for the sink's re-lock, so this is a margin. It only applies where the panel actually changed rate: an engine SDR rate-only write whose panel read another rate before the write. The gate now holds 1000 ms after
modeSwitchEnd(measured from the end) before releasing play. The settle line ends with; #950: holding 1000ms more for the sink to re-lock. Starts where the panel was already at the rate are unchanged.Retest, once there is a release:
SET:line, the#950:line and the settle line that follows.chore(release): prep 7.61.1 - display switch hold after a restart and…
superuser404notfound commentedon Nov 8, 2026
Released in 7.61.1 (5f22505).
fix(display): an in-flight switch's end no longer settles a new write…
secunit404 commentedon Nov 9, 2026
Follow-up on 7.61.1: case 1 was tvOS "quick switching", not the sink re-lock. My settle-margin suggestion came from tests with the Apple TV's quick switching on. With it off (Apple TV 4K 3rd gen, tvOS 27.2, LG C3, SDR 23.976 from a 50 Hz menu, 7.61.1 owning the criteria):
SET:readpanel cadence unmeasured … a switch already in flight, so the 1000 ms hold didn't run. Those started in 3.1–3.3 s. The 7 that held started in 4.0–4.3 s.modeSwitchEndmade no reliable difference: about 1 in 8 against 1 in 10, over about 60 switches each.So the 1000 ms hold adds a second to every rate-changing SDR start without fixing case 1. Could it be removed, or made opt-in? The case 2 fix works: each in-flight restart waited out the reset's switch and landed on 23.976 Hz.
Open question: Infuse shows no noise with quick switching on, so something in how it switches avoids it.
Merge pull request #1010 from superuser404notfound/fix/issue-950-drop…
superuser404notfound commentedon Nov 9, 2026
Thanks, that settles case 1. The hold is removed on
mainin #1010 (merge4472aa0d). Not in a release yet.modeSwitchEndagain, about a second sooner. The settle lines no longer end with; #950: holding ....On Infuse with quick switching on. The engine has no view into how Infuse switches, so for now this is open. Two observations from Infuse with quick switching on would help narrow it down:
If Infuse waits noticeably longer, it may hold the first frame until some later signal. If it starts as fast, the difference is more likely in how the criteria are written.
fix(display): drop the post-end sink hold on real rate switches (supe…
chore(release): prep 7.62.1 - version sweep, changelog folds #1015, #929
superuser404notfound commentedon Nov 10, 2026
Released in 7.62.1 (
a4b7fa8c): the 1000 ms post-end hold from 7.61.1 is gone again, so a start that changes the panel's rate releases atmodeSwitchEnd, about a second sooner. The in-flight restart fix from 7.61.1 stays. Sodalite and AetherPlayer are bumped to it.secunit404 commentedon Nov 22, 2026
Retested on 7.72.1 (Apple TV 4K 3rd gen, tvOS 27.2, LG C3, native AVPlayer route, SDR 23.976 from a 50 Hz menu, Match Frame Rate on): no pink noise across repeated starts and quick restarts. Confirmed fixed, thanks for working through all three rounds of this. Closing.