input of ^O corrupts terminal output (in non-Windows terminal) #23548

Closed
opened 2026-01-31 08:45:32 +00:00 by claunia · 10 comments
Owner

Originally created by @mintty on GitHub (Aug 26, 2025).

Windows Terminal version

1.24.2231.0

Windows build number

10.0.26100.4946

Other Software

non-Windows terminal, mintty or also xterm, running wsl, involving some conhost layer

Steps to reproduce

Run mintty or xterm.
Run wsl.
ls -1 /bin # OK
^O # enter the control character
ls -1 /bin # corrupted output, gaps, added space, skipped sections, changing on repetition

Expected Behavior

correct output

Actual Behavior

see above; corrupted output remains until wsl is terminated
see also mintty/mintty#1332

^O is the stty discard character, with obscure meaning (see also comment in referenced issue). It used to have defined function in early Unix and pre-Unix systems, which would not be explaining such erratic behaviour however.

Originally created by @mintty on GitHub (Aug 26, 2025). ### Windows Terminal version 1.24.2231.0 ### Windows build number 10.0.26100.4946 ### Other Software non-Windows terminal, mintty or also xterm, running wsl, involving some conhost layer ### Steps to reproduce Run mintty or xterm. Run wsl. ls -1 /bin # OK ^O # enter the control character ls -1 /bin # corrupted output, gaps, added space, skipped sections, changing on repetition ### Expected Behavior correct output ### Actual Behavior see above; corrupted output remains until wsl is terminated see also mintty/mintty#1332 ^O is the stty discard character, with obscure meaning (see also comment in referenced issue). It used to have defined function in early Unix and pre-Unix systems, which would not be explaining such erratic behaviour however.
claunia added the Needs-TriageIssue-BugNeeds-Attention labels 2026-01-31 08:45:32 +00:00
Author
Owner

@DHowett commented on GitHub (Aug 27, 2025):

I'm sorry to say that I can't reproduce this or any other unusual behavior in applications that use ConPTY to host a WSL session (or any other application, honestly). When the hosting terminal emits SI, ConPTY passes it through unmodified; it has no special meaning to the console host. This is true in standard input mode or Win32 input mode.

Terminals tested:

  • putty (conpty in Windows 26100)
  • putty (conpty 1.24)
  • wezterm (conpty 1.22)

FWIW: the console host (either providing its own UI or acting as a PTY) does not implement the UNIX line discipline required to handle discard. That character has no function here.

@DHowett commented on GitHub (Aug 27, 2025): I'm sorry to say that I can't reproduce this or any other unusual behavior in applications that use ConPTY to host a WSL session (or any other application, honestly). When the hosting terminal emits `SI`, ConPTY passes it through unmodified; it has no special meaning to the console host. This is true in standard input mode or Win32 input mode. Terminals tested: - putty (conpty in Windows 26100) - putty (conpty 1.24) - wezterm (conpty 1.22) FWIW: the console host (either providing its own UI or acting as a PTY) does not implement the UNIX line discipline required to handle `discard`. That character has no function here.
Author
Owner

@mintty commented on GitHub (Aug 27, 2025):

Thanks for clarifying that conpty does not handle ^O. This left me puzzled first, but I actually found a workaround for mintty, setting Baud=999999, which was actually a fun option to slow down terminal operation (like setting Baud=9600 for some legacy feeling).
So maybe conpty is sending unusually large data packets to the host?

@mintty commented on GitHub (Aug 27, 2025): Thanks for clarifying that conpty does not handle ^O. This left me puzzled first, but I actually found a workaround for mintty, setting `Baud=999999`, which was actually a fun option to slow down terminal operation (like setting Baud=9600 for some legacy feeling). So maybe conpty is sending unusually large data packets to the host?
Author
Owner

@mintty commented on GitHub (Aug 27, 2025):

Checked with some other terminals: gnome-terminal, lxterminal, xfce4-terminal and rxvt-unicode, like xterm, are also affected, konsole is not. All run from cygwin, with Cygwin/X11 server.

@mintty commented on GitHub (Aug 27, 2025): Checked with some other terminals: gnome-terminal, lxterminal, xfce4-terminal and rxvt-unicode, like xterm, are also affected, konsole is not. All run from cygwin, with Cygwin/X11 server.
Author
Owner

@mintty commented on GitHub (Aug 28, 2025):

Tested some terminals in a remote scenario (ssh from Debian). Issue does not occur. So I guess it's something in the cygwin pty layer.
Closing here, thanks.

@mintty commented on GitHub (Aug 28, 2025): Tested some terminals in a remote scenario (ssh from Debian). Issue does not occur. So I guess it's something in the cygwin pty layer. Closing here, thanks.
Author
Owner

@DHowett commented on GitHub (Aug 28, 2025):

Thanks for following up! You gave me some really good ideas for how we can debug future PTY and terminal issues as well. (We have a debug tap that's similar to your logger, but I was thinking it would be cool if we had a congestion controller as well that simulated packet delays/low baud connections)

@DHowett commented on GitHub (Aug 28, 2025): Thanks for following up! You gave me some really good ideas for how we can debug future PTY and terminal issues as well. (We have a debug tap that's similar to your logger, but I was thinking it would be cool if we had a congestion controller as well that simulated packet delays/low baud connections)
Author
Owner

@j4james commented on GitHub (Aug 28, 2025):

I was thinking it would be cool if we had a congestion controller as well that simulated packet delays/low baud connections

@DHowett FYI, I use the trickle/tritty utility for this, but it would be nice to have that functionality built into the terminal. There was actually a feature request for something like that a few years back (#11182).

@j4james commented on GitHub (Aug 28, 2025): > I was thinking it would be cool if we had a congestion controller as well that simulated packet delays/low baud connections @DHowett FYI, I use the [trickle/tritty](https://github.com/sjmulder/trickle) utility for this, but it would be nice to have that functionality built into the terminal. There was actually a feature request for something like that a few years back (#11182).
Author
Owner

@mintty commented on GitHub (Aug 31, 2025):

There is a fix in cygwin, for release 3.7.0.

@mintty commented on GitHub (Aug 31, 2025): There is a fix in cygwin, for release 3.7.0.
Author
Owner

@DHowett commented on GitHub (Sep 2, 2025):

Ah, what did it end up being? Thanks for following up!

@DHowett commented on GitHub (Sep 2, 2025): Ah, what did it end up being? Thanks for following up!
Author
Owner

@mintty commented on GitHub (Sep 2, 2025):

Mintty 3.8.1 will have a workaround and cygwin 3.7.0 will have a fix. Both not yet released, kind of friendly race condition.

@mintty commented on GitHub (Sep 2, 2025): Mintty 3.8.1 will have a workaround and cygwin 3.7.0 will have a fix. Both not yet released, kind of friendly race condition.
Author
Owner

@mintty commented on GitHub (Sep 2, 2025):

If your question was about the actual cause, something with cygwin pty FLUSHO handling, see https://cygwin.com/pipermail/cygwin/2025-August/258726.html.

@mintty commented on GitHub (Sep 2, 2025): If your question was about the actual cause, something with cygwin pty FLUSHO handling, see https://cygwin.com/pipermail/cygwin/2025-August/258726.html.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#23548