Skip to content

P5: window, tray and tune watchdog - #2

Merged
Rovey merged 10 commits into
mainfrom
p5-ui
Sep 27, 2026
Merged

Rovey merged 10 commits into
mainfrom
p5-ui

Conversation

@Rovey

@Rovey Rovey commented Sep 26, 2026

Copy link
Copy Markdown
Owner

Overnight session. Draft so CI runs; merged after review.

🤖 Generated with Claude Code

Rovey and others added 10 commits September 27, 2026 01:30
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
- Watchdog::check decides per poll: nothing, re-apply (back at stock with the
  same driver and card), give up after a 4th reset within an hour (likely
  unstable), back off once from another tool's settings, or notify once
  that the driver or card changed. Pure and unit-tested (7 cases).
- GpuControl::read_applied reads the offsets and the power limit back from
  the driver; --status prints them.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…hared app library

gao.exe keeps only argument parsing and console output; the window and tray
executable will call the same functions.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…e watchdog

- Dear ImGui v1.92.9b vendored (core + Win32/DX11 backends, unmodified).
- Home (GPU, live telemetry, saved/applied tune, presets, Optimize), Run
  (live temperature/power, log, Abort) and Results (before/after, apply at
  logon) screens; the optimize runs on a worker thread.
- Tray icon with Open / Re-apply / Revert / Exit and balloon notices; the
  window hides to the tray on close; one instance only.
- Watchdog every 30 s while a tune should be applied: re-applies after a
  reset, gives up after four resets in an hour, backs off from other tools,
  reports a driver or card change.
- Renders only when needed (nothing while hidden, ~4 Hz idle); dark title
  bar; minidump on a crash, with the tuned GPU reset to stock first.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…re installed

- boot_task_xml takes the arguments and the time limit: the tray process
  runs with --tray and PT0S (never stopped by Task Scheduler).
- --boot on / the window's toggle copy gao.exe and GpuAutoOptimizer.exe into
  %ProgramFiles%\GpuAutoOptimizer; --boot off removes both.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
- watchdog: a partial reset (offsets gone, power limit kept, or the reverse)
  counts as a reset and is re-applied, not taken for another tool
- a process-wide tuning lock: two optimizes cannot run at once, and the
  watchdog never re-applies under a running search (window or CLI)
- gao --reset tells a running tray app the card is at stock by choice
- boot-apply off removes an in-use tray copy at the next restart
- the logon task runs at normal priority
- window: device-lost recovery on a timer, crash dump from a pre-created
  thread before the reset, end-session handling, busy-state guards on tray
  actions, single-instance handling for an elevated first instance,
  NIM_MODIFY falls back to NIM_ADD, DPI from the actual window, close
  exits when there is no tune to keep applied
- an exception during a search resets the card to stock

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The version lives in core/version.hpp as macros so the resource compiler
can read it. A v* tag builds, tests and packages the app into a DRAFT
release with a SHA-256 and a provenance attestation; publishing stays
manual. A manual run is a dry run that only uploads the zip.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…hanged

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…eir name at restart

Turning boot-apply off while the tray app runs, then on again before a
restart, scheduled the new copy's deletion. Installing over a running
copy failed outright. Both now rename the running file aside first.
Also: the tray's stock-by-choice notice is no longer accepted from
unelevated processes and is only sent after a successful reset, and
the tuning lock waits briefly so the watchdog's look cannot refuse
an optimize.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@Rovey
Rovey marked this pull request as ready for review September 27, 2026 05:45
@Rovey
Rovey merged commit f059e9f into main Sep 27, 2026
2 checks passed
@Rovey
Rovey deleted the p5-ui branch October 2, 2026 12:21
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