Skip to content

testenv: idle virtual screen matches the TV (3840x2160, 225%) - #572

Merged
Maxaubert merged 2 commits into
mainfrom
test/vdd-idle
Nov 17, 2026
Merged

Maxaubert merged 2 commits into
mainfrom
test/vdd-idle

Conversation

@Maxaubert

Copy link
Copy Markdown
Owner

Closes #571.

With the TV off, Windows falls back to the always-present virtual screen (MTT VDD, MTT1337). It came up at 1366x768 and 100 %, so every window was squeezed and stayed small when the TV came back. Idle, the virtual screen now matches the TV: 3840x2160, 144 Hz (60 Hz if the driver does not offer 144), 225 % scale, one monitor. The logical desktop stays 1707x960, so windows keep their size.

Commits

  1. Virtual display test environment. display.ps1, matrix.ps1, run.ps1 -Display, README and doc sections. This existed only uncommitted in the main checkout (branch test/virtual-display, never pushed). Committed as it was, with CLAUDE.md rebased on current main.
  2. Idle state.
    • display.ps1: Set-VirtualIdleMode (count, then mode, then scale), the pure Get-VirtualIdlePlan, Invoke-VirtualIdle (never throws, for exit paths), and the CLI switches -Idle, -Idle -DryRun and -SelfTest.
    • Restore-DisplayLayout applies the idle state first, and again on both pending paths. The snapshot can hold a test mode: a run that started with the TV off saves a layout with only the virtual screen.
    • run.ps1: if the restore throws, the idle state is still applied.
    • matrix.ps1: the final step applies the full idle state, not just the count.
    • README: an idle-state section, plus 3840x2160 listed first in vdd_settings.xml. The driver offers the first <resolution> as its preferred mode.

Scale is set the same way Settings sets it, relative to the recommended rung (DisplayConfigSetDeviceInfo). Windows stores DpiValue relative to the recommended scale at the current resolution, so writing it by hand would mean guessing that rung.

Test plan

  • display.ps1 -SelfTest: 8 plan cases pass in pwsh 7 and Windows PowerShell 5.1 (the nightly uses 5.1).
  • display.ps1 -Idle -DryRun with the TV on: no change (the virtual screen is not on the desktop).
  • Parse check of run.ps1, matrix.ps1 and display.ps1. check_copyright.ps1 OK. No em-dashes.
  • Not run live: no driver reload and no SetDisplayConfig while Max works. Still needed: display.ps1 -Idle once with the TV off, and a TV-off fallback check after the next driver reload.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Kg7JN52XncN8Sm7vFe6HPA

Maxaubert and others added 2 commits November 17, 2026 07:50
display.ps1 attaches a Virtual Display Driver screen as primary, sets its mode and scale, and
saves and restores the layout. run.ps1 -Display uses it when the TV is off; matrix.ps1 runs a
suite across several screen setups. This work existed only uncommitted in the main checkout.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Kg7JN52XncN8Sm7vFe6HPA
With the TV off, Windows falls back to the always-present virtual screen. It came up at 1366x768
and 100 %, so every window was squeezed and stayed small when the TV came back. Idle, it now
matches the TV: 3840x2160, 144 Hz (60 if not offered), 225 % scale, one monitor.

- display.ps1: Set-VirtualIdleMode (count, mode, scale), a pure Get-VirtualIdlePlan, -Idle,
  -Idle -DryRun and -SelfTest. Restore-DisplayLayout applies it first and again on the pending path.
- run.ps1: a failed restore still applies the idle state.
- matrix.ps1: the final step applies the idle state instead of only the count.
- README: idle state, and 3840x2160 first in vdd_settings.xml (the driver's preferred mode).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Kg7JN52XncN8Sm7vFe6HPA
@Maxaubert
Maxaubert merged commit 3717017 into main Nov 17, 2026
1 check passed
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.

testenv: idle virtual screen should match the TV (3840x2160, 225%)

1 participant