-
Notifications
You must be signed in to change notification settings - Fork 823
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WSL high CPU usage and hangs all requests after some sleep-resume or hibernate-resume cycles #9855
Comments
+1
One trial to fix it was: I adapted the I read somewhere, that apparently it should not occur in Windows 11 anymore. Windows 11 also has some more wsl2 features like usb pass-through or mounting which is missing in Windows 10 :-( |
Is this on arm64 or amd64? |
amd64
|
This high cpu issue has unfortunately been around for a while and Microsoft is very silent on it. 😞 |
WslLogs-2023-04-03_13-59-51.zip Couple differences:
|
This seems like a power management issue as I regularly hibernate my system and this issue only makes itself evident coming out of hibernation (others have said sleep mode). |
I'm sorry to report, I had that line in .wslconfig, and I'm on Windows 11 (Dell XPS 17 purchased January 2022) and still had the vmmem 100% CPU problem. |
Just experienced the same thing this morning from sleep: (Ubuntu window unresponsive, wsl shutdown not returning, Visual Studio Code reporting containers not connected). Had to reboot.
|
Duplicate of #8696 ? That one has a workaround to properly kill WSL without rebooting. |
I can confirm this issue too. Vmmem high CPU usage after sleep. I had a VSCode session that was running before and it says it is disconnected now. In powershell, trying out wsl.exe --shutdown doesn't work either. The command just hangs. I can't access the Ubuntu (the distro on WSL) terminal when the CPU usage high. |
Have you tried this workaround:
in a console running as administrator to restart the VM. I keep using that command regularly to restart WSL. |
Another workaround (requires PSTools):
|
Having the same issue for a long time (1y+) on my laptop currently running:
This laptop I sleep and hibernate regularly. On another machine that has always had win11 since installing WSL2, I never encountered this issue. This machine I only sleep regularly, hibernate is disabled. I do not use vscode, I do use various IDEs from the JetBrains toolbox. But I always had a suspicion there was a link with docker-desktop, because when I run docker-desktop containers this issue occurs much more frequently. Today I noticed for the first time this issue occurred without docker-desktop running (which prompted me to search this issues thread once again). My workaround used to be also like others report in this thread to use various ways to kill the WSL process, but since at least a few months I realized that just another hibernate/wake cycle also corrects the problem for the running WSL2 without having to restart WSL. Hope that workaround works for you all too, as it is a lot more convenient than restarting WSL |
Note that in our case we specifically do not run docker-desktop but docker under WSL only and have the same issue.
@daniel5gh interesting that another hibernate/wake cycle fixes this - thanks for the tip! |
Has someone found a solution to this issue yet (other than another power cycle)? I am having to restart WSL after every hibernate which is about 2-3 times a day... |
There is no proper solution, Microsoft ignores the problem. |
In my case, I eventually switched to Windows 11. There the problem disappeared. |
@thfrei Did you factory reset windows after/before upgrading? |
nope..., kept everything as is, and then used https://github.com/valinet/ExplorerPatcher to stay sane 😅 |
Windows Version
Microsoft Windows [Version 10.0.22000.1696]
WSL Version
WSL version: 1.1.3.0 Kernel version: 5.15.90.1 WSLg version: 1.0.49 MSRDC version: 1.2.3770 Direct3D version: 1.608.2-61064218 DXCore version: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp Windows version: 10.0.22000.1696
Are you using WSL 1 or WSL 2?
Kernel Version
Default Distribution: Ubuntu-22.04 Default Version: 2 WSL1 is not supported with your current machine configuration. Please enable the "Windows Subsystem for Linux" optional component to use WSL1.
Distro Version
Ubuntu 22.04
Other Software
During the sleep-resume or hibernate-resume cycles following software is running:
vscode: 1.76.2, WSL extension: v0.76.1
explorer with wsl drive open
Repro Steps
Use wsl with vscode, open drives in windows explorer, use other apps which use the filesystem from the WSL.
Do a lot of sleep-resume cycles, while other software accessing the WSL works.
Once in a while after sleep-resume notice that the
VmmemWSL
process CPU usage is high. Attempt to access the WSL FS via explorer - it hangs opening it, use vscode - it says WSL is not responsive.Try to shutdown the wsl to restart it using
wsl --shutdown
- the operation hangs, never completes.Expected Behavior
The WSL always works normally after sleep-resume / hibernate-resume cycle.
Actual Behavior
After some sleep-resume / hibernate-resume cycles the WSL hangs, CPU usage spikes, and WSL doesn't respond to any commands.
wsl --shutdown
doesn't stops the wsl, and just hangs.Diagnostic Logs
No response
The text was updated successfully, but these errors were encountered: