VSCode hangs when switching between local login and remote desktop login
Does this issue occur when all extensions are disabled?: Yes
- VS Code Version: 1.73.1
- OS Version: Windows_NT x64 10.0.22621
Steps to Reproduce:
- Log in locally to your Windows desktop
- Set scaling to 150% (Control Panel-->System-->Display)
- Take note of the display resolution
- From a local login, open a project in VSCode
- Lock the local workstation (do not log out)
- From a different system where scaling is set to something other than 150%, and preferably the resolution is also different
- Open Remote Desktop Connection
- Enter the IP of the original system
- Click Connect
- Log in
VSCode will resize the outermost frame of the window, but will leave Explorer and code windows smaller, and will be unresponsive to mouse or keyboard input. After about 15 seconds, you'll get a popup that says:
"The window is not responding. You can reopen or close the window or keep waiting"
If you choose "Reopen", a new instance of VSCode will launch and will work fine. If you Keep Waiting, it will never come back.
same problem for a long time
same here, but not for a long time. started to happen after most recent win11 upgrade. chrome actually had the same problem, but that one is fixed now. vscode isnt, sadly.
Similar here
same issue.
very annoying
If you Keep Waiting, it will never come back.
In my case, if you wait 1-2 minutes it eventually comes back.
weird. started the profiler through the developer tools, disconnected RDP, reconnected, waited couple mins for vscode to unfreeze, and stopped the profiler.
Nothing stood out to me as "stuck" or taking a long time from the gpu or main.js thread.
For context, this is not unique to vscode for me. The Slack desktop app (pretty sure is also web/browser based) exhibits similar behavior.
@yo1dog That seems to point to an issue with electron or browserview then.
I've seen this with Google Chrome too. VS Code, and Windows Terminal.
For Windows Terminal I've tried their Preview and it uses different rending logic apparently. Team indicate some issues with NVIDIA -- but that has done better in haven't seen freezes.
Edge surprisingly "recovers" after a bit; where as Google Chrome never does.
VS Code I've affected the experimental terminal GPU rendering flag to "canvas" for now to see if that helps.
This seems like a Windows/NVIDIA driver issue on desktop resizing.
So, kinda seems Chromium based.
I have a AMD card so that throws the nvidia issue out -- but could still be chromium/windows related 🤔
I am seeing similar behaviour as @cicorias
Windows Terminal will freeze completely. Their main issue for this is https://github.com/microsoft/terminal/issues/12607 -- I have disabled hardware rendering for Terminal, and it seems to help.
My VSCode is also frozen when I re-attach, either via RDP, or at the machine in question, but indeed it ofter recovers after a few minutes, sometimes asking to reconnect. (I use WSL) For now I have added "disable-hardware-acceleration": true to Preferences: Runtime arguments
So far, my Edge has not yet been able to recover, but I have never been able to wait long enough.
I have an nvidia in this machine.
Not specific to VS Code and not specific to Local/Remote changing. I'm working remotely for vacation and haven't been local. It happens on first connect and also when I lose internet (spotty WiFi) and reconnect. I have 3 Chromium-based windows opened: VSCode, Chrome with default profile and Chrome with a non-default profile (debugging window). Just connecting over RDP will hang VS Code and my primary Chrome window. Oddly enough a Chrome window not on default profile (the one I had open for debugging) responds just fine.
Opening a new tab in Chrome via the Windows taskbar will show a white window. But eventually, after a long while everything will start working again.
Happens with Chrome Canary as well. It's a rendering issue, seems like, which is interesting because the mouse cursor does change and I can close a Chrome window if I click on the x on the only opened tab.
Nvidia GPU and Windows 11 (though graphics card is probably irrelevant since it's running on the Microsoft Remote Display Adapter driver).
Same issue here (both in VS code and e.g. Edge), but disabling gpu when starting VS Code seems to have fixed the problem for me, i.e. start vs code by running:
code --disable-gpu
For now I'm ok with this fix, but I might fiddle around with different GPU drivers in the future to see if it that's the issue.
My setup:
- VS Code version: 1.75.1
- OS version: Windows_NT x64 10.0.22621 (11 Pro)
- GPU: nVidia RTX 3090FE, Game Ready driver 526.98
The issue occured under the following circumstances:
- RDP from Samsung Galaxy Tab s8+ (Android 13, using MS RDP app version 10.0.15.1208, or when using Devolution Remote Desktop Manager 2022.3.5.0) into the Windows machine, resolution set to 2800x1752@200% scaling.
- Using my normal screen that is attached to the Windows pc by DP cable (LG34WK95U) after an RDP session. This monitor has a resolution of 5120x2160 and I'm using a 150% scaling in Windows.
I've seen this with Google Chrome too. VS Code, and Windows Terminal.
For Windows Terminal I've tried their Preview and it uses different rending logic apparently. Team indicate some issues with NVIDIA -- but that has done better in haven't seen freezes.
Edge surprisingly "recovers" after a bit; where as Google Chrome never does.
VS Code I've affected the experimental terminal GPU rendering flag to "canvas" for now to see if that helps.
This seems like a Windows/NVIDIA driver issue on desktop resizing.
So, kinda seems Chromium based.
Oh, I encountered frozen Windows Terminal frequently. Then I have to use Admin to run Anaconda Prompt because I have some intensive tasks that need to run multiple days. I never thought it's caused by Remote Desktop...
For VS Code..Seriously? Almost the best tool I've ever used, but also, I'm more of a RDP guy. C'mon, both RDP and VS Code are from Microsoft......
KB5022913 for Windows 11 22H2 appears to solve this issue for Edge/Chrome/Windows Terminal. It may solve it for VS Code as well.
KB5022913 for Windows 11 22H2 appears to solve this issue for Edge/Chrome/Windows Terminal. It may solve it for VS Code as well.
seems not work well
I am still seeing this problem. I am in most updated Windows 11.
Here is a screenshot https://pasteboard.co/QyG6ZKRdQqqZ.png
Same issue. Recently, The edge browser has the same problem, which seems to be a problem of upstream chromium.
I met with the same trouble. Just for VSCode on Windows 11, and other softwares, such as Edge, are OK. VSCode on Linux is OK.
Any update on this?
Seems to be fixed in the KB5026372 update.
Seems to be fixed in the KB5026372 update.
I have installed the KB5026372 update, but the issue still exists.
I found an extremely ugly but effective temporary solution to recover from an unresponsive window input without needing to restart VSCode.
When the window becomes unresponsive, losing and regaining focus can restore operation, but if you enter any character again, the window will freeze.
In a fortuitous circumstance, I found that you can continuously input any characters(Press a character button without releasing it) when the window freezes, then click any other character-inputable area within the frozen window (while still inputting characters), then make the window to lose focus and regain it. This will restore the window from freezing.
You might not have enough hands to make the window lose focus, but remember, the Windows key (Win key) can also do the trick.
Same problem for a year...
same issue.
I found an extremely ugly but effective temporary solution to recover from an unresponsive window input without needing to restart VSCode.
When the window becomes unresponsive, losing and regaining focus can restore operation, but if you enter any character again, the window will freeze.
In a fortuitous circumstance, I found that you can continuously input any characters(Press a character button without releasing it) when the window freezes, then click any other character-inputable area within the frozen window (while still inputting characters), then make the window to lose focus and regain it. This will restore the window from freezing.
You might not have enough hands to make the window lose focus, but remember, the Windows key (Win key) can also do the trick.
I found an extremely ugly but effective temporary solution to recover from an unresponsive window input without needing to restart VSCode.
When the window becomes unresponsive, losing and regaining focus can restore operation, but if you enter any character again, the window will freeze.
In a fortuitous circumstance, I found that you can continuously input any characters(Press a character button without releasing it) when the window freezes, then click any other character-inputable area within the frozen window (while still inputting characters), then make the window to lose focus and regain it. This will restore the window from freezing.
You might not have enough hands to make the window lose focus, but remember, the Windows key (Win key) can also do the trick.
it works! My operation process: 1: When vscode freezes and does not respond, open any other software (such as chrome or edge); 2: Switch back to vscode, press and hold any key on the keyboard without releasing it, and use the mouse to click on the frozen vscode window at the same time; 3: After clicking, switch to other open software, and switch back again to exit the frozen state.
This was fixed for me a long time, but I forgot about this ticket and when exactly it was fixed. Don't know if it was a vscode update or Windows update that fixed it, but I am currently on:
Version: 1.80.2 (user setup)
Commit: 2ccd690cbff1569e4a83d7c43d45101f817401dc
Date: 2023-07-27T20:40:28.909Z
Electron: 22.3.14
ElectronBuildId: 22695494
Chromium: 108.0.5359.215
Node.js: 16.17.1
V8: 10.8.168.25-electron.0
OS: Windows_NT x64 10.0.22621
Windows OS Build: 22621.2134
The trouble still exists for me.
Version: 1.81.1 (user setup)
Commit: 6c3e3dba23e8fadc360aed75ce363ba185c49794
Date: 2023-08-09T22:22:42.175Z
Electron: 22.3.18
ElectronBuildId: 22689846
Chromium: 108.0.5359.215
Node.js: 16.17.1
V8: 10.8.168.25-electron.0
OS: Windows_NT x64 10.0.22621
Windows OS Build: 22621.2134
same issue. has long time.
VS Code Version: 1.81.1 Windows Version: Windows 11 Pro for Workstations, 22H2, Build 22621.2134
same issue. i always restart vscode, slack and the other apps based electron when i face this
- vscode1.81.1
- windows 11 pro, 22H2, build 22621.2215