Terminal hangs constantly while running WSL 2 #21559

Closed
opened 2026-01-31 07:48:08 +00:00 by claunia · 8 comments
Owner

Originally created by @lumbytyci on GitHub (Apr 21, 2024).

Windows Terminal version

1.19.10821.0

Windows build number

10.0.22631.3447

Other Software

WSL version: 2.1.5.0
Kernel version: 5.15.146.1-2
WSLg version: 1.0.60
MSRDC version: 1.2.5105
Direct3D version: 1.611.1-81528511
DXCore version: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp
Windows version: 10.0.22631.3447

Steps to reproduce

  1. Open Windows Terminal
  2. Launch WSL 2 (I'm running Debian)
  3. Do some work, usually happens after I save and quit from vim or any console application that has some kind of CLI
  4. Windows Terminal will hang (not freeze, there is no Program Not Responding message).

This will happen every few minutes or so. When this happens I have to wait ~30 seconds for the terminal to become responsive. Once responding, all of the previously buffered inputs will flush into the terminal.

Recently I discovered a way to immediately make the terminal responsive once it starts to hang. I do this by sending a SIGINT/Ctrl + C which immediately registers in the terminal (^C) and afterwards zooming in or out (ctrl +/-) - this seems to do the trick.

I'm directing this issue to this repository as opposed to the WSL repository since this issue is not reproducible with other terminal applications.
I can observe this identical issue in both of my devices running Windows 11.

Expected Behavior

Windows Terminal should not hang

Actual Behavior

Windows Terminal hangs

Originally created by @lumbytyci on GitHub (Apr 21, 2024). ### Windows Terminal version 1.19.10821.0 ### Windows build number 10.0.22631.3447 ### Other Software WSL version: 2.1.5.0 Kernel version: 5.15.146.1-2 WSLg version: 1.0.60 MSRDC version: 1.2.5105 Direct3D version: 1.611.1-81528511 DXCore version: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp Windows version: 10.0.22631.3447 ### Steps to reproduce 1. Open Windows Terminal 2. Launch WSL 2 (I'm running Debian) 3. Do some work, usually happens after I save and quit from vim or any console application that has some kind of CLI 4. Windows Terminal will hang (not freeze, there is no Program Not Responding message). This will happen every few minutes or so. When this happens I have to wait ~30 seconds for the terminal to become responsive. Once responding, all of the previously buffered inputs will flush into the terminal. Recently I discovered a way to immediately make the terminal responsive once it starts to hang. I do this by sending a **SIGINT/Ctrl + C** which immediately registers in the terminal (^C) and afterwards zooming in or out (ctrl +/-) - this seems to do the trick. I'm directing this issue to this repository as opposed to the WSL repository since this issue is not reproducible with other terminal applications. I can observe this identical issue in both of my devices running Windows 11. ### Expected Behavior Windows Terminal should not hang ### Actual Behavior Windows Terminal hangs
claunia added the Needs-TriageIssue-BugNeeds-Attention labels 2026-01-31 07:48:08 +00:00
Author
Owner

@github-actions[bot] commented on GitHub (Apr 21, 2024):

Hi I'm an AI powered bot that finds similar issues based off the issue title.

Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you!

Closed similar issues:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

@github-actions[bot] commented on GitHub (Apr 21, 2024): Hi I'm an AI powered bot that finds similar issues based off the issue title. Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you! ### Closed similar issues: - [Windows Terminal Freezes on Resize (#11903)](https://github.com/microsoft/terminal/issues/11903), similarity score: 0.76 > Note: You can give me feedback by thumbs upping or thumbs downing this comment.
Author
Owner

@zadjii-msft commented on GitHub (Apr 23, 2024):

Any chance you can narrow down the repro steps at all? A specific set of commands you're running to make this happen would be helpful, or maybe more info about your vim setup? I know there's at least one other thread around here where IIRC, there's some vim plugin that seems to cause the Terminal to hang.

Another thing that may be helpful to know - does this repro with the vintage console host, conhost.exe/?

@zadjii-msft commented on GitHub (Apr 23, 2024): Any chance you can narrow down the repro steps at all? A specific set of commands you're running to make this happen would be helpful, or maybe more info about your `vim` setup? I know there's at least one other thread around here where IIRC, there's some vim plugin that seems to cause the Terminal to hang. Another thing that may be helpful to know - does this repro with the vintage console host, `conhost.exe`/?
Author
Owner

@lumbytyci commented on GitHub (Apr 23, 2024):

Any chance you can narrow down the repro steps at all? A specific set of commands you're running to make this happen would be helpful, or maybe more info about your vim setup? I know there's at least one other thread around here where IIRC, there's some vim plugin that seems to cause the Terminal to hang.

Another thing that may be helpful to know - does this repro with the vintage console host, conhost.exe/?

I'll do my best to find an exact scenario to reproduce this issue. Is the terminal storing some kind of logs which I could extract and share here?

Funny enough, just as I read your remark I opened the legacy command line application conhost.exe and launched WSL 2 by typing debian and as soon as it launched - it immediately froze. In contrast with windows terminal, zooming didn't fix the problem here. I should note that I have neofetch configured to run in this device once I launch the terminal.

This makes me wonder whether the problem is actually with the windows terminal at all. I will try to mess around and will close the issue if nothing interesting is found.

@lumbytyci commented on GitHub (Apr 23, 2024): > Any chance you can narrow down the repro steps at all? A specific set of commands you're running to make this happen would be helpful, or maybe more info about your `vim` setup? I know there's at least one other thread around here where IIRC, there's some vim plugin that seems to cause the Terminal to hang. > > Another thing that may be helpful to know - does this repro with the vintage console host, `conhost.exe`/? I'll do my best to find an exact scenario to reproduce this issue. Is the terminal storing some kind of logs which I could extract and share here? Funny enough, just as I read your remark I opened the legacy command line application `conhost.exe` and launched WSL 2 by typing `debian` and as soon as it launched - it immediately froze. In contrast with windows terminal, zooming didn't fix the problem here. I should note that I have `neofetch` configured to run in this device once I launch the terminal. This makes me wonder whether the problem is actually with the windows terminal at all. I will try to mess around and will close the issue if nothing interesting is found.
Author
Owner

@kutovoy commented on GitHub (Mar 31, 2025):

Any chance you can narrow down the repro steps at all? A specific set of commands you're running to make this happen would be helpful, or maybe more info about your vim setup? I know there's at least one other thread around here where IIRC, there's some vim plugin that seems to cause the Terminal to hang.

Another thing that may be helpful to know - does this repro with the vintage console host, conhost.exe/?

I have same issue - after installing WSL2 and adding ubuntu as a shell - both Command Prompt and Windows PowerShell would often freeze when typing a command. they would stay frozen for a long time and might unfreeze. I also have Docker Desktop installed and I do some docker builds/etc.

conhost.exe shell works without these "freezing" problems.

i have Win11Pro 24H2 b26100.3476 exp pack 1000.26100.54.0 64 bit

@kutovoy commented on GitHub (Mar 31, 2025): > Any chance you can narrow down the repro steps at all? A specific set of commands you're running to make this happen would be helpful, or maybe more info about your `vim` setup? I know there's at least one other thread around here where IIRC, there's some vim plugin that seems to cause the Terminal to hang. > > Another thing that may be helpful to know - does this repro with the vintage console host, `conhost.exe`/? I have same issue - after installing WSL2 and adding ubuntu as a shell - both Command Prompt and Windows PowerShell would often freeze when typing a command. they would stay frozen for a long time and might unfreeze. I also have Docker Desktop installed and I do some docker builds/etc. conhost.exe shell works without these "freezing" problems. i have Win11Pro 24H2 b26100.3476 exp pack 1000.26100.54.0 64 bit
Author
Owner

@lumbytyci commented on GitHub (Apr 2, 2025):

Any chance you can narrow down the repro steps at all? A specific set of commands you're running to make this happen would be helpful, or maybe more info about your vim setup? I know there's at least one other thread around here where IIRC, there's some vim plugin that seems to cause the Terminal to hang.
Another thing that may be helpful to know - does this repro with the vintage console host, conhost.exe/?

I have same issue - after installing WSL2 and adding ubuntu as a shell - both Command Prompt and Windows PowerShell would often freeze when typing a command. they would stay frozen for a long time and might unfreeze. I also have Docker Desktop installed and I do some docker builds/etc.

conhost.exe shell works without these "freezing" problems.

i have Win11Pro 24H2 b26100.3476 exp pack 1000.26100.54.0 64 bit

@kutovoy I decided to not follow-up with the issue since I am less confident that this is a microsoft-terminal issue. I get similar behaviors on other applications now, one I'd like to note is freezing of chrome.exe when I paste from the Windows 11 clipboard manager. I'm not sure where to start hunting for this issue since it's on Windows.

@lumbytyci commented on GitHub (Apr 2, 2025): > > Any chance you can narrow down the repro steps at all? A specific set of commands you're running to make this happen would be helpful, or maybe more info about your `vim` setup? I know there's at least one other thread around here where IIRC, there's some vim plugin that seems to cause the Terminal to hang. > > Another thing that may be helpful to know - does this repro with the vintage console host, `conhost.exe`/? > > I have same issue - after installing WSL2 and adding ubuntu as a shell - both Command Prompt and Windows PowerShell would often freeze when typing a command. they would stay frozen for a long time and might unfreeze. I also have Docker Desktop installed and I do some docker builds/etc. > > conhost.exe shell works without these "freezing" problems. > > i have Win11Pro 24H2 b26100.3476 exp pack 1000.26100.54.0 64 bit @kutovoy I decided to not follow-up with the issue since I am less confident that this is a microsoft-terminal issue. I get similar behaviors on other applications now, one I'd like to note is freezing of **chrome.exe** when I paste from the Windows 11 clipboard manager. I'm not sure where to start hunting for this issue since it's on Windows.
Author
Owner

@TsengSR commented on GitHub (Jan 11, 2026):

@kutovoy

I have same issue - after installing WSL2 and adding ubuntu as a shell - both Command Prompt and Windows PowerShell would often freeze when typing a command. they would stay frozen for a long time and might unfreeze. I also have Docker Desktop installed and I do some docker builds/etc.

conhost.exe shell works without these "freezing" problems.

i have Win11Pro 24H2 b26100.3476 exp pack 1000.26100.54.0 64 bit

Let me guess, Kaspersky Internet Security / Kaspersky Plus?

This one seems to have severe issues with two services in WSL2 Ubuntu: cloud-init-local and motd-news

If you disable them before it happens (or after it becomes responsive again), it should solve it.

You can analyze it with systemd-analyze blame in the ubuntu/WSL shell and these two services should have absurd times listed there.

sudo systemctl mask cloud-init-local
sudo systemctl mask motd-news

disables both services and prevented it for me

@TsengSR commented on GitHub (Jan 11, 2026): @kutovoy > I have same issue - after installing WSL2 and adding ubuntu as a shell - both Command Prompt and Windows PowerShell would often freeze when typing a command. they would stay frozen for a long time and might unfreeze. I also have Docker Desktop installed and I do some docker builds/etc. > > conhost.exe shell works without these "freezing" problems. > > i have Win11Pro 24H2 b26100.3476 exp pack 1000.26100.54.0 64 bit Let me guess, Kaspersky Internet Security / Kaspersky Plus? This one seems to have severe issues with two services in WSL2 Ubuntu: cloud-init-local and motd-news If you disable them before it happens (or after it becomes responsive again), it should solve it. You can analyze it with `systemd-analyze blame` in the ubuntu/WSL shell and these two services should have absurd times listed there. ```bash sudo systemctl mask cloud-init-local sudo systemctl mask motd-news ``` disables both services and prevented it for me
Author
Owner

@kutovoy commented on GitHub (Jan 12, 2026):

unfortunately, no, I am not using those antivirus due to various security concerns. I don't think I have any external antivirus installed on top of windows builtin defender as it is my gaming laptop. Thanks for the idea tho!

@kutovoy commented on GitHub (Jan 12, 2026): unfortunately, no, I am not using those antivirus due to various security concerns. I don't think I have any external antivirus installed on top of windows builtin defender as it is my gaming laptop. Thanks for the idea tho!
Author
Owner

@mykola-dev commented on GitHub (Jan 14, 2026):

guys, try to update video driver. gemini recommended me to do this, and it worked!

@mykola-dev commented on GitHub (Jan 14, 2026): guys, try to update video driver. gemini recommended me to do this, and it worked!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#21559