microsoft / microsoft/vscode

[WSL] VS Code 1.135.0 causes wsl.exe to consume one full CPU core after connecting to WSL

Open
#333,337 2 comments 5 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
193k
Forks
42.4k
PR merge metrics
PR metrics pending

Description

Type: Bug

## Description

After connecting VS Code 1.135.0 to Ubuntu through Remote WSL, one Windows-side `wsl.exe` process continuously consumes approximately 100% of
one logical CPU core.

This increases CPU package power from approximately 16 W to 36 W and significantly raises the CPU temperature. Disconnecting the Remote WSL
session immediately stops the CPU usage and restores normal power consumption.

The problem does not occur with VS Code 1.134.0.

## Steps to Reproduce

1. Start Windows and ensure WSL is stopped:

```powershell
wsl --shutdown

2. Verify that wslservice.exe is idle.
3. Start Ubuntu directly from PowerShell or Windows Terminal.
4. Confirm that all WSL-related processes remain at 0% CPU.
5. Open VS Code 1.135.0.
6. Connect to Ubuntu using Remote WSL.
7. Run:

Get-CimInstance Win32_PerfFormattedData_PerfProc_Process |
Where-Object Name -like 'wsl*' |
Sort-Object PercentProcessorTime -Descending |
Format-Table IDProcess,Name,PercentProcessorTime

8. One wsl.exe process consistently reports approximately 96–102% CPU.

## Actual Result

A wsl.exe process associated with the VS Code Server startup command consumes one full logical CPU core continuously:

C:\WINDOWS\System32\wsl.exe -d Ubuntu sh -c
"$VSCODE_WSL_EXT_LOCATION/scripts/wslServer.sh"
08d4889f9ec4a1685d257b9b95de036c8e1ce1e5
stable code-server .vscode-server ...

Example:

IDProcess Name PercentProcessorTime
44616 wsl#3 100

The Windows energy report attributes most of this load to wsl.exe and ntoskrnl.exe.

## Expected Result

An idle Remote WSL connection should not continuously consume an entire logical CPU core.

## Regression

The issue occurs with:

VS Code: 1.135.0
Commit: 08d4889f9ec4a1685d257b9b95de036c8e1ce1e5
Architecture: x64

After switching to VS Code 1.134.0, the Remote WSL connection remains idle and CPU power consumption is normal.

## Environment

CPU: Intel Core i7-14650HX
Windows: 10.0.26200.9168
WSL: 2.7.12.0
WSL kernel: 6.18.33.2-2
Distribution: Ubuntu
Remote WSL extension tested: 0.104.2 and 0.104.3

## Troubleshooting Already Performed

- Disabled all non-required extensions: no change.
- Started VS Code with --disable-gpu: no change.
- Enabled remote.WSL.experimental.scriptLessStartup: no change.
- Tested Remote WSL extension versions 0.104.2 and 0.104.3: both affected.
- Running WSL directly in Windows Terminal: no issue.
- Running wsl.exe -d Ubuntu -e sleep 300: no issue.
- Closing or disconnecting VS Code Remote WSL immediately stops the CPU usage.
- VS Code 1.134.0 does not reproduce the issue.

This appears to be a regression in VS Code 1.135.0 or its corresponding VS Code Server build.

VS Code version: Code 1.134.0 (110a328ea54b42367b803ec53ee0bf52ef26b419, 2026-08-18T18:24:44Z)
OS version: Windows_NT x64 10.0.26200
Modes:
Remote OS version: Linux x64 6.18.33.2-microsoft-standard-WSL2

System Info

|Item|Value|
|---|---|
|CPUs|Intel(R) Core(TM) i7-14650HX (24 x 2419)|
|GPU Status|2d_canvas: enabled
GPU0: VENDOR= 0x8086, DEVICE=0xa78b [Intel(R) UHD Graphics], DRIVER_VENDOR=Intel, DRIVER_VERSION=31.0.101.5445 *ACTIVE*
GPU1: VENDOR= 0x10de, DEVICE=0x28a0 [NVIDIA GeForce RTX 4060 Laptop GPU], DRIVER_VERSION=32.0.15.8142
GPU2: VENDOR= 0x8086, DEVICE=0xa78b [Intel(R) UHD Graphics], DRIVER_VERSION=31.0.101.5445
GPU3: VENDOR= 0x1414, DEVICE=0x008c [Microsoft Basic Render Driver], DRIVER_VERSION=10.0.26100.8972
Machine model name:
Machine model version:
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_graphite: disabled_off
trees_in_viz: disabled_off
video_decode: enabled
video_encode: enabled
webgl: enabled
webgpu: enabled
webnn: disabled_off|
|Load (avg)|undefined|
|Memory (System)|31.73GB (13.19GB free)|
|Process Argv|--crash-reporter-id b7dfa842-982d-4495-bf06-22c1c4fff193|
|Screen Reader|no|
|VM|0%|

|Item|Value|
|---|---|
|Remote|WSL: Ubuntu|
|OS|Linux x64 6.18.33.2-microsoft-standard-WSL2|
|CPUs|Intel(R) Core(TM) i7-14650HX (24 x 0)|
|Memory (System)|15.48GB (13.58GB free)|
|VM|0%|
Extensions (15)

Name|Identifier|Author|Version
---|---|---|---
开发容器|ms-vscode-remote.remote-containers|ms-vscode-remote|0.466.0
Remote - SSH|ms-vscode-remote.remote-ssh|ms-vscode-remote|0.128.0
Remote - SSH: Editing Configuration Files|ms-vscode-remote.remote-ssh-edit|ms-vscode-remote|0.87.0
WSL|ms-vscode-remote.remote-wsl|ms-vscode-remote|0.104.2
远程开发|ms-vscode-remote.vscode-remote-extensionpack|ms-vscode-remote|0.26.0
远程资源管理器|ms-vscode.remote-explorer|ms-vscode|0.5.0
Remote - Tunnels|ms-vscode.remote-server|ms-vscode|1.5.3
vscode-pdf|tomoki1207.pdf|tomoki1207|1.2.2
Prettier - Code formatter|esbenp.prettier-vscode|esbenp|12.4.0
HTML Preview|george-alisson.html-preview-vscode|george-alisson|0.2.5
Chinese (Simplified) (简体中文) Language Pack for Visual Studio Code|ms-ceintl.vscode-language-pack-zh-hans|MS-CEINTL|1.131.2026082318
C# 开发工具包|ms-dotnettools.csdevkit|ms-dotnettools|3.20.199
C#|ms-dotnettools.csharp|ms-dotnettools|2.140.9
.NET Install Tool|ms-dotnettools.vscode-dotnet-runtime|ms-dotnettools|3.1.0
Markdown 增强预览|shd101wyy.markdown-preview-enhanced|shd101wyy|0.8.30

A/B Experiments

```
vsliv368:30146709
binariesv615:30325510
nativeloc1:31344060
dwcopilot:31170013
dwoutputs:31242946
copilot_t_ci:31333650
e5gg6876:31282496
pythonrdcb7:31342333
6518g693:31463988
aj953862:31281341
b6b4d950:31327385
envsactivate1:31551504
cloudbuttont:31379625
3efgi100_wstrepl:31403338
55ia6109:31457054
ec5jj548:31422691
cp_cls_t_966_ss:31526232
4je02754:31466945
c3h7c220:31478652
cp_cls_c_1081:31454833
conptydll_true:31498968
e9c30283:31461165
46204921:31447328
ei9d7968:31496641
chat:31457767
ddid_t:31478206
hmra_i5g22:31518061
7df3h592:31512476
cp_cls_t_1082:31535311
logging_enabled_new:31498466
db5d2638:31499441
jb_cp_cls_t_632:31543129
56dj4588:31512888
32d76977:31512328
ha629193:31508444
jh5f2457_c:31540921
jbcp_cls_pctr_t:31531130
61138546:31518536
cp_intellij_t_nes:31548657
gf14b233:31526830
ahp-both-windows:31556933
session_8:31532895
ihg5j128:31534457
f412h606:31551416
9gg7f176:31542112
enable_editor_pane_layout:31569726
allow-none:31555437
36h42362:31564511
c7c27ce7:31554789
1h923230:31564177
0dg73464:31554319
treatment-23-1:31555779
unuse_dynamic_mcp:31555281
0d8dfbc3:31570291
a1hcc538:31559322
0c1h4866:31566224
vrbsty_tr:31561058
session-archive:31558132
5b8j3302:31564601
mangle-name-control:31572633
lunaclean:31573760
multiv2:31574985

```

Contributor guide

Open the contributing guide

Research direction

Reproduce the regression with the provided PowerShell process query, comparing VS Code 1.134.0 and 1.135.0 while tracing the Remote WSL startup command. Start with the mentioned scripts/wslServer.sh and the VS Code Server startup path; done means an idle Remote WSL connection no longer leaves wsl.exe at roughly 100% CPU.

Written by the indexing model from the issue text.

Assessment

Tech stack
linux, powershell, typescript, vscode
Domain
desktop-dev, devtools, operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
50/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.