WSL tmux screen scrambled when powershell.exe stderr redirected #14234

Closed
opened 2026-01-31 04:04:33 +00:00 by claunia · 3 comments
Owner

Originally created by @wedaly on GitHub (Jun 15, 2021).

Windows Terminal version (or Windows build number)

1.8.1521.0

Other Software

WSL2
Ubuntu 20.04
tmux 3.0a
powershell.exe (major: 5, minor: 1, build: 19041, revision: 1023)

Steps to reproduce

In Windows Terminal under WSL2 Ubuntu 20.04:

  1. Start a new tmux session: tmux new -s default
  2. Run powershell.exe Write-Host 'hello' 2> /dev/null
  3. Type: Ctrl-B, then :split-window -h to split the tmux window.
  4. The display is garbled (see screenshot below).

After closing and opening Windows terminal, the display returns to normal. I found that I needed to exit and start a new tmux session to reproduce the issue.

The issue occurs ONLY when redirecting stderr from powershell.exe. If I remove the redirection, the issue doesn't happen.

Expected Behavior

Tmux displays two panes with a separator, and "hello world" from powershell.exe is displayed in the left pane. It should look like this:

image

Actual Behavior

Tmux display is garbled (see screenshot) until closing and reopening Windows Terminal.

image

Originally created by @wedaly on GitHub (Jun 15, 2021). ### Windows Terminal version (or Windows build number) 1.8.1521.0 ### Other Software WSL2 Ubuntu 20.04 tmux 3.0a powershell.exe (major: 5, minor: 1, build: 19041, revision: 1023) ### Steps to reproduce In Windows Terminal under WSL2 Ubuntu 20.04: 1. Start a new tmux session: `tmux new -s default` 2. Run `powershell.exe Write-Host 'hello' 2> /dev/null` 3. Type: Ctrl-B, then `:split-window -h` to split the tmux window. 4. The display is garbled (see screenshot below). After closing and opening Windows terminal, the display returns to normal. I found that I needed to exit and start a new tmux session to reproduce the issue. The issue occurs ONLY when redirecting stderr from powershell.exe. If I remove the redirection, the issue doesn't happen. ### Expected Behavior Tmux displays two panes with a separator, and "hello world" from powershell.exe is displayed in the left pane. It should look like this: ![image](https://user-images.githubusercontent.com/2948394/121993928-30d54a00-cd59-11eb-83c1-bc842fa44ead.png) ### Actual Behavior Tmux display is garbled (see screenshot) until closing and reopening Windows Terminal. ![image](https://user-images.githubusercontent.com/2948394/121993873-18652f80-cd59-11eb-8a07-b57a005b8713.png)
claunia added the Resolution-ExternalNeeds-Tag-Fix labels 2026-01-31 04:04:33 +00:00
Author
Owner

@wedaly commented on GitHub (Jun 15, 2021):

Maybe similar to https://github.com/microsoft/terminal/issues/155 except it happens only when redirecting powershell.exe stderr.

@wedaly commented on GitHub (Jun 15, 2021): Maybe similar to https://github.com/microsoft/terminal/issues/155 except it happens only when redirecting `powershell.exe` stderr.
Author
Owner

@DHowett commented on GitHub (Jun 17, 2021):

Thanks for the report! I moved this over to the WSL repository at /dup https://github.com/microsoft/WSL/issues/7077

@DHowett commented on GitHub (Jun 17, 2021): Thanks for the report! I moved this over to the WSL repository at /dup https://github.com/microsoft/WSL/issues/7077
Author
Owner

@ghost commented on GitHub (Jun 17, 2021):

Hi! We've identified this issue as a duplicate of one that exists on somebody else's Issue Tracker. Please make sure you subscribe to the referenced external issue for future updates. Thanks for your report!

@ghost commented on GitHub (Jun 17, 2021): Hi! We've identified this issue as a duplicate of one that exists on somebody else's Issue Tracker. Please make sure you subscribe to the referenced external issue for future updates. Thanks for your report!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#14234