Skip to content

Connect to a GLKVM whose host has no HDMI signal - #45

Merged
thirteen37 merged 1 commit into
mainfrom
glkvm-no-signal-connect
Oct 15, 2026
Merged

thirteen37 merged 1 commit into
mainfrom
glkvm-no-signal-connect

Conversation

@thirteen37

Copy link
Copy Markdown
Owner

Connecting to a GL.iNet Comet while the host PC was off or hibernated failed with "GLKVM media stream did not deliver a frame in time", even though the web UI connected fine and showed "No signal".

The session refused to enter .streaming until a first H.264 frame arrived. With no HDMI signal the device keeps the media socket open (heartbeats only) and never sends a frame, so each of the three connect attempts hit the 5s timeout and the session landed in .error.

This treats a frameless-but-open media socket as "no signal" rather than a failure:

  • The socket's first-frame timeout becomes a grace period. When it elapses the stream yields a single nil marker and keeps running instead of finishing with an error and cancelling the socket.
  • The session hands off to .streaming on that marker, so keyboard, mouse and ATX power work and the HDMI indicator shows no signal. Frames decode as soon as they start.
  • The streamer-restart retry is unchanged: that failure surfaces as a socket error, not a timeout.
  • H264StreamFrameSequencer.recordYield is generic over the stream element so it serves both the NanoKVM and the GLKVM streams.

Bumps MARKETING_VERSION to 1.0.8.

Verified: swift test --package-path KVMCore (178 tests) and the macOS xcodebuild test scheme pass. No WebSocket mock exists, so the grace path has no automated test; verified against the log evidence from the failing device.

🤖 Generated with Claude Code

Connecting to a GL.iNet Comet while the host PC was off or hibernated
failed with "GLKVM media stream did not deliver a frame in time", even
though the web UI connected fine and showed "No signal". The session
refused to enter .streaming until a first H.264 frame arrived, and with
no HDMI signal the device keeps the media socket open (heartbeats only)
and never sends one, so each of the three attempts hit the 5s timeout.

Treat a frameless-but-open media socket as "no signal" rather than a
failure. The socket's first-frame timeout becomes a grace period: when
it elapses the stream yields a single nil marker and keeps running, and
the session hands off to .streaming without video. Keyboard, mouse and
ATX power work, the HDMI indicator shows no signal, and frames decode
as soon as they start. The streamer-restart retry is unchanged, since
that failure surfaces as a socket error rather than a timeout.

Bump to 1.0.8.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
@thirteen37
thirteen37 merged commit 035466e into main Oct 15, 2026
3 checks passed
@thirteen37
thirteen37 deleted the glkvm-no-signal-connect branch October 15, 2026 16:50
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.

1 participant