windows-subsystem-for-linux

(WSL error at Startup) Press any key to continue


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:

Environment:


Solution

  • 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!