fix(viewer): skip the Writeback connector in the eglfs headless guard#2968
Merged
Conversation
#2962 added wait_for_eglfs_display so a screenless eglfs (Pi 4) board waits for a display instead of crash-looping on Qt's "no screens available". eglfs_has_display() treated any connector status other than "disconnected" as a present display (to tolerate bridges that report "unknown"). balenaOS 2026.x exposes a KMS `card0-Writeback-1` virtual connector that ALWAYS reports "unknown". On a headless Pi 4 (both HDMI ports "disconnected") the writeback connector's "unknown" satisfied the guard, so it skipped the wait, launched eglfs, and the viewer crash-looped on "no screens available" / "AnthiasViewer exited before emitting D-Bus handshake" — exactly the failure #2962 was meant to prevent. Confirmed on multiple live pi4 on 2026.1.0 (card0-HDMI-A-1/-2 = disconnected, card0-Writeback-1 = unknown). Skip `*Writeback*` connectors so only real display outputs (HDMI/DSI/DP/…) count. A genuinely headless board now waits gracefully; the bridge-"unknown" hedge is preserved for real connectors. Verified locally for headless, connected, and bridge-unknown layouts. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Copilot wasn't able to review any files in this pull request.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
5 tasks
vpetersson
added a commit
that referenced
this pull request
Jun 2, 2026
- CalVer (YYYY.0M.MICRO); still June 2026, micro 0 -> 1 - Ships the QML VideoOutput presentation path (#2975), the pi2/pi3 GStreamer HW video pipeline (#2972), and the x86 WLR_DRM_NO_ATOMIC display-freeze fix (#2978) - Also picks up Pi 4 eglfs rotation (#2971, #2973), the armv7 viewer spawn retry (#2969), the Writeback-connector headless guard (#2968), and viewer log cleanups (#2977, #2979) Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Issues Fixed
Pi 4 devices on balenaOS 2026.x crash-loop the viewer with
no screens available/AnthiasViewer exited before emitting D-Bus handshake, despite the headless guard from #2962.Root cause:
2026.xexposes a KMScard0-Writeback-1virtual connector that always reportsunknown.#2962'seglfs_has_display()counted any non-disconnectedstatus as "display present" (to tolerate bridge chips reportingunknown). On a headless Pi 4 (bothHDMI-A-1/HDMI-A-2=disconnected), the writeback connector'sunknownmade the guard think a display was attached → it skipped the wait → launched eglfs → crash-loop. Confirmed on live devices094231c3,098fa957(both: HDMI disconnected,Writeback-1unknown).Description
Skip
*Writeback*connectors ineglfs_has_display()so only real display outputs (HDMI/DSI/DP/…) count toward "a display is present." A genuinely headless board now waits gracefully (as #2962 intended) instead of crash-looping; theunknown-as-present hedge is kept for real connectors.Verified locally: headless (HDMI disconnected + Writeback unknown) → waits; HDMI connected → launches; HDMI
unknown(bridge) → launches.bash -n+shellcheckclean.Checklist
🤖 Generated with Claude Code