Skip to content

Terminal hangs constantly while running WSL 2 #17096

Closed

Description

@lumbytyci

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

Activity

  1. added
    Issue-BugIt either shouldn't be doing this or needs an investigation.
    Needs-TriageIt's a new issue that the core contributor team needs to triage at the next triage meeting
    on Apr 21, 2024
  2. github-actions commented on Apr 21, 2024

    @github-actions
  3. zadjii-msft commented on Apr 23, 2024

    @zadjii-msft
    Member

    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/?

  4. lumbytyci commented on Apr 23, 2024

    @lumbytyci
    Author

    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.

  5. added
    Needs-AttentionThe core contributors need to come back around and look at this ASAP.
    and removed
    Needs-Author-FeedbackThe original author of the issue/PR needs to come back and respond to something
    on Apr 23, 2024
  6. added
    Needs-Author-FeedbackThe original author of the issue/PR needs to come back and respond to something
    and removed
    Needs-AttentionThe core contributors need to come back around and look at this ASAP.
    on Apr 25, 2024
  7. kutovoy commented on Mar 30, 2025

    @kutovoy

    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

  8. lumbytyci commented on Apr 2, 2025

    @lumbytyci
    Author

    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 (@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.

  9. added
    Needs-AttentionThe core contributors need to come back around and look at this ASAP.
    and removed
    Needs-Author-FeedbackThe original author of the issue/PR needs to come back and respond to something
    on Apr 2, 2025
  10. TsengSR commented on Jan 11, 2026

    @TsengSR

    kutovoy (@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

  11. kutovoy commented on Jan 12, 2026

    @kutovoy

    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!

  12. mykola-dev commented on Jan 14, 2026

    @mykola-dev

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Issue-BugIt either shouldn't be doing this or needs an investigation.Needs-AttentionThe core contributors need to come back around and look at this ASAP.Needs-TriageIt's a new issue that the core contributor team needs to triage at the next triage meeting

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions