From f9066dca73dead69687f9e4e048ec480403e9bdc Mon Sep 17 00:00:00 2001 From: Leonard Hecker Date: Thu, 13 Aug 2026 00:49:11 +0200 Subject: [PATCH] ConPTY: Do not wait for DA1 on startup (#20536) A counterpart to #20510. After this commit you can spawn ConPTY again without handling any queries and it'll (mostly) just work. (cherry picked from commit bfc054685cb3e1cd07fdf294a294f266934e3d1b) Service-Card-Id: PVTI_lADOAF3p4s4BQX0-zg2Hrj8 Service-Version: 1.25 --- src/host/VtIo.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/host/VtIo.cpp b/src/host/VtIo.cpp index f5214d3817..f03ef64e2b 100644 --- a/src/host/VtIo.cpp +++ b/src/host/VtIo.cpp @@ -206,11 +206,14 @@ bool VtIo::IsUsingVt() const writer.Submit(); } + // NOTE: The PTY host may not be a terminal and may never respond + // to our DA1 request. It's better to not wait for a response. + if (_lookingForCursorPosition) { // Allow the input thread to momentarily gain the console lock. auto& gci = ServiceLocator::LocateGlobals().getConsoleInformation(); const auto suspension = gci.SuspendLock(); - _deviceAttributes = _pVtInputThread->WaitUntilDA1(3000); + _deviceAttributes = _pVtInputThread->WaitUntilDA1(1000); } }