Skip to content

fix: surface out_of_range error for unsupported HDMI resolution (>1080p) - #1513

Open
nitishagar wants to merge 1 commit into
jetkvm:devfrom
nitishagar:fix/unsupported-hdmi-resolution-error
Open

fix: surface out_of_range error for unsupported HDMI resolution (>1080p)#1513
nitishagar wants to merge 1 commit into
jetkvm:devfrom
nitishagar:fix/unsupported-hdmi-resolution-error

Conversation

@nitishagar

Copy link
Copy Markdown
Contributor

Problem

When the HDMI source resolution exceeds 1920x1080, the native layer reports real Width/Height but leaves Error empty, so the video state is never classified as out_of_range. The UI then hangs indefinitely on "Loading video stream…" instead of showing the incompatible-resolution error.

Fixes #1482

Change

  • Add a small pure helper unsupportedResolutionState in video.go: when Error == "" and Width > 1920 || Height > 1080, set Error = "out_of_range" and Ready = false.
  • Apply it in OnVideoStateChange before lastVideoState is stored/emitted, so the existing out_of_rangeHDMIErrorOverlay pipeline lights up and rpcGetVideoState reports the same state for automation.

The classification is only applied when no more specific error is already present (no_signal/no_lock still win), and it is idempotent.

Scope

  • Go-only, additive: one helper + one call site. No change to the event payload, the UI, or MQTT.
  • No frame-rate/interlaced handling and no device-side C detection (possible follow-up).

Testing

  • Added TestUnsupportedResolutionState (table-driven): 1920x1080/no-error unchanged; 3840x2160/no-error → out_of_range, Ready=false; existing no_signal/no_lock preserved.
  • Device manual check: a >1080p source shows the resolution error overlay instead of an indefinite loading state.

When the HDMI source exceeds 1920x1080, the native layer reports real
Width/Height but no Error, so the UI hangs on "Loading video stream...".
Classify such states as out_of_range (Ready=false) in OnVideoStateChange
before storing/emitting, feeding the existing HDMIErrorOverlay pipeline so
the user sees an incompatible-resolution message. rpcGetVideoState reflects
the same state for automation.

Fixes jetkvm#1482
@nitishagar
nitishagar force-pushed the fix/unsupported-hdmi-resolution-error branch from 29fc863 to 19e1f8b Compare July 2, 2026 08:32
@nitishagar
nitishagar marked this pull request as ready for review July 2, 2026 08:35
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.

No error message when unsupported HDMI resolution (>1080p/60Hz) is detected

1 participant