[SteamOS 3.9.5 / cecd] S3 suspend/resume race conditions: immediate re-suspend on wake, user.slice freeze before TV standby TX, and HDMI 2.1 link training failure against cold TV

オープン
#2,997 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
25/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
linux

調査の方向性

Start by tracing cecd's PrepareForSleep handling and CEC transmit completion, then inspect the suspend and resume logs in the issue. The report also points to amdgpu_dm_handle_vrr_transition, connector hotplug handling, and DRM link retraining. Done means validating the proposed grace period, sleep delay inhibitor, and post-wake retraining across all three reported failures.

索引モデルが issue の本文から書いたものです。

説明

System Information
  • SteamOS Version: 3.9.5 (20261023.100)
  • Kernel: 7.2.7-valve2-2-neptune-72-g31504582a073
  • Dock: Official Steam Deck Docking Station (4.0.0.0, DP-1)
  • Display: Samsung Q90A Neo QLED (0.0.0.0, HDMI 4, 2560x1440 @ 120Hz VRR HDR)
  • Audio: Samsung HW-S800B eARC Soundbar (3.0.0.0, HDMI 3)

Summary

Following up on #2968 (which fixed cecd deactivating when an eARC soundbar is present on the bus), we've hit three interrelated suspend/resume race conditions in cecd and amdgpu/Dock link training during S3 sleep/wake transitions:


1. False-Standby Bounce Loop on Resume (allow_standby = true)

When waking the Steam Deck from S3 sleep (e.g. via wireless controller while the TV is in standby), cecd thaws with user.slice and immediately processes either a buffered STANDBY (0x36) frame or a transitional standby state from the TV before the TV has finished waking up. Within ~1 second of PM: suspend exit, cecd requests systemd-logind to suspend the Steam Deck right back to sleep:

Oct 27 16:52:15 steamdeck kernel: PM: suspend exit
Oct 27 16:52:15 steamdeck cecd[1898]: INFO cecd::device: TV did not respond to wake immediately
Oct 27 16:52:15 steamdeck systemd-sleep[107509]: Successfully thawed unit 'user.slice'.
Oct 27 16:52:15 steamdeck systemd-logind[1138]: Operation 'suspend' finished.
Oct 27 16:52:16 steamdeck systemd-logind[1138]: suspend requested from client PID 1898 ('cecd') (unit [email protected])...
Oct 27 16:52:16 steamdeck systemd-logind[1138]: The system will suspend now!

Suggested Fix (Zero downside for working TVs):
Add a short post-resume grace window (e.g. 5–10 seconds after PrepareForSleep(false) / waking) during which incoming CEC STANDBY broadcasts from the TV are ignored by cecd.


2. user.slice Freeze Race Before STANDBY TX Completes (suspend_tv = true)

When putting the Steam Deck to sleep, cecd runs inside [email protected] (user.slice). Because CEC bus transmission + retries take ~200–600ms (especially if bus arbitration is busy), systemd-sleep frequently freezes user.slice or tears down the display topology before cecd's STANDBY transmission completes, leaving the TV turned on.

Suggested Fix (Zero downside for working TVs):
Hold the systemd-logind sleep delay inhibitor lock in cecd until the kernel CEC_TX_STATUS callback confirms the STANDBY message has finished transmitting (or timed out) before releasing the lock.


3. Cold-Boot HDMI 2.1 Link Training Failure ("Mode Not Supported" at 1440p@120Hz HDR)

When resuming from S3 sleep while connected to a TV in cold standby:

  1. At T+0.0s, kernel dm_resume immediately attempts DisplayPort/HDMI 2.1 link training (2560x1440 @ 120Hz HDR) via the Official Dock before the TV's high-bandwidth HDMI 2.1 receiver (Samsung Input Signal Plus) has booted:
    Oct 27 16:52:15 steamdeck kernel: WARNING: drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:10439 at amdgpu_dm_handle_vrr_transition+0x1d5/0x1e0 [amdgpu]
    Oct 27 16:52:18 steamdeck kernel: amdgpu 0000:04:00.0: [drm] *ERROR* dpcd_set_link_settings:1123: core_link_write_dpcd (DP_DOWNSPREAD_CTRL) failed
    Oct 27 16:52:18 steamdeck kernel: amdgpu 0000:04:00.0: [drm] *ERROR* dpcd_set_link_settings:1128: core_link_write_dpcd (DP_LANE_COUNT_SET) failed
    
  2. cecd wakes the TV (IMAGE_VIEW_ON), and ~2.5s later the TV's HDMI 2.1 receiver finishes booting and switches to the Deck's input (ACTIVE_SOURCE).
  3. However, because the TV keeps +5V/HPD asserted during standby and the Dock's DP-to-HDMI bridge does not fire a new HPD interrupt once the TV's scaler finishes booting, amdgpu never re-trains the failed link—resulting in a permanent "Mode Not Supported" error on the TV until the cable is replugged or hotplug is forced.

Workaround / Suggested Fix:
If the TV was in standby (pwr-state != on) prior to wake, triggering a DRM connector hotplug/re-train (trigger_hotplug / KMS link re-verification) ~1.5s after the TV finishes waking and accepts ACTIVE_SOURCE cleanly re-trains the 2-lane HBR3 link and resolves the "Mode Not Supported" error 100% of the time without affecting TVs that were already powered on.

主要言語
言語のデータがありません
スター
2.7k
フォーク
89
PR マージ指標
30日以内にマージされた PR はありません

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

ValveSoftware/SteamOS のほかの issue

ValveSoftware/SteamOS の issue をすべて見る

似ている issue

Backend & API Design の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。