fix: re-enable output on backend mode request, force frame on fresh scene output - #5
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 242686761a
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| ~(WLR_OUTPUT_STATE_ENABLED | WLR_OUTPUT_STATE_MODE); | ||
| } | ||
| } | ||
| wlr_output_schedule_frame(output->wlr_output); |
There was a problem hiding this comment.
Commit the staged enable instead of scheduling a frame
When this branch handles a MODE-only request for a disabled output, enabled=true is only staged in output->pending; scheduling a frame cannot apply it. Any resulting callback reaches handle_output_frame(), which returns while the output is disabled because output_is_usable() requires wlr_output->enabled, so lab_wlr_scene_output_commit() is never called and the connector remains disabled. This path needs to commit the staged state directly, or otherwise permit the enabling frame callback to perform that commit.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Confirmed — verified against actual source (output_is_usable() at src/output.c:1240 checks the live wlr_output->enabled, not output->pending). Fixed in 122b5d4: commits the pending state directly on the success path instead of relying on the frame callback to apply it. Hardware-retested on MS-R1 after the fix, still resolves the replug black screen.
mirkobrombin
left a comment
There was a problem hiding this comment.
Please split out the hardware-tested fresh-output frame fix and remove the unverified backend mode and power-state path.
|
Split as requested in aba03df. Removed entirely: the MODE-only re-enable fallback in Kept: only the Rebuilt clean (meson + ninja pulling wlroots-0.20 via the subproject wrap) and |
mirkobrombin
left a comment
There was a problem hiding this comment.
The fix is now correctly scoped, but please reduce the 27-line explanation around the single schedule call to a concise cause-and-effect comment.
b0ba70a to
be9a38b
Compare
|
Trimmed in 133f910. The 27-line block around the Did the same to the four blocks around the mode-test retry (38 lines down to 8), keeping only the cause (some DP/HDMI transmitters report Comment-only, no functional change. Rebuilt clean on aarch64 and the full |
be9a38b to
133f910
Compare
mirkobrombin
left a comment
There was a problem hiding this comment.
The new mode-test retry is explicitly unverified on the affected hardware, so please move it to a separate PR and keep this one limited to the hardware-confirmed frame scheduling fix.
133f910 to
7c6273a
Compare
A fresh wlr_scene_output has needs_frame false, so lab_wlr_scene_output_commit() short-circuits and the atomic commit that binds a CRTC never reaches the kernel: black screen after a DP/HDMI replug. Scheduling a frame first makes the commit run. Rescoped per review onto current singularity: the unverified mode-test retry and its timer teardown are dropped entirely, leaving only the fix confirmed on hardware (O6N and MS-R1, repeated unplug/replug). Assisted-by: Claude Code:claude-opus-5 AI-Scope: Rescoped the branch to the single hardware-confirmed call, dropped the unverified retry machinery, and reduced the comment to one line. Signed-off-by: Jason Perlow <jperlow@gmail.com>
37b5d5f to
bd580a4
Compare
|
Rescoped in Removed, per your review: the whole mode-test retry path - I have not filed it as a separate PR either. It stays out of tree until I can reproduce the mode-test failure on the affected board rather than infer it - it would be the same unverified change with a different number on it. Kept: only Also trimmed the comment on it from 7 lines to 1, per your earlier /* A fresh scene_output has needs_frame false; the commit binds no CRTC. */
wlr_output_schedule_frame(wlr_output);I also had the branch based on Still verified the same way: repeated unplug/replug of DP-3 on MS-R1 (4 outputs) and on Radxa Orion O6N (1 output), screen recovering without a compositor restart on both. @mirkobrombin your |
025808d
into
singularityos-lab:singularity
Summary
A DP/HDMI replug leaves the compositor black on CIX Sky1 (
trilin-dptx-cix,kernel 7.2.3-sky1-ncz). On this driver an unplug destroys the
wlr_output, sothe replug arrives as a new one through
configure_new_output(). Afreshly-created
wlr_scene_outputhasneeds_frameunset, solab_wlr_scene_output_commit()short-circuits onwlr_scene_output_needs_frame()and the atomic commit that binds a CRTC to theconnector never reaches the kernel. Scheduling a frame first makes the commit
run; the idle source it registers is a no-op once the commit sets
frame_pending, so there is no double commit.Scope
Rescoped per review to the single hardware-confirmed change: two lines in
configure_new_output(). The earlier mode-only re-enable path and themode-test retry timer are both gone, since neither was verified on the affected
hardware. The retry is not being filed as a separate PR yet - it stays out of
tree until it has a hardware reproduction behind it.
Test plan
AI assistance: disclosed