ASPONE.CN
苦逼

Visual Studio Code 禁用GPU加速

曾经,VSCode会出现模糊现象,Google后发现是由于启用GPU硬件加速导致的问题,尤其在双显卡的笔记本上会有更大的可能性出现,解决方案是在启动时加上“--disable-gpu”参数,来禁用GPU硬件加速。可是这样只能在从开始菜单或桌面的快捷方式中启动才能加上该参数,在右键打开或者和WinSCP一类集成时,打开的VSCode并不能禁用GPU硬件加速。

在今天更新的1.40.1版本中,加入了这样一个设置,可以从配置中彻底禁用GPU硬件加速。

具体操作如下:

  • 打开命令面板(Ctrl + Shift + P 或者直接按 F1)

  • 运行“首选项:配置运行时参数”命令

  • 该命令将打开一个“argv.json”文件

  • 添加"disable-hardware-acceleration": true

  • 重启 VSCode


原文:https://code.visualstudio.com/updates/v1_40

原文引用:

Disable GPU acceleration

We have heard issue reports from users that seem related to how the GPU is used to render VS Code's UI. These users have a much better experience when running VS Code with the additional --disable-gpu command-line argument. Running with this argument will disable the GPU hardware acceleration and fall back to a software renderer.

To make life easier, you can add this flag as a setting so that it does not have to be passed on the command line each time.

To add this flag:

  • Open the Command Palette (Ctrl+Shift+P).

  • Run the Preferences: Configure Runtime Arguments command.

  • This command will open a argv.json file to configure runtime arguments. You might see some default arguments there already.

  • Add "disable-hardware-acceleration": true.

  • Restart VS Code.

Note: Do not use this setting unless you are seeing issues!


Copyright © 2016 ASPONE.CN. All Rights Reserved. 京ICP备18038662号