Skip to content

When opening my WSL2 Ubuntu profile, there is a 1-2 second delay if I haven't used bash for a little bit. Looking for a way to keep bash active in the background for a longer period of time. #19087

Closed as not planned
@futuremotiondev

Description

@futuremotiondev

Windows Terminal version

1.22.11751.0

Windows build number

10.0.19045.0

Other Software

WSL version: 2.4.4.0
Kernel version: 5.15.167.4-1
WSLg version: 1.0.65
MSRDC version: 1.2.5620
Direct3D version: 1.611.1-81528511
DXCore version: 10.0.26100.1-240331-1435.ge-release
Windows version: 10.0.19045.6036

Steps to reproduce

  1. Open Windows Terminal.
  2. Select the WSL2 Profile. In my case I have two:

Command Line for "Ubuntu-22.04" Profile: C:\Windows\system32\wsl.exe -d Ubuntu-22.04
Command Line for "WSL Ubuntu 22.04.5" Profile: ubuntu2204.exe

  1. Wait as WSL spins up, taking ~1-3 seconds.
  2. Finally I get a prompt.

You can also reproduce by just running this command:

wt.exe -p "Ubuntu-22.04"

(Replace "Ubuntu-22.04" with your actual WSL2 profile name in WT)

Expected Behavior

I expected the prompt to appear faster. It's fairly annoying when you're using it a lot.

Actual Behavior

Again, it takes anywhere from one to three seconds for a prompt to appear. Once the prompt has appeared, if I open additional bash windows in terminal it's instantaneous.

I suspect that there is some kind of timeout where WSL goes in to some kind of dormant state after non-usage.

I am hoping to find a way to modify WSL's behavior so the prompt loads faster from a cold start, either by editing .wslconfig or using the new "WSL Settings" app. Is there a setting or option that would help my use-case here?

Thanks for any sort of recommendations.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Issue-QuestionFor questions or discussionNeeds-Tag-FixDoesn't match tag requirementsResolution-ExternalFor issues that are outside this codebase

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions