Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WSL takes too long to start after a Windows Update #4673

Closed
ad-on-is opened this issue Nov 13, 2019 · 16 comments
Closed

WSL takes too long to start after a Windows Update #4673

ad-on-is opened this issue Nov 13, 2019 · 16 comments

Comments

@ad-on-is
Copy link

ad-on-is commented Nov 13, 2019

Just installed Windows 19023, and WSL seems broken.
I noticed this issue happening since 19023. After updating Windows, WSL takes too long, aproximately 30 minutes, to actually start.

What's not working

  • Network drive mount of \\wsl$
  • wsl command in CMD
  • bash command in CMD
  • Windows Terminal, which has bash as default profile
  • Docker in WSL2 profile, i.e Docker not starting and Docker Settings -> Resources -> WSL integration, All distros are unselected (which were previously selected when everything is running fine)

Expected behaviour

WSL should work instantly after updating Windows. So, when entering wsl in CMD. Network drive mounts to \\wsl$ should be mounted and working. bash should start the default distro when entering in CMD. Docker should start and all the distros under Resources -> WSL integration should be selected.

Actual behaviour

  • Running wsl in CMD does nothing, no errors, nothing.
  • Running bash command in CMD just hangs, no erros, nothing.
  • When opening network mount of \\wsl$ this error message shows up
    image
  • After some minutes (30 or so) everything starts to work as expected.

Things tried so far without success

  • Restart/Shutdown
  • Enable-WindowsOptionalFeature -Online -FeatureName $("VirtualMachinePlatform", "Microsoft-Windows-Subsystem-Linux")

Infos

image
image

Update

After a while, everything started to work again as expected. Now, even after a restart, everything works instantly.

Fixed

I realized that my PC was slow overall, when waking from hybernate or restarting. After fiddling around, I found out that the firewall of Kaspersky Internet Security 2019 was causing the lags, and the slow startup of WSL and all the realted service (network mount, docker, etc..)

@Biswa96
Copy link

Biswa96 commented Nov 13, 2019

I am using WSL2 with build 19023 right now without any issue. Does WSL1 work? One random thought, can you check if vmcompute, LxssManager, dhcp, dnscache, p9rdr services are running?

@ad-on-is
Copy link
Author

ad-on-is commented Nov 13, 2019

I am using WSL2 with build 19023 right now without any issue. Does WSL1 work? One random thought, can you check if vmcompute, LxssManager, dhcp, dnscache, p9rdr services are running?

Just looked into task manager, tab Services:

  • vmcompute running
  • LxssManager running
  • LxssManger_User stopped
  • Dhcp running
  • Dnscache running
  • Can't find p9rdr or any p9* services

@ad-on-is
Copy link
Author

Strange, now everything works :-)

@therealkenc
Copy link
Collaborator

We can let the float need-repro for a bit and see if some me2s come in. Can't reproduce here either.

@hrfmartins
Copy link

I'm having exactly the same issue. Can't even install new distros from the Microsoft Store, since they won't install, after being downloaded.
I'm on Windows 10 Home, build 19018, with wsl 2 installed.

@ad-on-is
Copy link
Author

ad-on-is commented Nov 13, 2019

I'm having exactly the same issue. Can't even install new distros from the Microsoft Store, since they won't install, after being downloaded.
I'm on Windows 10 Home, build 19018, with wsl 2 installed.

Do you have Docker Desktop 2.1.5.0 running? I remember, the only thing I did was quitting Docker, but I'm not sure if that was really the fault.

@chiefjester
Copy link

Hi, 👋🏻, I just updated to 19023, seems to be working fine here

@sirredbeard
Copy link
Contributor

There were some other reports of this in #4662.

@therealkenc
Copy link
Collaborator

#4662 is 18362 with a side of wsl.exe --upgrade (which probably hooped everything); that one probably can't be redeemed at this point. This one might (or might not) be something "new", if we can figure out the variable. I run docker desktop so that's probably not it.

@pathaine
Copy link

There were some other reports of this in #4662.

Thanks @sirredbeard!
Switching to WSL 2 worked, but only after following these instructions.

@GhostvOne
Copy link

GhostvOne commented Nov 14, 2019

Same for me after this update but I resolved the issue with :

CMD + R : optionalfeatures.exe
Disable Linux windows sub system
Reboot

CMD + R optionalfeatures.exe
Enable back Linux sub system
it works now

@hrfmartins
Copy link

I'm having exactly the same issue. Can't even install new distros from the Microsoft Store, since they won't install, after being downloaded.
I'm on Windows 10 Home, build 19018, with wsl 2 installed.

Do you have Docker Desktop 2.1.5.0 running? I remember, the only thing I did was quitting Docker, but I'm not sure if that was really the fault.

I'm not. I'm on windows 10 home, for laziness reasons really, so I can't even run docker

@sdv22
Copy link

sdv22 commented Nov 14, 2019

Just got the same problem. wsl2 machine refused to start. The problem was that there was not enough disk space on the drive pointed as linux swap in .wslconfig.
wsl2 machine gave "bus error" before. Not any sign of the real problem anywhere.

@ghost
Copy link

ghost commented Nov 15, 2019

Just finished upgrading to 19023, and literally the first thing I did was launch Windows Terminal to see what's up.
WSL2 machine started normally, the apache2 and mysql setup I had before works just as it was supposed to.
Docker Desktop not installed either.

@chiefjester
Copy link

I'm in 19025, wsl2 working well here.

@ad-on-is ad-on-is changed the title WSL not working anymore after update to Windows 19023 WSL takes too long to start after a Windows Update Nov 27, 2019
@phisad
Copy link

phisad commented Mar 23, 2021

Same for me after this update but I resolved the issue with :

CMD + R : optionalfeatures.exe
Disable Linux windows sub system
Reboot

CMD + R optionalfeatures.exe
Enable back Linux sub system
it works now

This worked for me for Windows Version 21H1 (OS Build 19043.867). The Ubuntu WSL wasnt starting anymore, the Ubuntu terminal wasnt listed in the Windows Terminal and the wsl --list command was "frozen". Now its looking fine again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants