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 · 82 comments
Open

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

shaunco opened this issue Nov 29, 2022 · 82 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.

@cnrat
Copy link

cnrat commented Aug 21, 2024

According to the comment 37 , this is a Windows TSF framework bug which is confirmed and fixed by Microsoft and the fix should be released to public July - August.

It’s August 22nd, 2024, and this issue is still bothering me—classic Microsoft.

@ValueXu
Copy link

ValueXu commented Sep 10, 2024

According to the comment 37 , this is a Windows TSF framework bug which is confirmed and fixed by Microsoft and the fix should be released to public July - August.

No any futher progress for this issue until now, sad and mad.

@xty435768
Copy link

still waiting for update...

@jackyzy823
Copy link

Update from https://issues.chromium.org/issues/328859185#comment45 :

just got a response from Windows team. Unfortunately, the original fix was scheduled to release in September. However, there was a regression, so the fix was reverted. The new fix is under test and won't be released until several months.

@ValueXu
Copy link

ValueXu commented Sep 19, 2024

Update from https://issues.chromium.org/issues/328859185#comment45 :

just got a response from Windows team. Unfortunately, the original fix was scheduled to release in September. However, there was a regression, so the fix was reverted. The new fix is under test and won't be released until several months.

No! I'm gonna use Linux.

@longfei8533
Copy link

This issue remains unresolved, affecting both Edge browser and VSCode, which become unresponsive for long periods after using remote connections. Below is a method that might help address this problem.

"I found a temporary solution for this bug: download a third-party input method, such as "Rime Input Method," and set it as the system default. This way, each time you connect via RDP, the input method will default to "Rime Input Method," which prevents the bug from occurring. You can then manually switch back to Microsoft Pinyin as needed." -- from https://issues.chromium.org/issues/328859185 po...@gmail.com

@MMMMMoris
Copy link

Today, Dec.12, not even an update.

@xty435768
Copy link

This solution works. I have changed the default input method to Weixin Input. This problem seems disappear.
Image

This issue remains unresolved, affecting both Edge browser and VSCode, which become unresponsive for long periods after using remote connections. Below is a method that might help address this problem.

"I found a temporary solution for this bug: download a third-party input method, such as "Rime Input Method," and set it as the system default. This way, each time you connect via RDP, the input method will default to "Rime Input Method," which prevents the bug from occurring. You can then manually switch back to Microsoft Pinyin as needed." -- from https://issues.chromium.org/issues/328859185 po...@gmail.com

@reitowo
Copy link

reitowo commented Dec 14, 2024

Not a solution for anyone prefer not installing third party IME.

Since VSCode is also a Microsoft product could you ask IME team for update?

@kanhao100
Copy link

This solution works. I have changed the default input method to Weixin Input. This problem seems disappear. Image

This issue remains unresolved, affecting both Edge browser and VSCode, which become unresponsive for long periods after using remote connections. Below is a method that might help address this problem.
"I found a temporary solution for this bug: download a third-party input method, such as "Rime Input Method," and set it as the system default. This way, each time you connect via RDP, the input method will default to "Rime Input Method," which prevents the bug from occurring. You can then manually switch back to Microsoft Pinyin as needed." -- from https://issues.chromium.org/issues/328859185 po...@gmail.com

Finally, I also adopted your method, can not wait for Microsoft

@Xyberonz
Copy link

My goodness, you have finally identified this persistent bug. It seems I am not alone in facing this issue. I have been struggling with this problem for nearly two years. Due to my work requirements, I need to use applications like VSCode and Eleterm, which are based on the Chrome engine. However, whenever I disconnect from the RDP session and reconnect later, I am forced to lose my previous work state. I have to forcibly close and restart these applications; otherwise, my mouse and keyboard remain unresponsive. I sincerely hope you can resolve this issue as soon as possible.

@jackyzy823
Copy link

It’s obviously a compatibility problem between Microsoft Pinyin and the new Windows input framework, and it should be fixed by Microsoft China’s IME development team—this is not a Windows bug. Given Microsoft China’s current state, however, I wouldn’t hold my breath waiting for a fix. This is what every Simplified Chinese user deserves, yet here we are saying goodbye to the world.

This is not true. The problem occurs with Microsoft Japanese Input too.

According to https://issues.chromium.org/issues/328859185#comment37 from Microsoft's developer: The root cause is in Windows TSF code. After entering this broken state, TSF drops any future IME inputs.

@reitowo
Copy link

reitowo commented Dec 28, 2024

In fact, firefox doesn't have this issue. So, maybe someone could see the difference between usage of TSF in these browsers.

@Molay
Copy link

Molay commented Feb 13, 2025

Hello everyone.
Due to my work, I often connect to the Windows 11 virtual machine through Windows Remote Desktop on macOS and use VSCode in the Windows virtual machine to perform some development tasks.
When switching between the macOS local window and the Windows 11 remote window, VSCode often fails to respond to keyboard input and freezes, which drives me crazy.
Through searching, I found that you mentioned that there might be a problem with the Microsoft input method, so I turned on the "Compatibility" option in "Windows Settings/Time and Language/Language/Preferred Language/Options/Microsoft Pinyin/Options/General", and the problem was solved.

@lance5
Copy link

lance5 commented Feb 17, 2025

Hello everyone.  大家好。 Due to my work, I often connect to the Windows 11 virtual machine through Windows Remote Desktop on macOS and use VSCode in the Windows virtual machine to perform some development tasks.由于我的工作,我经常通过MACOS上的Windows远程桌面连接到Windows 11虚拟机,并在Windows虚拟机中使用VSCODE执行一些开发任务。 When switching between the macOS local window and the Windows 11 remote window, VSCode often fails to respond to keyboard input and freezes, which drives me crazy.在MacOS本地窗口和Windows 11远程窗口之间切换时,Vscode通常无法响应键盘输入和冻结,这使我发疯。 Through searching, I found that you mentioned that there might be a problem with the Microsoft input method, so I turned on the "Compatibility" option in "Windows Settings/Time and Language/Language/Preferred Language/Options/Microsoft Pinyin/Options/General", and the problem was solved.通过搜索,我发现您提到了Microsoft输入方法可能存在问题,因此我打开了“ Windows设置/time and Lagans/landage/pecialred语言/options/microsoft pinyin/options/options/options/options/options”中的“兼容性”选项。一般”,问题得到了解决。

Wow, thank for your answer.it is working in my computer.have good nice every day for you.

@thexqn
Copy link

thexqn commented Feb 20, 2025

大家好。由于工作的原因,我经常在 macOS 上通过 Windows 远程桌面连接到 Windows 11 虚拟机,并使用 Windows 虚拟机中的 VSCode 来执行一些开发任务。在 macOS 本地窗口和 Windows 11 远程窗口之间切换时,VSCode 经常无法响应键盘输入并卡顿,这让我抓狂。通过搜索,发现你提到Microsoft输入法可能存在问题,于是我在“Windows设置/时间和语言/语言/首选语言/选项/Microsoft拼音/选项/通用”中打开了“兼容性”选项,问题就解决了。

匪夷所思的异常,但貌似能解决问题,不想安装多一个IME了。

@bpan2020
Copy link

Image

@ellermister
Copy link

I don't know if it's the same thing.

I have installed multiple language input methods, including Microsoft Pinyin, Microsoft Japanese, and American English.

Every time the interface gets stuck and I can't input content, I just need to change the current input method to American English to solve the problem.

The keys that were originally unresponsive when pressed will be released one by one.

@villivateur
Copy link

This is a severe issue, but almost 3 years passed and Microsoft did nothing. Maybe most MS developers use English only and did not care about Asia languages IME?

@beck-8
Copy link

beck-8 commented Mar 11, 2025

This is a severe issue, but almost 3 years passed and Microsoft did nothing.

@2234839
Copy link

2234839 commented Mar 14, 2025

After several failures, I finally started searching and found this issue. Enabling input method compatibility indeed solves the problem of not being able to type in vscode: #167556 (comment) , but it prevents me from switching between Chinese and English (the solution is to reopen compatibility...).

@beck-8
Copy link

beck-8 commented Mar 14, 2025

Download Sogou Input Method and completely turn off the built-in input method for a perfect solution.

@2234839
Copy link

2234839 commented Mar 14, 2025

Download Sogou Input Method and completely turn off the built-in input method for a perfect solution.

I prefer to use Rime rather than these manufacturer's input methods, as they show no respect for user privacy

@beck-8
Copy link

beck-8 commented Mar 14, 2025

Download Sogou Input Method and completely turn off the built-in input method for a perfect solution.

I prefer to use Rime rather than these manufacturer's input methods, as they show no respect for user privacy

Thank you for your suggestion. However, Sogou Input Method will bypass this BUG by itself. I am not sure whether this input method is a perfect solution.

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