Repository navigation
testenv: idle virtual screen matches the TV (3840x2160, 225%) - #572
Merged
Merged
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
display.ps1,matrix.ps1,run.ps1 -Display, README and doc sections. This existed only uncommitted in the main checkout (branchtest/virtual-display, never pushed). Committed as it was, with CLAUDE.md rebased on current main.display.ps1:Set-VirtualIdleMode(count, then mode, then scale), the pureGet-VirtualIdlePlan,Invoke-VirtualIdle(never throws, for exit paths), and the CLI switches-Idle,-Idle -DryRunand-SelfTest.Restore-DisplayLayoutapplies 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.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 storesDpiValuerelative 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 -DryRunwith the TV on: no change (the virtual screen is not on the desktop).check_copyright.ps1OK. No em-dashes.display.ps1 -Idleonce 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