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
WSL2 causing high CPU load #7893
Comments
Thanks for reporting this @max06. I wonder if this could be caused by wslg. Can you try to add:
To %userprofile%.wslconfig , then run wsl --shutdown, and start wsl again to see if the issue is still there ? |
This issue has been automatically closed since it has not had any author activity for the past 7 days. If you're still experiencing this issue please re-open it. Thank you! |
I'm not sure if it's prudent replying here, but I just wanted you to know that your comment fixed a similar issue that I was having on a clean install of windows 11 where wsl was causing the taskbar notification icons and taskmanager to flicker a lot. Thanks mate. |
Having this exact issue as well. Docker using wsl2 starts flickering taskbar and windows after a while with text inputs losing focus. Always have to restart docker/wsl2 to fix it |
Also experiencing this issue on Windows 11. Disabling GUI applications fixed it for me as well. |
Have the same problem, most of the time in an RDP Connection. |
The issue was gone for me after I updated my Intel graphics drivers to their latest version overriding the Dell-provided ones which were quite outdated. |
@OneBlue I'm so sorry for the late reply... the issue never appeared again, until just now. Let's go step by step: I noticed lags in UI intensive applications (Vivaldi, Bluestacks) I closed all the suspect applications: Vivaldi, VSCode, Windows Terminal, no improvements. I reopened Vivaldi to look for this issue. I also opened a fresh windows terminal (powershell) to shutdown the wsl2 instance. The flickering disappeared. Trying to reproduce the issue: Opened a tab with my Ubuntu WSL2 instance in Windows terminal. Flickering is back. Also the WSL2 instance showed a memory consumption of around 2GB, increasing tendency. Found the question about dmesg in this issue, executed it inside my ubuntu instance:
repeating every 900ms. Copied whole output. Noticed, my vscode was still running with one window, telling me it's taking longer to close. I can't tell if that window was connected to WSL before. Force closing it stopped the flickering, and I'm not able to reproduce it now again. A fresh dmesg dump doesn't show the terminating weston anymore. I can't tell if disabling the GUI extensions for WSL would improve anything here, but a connection to VSCode seems to be likely. |
@max06 With that additional information, maybe you could re-open the issue so someone from MS could notice it? |
@levrik I'd love to, but I don't have the privileges for that... |
@max06 That's weird... I was guessing so from #7893 (comment). |
I hope @OneBlue can reopen it 😅 |
Thanks for reporting this @max06. Based on the logs it looks like weston is crashing. If it's crashing in a loop that would explain the CPU consumption. I'd recommend creating a wslg issue for this |
@OneBlue Thank you for your reply! The more interesting question is: Why is weston even running when there's no GUI application using it? Thought it would get started on first use. |
It's always started when gui apps are enabled. There are no easy way to do that 'on-demand' since GUI apps will expect the X11 socket to be already present when they start |
Gotcha. Disabling weston would obviously solve this issue, but then I can't use gui apps (if I'd want to). Maybe remotely related: Is weston also used if I'm running a regular Hyper-V VM with Linux and the enhanced session mode? |
No, these two things are completely different. |
Version
Microsoft Windows [Version 10.0.22000.376]
WSL Version
Kernel Version
5.10.60.1
Distro Version
Ubuntu 18.04
Other Software
No response
Repro Steps
Unsure. Here it's enough to simply have a wsl2 shell open. Funny enough, it's gone for now.
Expected Behavior
Taskmanager showing
Vmmem
with little to no cpu usage in idle, while a wsl2 shell is open.Actual Behavior
Taskmanager show(ed)
Vmmem
with 5-6% constant cpu usage (on a CPU with 32 Threads), high energy consumption and makes the task manager flicker every second.Processes inside the WSL guest are idling:
Closing the shell (and waiting some seconds) fixes the issue, as well as terminating the guest or the virtual machine.
Diagnostic Logs
I currently hope for someone coming along with "we know that already" and "it's gonna be fixt next update". Otherwise I'm happy to provide whatever you ask for.
The text was updated successfully, but these errors were encountered: