Short answer:
Try downgrading WSL and or the kernel. If that works, please file a new issue on the WSL2 Github repo. Include the information on your Windows build as well as wsl --status
results.
More detail:
now after some updates it does not work.
5.15.57.1-microsoft-standard-WSL2
You don't mention your Windows version in your question, but that would indicate that you are probably using a Windows 11 Insider build. Last week was the first time in a long while that the WSL team:
- Updated the Linux kernel (from 5.10.102.1 to 5.15.57.1)
- Pushed a WSL "Pre-release" (0.65.1) to Insiders. I don't think they've done that since Windows 10. Typically all releases have been considered "Preview" since they moved to the Microsoft Store delivery model. The "pre-release", to me, indicates some additional concern that the team had that it might need additional testing on Insider builds before being made available to Preview opt-in via the Store.
And there was at least one serious regression (issue 8679, but it doesn't appear to be related to the issue you are seeing. And regardless, from reading that issue, you should have received the subsequent (still pre-release) update that fixes that particular issue.
Since the emulator issue started after an upgrade, though, I would definitely try rolling back to the previous release(s).
Start with the WSL package itself:
Download the 0.64.0 release package from the repo
Exit WSL and wsl --shutdown
From an administrative PowerShell:
Add-AppxPackage -Path .\Microsoft.WSL_0.64.0.0_x64_ARM64.msixbundle -ForceUpdateFromAnyVersion -ForceApplicationShutdown
Confirm installation via wsl --status
.
Start WSL and try again.
If it is still not fixed, you may need to try rolling back the kernel release separately.
Download the GA kernel (5.10.102.1) from the link in the Manual Installation steps.
Create a directory for the kernel (something like C:\WSL\kernel\5.10.102.1
).
From a CMD shell:
cd <download_directory>
msiexec /a wsl_update_x64.msi TARGETDIR=C:\WSL
You should now have C:\WSL\System32\lxss\tools\kernel
. Move this to the C:\WSL\kernel\5.10.102.1
directory.
Create or edit %userprofile%\.wslconfig
(that's your Windows user profile, not WSL):
[wsl2]
kernel = C:\\WSL\\kernel\\5.10.102.1\\kernel
wsl --shutdown
Restart and check uname -a
.