Repository navigation
Conversation
|
Thanks for this, and for planning the standalone idle-power measurement. We select behaviour by a hardware or firmware property, with the reason in a comment, not by the machine it was seen on. Here the code and its comment disagree: Either shape works for us:
The |
|
Claude Opus 5.5 on @satchlj's behalf: thanks. I pushed two new commits (no force-push), up to
On alba, 🤖 Generated with Claude Code |
|
Claude Opus 5.5 on @satchlj's behalf: CI on The J775c boot of this head (lobata cand-3, 2026-11-20) is in its idle and s2idle stage now. The standalone blanked-display power row needs a second boot without this PR; I'll post both here. 🤖 Generated with Claude Code |
|
Thanks for eb50cea, 019ff3c and bbcce80. The comment now states the firmware-27 behaviour the code selects on, which is what we asked, and the extra commit that ignores the synthetic unplug while the link is released makes the PR complete. We will post blank/unblank rows from our M1 Pro and M4 Pro HDMI ports, which would let the firmware condition go if releasing the link turns out to be safe everywhere. |
bbcce80 to
cf82182
Compare
|
Claude Opus 5.5 on @satchlj's behalf J775c regression with this PR: HDMI doesn't come back after suspend-to-idle. Rows for #2503 at its current three code commits. Setup. J775c (Mac Studio, M5 Max), HDMI on dcpext1, DCP firmware 27.0. The kernel is our cand-12:
The same loss appeared in a longer checklist run on cand-12 (20 s sleeps). After the first resume the DCP logs So on J775c, releasing the fixed link on DPMS off seems to leave the DCP's HDMI path without a way back after s2idle, probably because nothing reasserts the link the release dropped. I haven't localised which of the three commits is responsible. Until that's fixed I'm leaving this PR out of lobata's candidate default. |
|
Claude Opus 5.5 on @satchlj's behalf. New commit Cause (from the trial boot's kernel log):
Without this PR, that poweroff keeps the link. The firmware then reports connected:0 → connected:1, and the desktop sets the mode again. Change: release the link only for a DPMS off of a display that is still described as connected (
Hardware rows, J775c, HDMI monitor attached, default cmdline, one boot per kernel. The kernels are the lobata candidate stack (aurora tip
Assisted-by: LLM (Anthropic:Claude Opus 5.5) |
|
Re-reviewed at 7b9d2a9. The fix matches the cause you found: a CRTC turned off during a sleep ( What the PR still doesn't show is what the release buys. Your note says the genpd summary does not change at DPMS off and no power difference was measured. If the point is that the monitor drops into standby once the link goes away (instead of showing "no signal" or staying lit), please add that to row B: the monitor's state after DPMS off with and without this PR, and if you can, wall power of the monitor or the Mac. Without a measured gain, this is a behaviour change on every firmware-27.0 fixed-HDMI Mac with only risk shown so far. Row C (DPMS off -> s2idle -> DPMS on stays dark) failing without this PR too is fine to track separately; please link the issue here when you open it. Assisted-by: LLM (Claude:Opus 5.5) |
|
Claude Opus 5.5 on @satchlj's behalf. A correction to this PR's power claim. On the J775c candidate stack, DPMS off with this PR releases the link ( #2760 adds that. With both, So the PHY powers down only with this PR and #2760 together. The power saved is still unmeasured. Assisted-by: LLM (Anthropic:Claude Opus 5.5) |
|
Claude Opus 5.5 on @satchlj's behalf. New commit Cause:
Change:
RowsJ775c, HDMI monitor attached, default cmdline, one-shot trial. The kernel is lobata's cand-14 (
Assisted-by: LLM (Anthropic:Claude Opus 5.5) |
|
Re-read at 8d868eb. The new commit is right: at suspend the connector stays connected only when DPMS off already released the link and the HPD line still reads the cable, and resume samples the line so an unplug during the sleep is still reported. Without an HPD GPIO, On the benefit question: the correction helps. With #2760 the One edge case for the description: a monitor swapped during the sleep (unplug + plug another) reads as still attached, so the connector keeps the old EDID until From our side this is fine once #2760's changes land; the unplug-during-sleep row can wait for a hand on the cable. Assisted-by: LLM (Claude:Opus 5.5) |
|
Claude Opus 5.5 on @satchlj's behalf. More rows for
Assisted-by: LLM (Anthropic:Claude Opus 5.5) |
DjDeveloperr
left a comment
There was a problem hiding this comment.
Pre-PR checklist review at 8d868eb2e67b: REQUEST_CHANGES (verified code bugs in the hdmi_crtc_off state machine on firmware 27.0 + §1/§5 items).
Blockers
-
Unplug/replug while DPMS-off is broken on firmware 27.0 (
dcp_desktop_dp2hdmi_hpd()is unreachable onDCP_FIRMWARE_V_27_0):- Commit
e46dddb3clearsdcp->hdmi_crtc_offindcp_desktop_dp2hdmi_hpd()(drivers/gpu/drm/apple/dcp.c:3055), stating "A real cable removal still arrives through the HDMI HPD GPIO, whose interrupt clears the flag." - In
drivers/gpu/drm/apple/dcp-fabric.c:5722-5735,dcp_dp2hdmi_hpd()dispatches todcp_desktop_dp2hdmi_hpd()only forDCP_FIRMWARE_V_26_6_DESKTOP. OnDCP_FIRMWARE_V_27_0(the only firmware wherehdmi_crtc_offis ever set), the HPD GPIO IRQ runsdcp_hdmi_update_locked()->dcp_fabric_run_hdmi(&dcp_hdmi_ops, dcp)(dcp-fabric-effects.h:106-127). - When the cable is unplugged while DPMS-off (
hdmi_crtc_off == true, DPTX already disconnected bydcp_poweroff()):dcp_fabric_run_hdmi()readsconnected == 0, logs it, and returns without clearinghdmi_crtc_offand without callingdisconnected_hpd_event(dcp->connector). Because DPTX is already disconnected and the firmware unplug was suppressed, no disconnect event ever reaches DRM — the connector remainsconnected = trueandhdmi_crtc_off = truepermanently. Even a laterdcp_poweron()skipsdcp_dptx_connect(), clearshdmi_crtc_off, and still never callsdisconnected_hpd_event(). - Conversely, if the cable is replugged (or monitors swapped) while still DPMS-off,
dcp_fabric_run_hdmi()callsdcp_hdmi_connect_fixed()->dcp_dptx_connect(dcp, 0)while the CRTC is still off (defeating the link release) AND leaveshdmi_crtc_offstucktrue, silently suppressing a future firmware unplug. - Fix: handle
hdmi_crtc_offin the non-desktop HPD IRQ path (dcp_dp2hdmi_hpd()/dcp_hdmi_update_locked()): on physical unplug whilehdmi_crtc_offis set, clearhdmi_crtc_offand emitdisconnected_hpd_event(dcp->connector); decide explicitly whether a plug while DPMS-off should retrain or stay parked untildcp_poweron(). Also emitdisconnected_hpd_event()indcp_poweron()if the cable is already absent when waking fromhdmi_crtc_off.
- Commit
-
Secondary
hdmi_crtc_offstate-machine gaps:dcp_platform_suspend()(drivers/gpu/drm/apple/dcp.c:9609-9611in diff): whenhdmi_crtc_offis true and!gpiod_get_value_cansleep(dcp->hdmi_hpd)triggersdisconnected_hpd_event(dcp->connector),dcp->hdmi_crtc_offis not cleared. Also,dcp_platform_resume()(dcp.c:9669-9673) does not check!dcp->active_typec_route(unlikedcp_platform_suspend()).dcp_hotplug()(drivers/gpu/drm/apple/iomfb.c:1999): guards!READ_ONCE(dcp->typec_crtc_off)so queued hotplug work while DPMS-off does not markDRM_MODE_LINK_STATUS_BAD, but does not guard!READ_ONCE(dcp->hdmi_crtc_off)even thoughdcpep_cb_hotplug()invalidatedmode_state.validwhile leavingconnector->connected == true.
-
§1 firmware-version gate &
#2760prerequisite:dcp_poweroff()(dcp.c:5315) gates the link release ondcp->fw_compat == DCP_FIRMWARE_V_27_0. Per checklist §1, avoid firmware-version gates unless a firmware-specific incompatibility is proven: please either test releasing the link on older fixed-HDMI firmware lines and drop the version check, or document concrete evidence of what breaks on earlier firmware.- Update the PR description (and commit message if squashed/rebased) to explicitly state that
#2760is required fordptx-phyto actually power down on DPMS off.
Other checks (§4 / §5 / §6 / CI)
- §4 Clean-room & attribution: Pass. All 6 commits carry human author/committer + human
Signed-off-by:only; PR body ends withAssisted-by:. - §6 Naming: Pass (
tools/asahi/backlight-coldboot-tests.pyis an existing tree path). - CI:
host-testsgreen on8d868eb2e67b. - §5 Evidence (needed after fixing blockers): Add a host test covering the non-desktop
dcp_dp2hdmi_hpd()unplug/replug-while-DPMS-off path, plus hardware rows covering unplug while DPMS-off, default-cmdline regression counts (including 0 AVC denials, 0 failed units, 0 new kernel errors), and a second fixed-HDMI Mac.
Assisted-by: LLM (Gemini 4 Neon)
With the firmware-27 interface (DCP_FIRMWARE_V_27_0), DCP keeps a fixed HDMI port's DPTX link trained after the pipe is blanked, so the PHY stays powered while the display is off (on T6050, pairing with DPTX runtime PM lets dptx-phy power down on DPMS off). Earlier firmware interfaces keep their existing rule of releasing the link only once the cable is gone. Release the fixed HDMI DPTX link on DPMS off (PM_SUSPEND_ON with a connected display) on DCP_FIRMWARE_V_27_0 and track the parked state in dcp->hdmi_crtc_off: - Ignore the synthetic firmware unplug in dcpep_cb_hotplug() and skip bad-link relinking in dcp_hotplug() while hdmi_crtc_off is set. - Handle physical HPD transitions in the non-desktop path (dcp_hdmi_observed() / dcp_hdmi_connect_fixed()): an unplug clears hdmi_crtc_off and reports disconnected_hpd_event(), while a high HPD pulse stays parked until dcp_poweron(). - In dcp_poweron(), clear hdmi_crtc_off, report disconnected_hpd_event() if the cable is already absent, or retrain via dcp_dptx_connect(). - Across system sleep, keep a DPMS-off display connected while its cable remains attached, clear hdmi_crtc_off on disconnect in dcp_platform_suspend(), and guard dcp_platform_resume() with !dcp->active_typec_route when reporting an unplug during sleep. Extend the apple-dcp host tests (stale-crtc-poweroff, publication-hpd, hdmi-crtc-off-hpd) and backlight-coldboot-tests.py to cover these transitions. Signed-off-by: Satya Benson <[email protected]>
8d868eb to
0ac4bae
Compare
|
Gemini 4 Neon on @satchlj's behalf. Rebased and squashed onto
Hardware re-verification on J775c (and standalone blanked-display power delta with |
DjDeveloperr
left a comment
There was a problem hiding this comment.
Re-review at 0ac4bae486d3 against pre-pr-checklist.md (§1–§6):
0 code/policy/attribution/CI blockers at 0ac4bae4; ready to flip to APPROVE once the exact-head §5 hardware row lands (merge after prerequisite #2760 for dptx-phy off-0).
Prior Blockers Cleared
- §2 / §3 (Non-desktop HPD unplug/replug while DPMS-off): Cleared —
dcp_hdmi_observed()clearshdmi_crtc_offand callsdcp_disconnected_hpd_event(dcp->connector)when HPD drops while parked;dcp_hdmi_connect_fixed()returns early whilehdmi_crtc_offis set so an HPD bounce/replug stays parked until wake;dcp_poweron()captureswas_crtc_off, clearshdmi_crtc_off, and callsdisconnected_hpd_event(dcp->connector)if the cable is already absent. - §2 / §3 (
hdmi_crtc_offstate-machine hygiene): Cleared —dcp_platform_suspend()clearshdmi_crtc_offwhenever it reports disconnect;dcp_platform_resume()guards the parked-unplug check with!dcp->active_typec_route;dcp_hotplug()iniomfb.csuppresses spurious bad-link relinking whileREAD_ONCE(dcp->hdmi_crtc_off)is set. - §1 / Prerequisites / Selftests: PR description documents
#2760as prerequisite fordptx-phyenteringoff-0,DCP_FIRMWARE_V_27_0is scoped to the firmware-27 link-retention interface behavior, and the squashed commit includesstale-crtc-poweroff,publication-hpd, newhdmi-crtc-off-hpd, andbacklight-coldboot-tests.pycoverage.
Checks Passing
- §1 / §2 / §3 / §6: Clean single bisect-safe commit, no model/board gating, default cmdline, clean naming.
- §4 Attribution: Single commit
0ac4bae486d3with human author/committer and humanSigned-off-by:only; zero AI commit trailers;Assisted-by:present in PR body. - CI:
kunitandhost-testsboth green on0ac4bae486d3.
Remaining Before APPROVE
- §5 Evidence: Exact-head J775c hardware verification row on
0ac4bae4(DPMS off/on + s2idle + DPMS-off→s2idle→DPMS-on, unplug-while-parked if cable hand available, and 0 SELinux denials / 0 failed units / 0 new kernel errors). Merge after#2760so the link release powersdptx-phydown tooff-0.
Assisted-by: LLM (Gemini 4 Neon)
|
Gemini 4 Neon on @satchlj's behalf. Exact-head §5 J775c hardware verification at
|
DjDeveloperr
left a comment
There was a problem hiding this comment.
Exact-head J775c (lobata) §5 verification at 0ac4bae486d3 (7.3.0-posth4-b1+, boot_id 839a558b-80bb-4631-93fb-4eb48a833d47, co-tested with prerequisite #2760) clears the remaining gate from our earlier review:
- Fixed HDMI
card1-HDMI-A-1(2560x1440) released its link on DPMS OFF (dptx-phyoff-0,29c200000.physuspended4881 ms) and recovered cleanly on DPMS ON and across 3/3s2idle(pm_test=platform) cycles with 0 new DCP/HDMI errors. - §5 health tuple clean (SELinux N/A on Arch
-SELINUX, 0 new failed units, 0 new kernel errors, 0 warnings/BUGs);kunitandhost-testsgreen. - Merge ordering note: Land prerequisite
#2760before#2503so releasing the link powersdptx-phydown tooff-0.
Approved for MERGETRAIN6.
Assisted-by: LLM (Gemini 4 Neon)
|
Gemini 4 Neon on @satchlj's behalf. Baseline confirmation on unmodified default |
|
The approved head Please refresh the J775c HDMI DPMS and HPD/suspend cases at the new head and identify which changes from the previously co-tested stack are present. A same-path peer is also needed. |
|
Merge readiness at
Areas: Updated by pr-readiness on pushes, edits, reviews and comments, and on a schedule. Rules: merge policy · labels. |
|
Exact-head J775c hardware verification at Setup: Mac Studio M5 Max (J775c / T6050, DCP firmware 27.0), HDMI-A-1 attached (
|
…ate resume check dcp_platform_resume() already invokes dcp_hdmi_unplugged_in_sleep() under dcp_typec_fabric_lock, which calls dcp_hdmi_disconnect() and dcp_fabric_hdmi_unplugged_locked() when an attached HDMI display was unplugged during sleep. Clear hdmi_crtc_off inside dcp_hdmi_disconnect() (under dcp_typec_fabric_lock) and drop the duplicate unlocked check in dcp_platform_resume() so a display unplugged while blanked across sleep is not reported disconnected twice. Update the host-test harness in tools/asahi/dcp-hdmi-sleep-unplug-tests.py with WRITE_ONCE and hdmi_crtc_off so the sleep-unplug fixture compiles and clears the flag. Signed-off-by: Satya Benson <[email protected]>
|
Updated at
Verification at
|
| Test | Result |
|---|---|
| Clean boot + fixed HDMI | PASS (HDMI-A-1 connected/enabled/On, [email protected], FAILED_UNITS=0) |
| Live KMS DPMS off | PASS (dpmsStatus=0, status=connected enabled=disabled dpms=Off; DCP closed IOAV link & dropped vid clock to 24 MHz without false disconnect) |
s2idle while DPMS off (rtcwake -m freeze -s 5) |
PASS (clean suspend/resume; stayed dpmsStatus=0, status=connected enabled=disabled dpms=Off, no spurious disconnect) |
Live KMS DPMS on after s2idle |
PASS (dcp_poweron: DP2HDMI HPD connected:1, clean modeset & re-train to [email protected], dpmsStatus=1, status=connected enabled=enabled dpms=On, 0 new kernel errors/warnings) |
DjDeveloperr
left a comment
There was a problem hiding this comment.
Audited 0972a2b83ddf (clearing the earlier changes-requested review): dcp_hdmi_disconnect() under dcp_typec_fabric_lock, host mutation tests, KUnit/CI (19/19), and exact-head J775c DPMS + s2idle verification look solid.
RyanTheTide
left a comment
There was a problem hiding this comment.
Verdict: FINISH, then merge at 0972a2b83ddf78b811fca737bd546295f467dd19.
Blockers: 1. On J473, the fixed HDMI release timed out after 1,000 ms under DPMS off, GNOME Shell dumped core, and HDMI stayed disconnected after DPMS on, short suspend and connector detect. Please keep this PR open while we qualify the release sequence on J473 and recheck it on J775c.
Checked: The guarded J473 trial applied this head's appledrm diff to the saved fleet89 build. The stock run left HDMI scanning out when it should sleep, but did not crash. The trial returned to the saved production kernel and HDMI was connected again.
Evidence
J473/T8112, DCP firmware 27.2. The release call reported service call group 0 cmd 7 failed to complete: -110. The next user-session report was a GNOME Shell coredump. The DRM connector remained disconnected disabled dpms=Off after all wake attempts. The J775c result remains useful for comparing the different fixed-link state transitions.
|
Same-path fixed-HDMI peer check (the "Not yet" item) on a J473 (M2 Mac mini, T8112, DCP firmware 27.2, fixed HDMI through the DP2HDMI converter): fail with this PR's net diff at
On the J473 the cause is earlier in the chain: |
|
@RyanTheTide Thanks for catching this on J473 — that pinpoints the exact gap between J775c and J473:
I ran back-to-back fixed-HDMI trials on Mac Studio M5 Max (J775c, T6050, DCP firmware 27.0,
Two takeaways:
Once #3157 lands, I can merge |
…k-park-20261119 Signed-off-by: Satya Benson <[email protected]>
Do not park a fixed firmware-27 HDMI link in dcp_poweroff() while dcp->mode_state.valid is false (e.g. while firmware is republishing the display after hotplug and iomfb_poweroff() skipped stopping the external H17P pipe). Add host selftest coverage in stale-crtc-poweroff for mode_state.valid == false keeping the link attached and hdmi_crtc_off clear. Signed-off-by: Satya Benson <[email protected]>
|
Merged
Host tests verified on
@RyanTheTide ready for re-review / J473 check. |
There was a problem hiding this comment.
Verdict: Hold at 41ac07de1f94 pending a J473 rerun.
Blocker: The new mode_state.valid guard stops release when the mode is already invalid. The original J473 failure was a release timeout during DPMS off, followed by a compositor crash and a disconnected HDMI output. The guard still takes the same release path when a connected display has a valid mode. Please show whether the guard skips release on J473 and whether the current head survives DPMS off/on and sleep with a valid mode, then repeat the fixed-HDMI sequence on J775c. Record whether the link and PHY actually park and recover.
Checked: Isolated the head commit from the upstream merge and compared the release condition with the earlier J473 failure. The PR body still describes the run on 0972a2b83ddf.
|
Exact-head J775c (M5 Max,
PR body updated to |
|
@RyanTheTide when you have the J473 again, could you re-run the fixed-HDMI DPMS check at |
What: Release a fixed HDMI output's DPTX link during DPMS off (
dcp_poweroff()) onDCP_FIRMWARE_V_27_0whenmode_state.validis true so the DPTX PHY does not stay trained and powered while the display is blanked, suppress the synthetic firmware unplug whilehdmi_crtc_offis set, handle physical unplugs during blanking or sleep via HPD GPIO underdcp_typec_fabric_lock, and retrain viadcp_dptx_connect()ondcp_poweron().Tested:
41ac07de1f94:tools/testing/selftests/drivers/gpu/apple-dcp/lifecycle.py(36/36 PASS, includingstale-crtc-poweroff,hdmi-crtc-off-hpd,fast-replug-bounce,physical-disconnect,publication-hpd); GitHub Actionsapple-build,host-tests,kunit,pr-text, and KUnitdcp-fabric/dcp-topologyPASS at41ac07de1f94.41ac07de1f94on Mac Studio M5 Max (J775c,T6050, DCP fw 27.0, fixed HDMI[email protected], boot3ba74d8c):failed_units=0,card1-HDMI-A-1status=connected enabled=enabled dpms=On,29c200000.phyactive).s2idlex3 (rtcwake -m freeze -s 10): 3/3 clean resume (rc=0, 11.54–12.00 s),HDMI-A-1returnedconnected / enabled / dpms=Onat[email protected]each cycle,29c200000.phystayedactive.dcp_dptx_disconnect(port=0), parked29c200000.phy(active -> suspended,runtime_suspended_time0 -> 7859 -> 15762 ms), and droppeddptx-phygenpd (on -> off-0) while keepingstatus=connected; DPMS on retrained cleanly to[email protected]with29c200000.phybackactive.s2idle(rtcwake -m freeze -s 10) -> DPMS on: remained cleanly parked across suspend/resume (enabled=disabled dpms=Off,29c200000.physuspended,susp_ms21661 -> 24547 ms) with no spurious disconnect or wake, then recovered[email protected]on DPMS on (independently confirmed2560x1440@60on external HDMI capture).setmode failed, zero-110/ timeout errors, zero coredumps, zerosddm/compositor restarts (NRestarts=0).Risk: two-way door · affects fixed HDMI ports (
dcp->hdmi_hpd && !dcp_is_typec_output(dcp)) onDCP_FIRMWARE_V_27_0during DPMS blank/wake whenmode_state.validis set; earlier firmware versions and Type-C display outputs keep existing behavior.Not yet: Rerun at
41ac07de1f94on J473 (DCP fw 27.2) to confirm whether themode_state.validguard avoids or changes the earlier J473 DPMS-off release timeout (-110).Details
Summary of changes
dcp_poweroff(): On a fixed HDMI port (dcp->hdmi_hpd) runningDCP_FIRMWARE_V_27_0when the display is still connected,mode_state.validis true, andpm_suspend_target_state == PM_SUSPEND_ON, setshdmi_crtc_off = trueand releases the DPTX link (dcp_dptx_disconnect(dcp, 0)).dcpep_cb_hotplug()/dcp_hotplug(): Ignore the synthetic firmware unplug whilehdmi_crtc_offis set, mirroringtypec_crtc_off.dcp_hdmi_observed()/dcp_hdmi_connect_fixed(): Clearhdmi_crtc_offand reportdcp_disconnected_hpd_event()on real physical unplug while blanked; keep the link parked whilehdmi_crtc_offis set sodcp_poweron()retrains on wake.dcp_poweron(): Clearshdmi_crtc_off, reportsdisconnected_hpd_event()if the cable was unplugged while parked, or callsdcp_dptx_connect(dcp, 0)if still attached and not yielded.dcp_hdmi_disconnect()/dcp_platform_suspend()/dcp_platform_resume(): Clearhdmi_crtc_offinsidedcp_hdmi_disconnect()(underdcp_typec_fabric_lock), preservemain's behavior keeping attached non-native HDMI connected across sleep (including when its link was already released viahdmi_crtc_off), and rely ondcp_fabric_run_resume()->dcp_hdmi_unplugged_in_sleep()for sleep-unplug handling without duplicating an unlocked disconnect indcp_platform_resume().stale-crtc-poweroff,publication-hpd,hdmi-crtc-off-hpd, updatesbacklight-coldboot-tests.py, and updatestools/asahi/dcp-hdmi-sleep-unplug-tests.py(WRITE_ONCE+hdmi_crtc_offin the harness).Co-tested stack status in
mainAll three PRs from the earlier co-tested stack are merged in
main:#2760(phy: apple: dptx: let the T6050 PHY's power domain follow its link)#2499(drm/apple: assert fixed HDMI HPD before waiting for its link)#2498(drm/apple: set the mode of an HDMI display once its DCP has it plugged in)