WSL2 randomly locks CPU at 100%

I’m having an issue on my 11th Gen (i7-1165G7 @2.8 GHz) where some process running under WSL2 will locks all available CPU cores at 100%. It pops up randomly and when it happens, all WSL2 processes are totally unusable. I can’t even run ps or top to tell what Linux process is responsible.

It used to render the Windows layer unusable too and required a hard shut down with the hardware power button. I’ve since reduced the CPU cores available to WSL2 as a workaround. I still need to restart to get it to stop but at least I can gracefully shut down my Windows processes first.

The issue is totally unpredictable. Sometimes the laptop is fine but I never know when it’s going to happen again.

Has anyone else experienced this issue? I still love my Framework but I need WSL2 working reliably for it to be my daily driver.

1 Like

Here’s some info about my WSL2 setup in case that’s helpful

PS C:\Users\rafe> wsl -l
Windows Subsystem for Linux Distributions:
Ubuntu (Default)
docker-desktop
docker-desktop-data
PS C:\Users\rafe> wsl --version
WSL version: 0.70.0.0
Kernel version: 5.15.68.1
WSLg version: 1.0.45
MSRDC version: 1.2.3575
Direct3D version: 1.606.4
DXCore version: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp
Windows version: 10.0.22621.674

I was having a similar issue, with the CPU ramping up to 100% usage (Same CPU, Windows 11)
A full restart would enable WSL to work again, but as soon as i put the laptop to sleep and woke it, i saw the same behaviour again.
Updating WSL by running wsl --update in powershell fixed the problem for me and it hasn’t happened since. I notice i’m using a slightly newer WSL version to you 0.70.4.0 so it might be the same problem, but as my symptoms were quite predictable there may be something else at play.

4 Likes

So right after posting this I noticed that there was a BIOS update available. I installed it and that seems to have fixed the issue