Skip to content

Improve GC553G2 support in the Console Hub - #160

Open
accola88 wants to merge 4 commits into
Everlite:devfrom
accola88:gc553g2-console-hub
Open

accola88 wants to merge 4 commits into
Everlite:devfrom
accola88:gc553g2-console-hub

Conversation

@accola88

@accola88 accola88 commented Nov 25, 2026 •

Copy link
Copy Markdown

Summary

Improve GC553G2 USB/UVC integration in the Console Hub so card selection, playback devices, HDMI status, and playback telemetry follow the selected capture card.

  • Support explicit GC553G2 selection in the launcher and Hub, with video and audio devices resolved for the selected USB port.
  • Query live HDMI lock and timing through uvcvideo without detaching the driver, and refresh capture presets and settings in the Hub.
  • Add mpv playback telemetry, fullscreen statistics, and experimental LSFG-VK frame generation with fallback handling.
  • Limit GPU work in flight, explicitly honor OpenGL VSync, and skip the game-FPS analysis filter during standard USB playback; keep the LSFG path unchanged.
  • Extend regression coverage for discovery, live queries, card selection, playback, and telemetry.

Validation

Updated onto upstream dev at c22a385, preserving the upstream Qt signal/shutdown fixes while retaining the GC553G2 changes.

  • QT_QPA_PLATFORM=offscreen python3 -m unittest discover -s tools/everlive/tests -v — 192 tests passed.
  • make -C tests test — passed.
  • bash -n play.sh and git diff c22a385...HEAD --check — passed.
  • GC553G2 with PS5: short 3840×2160 @ 60 FPS MJPEG playback test in the Advanced Hub, with audio active, embedded video, telemetry and settings visible, then Cinema Fullscreen. No mpv render drops reported.
  • Hub SIGTERM shutdown — exited cleanly.
  • LSFG-VK frame generation remains unverified: the Vulkan layer is installed, but the required Lossless Scaling DLL is unavailable. Standard-playback fallback was tested before the rebase.
  • Full GC573 engine build could not complete locally because the SDL2_ttf development dependency (SDL_ttf.h) is missing.

Kept as draft pending the maintainer's 2.0.2 integration and regression review.

Playback buffering follow-up: compared standard embedded playback (A), reduced buffering without the image-analysis filter (B), and separate-window playback (C). B was subjectively preferred on this setup. mpv CPU use in the short A/B comparison fell from approximately 71% to 63% of one CPU core. These observations do not establish a measured reduction in controller-to-display latency. The final B patch passed all 190 Python tests and a short embedded 4K60 playback check with audio and no reported render drops.

Empty AT response review: verified all four setting commands (0x4E, 0x56, 0x76, 0x72) using empty short wire replies through the real _read_at_reply() implementation. Its existing non-empty payload check retries and raises RuntimeError, which query_live_hdmi_status() reports as settings_error while retaining HDMI status. Added regression coverage for this behavior and recovery after a transient empty reply; no production change was needed.

@PolygonPrincess
PolygonPrincess marked this pull request as draft November 25, 2026 10:20
@PolygonPrincess

Copy link
Copy Markdown
Collaborator

@accola88 Converting this to a draft as it should be targeting the dev branch, not main.

Additionally I think the issues in 2.0.2 should be merged in first before we pull this into dev, as we prepare and finalize 2.0.2 to see if this introduces any regressions or behaviors we don't expect.

@accola88
accola88 changed the base branch from main to dev November 25, 2026 10:31
@accola88

Copy link
Copy Markdown
Author

Thanks for clarifying. I’ve changed the target branch to dev and will keep this as a draft until the 2.0.2 fixes are merged. Afterwards, I’ll update the branch, resolve conflicts, and retest GC553G2 playback.

@PolygonPrincess

PolygonPrincess commented Nov 25, 2026 •

Copy link
Copy Markdown
Collaborator

@accola88 Thanks for changing the base branch to dev. Hydrogen found a minor edge-case bug (you might want to verify this yourself, and if it's unfounded feel free to report it as such):

Unhandled IndexError on empty AT replies in gc553g2_control.py

  • In gc553g2_control.py, _read_at_settings() calls _read_at_reply(..., allow_short=True)[0] for selectors 0x4E, 0x56, 0x76, and 0x72.
  • If the device returns an empty (b"") short reply, [0] raises IndexError, which is not caught by except (RuntimeError, OSError) in query_live_hdmi_status() or by read_hdmi() in everlive_viewer.py's background probe thread. Checking len(data) < 1 (as _read_hdmi_status() already does for len(data) < 4) or catching IndexError avoids an unhandled thread exception.

Other than that, it looks good. After the pre-existing 2.0.2 PR's are merged in and this PR gets updated, conflicts resolved and tested it should be ready for review.

Up to you if you want to resolve the conflicts per PR or wait until they're all merged in and then resolve any conflicts.

@accola88
accola88 force-pushed the gc553g2-console-hub branch from 38afef5 to 3e0af82 Compare November 25, 2026 10:35
@accola88

Copy link
Copy Markdown
Author

Thanks for flagging this. I verified all four commands with empty short replies through the actual reply parser. _read_at_reply() already rejects empty payloads and raises a handled RuntimeError after retries. I’ve added regression tests covering this and recovery from transient empty replies; all 192 tests pass.

I’ll keep the PR as a draft and update against dev again after the remaining 2.0.2 PRs are merged.

@PolygonPrincess
PolygonPrincess marked this pull request as ready for review November 27, 2026 14:17
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.

2 participants