Skip to content

drm/apple: v14.7: 120 fps and a locked 60 Hz mode on the M3 Pro ProMotion panel - #484

Open
ilyasakin wants to merge 2 commits into
omacom:integration/aurorafrom
ilyasakin:t6030-panel-vrr
Open

ilyasakin wants to merge 2 commits into
omacom:integration/aurorafrom
ilyasakin:t6030-panel-vrr

Conversation

@ilyasakin

@ilyasakin ilyasakin commented Nov 15, 2026 •

Copy link
Copy Markdown

What this changes and why

On the J514S (MacBook Pro 14", M3 Pro, T6030), the internal ProMotion panel has two problems:

  • It never shows more than 60 fps. The firmware reports a single 120 Hz timing, but swaps go out without timestamps, and the 14.7 firmware then completes at most one swap per two refreshes.
  • Desktops can't choose a refresh rate. The panel has one timing (timing 1/1), so GNOME, KDE and Hyprland offer only 120 Hz.

Stacked on #358 (cachebag), which stamps the T6030 panel's swaps and updates the board test, giving 120 FPS. This PR adds one commit on top:

  • Offer a locked 60 Hz mode beside variable refresh, as the 26.6 path (iomfb_v26_6.c) already does.
    • On a board whose swaps carry timing words, the single 120 Hz timing becomes two modes:
      • 120 Hz variable refresh: swaps carry timing words.
      • 60 Hz locked: the same timing with none, which the firmware shows at 60 Hz.
    • Boards that don't stamp swaps (J504, J514C, J514M) keep their single mode.
    • Swaps stay timed unless the locked mode is set.
    • The firmware keeps its boot timing in both modes, so switching sends it nothing and the panel never blanks.

Part of aurora-silicon/linux#1633.

What was tested

  • Mac model and chip: J514S, MacBook Pro 14" M3 Pro (T6030), 11-core.
  • Firmware: DCP firmware UUID DDF38191-…, which ships in macOS 14.7.5–14.7.8. This is the build the T6030 record pins.
  • Was a kernel built from THIS commit booted? Yes. It was built with the omarchy-pkgs linux-aurora recipe, pointed at the commit with tools/aurora-ci/prepare-recipe.py, then installed and booted.

Modes

Before 120 Hz variable 60 Hz locked
Hyprland availableModes 3024x1964@120 only @120 and @60 offered (same list)
glmark2 --swap-mode fifo 61 FPS 120 FPS 61 FPS
  • Switching between the modes at runtime with hyprctl does not blank the panel.

Idle power

The desktop was static with 0.1 swaps/s, read from the DCP debugfs swap counter. Each value is the average of 60 s of SMC PSTR (total system power), on AC:

Mode System SoC (PHPC)
60 Hz locked 8.45 W / 8.45 W 1.22 W / 1.33 W
120 Hz variable 7.88 W 1.18 W

The panel lowers its refresh rate itself when no swaps arrive in the variable-refresh mode. For comparison, macOS on another J514S reports IOMFBDisplayRefresh for disp0 as 120 Hz minimum interval and 24 Hz maximum interval (displayMin/MaxRefreshIntervalMachTime 200000/1000000).

A busy desktop sends frames all the time and gives no saving. An earlier run where my terminal redrew about 23 times a second showed 9.86 W vs 9.71 W.

Build: make W=1 drivers/gpu/drm/apple/iomfb_v14_7.o (clang) is clean. checkpatch is clean apart from the trailers.

Findings for #1633

These came up along the way, and are useful to anyone continuing on VRR for this panel:

  • Timestamps are in 24 MHz units. The firmware counts time in macOS's mach time, which is 24 MHz (hw.tbfrequency). The CPU counter on T6030 runs at 1 GHz. Real swap timestamps work once the counter is scaled to 24 MHz; I tested this with an experimental parameter. Unscaled 1 GHz values are about 42× in the future, which explains the existing comment that "counter values make the firmware time out".
  • A440 is set_parameter_dcp here too, and it needs a u32 reply. The handler writes its status through the reply pointer. Calling it without a reply crashes the DCP: at 0x140c2c in the DDF38191 image, str w8, [x19] with x19 = 0. With a 4-byte reply, IOMFBParameter_adaptive_sync (parameter 14) is accepted with status 0 for minRR 24 Hz and 120 Hz. In my measurements the minRR value made no measurable difference to idle power once the swaps are timed, so this PR doesn't use it.

What was NOT tested

  • Other boards: J516S, J514C and J516C. The change only applies where the board has promotion and a 120 Hz best timing; J613 and J615 (60 Hz) are unaffected.
  • Battery runtime: not measured beyond the AC power comparison above.
  • GNOME or KDE: I tested Hyprland only, so I haven't checked whether they pick the 120 Hz mode by default.

Risk

  • Other Macs: no change. Only 14.7 boards with a 120 Hz ProMotion timing change.
  • External displays: unchanged. They don't use the internal timing words.
  • J514S/J516S: the panel now runs at 120 fps by default, which can cost more power under constant animation. The 60 Hz mode is there for anyone who wants it locked.

AI assistance

  • I used an AI tool or agent to write or draft part of this change: Claude (claude-opus-5-5), via Claude Code. It did the analysis, the measurements, the patches and this text, with me running the machine and reviewing.
  • A human has read the whole diff and takes responsibility for it.

🤖 Generated with Claude Code

@scottjones scottjones left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this, Ilyas. The J514S results are really solid: 120 fps under glmark2, and the idle power numbers make a good case for the variable mode. Following the existing 26.6 path for the 120/60 split was the right call too, it made this easy to review.

Blocking: the board KUnit test fails

Commit 1 sets .swap_timestamps = true for T6030 (iomfb_v14_7.c:107), but v14-board-test.c:260 and :267 still expect it to be false, so the display KUnit suite fails. CI hasn't caught it yet because the Kernel CI run is waiting for approval.

#358 from cachebag makes the same board change and updates those two expectations. Since you offered to drop commit 1 if one of those landed first, I think that's the cleanest route: land #358, then rebase this without commit 1. If you'd rather keep it self-contained, updating the two expectations here works too.

Suggestion: gate the split on boards that stamp swaps

The 120/60 split (iomfb_v14_7.c:2674) is gated on promotion and a 120 Hz best timing. That also covers J504, J516C, J516M, J514C and J514M, which the PR doesn't list. On the boards that don't stamp swaps (J504, J514C, J514M), both modes send identical swaps, so the split doesn't change anything there and just adds a 60 Hz option that behaves the same as 120.

Adding dcp_v14_board_stamps_swaps(v14->board, false) to the condition would keep it to the boards where it actually works. To be upfront: that would also mean J514M picks up the split once my #457 (J514M timestamps) lands.

Optional, low priority

Right now timed follows vrr, so a stamping board only stamps when the best timing is exactly 120 Hz. Defaulting timed to true and clearing it only for the locked 60 Hz mode would protect those boards if the best timing were ever 60 Hz. The J516C/J516M logs we have show a single 120 Hz timing, so this isn't a real regression today, just a bit of robustness.

Happy to approve once the test is sorted.

@ilyasakin

Copy link
Copy Markdown
Author

Thanks for the review. I've reworked it:

Re-tested on the J514S. Both modes are offered. glmark2 FIFO gives 121 FPS at 120 Hz and 61 FPS at 60 Hz, and switching back gives 118. There were no DCP errors. For this test I loaded the same logic as a module on my daily kernel; the branch itself is on #358's older base. I couldn't run the display KUnit suite here, so I'm relying on CI for that.

cachebag and others added 2 commits November 17, 2026 19:05
The T6030 (M3 Pro) record admits the panel's 120 Hz timing, but its
swaps go out with zero timestamps, so the firmware completes at most one
per 16.7 ms: the mode reports 120 Hz while a vsync-locked client
measures 60 fps. The J516C already sends the constant timestamps for
this; set swap_timestamps on the T6030 record too.

Tested on a J514S (MacBook Pro 14", M3 Pro), DCP firmware 14.7, on
aurora-2026.10.17.20 with the equivalent change: es2gears_wayland goes
from 60.0 to 119.9 fps on the built-in panel. Not tested on a J516S,
which shares the record.

Signed-off-by: cachebag <alhakimiakrmj@gmail.com>
A ProMotion panel on the 14.7 path has a single 120 Hz timing (one
"timing 1/1" on a J514S), so GNOME, KDE and Hyprland offer only 120 Hz,
with no way to run the panel at 60 Hz.

On a board whose swaps carry timing words, offer it as two modes, as
the 26.6 path does: the 120 Hz timing as the variable-refresh mode, and
the same timing as a locked 60 Hz mode whose swaps carry none, which
the firmware then shows at 60 Hz. The firmware keeps its boot timing
either way, so switching modes sends nothing to it and the panel never
blanks. Boards that don't stamp swaps keep their single mode: both modes
would send the same swaps there. Swaps stay timed unless the locked mode
is set, so a stamping board keeps its timing words whatever its best
timing.

On a J514S (MacBook Pro 14", M3 Pro), with the desktop idle (0.1
swaps a second), the variable-refresh mode draws 7.88 W and the locked
60 Hz mode 8.45 W: the panel lowers its refresh rate when no swaps
come. glmark2 with FIFO runs at 120 and 60 FPS in the two modes.

Link: aurora-silicon/linux#1633
Assisted-by: Claude:claude-opus-5-5
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Ilyas Akin <ashnwor@gmail.com>
@ilyasakin

Copy link
Copy Markdown
Author

#358 was closed without being merged, so I've rebased this onto current integration/aurora (c20794c48) and kept cachebag's commit, unchanged and under their authorship. It's the only path for the T6030 swap timestamps now. The second commit is unchanged too.

I've now run the display KUnit suites in QEMU on the rebased branch, which I couldn't do before:

  • 388 cases: 387 pass and 1 skips (S35_dual_retry_off, which is covered by W3); none fail. apple-dcp-v14-board passes 10 of 10.
  • As a negative control, I removed .swap_timestamps = true from the T6030 record and reran the suite. v14_board_swap_timestamps then fails at v14-board-test.c:260 and :264.

On the J514S, the same two commits run in my daily kernel: 3024×1964 at 120 Hz, with the locked 60 Hz mode also listed.

@cachebag, if you'd rather this commit didn't land through this PR, let me know and I'll drop it.

@c4software

Copy link
Copy Markdown

Tested on a second J514S.

  • Modes: eDP-1 now offers 3024x1964@120 and @60. Before, it offered 120 Hz only.
  • Real presentation rate at 120 Hz: measured with mpv (--video-sync=display-resample, a 120 fps testsrc2, fullscreen on eDP-1, estimated-display-fps once per second). It reads 118.9–120.0 fps over 15 s, 0 dropped frames. As a control, the external 75 Hz monitor reads 74.9.
  • Locked 60 Hz: switched with hyprctl eval 'hl.monitor({ output = "eDP-1", mode = "3024x1964@60", ... })'. It reads 59.9 fps, and then 120.0–120.5 after switching back. No blanking in either direction (checked by eye), and the kernel logged nothing during the switches.
  • After suspend: after a 3 min 23 s s2idle (lid close, on battery), it is still at 118.5–118.9 fps, 0 dropped.
  • Not tested: I did not measure the 60 fps ceiling on the stock kernel on this machine, and did not measure battery runtime.
Test setup

Testing and write-up assisted by Claude Code.

@c4software

Copy link
Copy Markdown

Follow-up: idle power of the two modes on the same J514S. The machine is on battery, the desktop is idle (CPU 0.1 %), brightness is unchanged, and I sampled the SMC "Total System Power" 4 times per second.

eDP-1 mode mean σ min / max
120 Hz (variable, timed swaps) 2.75 W 0.03 W 2.69 / 2.83 W
60 Hz (locked, no timing words) 3.36 W 0.03 W 3.30 / 3.49 W
120 Hz again (drift check) 2.76 W 0.04 W 2.69 / 2.91 W

Each run is 60 s (30 s for the re-check), 3 s after hyprctl eval 'hl.monitor(...)'.

So on an idle desktop, the locked 60 Hz mode costs about 0.6 W more than 120 Hz variable. My guess is that with timed swaps the panel drops well below 60 Hz on a static image, while the locked mode keeps it at 60. I haven't checked the panel's actual refresh to confirm that. If so, it may be worth saying in the mode's description, or in the docs, that the locked mode is for constant timing and not for saving power.

Testing and write-up assisted by Claude Code.

@ilyasakin

Copy link
Copy Markdown
Author

Thanks for testing on a second J514S, and for the idle numbers. They match mine: on an idle desktop, the locked mode drew about 0.45–0.6 W more than variable refresh here too (the commit message has 7.88 vs 8.45 W). Your guess is the reason: with timed swaps the panel lowers its refresh on a static image, and the locked mode, whose swaps carry no timing words, holds it at 60.

I looked at making the locked mode lower its rate too. There are two ways, and I've left both out of this PR:

  • Pace in the kernel. Send timed swaps, but complete them at no more than 60 a second. That changes vblank and flip timing for every client, so I'd rather do it as a follow-up with its own measurements: besides the idle difference, a 60 Hz cap could save power during animation and scrolling too.
  • Give each swap a real presentation time. That needs the firmware's time base, which isn't known. Counter values in the future make the firmware time out on the first swap (see the comment above DCP_V14_SWAP_TIMESTAMP_VALUE), so for now the swaps carry a constant that is never in the future.

I'll add a line to the commit message saying the locked mode is for constant timing, not for saving power.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants