Skip to content

arm64: dts: apple: t6050-j716s: keep GFX on through suspend-to-idle - #4190

Draft
ja-818 wants to merge 6 commits into
aurora-silicon:mainfrom
ja-818:j716s-gfx-s2idle
Draft

ja-818 wants to merge 6 commits into
aurora-silicon:mainfrom
ja-818:j716s-gfx-s2idle

Conversation

@ja-818

@ja-818 ja-818 commented Dec 3, 2026 •

Copy link
Copy Markdown
Contributor

What: In suspend-to-idle the GPU driver keeps its firmware running, and nothing on the J716s holds GFX, the power domain of sgx and both GFX mailboxes, so genpd power-cycles it in each sleep attempt's noirq step. On one J716s about twenty such cycles went through and the next crashed both GPU coprocessors. This marks ps_gfx always-on, as the J714s and K116s sleep trees do. It follows #4189 (merged), which added the J716s GPU description.
Tested: pending at 37fc510: a J716s lid sleep with the GPU up (s2idle entry and exit, suspend_stats, GFX genpd usage, the GPU after the resume). Earlier, on a J716s build of omarchy-m5's v272-17 kernel with the same property: 8.7 h in one s2idle cycle with the lid closed, woken by the lid, GFX never powered off, the GPU back without a fault. Without it, the GPU firmware crashed during repeated sleep attempts.
Risk: two-way door · J716s only
Not yet: the lid-sleep row at this head.

RyanTheTide and others added 6 commits November 29, 2026 15:08
The J716s file was the J714s file apart from the panel node. Move the
chip-level display and GPU nodes into t6050-j714s-j716s-gpu.dtsi and keep
only each board's panel in its gpu-panel file; the J714s DTB is unchanged.

Drop the J716s panel's fixed apple,max-brightness: the loader's T6050
display handoff supplies the backlight ceiling from the ADT, as on the
J714s. Say that the panel dimensions are computed from 254.6 ppi.

The GPU mailboxes replace the gfx_asc and gfx1_asc inventory nodes, so
point the J716s ADT coverage manifest at /soc/mailbox@2302600000 and
/soc/mailbox@2302e00000; dt-checks failed on the absent
/soc/gpu-coproc@2302e00000.

Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
Keep the shared J714s/J716s GPU description and retain main's G17S OPP include in the J714s board file, where it was qualified.

Signed-off-by: DjDeveloperr <hey@djdev.me>
The J716s had no GPU or internal-panel nodes, so the loader's display and
GPU handoff refused it (no dcp, disp0 or gpu alias) and Linux stayed on
the boot framebuffer.

Add t6050-j716s-gpu-panel.dtsi after t6050-j714s-gpu-panel.dtsi: the
chip-level nodes (sgx, the GFX and GFX1 ASCs, the dart-dcp and dart-disp0
windows, clocks), each checked against the J716sAP 27.2 (26B123) ADT,
where they match the J714s's, and the J716s's own 16-inch 3456x2234
mini-LED panel. Everything stays disabled until the loader enables it.

Seen on one J716s (27.2 stub) with omarchy-m5's v272-17 kernel and a
J716s GPU board entry in the driver: apple-dcp drives the panel at
3456x2234 with backlight control, the GPU driver registers, and the
panel comes back after lid sleep. The GPU also needs the driver's J716s
board support (aurora-silicon#1173); this only describes the hardware.

Signed-off-by: Julian Arango <julianarango1818@gmail.com>
Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
Main added the J716s's left-back USB4 router (ATC0) and the right port's
router and DP tunnels after the camera include in t6050-j716s.dts, where
this branch includes t6050-j716s-gpu-panel.dtsi. Both stay, the GPU and
panel include last. The J714s DTB builds byte-identical to main's.

Signed-off-by: Julian Arango <julianarango1818@gmail.com>
In suspend-to-idle the GPU driver leaves its firmware running; it stops
it only for a firmware sleep. On the J716s nothing holds GFX, the power
domain of sgx and both GFX mailboxes, so genpd powered it off in each
sleep attempt's noirq step and on again in the resume. On one J716s about
twenty such cycles went through and the next crashed both GPU
coprocessors (RTKit PC 0, "GPU firmware (Primary) crashed, device lost");
every later attempt then logged "PS gfx: Failed to reach power state".

Mark ps_gfx always-on, as t6050-j714s-sleep.dtsi and
t6050-k116s-sleep.dtsi do. With it the same J716s, on omarchy-m5's
v272-17 kernel, slept 8.7 h with the lid closed in one s2idle cycle; GFX
never powered off and the GPU came back without a fault.

Signed-off-by: Julian Arango <julianarango1818@gmail.com>
@AlexVittorioCastellano

Copy link
Copy Markdown
Contributor

Tested: J716s (MacBook Pro 16-inch, M5 Pro, T6050) at 37fc5107: one lid-closed s2idle cycle (~81 s asleep, woken by the lid) with the GPU up: suspend entry and exit clean, suspend_stats success 1 / fail 0, GFX genpd never powered off (usage 0 for the whole boot, sleep included), GPU working after resume (Vulkan Apple M5 Pro (G17S B1) / Borealis, 1200 frames of vkcube on KWin Wayland), no GPU faults, 18 CPUs, 0 failed units.

Evidence
  • DTB: this PR changes the J716s DTB by one property: t6050-j716s.dtb built at 37fc5107 and at its merge base 0262c1a6 decompile identically except apple,always-on; in the gfx pmgr node (power-controller@110). The row ran that property on top of the J716s DTB of the installed kernel (linux-aurora 7.3.0.aurora1-51, the arm64: dts: apple: t6050-j716s: describe the GPU and the internal panel #4189 J716s GPU/panel tree), because main's newer J716s nodes (RTC alarm, ANE dma-coherent) need a newer kernel than this Mac runs. Live DT: /proc/device-tree/soc/power-management@2300e80000/power-controller@110/apple,always-on present.
  • Stack: macOS 27.2 (26B123) stub, Aurora arch-minimal with KDE Plasma (KWin Wayland), aura 1.0.0b19-38-g647f1d5a (main), Stage 2 installed through an update-m1n1 trial and committed, default kernel command line, mem_sleep [s2idle].
  • Before (same Mac, same kernel and aura, DTB without the property): /sys/kernel/debug/pm_genpd/gfx/idle_states showed S0 2653 ms, usage 2 within the first minutes of the boot, with no sleep at all.
  • After, across the sleep:
gfx                             on                              0
State  Time(ms)       Usage      Rejected   Above      Below      S2idle
S0     0              0          0          0          0          0
[   59.724020] PM: suspend entry (s2idle)
[   59.907159] macsmc-input macsmc-input: lid open 72030001 at +80583 ms in sleep, MSLD=0: wakeup
[   59.908687] PM: suspend exit
  • After resume: no asahi/GPU kernel messages; vkcube --wsi wayland --c 1200 ran to completion (exit 0) on Apple M5 Pro (G17S B1). The only messages after resume are DCP IOMFB LACS_ERROR: DCP took too long to respond to LAS stats lines, which this Mac also logs on boots without this change.
  • Not covered: a long sleep (hours) and repeated sleep attempts at this head; the earlier 8.7 h row in the PR body is from the omarchy-m5 kernel.

@AlexVittorioCastellano

Copy link
Copy Markdown
Contributor

A data point for this change. It is not a row at 37fc5107: I tested only the property, on another tree.

J716s (MacBook Pro 16-inch, M5 Pro), macOS 27.2 (26B123) stub. Kernel linux-aurora 7.3.0.aurora1-53 with #4284, and #4300 applied to the DT. The audio of #4349 was in the DT too.

  • Without apple,always-on on ps_gfx: one lid sleep of about 20 min (s2idle, 18:23 → 18:42). It resumed, but the desktop froze. KWin logged DRM_IOCTL_ASAHI_VM_BIND failed: Input/output error (vm=1, ops=1) from the first second after the resume, and kept logging it until the reboot.
  • With only &ps_gfx { apple,always-on; }; added: one lid sleep (s2idle, about 77 s), woken by the lid. suspend_stats shows success 1, fail 0. pm_genpd_summary has gfx on after the resume. The desktop came back with the GPU renderer (Apple M5 Pro (G17S B1)) and no VM_BIND errors. The only new kernel warnings at resume were PS msr0-ase-core / msr1-ase-core: Failed to reach power state 0xf.

So the property alone is what took the freeze away here. I can run the lid-sleep row on a build of this head if that helps.

@ja-818

ja-818 commented Dec 4, 2026

Copy link
Copy Markdown
Contributor Author

Thanks, that before/after helps: the freeze without the property and none with it. Yes please: a longer lid sleep at 37fc5107 (an hour or more, or a few sleeps in a row) would cover what the first row left out.

@AlexVittorioCastellano

Copy link
Copy Markdown
Contributor

More lid sleeps on the same tree as my first comment, not yet at 37fc5107: kernel 7.3.0-1-53 with #4284, the DT with #4300 and #4349, and only &ps_gfx { apple,always-on; } added for this.

Boot Sleep Length Result
A 1st 77 s resumed; GPU up, no VM_BIND errors
A 2nd about 1 h did not come back: the screen stayed frozen on opening the lid, and it took a forced power-off
B 1st 2 h 41 min resumed; Apple M5 Pro (G17S B1) renderer, gfx on in pm_genpd_summary, no VM_BIND errors
B 2nd 3 min resumed the same way

suspend_stats in boot B: success 2, fail 0. Every resume logs only PS msr0-ase-core / msr1-ase-core: Failed to reach power state 0xf.

The failed one left nothing. Boot A's journal ends at PM: suspend entry (s2idle), and pstore is empty, so I cannot say whether it hung in sleep or on resume, nor whether GFX had anything to do with it. Boot A was busier than B: an HDMI monitor hot-unplugged before the first sleep, and a WirePlumber crash in between. It did not repeat as a second sleep in boot B.

Next I will boot the DTB of 37fc5107 itself and repeat this: a long sleep, then a few short ones.

This branch has not been deployed

No deployments
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