3

Problem:

When I launched Ubuntu 20.04, it pops up: "Press any key to continue...", and then if I press any key, it exits immediately. This prevents me from using (typing any command) in Ubuntu WSL. (It occurred suddenly today. For the last couple of days it has been working properly.)

Screenshot: Press any key to continue pops up after startup

Attempts Tried:

  • LxssManager service is running. But LxssManagerUser and LxssManagerUser_60d78 are stopped. Manually starting the two services doesn't help as they automatically stop themselves right afterwards.

  • Hyper-V service is set to auto. Virtualization mode is enabled (task manager -> performance -> CPU)

  • Trying to re-run the update from here https://docs.microsoft.com/en-us/windows/wsl/wsl2-kernel, but it shows WSL not installed (which is weird since I have been using it for a long time before)

Environment:

  • OS: Microsoft Windows 10 Family, Insider Preview

  • Version: 10.0.20152 Version 20152

  • System Type: x64 based

2 Answers 2

1

From https://github.com/microsoft/WSL/issues/4177#issuecomment-597736482

There is a conflict between wsl.exe and Proxifier.

Developers of Proxifier gave a solution.

Thanks for the info.

We have reproduced this issue. Apparently, wsl.exe displays this error if Winsock LSP DLL gets loaded into its process.

The easiest solution is to use WSCSetApplicationCategory WinAPI call for wsl.exe to prevent this. Under the hood the call creates an entry for wsl.exe at HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\WinSock2\Parameters\AppId_Catalog This tells Windows not to load LSP DLLs into wsl.exe process.

We have a tool that can make this call: www.proxifier.com/tmp/Test20200228/NoLsp.exe

Please just run as admin with the full path to wsl.exe as the parameter: NoLsp.exe c:\windows\system32\wsl.exe

This has fixed the problem in my case.

Please let me know how it works for you.

And it works well for me!

2
  • Thx! It seems to work for me as well.
    – jasonyux
    Commented Jul 9, 2020 at 1:29
  • I'm not willing to run somebody's script AS ADMIN to fix this. Can you describe what that does more clearly so we might replicate it with commands we ran run one by one? Maybe a little registry key magic, from the description.
    – pauljohn32
    Commented Feb 16, 2021 at 3:03
0

This is what worked for me

  1. Close the Ubuntu window
  2. Start windows powershell with elevated priviledges
  3. Shutdown the wsl
  4. Unregister ubuntu on the wsl
  5. install Ubuntu and register it back on the same wsl

Here are the commands

wsl --shutdown
wslconfig /unregister Ubuntu
wsl install --distibution Ubuntu

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .