microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
161k stars 28.25k forks source link

Screen flickering #207062

Open prashantrao23 opened 4 months ago

prashantrao23 commented 4 months ago

Type: Performance Issue

When im on vs code the screen flickrs a lot. And im only facing this issue on vs code. No other platforms.

VS Code version: Code 1.87.0 (019f4d1419fbc8219a181fab7892ebccf7ee29a2, 2024-02-27T23:41:44.469Z) OS version: Windows_NT x64 10.0.22631 Modes:

System Info |Item|Value| |---|---| |CPUs|AMD Ryzen 7 4800H with Radeon Graphics (16 x 2895)| |GPU Status|2d_canvas: enabled
canvas_oop_rasterization: enabled_on
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
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled| |Load (avg)|undefined| |Memory (System)|7.42GB (0.66GB free)| |Process Argv|--crash-reporter-id e541ffeb-dbe8-4da2-a7c6-c082b2233960| |Screen Reader|no| |VM|0%|
Process Info ``` CPU % Mem MB PID Process 0 87 16024 code main 0 102 1204 window [3] (Issue Reporter) 0 27 5944 crashpad-handler 0 59 13132 shared-process 0 269 13472 window [1] (Settings - portfolio - Visual Studio Code) 0 271 13944 extensionHost [2] 0 129 2940 electron-nodejs (eslintServer.js ) 0 214 5084 electron-nodejs (tsserver.js ) 0 61 11524 electron-nodejs (typingsInstaller.js typesMap.js ) 0 51 10412 electron-nodejs (serverMain.js ) 0 44 11780 electron-nodejs (start-server.js ) 0 98 13380 electron-nodejs (server.js ) 0 104 15064 electron-nodejs (tsserver.js ) 0 108 15184 electron-nodejs (server.js ) 0 84 16328 electron-nodejs (tailwindServer.js ) 0 66 20500 electron-nodejs (server.js ) 0 72 16332 fileWatcher [2] 0 298 19984 window [2] (SpotifyApiState.js - spotify-clone - Visual Studio Code) 0 53 21072 ptyHost 0 6 3068 conpty-agent 0 6 3448 conpty-agent 0 6 12484 conpty-agent 0 67 22504 C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.exe -noexit -command "try { . \"c:\Users\Prashant\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\contrib\terminal\browser\media\shellIntegration.ps1\" } catch {}" 0 30 24204 C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.exe -noexit -command "try { . \"c:\Users\Prashant\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\contrib\terminal\browser\media\shellIntegration.ps1\" } catch {}" 0 4 18240 C:\WINDOWS\system32\cmd.exe /c ""C:\Program Files\nodejs\npm.cmd" run start" 0 25 18856 "C:\Program Files\nodejs\\node.exe" "C:\Users\Prashant\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js" run start 0 4 18632 C:\WINDOWS\system32\cmd.exe /d /s /c react-scripts start 0 24 23936 electron-nodejs (react-scripts.js ) 0 273 3684 "C:\Program Files\nodejs\node.exe" D:\React\portfolio\node_modules\react-scripts\scripts\start.js 0 26 26196 C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.exe -noexit -command "try { . \"c:\Users\Prashant\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\contrib\terminal\browser\media\shellIntegration.ps1\" } catch {}" 0 28 21096 utility-network-service 0 128 23596 gpu-process 0 32 24248 fileWatcher [1] 0 157 26572 extensionHost [1] 0 74 3480 electron-nodejs (server.js ) 0 204 3884 electron-nodejs (tsserver.js ) 0 33 13032 electron-nodejs (typingsInstaller.js typesMap.js ) 0 76 6448 electron-nodejs (server.js ) 0 120 7636 "C:\Users\Prashant\AppData\Local\Programs\Microsoft VS Code\Code.exe" c:\Users\Prashant\.vscode\extensions\angular.ng-template-17.2.2\server --logToConsole --ngProbeLocations c:\Users\Prashant\.vscode\extensions\angular.ng-template-17.2.2,d:\React\portfolio --includeAutomaticOptionalChainCompletions --includeCompletionsWithSnippetText --tsProbeLocations c:\Users\Prashant\.vscode\extensions\angular.ng-template-17.2.2,d:\React\portfolio --node-ipc --clientProcessId=26572 0 30 7836 electron-nodejs (serverMain.js ) 0 45 12972 "C:\Users\Prashant\AppData\Local\Programs\Microsoft VS Code\Code.exe" "c:\Users\Prashant\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\json-language-features\server\dist\node\jsonServerMain" --node-ipc --clientProcessId=26572 0 115 15584 electron-nodejs (eslintServer.js ) 0 41 16980 electron-nodejs (server.js ) 0 83 17460 electron-nodejs (tsserver.js ) 0 81 19116 electron-nodejs (tailwindServer.js ) 0 41 19748 electron-nodejs (start-server.js ) 0 39 27456 "C:\Users\Prashant\AppData\Local\Programs\Microsoft VS Code\Code.exe" "c:\Users\Prashant\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\css-language-features\server\dist\node\cssServerMain" --node-ipc --clientProcessId=26572 ```
Workspace Info ``` | Window (SpotifyApiState.js - spotify-clone - Visual Studio Code) | Window (Settings - portfolio - Visual Studio Code) | Folder (spotify-clone): 90 files | File types: js(39) png(8) jpeg(8) json(5) svg(4) css(2) env(1) | gitignore(1) ico(1) html(1) | Conf files: package.json(2) | Folder (portfolio): 42 files | File types: js(16) json(5) png(2) css(2) gitignore(1) ico(1) html(1) | txt(1) md(1) pdf(1) | Conf files: package.json(2); ```
Extensions (37) Extension|Author (truncated)|Version ---|---|--- vscode-sqlite|ale|0.14.1 ng-template|Ang|17.2.2 htmlplay|bia|0.0.10 vscode-tailwindcss|bra|0.10.5 vscode-eslint|dba|2.4.4 es7-react-js-snippets|dsz|4.4.3 gitlens|eam|14.9.0 EditorConfig|Edi|0.16.4 vscode-npm-script|eg2|0.3.29 prettier-vscode|esb|10.1.0 auto-rename-tag|for|0.1.10 code-runner|for|0.12.1 vscode-google-translate|fun|1.4.13 copilot-chat|Git|0.13.0 angular-essentials|joh|16.0.4 Angular2|joh|16.0.1 vscode-peacock|joh|4.2.2 debugpy|ms-|2024.2.0 vscode-jupyter-cell-tags|ms-|0.1.8 vscode-jupyter-slideshow|ms-|0.1.5 vsliveshare|ms-|1.0.5918 file-and-folder-icons|nex|1.0.4 material-icon-theme|PKi|4.34.0 vscode-css-peek|pra|4.4.1 vscode-thunder-client|ran|2.19.2 java|red|1.28.1 LiveServer|rit|5.7.9 trailing-spaces|sha|0.4.1 vscode-stylelint|sty|1.3.0 ng-cli|UVB|1.3.0 intellicode-api-usage-examples|Vis|0.2.8 vscodeintellicode|Vis|1.2.30 vscode-java-debug|vsc|0.56.2 vscode-java-dependency|vsc|0.23.5 vscode-java-pack|vsc|0.25.15 vscode-java-test|vsc|0.40.1 vscode-maven|vsc|0.44.0 (1 theme extensions excluded)
A/B Experiments ``` vsliv368cf:30146710 vspor879:30202332 vspor708:30202333 vspor363:30204092 vscod805cf:30301675 binariesv615:30325510 vsaa593cf:30376535 py29gd2263:30899288 c4g48928:30535728 azure-dev_surveyone:30548225 2i9eh265:30646982 962ge761:30959799 pythongtdpath:30769146 welcomedialogc:30910334 pythonidxpt:30866567 pythonnoceb:30805159 asynctok:30898717 pythontestfixt:30902429 pythonregdiag2:30936856 pyreplss1:30897532 pythonmypyd1:30879173 pythoncet0:30885854 2e7ec940:30968132 pythontbext0:30879054 accentitlementsc:30887149 dsvsc016:30899300 dsvsc017:30899301 dsvsc018:30899302 bf62j303:30959262 cppperfcontrol:30979541 d34g3935:30971562 edj9j583:30969295 a89i1917:30973842 bg6jg535:30979843 dsvsc020:30976470 ```
andreamah commented 4 months ago

Could you share a screen capture video?

shammill commented 3 weeks ago

Same issue for me. Entire screen flickers black, not just VS Code. As soon as I take my mouse off the VS Code window onto something else the flickering stops. It seems especially bad when something else is using the GPU, like a video call or game.

Makes it almost impossible to use VS Code. The flickering and flashing is so frequent it makes me concerned for anyone who has epilepsy.

VS Code version: Code 1.90.2 (5437499feb04f7a586f677b155b039bc2b3669eb, 2024-06-18T22:34:26.404Z) OS version: Windows_NT x64 10.0.19045 Modes:

System Info |Item|Value| |---|---| |CPUs|Intel(R) Core(TM) i9-9900KF CPU @ 3.60GHz (16 x 3600)| |GPU Status|2d_canvas: enabled
canvas_oop_rasterization: enabled_on
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
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled| |Load (avg)|undefined| |Memory (System)|31.91GB (15.74GB free)| |Process Argv|--folder-uri *redacted* --enable-proposed-api genuitecllc.codetogether --crash-reporter-id 737031ae-6f5d-4e3b-93f3-36e5c4d178f2| |Screen Reader|no| |VM|0%|
Extensions (13) Extension|Author (truncated)|Version ---|---|--- ng-template|Ang|18.0.0 dart-code|Dar|3.92.0 flutter|Dar|3.92.0 gitlens|eam|15.1.0 EditorConfig|Edi|0.16.4 prettier-vscode|esb|10.4.0 bloc|Fel|6.6.6 prettify-json|moh|0.0.3 vscode-scss|mrm|0.10.0 vscode-dotnet-runtime|ms-|2.0.7 debugpy|ms-|2024.6.0 python|ms-|2024.8.1 vsliveshare|ms-|1.0.5932
A/B Experiments ``` vsliv368:30146709 vspor879:30202332 vspor708:30202333 vspor363:30204092 vscod805cf:30301675 binariesv615:30325510 vsaa593:30376534 py29gd2263:31024239 c4g48928:30535728 azure-dev_surveyone:30548225 962ge761:30959799 pythongtdpath:30769146 welcomedialogc:30910334 pythonnoceb:30805159 asynctok:30898717 pythonregdiag2:30936856 pythonmypyd1:30879173 h48ei257:31000450 pythontbext0:30879054 accentitlementst:30995554 dsvsc016:30899300 dsvsc017:30899301 dsvsc018:30899302 cppperfnew:31000557 dsvsc020:30976470 pythonait:31006305 jchc7451:31067544 chatpanelt:31048053 dsvsc021:30996838 f3je6385:31013174 pythoncenvpt:31062603 a69g1124:31058053 dvdeprecation:31068756 dwnewjupyter:31046869 2f103344:31071589 impr_priority:31082723 ```

Likely related to: https://github.com/microsoft/vscode/issues/205894

A work around: Disabling GPU rendering. Preferences: Configure Runtime Arguments, add "disable-hardware-acceleration": true,