Skip to content

feat: clock hold, Save Battery, Lowest latency take steering, one-frame Automatic - #15

Draft
broslife wants to merge 7 commits into
mainfrom
clock-control
Draft

broslife wants to merge 7 commits into
mainfrom
clock-control

Conversation

@broslife

@broslife broslife commented Nov 6, 2026 •

Copy link
Copy Markdown
Collaborator

What

Fixes for issue #30, items 1 to 3, as one test build.

1. The title holds its clocks (issue #30, item 1)

Stage CPU GPU Memory
Menu, handheld 1428 422.4 1600
Menu, docked 1428 system's 1600
Stream 1785 system's 1600
  • A running sys-clk or Horizon OC takes the request through its override command, because either one can undo clkrst. Without a module, the title sets clkrst itself and sets it again when the clocks move.
  • A module's hold outlives the title, so Lifecycle::exit and the panic hook hand the clocks back. The first stage replaces whatever a hard crash left.
  • The hold is on by default. Save Battery (nx.save_battery in the settings document) leaves the clocks to the system. The settings row needs the shared console UI: Settings: Save Battery row needs the shared console UI #31.
  • Probe check 7 is in this branch, with its console results in docs/NOTES.md.

2. Lowest latency: the take follows the arrivals (issue #30, item 2)

Newest wins took the picture at a fixed 10 ms after the vblank. The arrivals drift through the refresh (about 0.8 ms a minute in the issue's logs). Once their band straddled the take, up to 150 pictures a window went unseen for minutes. The take now sits 2 ms past the latest usual arrival, within the GPU budget, and moves with the band (pf-nx-vk steer.rs). present[10s] reports the band, the take and the moves. Smoothness is unchanged.

3. Automatic smoothness takes one frame (issue #30, item 3)

The shared rule resolves Automatic to two frames. On the console, one frame presents as many pictures as two, one refresh sooner. A buffer the player picks still stands.

Status

Draft: a test build for the console.

  • Proven on the console with Horizon OC 2.5.1: the CPU hold through the module, through sleep and past exit.
  • To test:
    • the hold with Horizon OC's governor on (the overlay should read 1785, not 612);
    • Save Battery through settings.json;
    • Lowest latency for 10+ minutes handheld (unseen (replaced) near zero);
    • Smoothness Automatic against 1;
    • dock changes;
    • plain sys-clk.

broslife and others added 5 commits November 20, 2026 16:21
Y at the start runs it alone. X, Y and B ask for 1785, 1224 and 1020 MHz;
every change of the clocks, focus or mode becomes a line in probe-clock.log.
Leaving does not restore the rate, so the next run shows what the system left.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Horizon OC puts the CPU back to stock when no profile sets it, so a direct
clkrst rate falls within 300 ms while the module runs. Its service and
sys-clk's share the override command. The check finds which one runs, logs
its versions, and A and R hold and release the CPU through it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The menu holds CPU 1428, GPU 422.4 in handheld and memory 1600; the
stream holds CPU 1785 and memory 1600 and leaves the GPU to the system.
A running sys-clk or Horizon OC takes the ask, since it undoes clkrst;
without one the title sets clkrst and asks again when the clocks move.

A module's hold outlives the title, so Lifecycle::exit and the panic
hook hand the clocks back, and the first stage replaces what a hard
crash left.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The clock hold stays on by default. With `nx.save_battery` on in the
settings document, the menu and the stream hold nothing: the title lets
go of the module's hold, or puts the stock rates back without one, and
stops asking again. The menu reads the setting every frame, so a flip
takes effect at once.

The settings screen has no row for it yet: its rows are the shared
console's, and a Switch-only row needs one there.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
broslife and others added 2 commits November 20, 2026 16:57
The shared rule resolves an Automatic buffer to two frames. On the
console one frame presents as many pictures a second as two, a refresh
sooner: 15-23 ms decode to present against 31-40 on 2026-10-31, and
21-25 ms end to end against a 23-36 ms swing in issue 30's run on
another network. A buffer the player picks still stands.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The host's frame clock and the panel's drift apart, so the pictures'
arrivals walk through the refresh, about 0.8 ms a minute in issue 30's
logs. Newest wins took at a fixed 10 ms after the vblank, and once the
band of arrivals straddled it, up to 150 pictures a window went unseen
for minutes.

Under the latency intent the take now sits 2 ms past the latest usual
arrival, within the GPU budget. It moves at once when the band comes
within 1 ms, moves earlier when that saves over 3 ms, and goes to the
start of the next refresh when the band runs past the budget. The
present line reports the band, the take and the moves. Smoothness keeps
its fixed late take.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@broslife broslife changed the title feat: the title holds its clocks for the menu and the stream feat: clock hold, Save Battery, Lowest latency take steering, one-frame Automatic Nov 20, 2026
@Zayr64

Zayr64 commented Nov 20, 2026

Copy link
Copy Markdown

Thanks for turning the report into a build this fast.

One thing before I test this PR, about the clock hold. This console runs its RAM at 2400 MHz through Horizon OC 2.6.0 (my logs read emc 2400.0), with timings validated only at that rate, and I keep it fixed there. On Nov 15 it hard-froze twice the moment a profile moved the RAM from 2400 to 2133. A GPU voltage change went in the same step, so I can't fully separate the two, but the RAM switch is my main suspect and I have not changed it at runtime since.

From the clock table, the title asks the module for memory 1600 in the menu and in the stream as soon as it opens. On this console that would be a runtime drop from 2400 to 1600, and I'd rather not find out what happens.

Would one of these be possible?

  • Never lower a clock: skip the memory hold when the system's rate is already at or above 1600. The same rule would help docked, where my profile runs the CPU at 2397 and the 1785 hold would pull it down.
  • Or a way to leave memory alone while keeping the CPU hold. Save Battery turns everything off, and the CPU hold is the part I need (the 612 MHz governor case).

If I should use Save Battery for a first run: where does settings.json live on the SD, and is the key a top-level "nx.save_battery": true?

Once memory is left alone, I'm happy to run the Lowest latency test (10+ minutes, handheld) and send the logs.


Generated by Claude Code

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