microsoft / vscode

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

Monitors constantly flickering when interacting with the VSCode window #205894

Open ScottTodd opened 8 months ago

ScottTodd commented 8 months ago

Does this issue occur when all extensions are disabled?: Yes

Steps to Reproduce:

  1. Launch VSCode
  2. Click off of VSCode and on to a program/windows on a different monitor OR toggle the zoom level (control, +) OR launch a new window via something like "Help: About" from the command palette
  3. Observe monitor flickering off then on (80% of the time, so very frequently when switching between windows)

Demo videos: https://photos.app.goo.gl/KmYpcfEbPETTbwMj6

This does not reproduce when running with code --disable-gpu

ScottTodd commented 8 months ago

Demo gif (changing zoom level): vscode_monitor_flicker_small

ScottTodd commented 7 months ago

Still seeing this with the latest version:

Version: 1.87.0 (user setup) Commit: 019f4d1419fbc8219a181fab7892ebccf7ee29a2 Date: 2024-02-27T23:41:44.469Z Electron: 27.3.2 ElectronBuildId: 26836302 Chromium: 118.0.5993.159 Node.js: 18.17.1 V8: 11.8.172.18-electron.0 OS: Windows_NT x64 10.0.19045

celstark commented 5 months ago

OMG someone else has this! NVIDIA 4080, Windows 11. Reverting back to the Feb 1.87.2 has no issues so far, while the 1.88 drove me crazy. Interact with it in any way, or at times, just let it sit and the whole screen goes black for a second and comes back. File, open, cancel was a 100% way to trigger it.

ScottTodd commented 5 months ago

I've also started noticing this with other applications like Microsoft Azure Storage Explorer and Discord (resizing the window, going into or out of settings, etc.). Feels like there is a graphics driver or display driver bug and something in these applications (maybe a common dep like Electron) is consistently triggering it. What's interesting about VSCode was that the issue does not reproduce on an older version.

smlegg commented 4 months ago

Try disabling G-Sync (even if its set to "enable for full screen") - that fixes the flickering for me (4080, WIndows 11).

shammill commented 3 months ago

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

Try disabling G-Sync (even if its set to "enable for full screen") - that fixes the flickering for me (4080, WIndows 11).

G-SYNC was already off for me.