Open isaporto opened 4 years ago
Same issue here, I followed #849 (comment) solution but I hope this is only temporal...
A three year old fix still seems to work, it fixed it for me as well. Can we please fix this permanently, I depend heavily on WSL now.
Hi! I have the same problem too, but only for one windows user. I created another user-administrator and install subsystem via official guide and it works. But it still doesn't work from the first user. Maybe this information will be helpful.
This is helped me:
PS C:\WINDOWS\system32> wslconfig /L docker-desktop-data (default) Ubuntu-18.04 docker-desktop
The default system for wsl was docker-desktop-data. Then I changed it on Ubuntu-18.04 via wslconfig /s Ubuntu-18.04
This problem started for me after rebooting WSL2 to get the time synced (it becomes un-synced when comp sleeps apparently). Computer restart solved the problem for me, but switching to a Linux OS is the real solution.
I ran into this problem today too, just after doing this kind of work, but with Jekyll serve
I went in settings.json
and:
I uninstalled the WSL completly
Rebooted the computer
Reinstalled the WSL from the Microsoft Store
settings.json
profile if you personalised it.Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux
You can also try out this newer guide from the official Microsoft Documentation.
However, this is not a reliable solution if you had important configurations inside WSL itself, as a reinstall will erase everything. What can you do in this case? Well, before proceeding with the reinstallation, follow this thread.
Edit: This problem seems to happen when the WSL is corrupted, moved, uninstalled or if the settings.json
file defaultProfile doesn't match any profile. One more thing that is worth trying is this:
My situation is a bit different. I could launch the wsl with PowerShell but using PowerShell ise wsl hangs forever.
I have the same problem. Only a reboot fix it.
Same issue today.
#849 (comment) has a solution
Seems to have fixed it (for now). Commenting so you can know it's effecting more people.
Edit: It was only temporary. Broken again.
From: https://github.com/microsoft/WSL/issues/5836#issuecomment-801663441
This is helped me:
PS C:\WINDOWS\system32> wslconfig /L docker-desktop-data (default) Ubuntu-18.04 docker-desktop
The default system for wsl was docker-desktop-data. Then I changed it on Ubuntu-18.04 via wslconfig /s Ubuntu-18.04
This was my case, the docker wsl2 was simply set as default, switching to my distro worked perfectly fine
This worked for me. Thanks a lot.
This worked for me. Thanks a lot.
It does not work for me. The problem continues
I do not know if I have the same problem, but if I open wsl from start menu it closes after probably 30s. If I open it from start menu and record with Centrum feedback it shows "Vypršel časový limit operace, protože z virtuálního počítače nebo kontejneru nepřišla odpověď." -> "Time limit for operation expired, becouse of no response from virtual computer or container." and hangs. Same happens when I run wsl from command line or powershell as admin or not. Began when I updated to windows 10 version 21390.1000. Other wsl commands work.
I've been using WSL2 for the last year and I was very satisfied. But today, when I tried just open Ubuntu 20.04 terminal inside WSL2 nothing appers, just the coursor blinking during a several minutes. This problem break me. I have lost one day of work and give up. I will back for the dual boot.
@ThoNogueira instead of dual boot, go for (free) Hyper-V
@ all - it's still a bug
In any event, the problem happened to me a couple of days ago as well. I had a pending Windows update. Same symptoms, blank screen, wouldn't start. I rebooted and the problem went away.
Plenty of disk space, RAM, and other "resources". (if it's been a while since rebooting, I think file handles exaust themselves; keeping a lot of web pages open in the browser makes this significantly worse)
== John ==
Got it working by doing the following.
Control Panel => Programs & Features => Click on Turn Windows Features On/Off => Turn Off Windows subsystem for linux => (Turn it on again) => Click on Restart Now
This should do it.
I had this problem either and solved it by setting a default distribution - since no one was set.
Find your preferred distro name using wsl --list
and set it as default with wsl --setdefault <DistributionName>
.
I had this problem either and solved it by setting a default distribution - since no one was set.
Find your preferred distro name using
wsl --list
and set it as default withwsl --setdefault <DistributionName>
.
It does not work for me
Still a problem. This just happened to me. Win 10 Pro v 21H1build 19043.1052.
My fix was to disable WSL, reboot, and then re-enable WSL. However, hope this sticks and will not happen every day :)
I had same issue. Turning off Hyper-V in Windows Features resolved the issue for me, but then I have trouble with Docker Desktop.
Same for me
Ln PowerShell (Windows Shell): wslconfig /L
This lists WSL distributions. For me "docker-desktop-data (Default)" was listed as default not my Ubuntu distribution.
To change this:
In PowerShell (Windows Shell): wslconfig /setdefault
Ln PowerShell (Windows Shell): wslconfig /L
This lists WSL distributions. For me "docker-desktop-data (Default)" was listed as default not my Ubuntu distribution.
To change this:
In PowerShell (Windows Shell): wslconfig /setdefault
I only have one OS in WSL and this problem persist
- Search for "features" in Windows
- Open up "Turn Windows features on or off"
- Look for the WSL feature
- Disable the feature and reboot
- Enabled it again and reboot
This helped! Thanks @n8eloy
Since Windows [10.0.20201.1000] wsl doesn't work (neither Docker for Windows)
basicaly.. when we enter wsl : nothing happen.. it won't respond.
I try this (also.. lot of reboot)
dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
wsl --set-default-version 2
wsl.exe --update
wsl --shutdown
wsl -l -v
PS C:\WINDOWS\system32> wsl -l -v NAME STATE VERSION
- Ubuntu-20.04 Stopped 2 Ubuntu-18.04 Stopped 2 docker-desktop-data Stopped 2 Ubuntu Stopped 2
no problem so far... but if I try just to enter wsl... it will stalled
I try wsl -d Ubuntu ... same thing.
At first I couldn't get version info using: wsl -l -v
. However, once I'd turned WSL off & on using dism commands, I could see this prompt. I found that setting the default wsl as Ubuntu wsl -s Ubuntu-20.04
seemed to resolve the issues I was having.
Looks like updating WSL worked out for me.
wsl --update
Looks like updating WSL worked out for me.
wsl --update
I'm using windows 11... and the problem continues, and is updated. The only way to fix it is a full windows restart
I just faced this issue Ubuntu distro was unable to respond.
Then I look into microsoft documentation: https://docs.microsoft.com/en-us/windows/wsl/install-manual#step-4---download-the-linux-kernel-update-package
I have to update linux kernel package for 64 bit.
Now it is working fine for me :)
I just faced this issue Ubuntu distro was unable to respond.
Then I look into microsoft documentation: https://docs.microsoft.com/en-us/windows/wsl/install-manual#step-4---download-the-linux-kernel-update-package
I have to update linux kernel package for 64 bit.
Now it is working fine for me :)
It work because it force a reset. In my case the problem appears again later.
So why exactly it is still a problem in 21H2 22000.282? Kernel version: 5.10.60.1 LxssManager is running, the fullest disk drive has >400G free, all disks @ 0% utilization, CPU < 5%, memory < 20%, this is happening right after a cold start.
A simple OS restart fixes the issue, but why would this happen in the first place?
Has this happened again to anyone? WSLv2 died today and was unable to recover at all. Reinstalling my distros didn't work and in fact, I even when and set up a brand new machine trying to get back to work but I can't even install a distro with the current version of windows 10.
I've spent 18hours at work today and still have no way to continue working. I actually had to go install Linux on an old rig as a backup so that I can at least get something done tomorrow.
I am ropable right now and have no idea wtf I can do. Windows is basically just a dead platform to me right now and I just bought a $3000 laptop that can only run Windows and its just an expensive paper weight.
Has this happened again to anyone? WSLv2 died today and was unable to recover at all. Reinstalling my distros didn't work and in fact, I even when and set up a brand new machine trying to get back to work but I can't even install a distro with the current version of windows 10.
I've spent 18hours at work today and still have no way to continue working. I actually had to go install Linux on an old rig as a backup so that I can at least get something done tomorrow.
I am ropable right now and have no idea wtf I can do. Windows is basically just a dead platform to me right now and I just bought a $3000 laptop that can only run Windows and its just an expensive paper weight.
yes, reproducible with windows 11. BTW: if it can run windows, it can run linux ;)
TL;DR: \\wsl$ "Does not exist" (but the Linux root filesystem does)
\\wsl$\Ubuntu-20.04\home\daniel
I experience a 'hanging' terminal when starting an 'Ubuntu-20.04' terminal.wsl
or wsl -d Ubuntu-20.04
gets me a command prompt on /mnt/c/Users/mywindowsuser.cd ~
does switch to /home/daniel
(verified via pwd
)/
shows that everything is therewsl --update
and kernel is up to date\\wsl$
results in a empty directory\\wsl$\Ubuntu-20.04
hangs 'File Explorer'.\\wsl$
filesystem on the Windows sideOS: Windows 10 Pro Version: 21H1 OS build: 19043.1288 Experience: 120.2212.3920.0
Possibly relevant: I recently used Hyper-V Manager and was using a normal Hyper-V VM. Perhaps this has caused a permissions issue?
And course, after applying the latest "Cumulative Update Preview" (KB5006738) and yet another restart, the issue has disappeared. Fun 😦, but at least it is working again. It may have been networking related as well, as I rebooted my router as well (although this 'should' be a purely local thing). Unfortunately, not able to troubleshoot now since it's magically resolved.
I wasn't able to get it working again at all. I didn't install the feature update tho as I figured, its just a feature update I don't need. Deleted windows and using native Ubuntu ATM. Just sick opf windows doing crap like this to me out of nowhere and costing precious time in the middle of serious fixes for my work. When did windows become so dam unreliable? Are they doing this on purpose to make us go to win11?
I wasn't able to get it working again at all. I didn't install the feature update tho as I figured, its just a feature update I don't need. Deleted windows and using native Ubuntu ATM. Just sick opf windows doing crap like this to me out of nowhere and costing precious time in the middle of serious fixes for my work. When did windows become so dam unreliable? Are they doing this on purpose to make us go to win11?
It fail on Win11 too.. so....
How can I avoid this problem happening again if I go back to windows? Its cost me pretty dearly.
How can I avoid this problem happening again if I go back to windows? Its cost me pretty dearly.
the bug is opt for like 2 years or more... you cannot prevent it until they fix it
One more data point. It appeared again after switching to wifi from wired, but a reboot got things working again. Smells like it may be a 'metric' issue on the network routes.
Its happening with me too. I'm on win 11. It was working an hour ago, I closed terminal after using and when I tried to start again it just won't.
I finally got back up and running nearly 2 weeks later. Installed feature updates (windows 10) and rebooted. Had to actually install Ubuntu on another machine to keep working. (FYI Ubuntu was awesome but it too has problems so glad to be back on windows and have my hardware working properly again.)
Not being able to rely on WSL is a huge problem. Knowing my entire dev environment with 50 docker containers can just die for no reason is horrifying.
This has happened twice for me so far on Windows 11.
I turned off "Windows Subsystem for Linux" from Windows Features, rebooted, then turned it back on again and then rebooted again. This fixed the issue, and thankfully my Ubuntu distro (installed from Store) and files in it were intact.
I'm on Windows 11 build 22000.318 right now (this happened just now and was fixed by the method I described), and it had happened once before too but I'm not sure about the exact build number back then.
A question for those still on the thread: Aside from WSL2 and a wired interface, do you use other network interfaces? If you also have wireless, do you switch between a wired and wireless connection?
I'm suspecting the WSL2 networking is getting 'bunged up' on certain network transitions.
A question for those still on the thread: Aside from WSL2 and a wired interface, do you use other network interfaces? If you also have wireless, do you switch between a wired and wireless connection?
I'm suspecting the WSL2 networking is getting 'bunged up' on certain network transitions.
that's not how a bug report works... try creating a specific teread about that.
@francogp Two points:
@francogp Two points:
- I'm specifically interested in those of us who have experienced this issue and whether there is a common environmental factor (e.g. network change) that is triggering it. My question is therefore germane to this bug and not to a general discussion or thread.
- If there isn't going to be any effort to do anything useful with the info provided in this issue, it should be closed and users requested to file a new (and separate) issue. Otherwise this 'issue' is just a complaints department.
I have 3 PC, 1 with 2 networks (wifi + ethernet), 2 with 1 ethernet. Can reproduce the problem without any network change.
This has happened twice for me so far on Windows 11.
I turned off "Windows Subsystem for Linux" from Windows Features, rebooted, then turned it back on again and then rebooted again. This fixed the issue, and thankfully my Ubuntu distro (installed from Store) and files in it were intact.
I'm on Windows 11 build 22000.318 right now (this happened just now and was fixed by the method I described), and it had happened once before too but I'm not sure about the exact build number back then.
I'm on the same Windows 11 build. Turning the WSL feature on/off didn't work for me. I guess the problem may be the strange behavior of the Hyper-V Virtual Switch Adapter device (in Network Adapters). Because it's state is always "Windows is still setting up the class configuration for this device. (Code 56)" and then system(or idk who) deletes it. This happens every time I try to interact with WSL or its filesystem.
Solved it for myself. VMWare issue. Some weird problem with bugged VMWare Workstation uninstall. After uninstalling VMWare Bridge Protocol from all network adapters my WSL problem was finally solved. I'm so happy about it :D
I had same issue. Turning off Hyper-V in Windows Features resolved the issue for me, but then I have trouble with Docker Desktop.
work for me ! thinks
@danielfdickinson
I'm specifically interested in those of us who have experienced this issue and whether there is a common environmental factor (e.g. network change) that is triggering it. My question is therefore germane to this bug and not to a general discussion or thread.
Yes, changing my connection from wired to wireless is exactly what I did before WSL 2 stopped responding. It's the only thing that changed on my side. A reboot did not fix the issue. I am using Windows 11 Pro Build 22000.318.
Edit: Okay, I had exactly the same symptoms @isaporto had after switching from a wired to a wireless connection. Commands like wsl -l -v
gave no response, and I was unable to install Ubuntu 20.04 LTS. I then disabled the WSL feature and rebooted. This led to the wsl -l -v
command giving me the expected output immediately.
After enabling the feature again and another reboot, the command still worked. I then booted Ubuntu 20.04 LTS, and it started the installation process. Et voilà, I am able to use my WSL again! So simply the disable⇾reboot⇾enable⇾reboot cycle worked for me.
Got the same behavior today on WIN 11 (22000.348). System reboots didn't help. Disabling Hyper-V services worked for me. After restarting my PC, I got other errors when using the wsl command. After which I re-enabled Hyper-V and WSL started working.
hi, I faced the same problem - trying to run wsl in general and make a connection through VSCode specifically. and here is how i resolved:-
and now it is live and kicking in both env.s
Environment
Windows build number: 20197.1000 WSL 2
Steps to reproduce
Open the Windows terminal
Expected behavior
Should open the Ubuntu terminal but didn't appear even the tab in the Windows terminal.
Actual behavior
The problem is that sometimes, when I open the Windows Terminal the WSL don't appear. Acctually appear once but don't show/load anything, then, when I open again the terminal, it's gone. If I try to run wsl or wsl -l -v or wsl --shutdown, nothing happens, just keep like it's loading the answer forever. If I try to open the Linux folder just keep loading forever. Sometimes I restart the computer and just works but sometimes don't. I tried reinstall all Linux but the error appear again.