Skip to content
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

VSCode hangs when switching between local login and remote desktop login #167556

Open
shaunco opened this issue Nov 29, 2022 · 51 comments
Open

VSCode hangs when switching between local login and remote desktop login #167556

shaunco opened this issue Nov 29, 2022 · 51 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug electron Issues and items related to Electron freeze-slow-crash-leak VS Code crashing, performance, freeze and memory leak issues remote-desktop upstream Issue identified as 'upstream' component related (exists outside of VS Code) windows VS Code on Windows issues

Comments

@shaunco
Copy link

shaunco commented Nov 29, 2022

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:

  1. Log in locally to your Windows desktop
  2. Set scaling to 150% (Control Panel-->System-->Display)
  3. Take note of the display resolution
  4. From a local login, open a project in VSCode
  5. Lock the local workstation (do not log out)
  6. From a different system where scaling is set to something other than 150%, and preferably the resolution is also different
  7. Open Remote Desktop Connection
  8. Enter the IP of the original system
  9. Click Connect
  10. 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.

@bpasero bpasero assigned deepak1556 and unassigned bpasero Nov 29, 2022
@bpasero bpasero added the freeze-slow-crash-leak VS Code crashing, performance, freeze and memory leak issues label Nov 29, 2022
@deepak1556 deepak1556 added bug Issue identified by VS Code Team member as probable bug upstream Issue identified as 'upstream' component related (exists outside of VS Code) windows VS Code on Windows issues electron Issues and items related to Electron remote-desktop labels Dec 6, 2022
@ringwraith
Copy link

same problem for a long time

@vware
Copy link

vware commented Dec 15, 2022

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.

@jozocai
Copy link

jozocai commented Dec 24, 2022

Similar here

@XianwuLin
Copy link

same issue.

@liberize
Copy link

liberize commented Jan 5, 2023

very annoying

@yo1dog
Copy link

yo1dog commented Jan 6, 2023

If you Keep Waiting, it will never come back.

In my case, if you wait 1-2 minutes it eventually comes back.

@zerkz
Copy link

zerkz commented Jan 7, 2023

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.

@yo1dog
Copy link

yo1dog commented Jan 7, 2023

For context, this is not unique to vscode for me. The Slack desktop app (pretty sure is also web/browser based) exhibits similar behavior.

@zerkz
Copy link

zerkz commented Jan 7, 2023

@yo1dog That seems to point to an issue with electron or browserview then.

@cicorias
Copy link
Member

cicorias commented Jan 10, 2023

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.

@zerkz
Copy link

zerkz commented Jan 11, 2023

I have a AMD card so that throws the nvidia issue out -- but could still be chromium/windows related 🤔

@cpbotha
Copy link

cpbotha commented Jan 20, 2023

I am seeing similar behaviour as @cicorias

Windows Terminal will freeze completely. Their main issue for this is microsoft/terminal#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.

@xgfone
Copy link

xgfone commented Aug 22, 2023

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

@iruis
Copy link

iruis commented Aug 26, 2023

same issue. has long time.

VS Code Version: 1.81.1
Windows Version: Windows 11 Pro for Workstations, 22H2, Build 22621.2134

@hdformat
Copy link

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

@DUWENINK
Copy link

I think this has something to do with Chromium, because I also have this problem when using the remote Edge browser.

@ZiJiaW
Copy link

ZiJiaW commented Sep 1, 2023

same issue

@iruis
Copy link

iruis commented Sep 1, 2023

My solution

  1. add a keyboard layout (Add a keyboard: https://support.microsoft.com/en-us/windows/manage-the-input-and-display-language-settings-in-windows-12a10cb4-8626-9b77-0ccb-5013e0c7c7a2#WindowsVersion=Windows_11)
  2. change keyboard layout (Win + Space bar)
    keyboard
  3. get back keyboard layout (Win + Space bar)

Problem solving!

@Senorsen
Copy link
Member

Senorsen commented Sep 28, 2023

My solution

  1. add a keyboard layout (Add a keyboard: https://support.microsoft.com/en-us/windows/manage-the-input-and-display-language-settings-in-windows-12a10cb4-8626-9b77-0ccb-5013e0c7c7a2#WindowsVersion=Windows_11)
  2. change keyboard layout (Win + Space bar)
    keyboard
  3. get back keyboard layout (Win + Space bar)

Problem solving!

Wow thanks, your workaround is a life saver, it works not only for VSCode but also for the frozen Edge, Teams, Chrome, etc...

@timhub
Copy link

timhub commented Oct 18, 2023

My solution

  1. add a keyboard layout (Add a keyboard: https://support.microsoft.com/en-us/windows/manage-the-input-and-display-language-settings-in-windows-12a10cb4-8626-9b77-0ccb-5013e0c7c7a2#WindowsVersion=Windows_11)
  2. change keyboard layout (Win + Space bar)
    keyboard
  3. get back keyboard layout (Win + Space bar)

Problem solving!

This works for me, it's not the first time that Microsoft keyboard yields a major issue.

@hezzze
Copy link

hezzze commented Oct 27, 2023

same issue here

版本: 1.83.1 (user setup)
提交: f1b07bd
日期: 2023-10-10T23:48:05.904Z
Electron: 25.8.4
ElectronBuildId: 24154031
Chromium: 114.0.5735.289
Node.js: 18.15.0
V8: 11.4.183.29-electron.0
OS: Windows_NT x64 10.0.22621

My issue more specifically is whenever I login again after a remote session, the terminal stop working as every time I try to type something it stuck

@deepak1556 deepak1556 changed the title VSCode hangs when switching between local login and remote desktop login if the display Scale changes VSCode hangs when switching between local login and remote desktop login Oct 30, 2023
@reitowo
Copy link

reitowo commented Nov 13, 2023

It's been a year, is anyone reporting this to chromium upstream? Anyway to track the upstream fix?

@saltfishmx
Copy link

same issue

@lbmeng
Copy link

lbmeng commented Nov 27, 2023

Yes, I have seen this issue for more than one year when remote desktop to my office PC running VSC or Edge browser.

I had to restart VSC or Edge when I hit this nasty issue every time.

Windows 11 22H2 (22621.2248)
VSC: 1.84.2

@march1993
Copy link

My solution

  1. add a keyboard layout (Add a keyboard: https://support.microsoft.com/en-us/windows/manage-the-input-and-display-language-settings-in-windows-12a10cb4-8626-9b77-0ccb-5013e0c7c7a2#WindowsVersion=Windows_11)
  2. change keyboard layout (Win + Space bar)
    keyboard
  3. get back keyboard layout (Win + Space bar)

Problem solving!

I tried to kill ChsIME.exe and then the problem got solved too.

@DUWENINK
Copy link

this issue make me unhappy a lot,i can not solve by my self ,if have some solution about this, call back me ,thankyou

@reitowo
Copy link

reitowo commented Dec 27, 2023

I started a Chromium Issue, vote and comment if you are interested:

https://bugs.chromium.org/p/chromium/issues/detail?id=1514402

I'm not sure if it duplicates, but the bug exists for years so I guess not. 😂

@k773920063
Copy link

Now, the EDGE has the same problem!

@DUWENINK
Copy link

Maybe this just happened in the China Language Env?

@jackyzy823
Copy link

Some hint: Prevent using Microsoft's IME ( like Microsoft Pinyin/Wubi , Japanese ...). Using third-party IME instead helps on this issue.

@iruis
Copy link

iruis commented Feb 23, 2024

My solution

1. add a keyboard layout (Add a keyboard: https://support.microsoft.com/en-us/windows/manage-the-input-and-display-language-settings-in-windows-12a10cb4-8626-9b77-0ccb-5013e0c7c7a2#WindowsVersion=Windows_11)

2. change keyboard layout (Win + Space bar)

3. get back keyboard layout (Win + Space bar)

Problem solving!

It seems to not work after windows 11, version 23h2 update.

@reitowo
Copy link

reitowo commented Feb 23, 2024

The simplest solution is:

  1. Press Windows key
  2. After Windows Menu pops up, switch to another keyboard layout (Alt + Shift, and English layout in my case)
  3. Go back to your app window
  4. Switch back to previous layout, and continue your work

@iruis
Copy link

iruis commented Mar 4, 2024

windows 11, version 23h2 update

My solution

1. add a keyboard layout (Add a keyboard: https://support.microsoft.com/en-us/windows/manage-the-input-and-display-language-settings-in-windows-12a10cb4-8626-9b77-0ccb-5013e0c7c7a2#WindowsVersion=Windows_11)

2. change keyboard layout (Win + Space bar)

3. get back keyboard layout (Win + Space bar)

Problem solving!

It seems to not work after windows 11, version 23h2 update.

in windows 11, version 23h2 update.
(korean) https://sanctacrux.tistory.com/1930

summary

  1. 설정
  2. 시간 및 언어
  3. 언어 및 지역
  4. 한국어 / 언어옵션
  5. Microsoft 입력기 /  키보드옵션
  6. 호환성 / 이전 버전의 Micorosoft IME 켬

google tranlation

  1. Settings
  2. Time and language
  3. Language and region
  4. Korean / language option (your input language)
  5. Microsoft input method / keyboard options
  6. Compatibility / Turn on older versions of Microsoft IME

couldn't find any official microsoft documentation.

@yindaheng98
Copy link

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.

it works! thank you so much!

@reitowo
Copy link

reitowo commented Mar 19, 2024

This should fix (at least partially) once VSCode upgrade to a electron version that based on Chromium 124.0.6367.0
https://chromium-review.googlesource.com/c/chromium/src/+/5365680

@soulee-dev
Copy link

Struggle same issue now. This should be fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue identified by VS Code Team member as probable bug electron Issues and items related to Electron freeze-slow-crash-leak VS Code crashing, performance, freeze and memory leak issues remote-desktop upstream Issue identified as 'upstream' component related (exists outside of VS Code) windows VS Code on Windows issues
Projects
None yet
Development

No branches or pull requests