Skip to content

Perf/gpu downscale - #64

Closed
BrenOne wants to merge 28 commits into
mskutin:mainfrom
BrenOne:perf/gpu-downscale
Closed

BrenOne wants to merge 28 commits into
mskutin:mainfrom
BrenOne:perf/gpu-downscale

Conversation

@BrenOne

@BrenOne BrenOne commented Oct 30, 2026

Copy link
Copy Markdown

No description provided.

BrenOne and others added 28 commits October 30, 2026 00:43
- Frames use the official 1-based (start,r,g,b,end) range format, merged to
  at most 34 ranges (3 HID reports instead of 8), 1 ms gap between reports
- Retry/reopen a stalled hid_write (0x3E5) instead of dropping the strip
- Read LED count and size via 0x82 and adopt them automatically
- Hardware brightness 255 (was 100 on a 0-255 scale)
- 45/60 FPS options, 60 by default
- Per-side LED counts and corner gap for strips with empty corners
- Turn the strip off on Windows shutdown/restart/sign-out

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017Sqdi9StAk5iH4ETYHDqEq
macOS runners are often unavailable and the upstream signing secret does
not exist in the fork, which skipped or failed the whole build.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017Sqdi9StAk5iH4ETYHDqEq
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017Sqdi9StAk5iH4ETYHDqEq
Keeps settings untouched on test/virtual connections.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017Sqdi9StAk5iH4ETYHDqEq
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017Sqdi9StAk5iH4ETYHDqEq
…frame

Lock-key OSDs, UAC and mode changes make DXGI drop the duplication. The
capture ended with an error and restarted, and a fresh duplication
returned an all-black frame until the first image arrived: the strip
strobed black on every Caps/Num/Scroll Lock press in Screen mode.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017Sqdi9StAk5iH4ETYHDqEq
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017Sqdi9StAk5iH4ETYHDqEq
Windows sends a keyboard-indicator SET_REPORT to the controller's
keyboard interface on every lock-key press. Above ~30 FPS it collides
with frame reception and the firmware shows white/random garbage. A
low-level hook that only inspects these three keys holds output for
250 ms (frames are dropped, solid colours wait).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017Sqdi9StAk5iH4ETYHDqEq
On the secure desktop both DXGI duplication and the GDI fallback fail.
Hold the last real frame while duplication is rebuilt (4 tries/s)
instead of ending capture with an error.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017Sqdi9StAk5iH4ETYHDqEq
Starts only after 0.3 s without a desktop image, so brief capture
losses keep full brightness.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017Sqdi9StAk5iH4ETYHDqEq
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017Sqdi9StAk5iH4ETYHDqEq
Launch at login now registers a scheduled task with the highest
available rights (one UAC prompt when toggled) instead of the Run key,
so the lock-key guard also sees administrator windows. A normally
started second copy can still hand over to the elevated instance.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017Sqdi9StAk5iH4ETYHDqEq
The USB capture confirmed the indicator SET_REPORT collision and the
pause works in every non-elevated window; elevated windows are covered
by the elevated login task. Refresh CLAUDE.md accordingly.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017Sqdi9StAk5iH4ETYHDqEq
A capture with the DynamicLight window focused showed frames never
paused: the hook did not fire. It lived on the session-events thread,
which can block on engine events long enough for Windows to drop a
low-level hook silently. Move the hook to its own thread and add a 4 ms
GetAsyncKeyState poll of Caps/Num/Scroll Lock as a backstop.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017Sqdi9StAk5iH4ETYHDqEq
- If desktop duplication stays unavailable for 3 s, try GDI and keep
  streaming it until DXGI returns (a display moved to another GPU no
  longer freezes the strip on a dimmed frame forever); UAC still holds.
- A solid colour re-checks the lock-key window while waiting, capped at
  one second so the engine never stalls on a held key.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017Sqdi9StAk5iH4ETYHDqEq
The controller reports its LED count and display size. On a fresh setup
pick 3 or 4 monitor edges by which gives the kit's ~2 cm LED pitch, and
split LEDs using the selected display's actual aspect ratio instead of a
fixed 16:9. Covers 24"/27" kits in both variants with wide margins.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017Sqdi9StAk5iH4ETYHDqEq
- Drop release/installer-script jobs the build waited on, and the CLI
  and updater packages the fork does not ship.
- Run fmt/tests/clippy and the installer build as parallel jobs.
- PR builds use a fast release profile (no LTO, 16 codegen units);
  pushes to main keep the project's optimised profile.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017Sqdi9StAk5iH4ETYHDqEq
Each frame copied the whole desktop to a CPU staging texture (14.7 MB at
1440p, 60 times a second), which cost 2-9 % of a 3080 Ti. Copy it into
a mip-mapped texture, generate mips on the GPU and read back only the
level whose shorter side is at least 128 px (320x180 at 1440p: 64x less
data). Edge colours are averages anyway, so the result is unchanged;
GPUs that cannot generate mips keep the full-size path.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017Sqdi9StAk5iH4ETYHDqEq
@BrenOne

BrenOne commented Oct 30, 2026

Copy link
Copy Markdown
Author

Opened by mistake, sorry — this was meant for my fork.

@BrenOne BrenOne closed this Oct 30, 2026
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