Skip to content

Add explicit USB wake control#1471

Merged
adamshiervani merged 1 commit into
devfrom
codex-no-video-wake-control
May 22, 2026
Merged

Add explicit USB wake control#1471
adamshiervani merged 1 commit into
devfrom
codex-no-video-wake-control

Conversation

@adamshiervani
Copy link
Copy Markdown
Contributor

@adamshiervani adamshiervani commented May 18, 2026

Adds a no-signal Try to wake control that sends a dedicated wake-only HID signal, while regular keyboard and mouse reports stay blocked during suspend or no-signal states.

Covers the behavior with S3 E2E tests for both ignored browser input and successful button-triggered wake, with the full E2E suite passing.


Note

Medium Risk
Adds a new wakeHost RPC that drives a dedicated wake-capable HID function and changes HID wake settings, which can impact suspend/resume behavior and USB gadget enumeration.

Overview
Adds an explicit USB wake path by introducing a dedicated vendor HID function (wake_hid on /dev/hidg3) with wakeup_on_write=1, while disabling wakeup_on_write for the normal keyboard and mouse HID functions.

Exposes this via a new JSON-RPC method wakeHost (toggling the wake report a few times) and wires it to a new “Try to wake” button on the no-signal video overlay (with new localized strings).

Updates E2E coverage to validate S3 behavior: browser/regular HID input does not wake the host, and waking works via the overlay button and the explicit wakeHost RPC; remote-agent health() now supports a timeout to make these checks more reliable.

Reviewed by Cursor Bugbot for commit 913ece1. Bugbot is set up for automated code reviews on this repo. Configure here.

Comment thread usb.go Outdated
Comment thread internal/usbgadget/hid_keyboard.go Outdated
@adamshiervani adamshiervani force-pushed the codex-no-video-wake-control branch from 976f78b to 3d5ecd4 Compare May 18, 2026 09:39
Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 3d5ecd4. Configure here.

Comment thread usb.go Outdated
@adamshiervani adamshiervani force-pushed the codex-no-video-wake-control branch from 3d5ecd4 to 5b16004 Compare May 18, 2026 10:20
@adamshiervani adamshiervani force-pushed the codex-no-video-wake-control branch from 5b16004 to 913ece1 Compare May 18, 2026 10:59
@adamshiervani adamshiervani marked this pull request as ready for review May 22, 2026 08:21
@adamshiervani adamshiervani merged commit e3595cd into dev May 22, 2026
5 checks passed
@adamshiervani adamshiervani deleted the codex-no-video-wake-control branch May 22, 2026 08:22
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