vscode icon indicating copy to clipboard operation
vscode copied to clipboard

vscode flickering on mac (macbook air M1 ) while using with external display.

Open gitsameep opened this issue 4 years ago • 75 comments

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

  • VS Code Version: 1.73.0 (Universal)
  • OS Version: MacOS 13.0 (22A380) Apple M1

Steps to Reproduce:

  1. Connect your laptop with an external display.
  2. Use your vscode on fullscreen. (On any display)
  3. Start using your vscode, after sometime it will start happening. (No pattern here, Unable to reproduce consistently)
  4. Maybe switching between two displays triggers this issue. Not sure. (Like browser on main display then switch to vscode on another display and it happens)

Flickering happens on the main and external display as well. Flickering is random. Sometimes the screen goes black for a long (3-4 secs). Sometimes it flickers continuously.

Will publish more related videos. It's pretty random. Unable to record all situations.

https://user-images.githubusercontent.com/96908258/200257870-5a55e608-844d-44d0-a7b4-e99a6043c3ab.mp4

gitsameep avatar Nov 07 '22 08:11 gitsameep

I have the same problem with my MBA M1.

cevenkadir avatar Nov 08 '22 09:11 cevenkadir

The same on mbp 14 m1pro

Bovey0809 avatar Nov 09 '22 11:11 Bovey0809

I am experiencing the same issues. Very problematic as it is occurring more frequently as of today for me. But the problem started when updating to MacOS 13.0

wehype-jonas avatar Nov 17 '22 13:11 wehype-jonas

Same issues. MacBook Pro 16 and external Benq 4k display

kdubrovsky avatar Dec 28 '22 08:12 kdubrovsky

same issue

khanhmai20 avatar Jan 02 '23 22:01 khanhmai20

M1 Max MacBook Pro 16 and external Benq 4k display.

dmo-code avatar Jan 13 '23 07:01 dmo-code

Yeah, same exact issue. M1 chip MacBook Pro 14 inch.

Dylan-Ranger avatar Jan 15 '23 15:01 Dylan-Ranger

Me too. Following.

eduelias avatar Jan 18 '23 16:01 eduelias

Me too, MBAM2 external Samsung monitor.

AlexDingleberries avatar Jan 23 '23 02:01 AlexDingleberries

Please try our exploration build based on newer runtime and confirm if the issue still persists. Thanks!

deepak1556 avatar Jan 23 '23 02:01 deepak1556

Mine flickers very fast, in both the stable build and the exploration build. Gets worse or better depending on the window position.

Able to reproduce when

  • macOS was in dark mode
  • VS Code was set to the Dark+ (default dark)

I wasn't able to reproduce when VS Code was set to Dark+ V2 (Experimental), or when macOS was in light mode and VS Code was in Dark+ (default dark)

Laptop

MacBook Pro 14-inch, 2021 Apple M1 Pro 32 GB macOS 13.1 (22065)

External Display

BenQ PD3220U, 4k 60hz, used as main display, macbook in clamshell mode

cypressf avatar Jan 26 '23 03:01 cypressf

Having the same issue lately

aneelang avatar Feb 05 '23 01:02 aneelang

The flicker is bad, gives me a headache. I did find out it is partly because of the themes. Not always though, the themes seem to make it happen just more often. Especially the kimbie dark theme. When it gets really bad, I must close everything and be on an empty desktop until it stops.

The external display on the macs hdmi port is the culprit. The laptop screen and the other connected with thunderbolt never flicker.

External Display: Asus VS247.

kferrone avatar Feb 15 '23 15:02 kferrone

https://forums.macrumors.com/threads/m1-air-ghosting-flickering-with-external-display.2271670/page-23

Having had my m1 mac for a long time, using my m1 mac mini as a headless server and for work I already switched to "normal" x86 machine. Problem is even worse when running asahilinux. But, hear me out: It is rumored that its a issue with EDID, which could mean that running your display with a capture card that has passthrough in between could actually help. Cost around 160 bucks ( e.g NZXT Signal 4K30 ) Alternatively could try a EDID Emulator device. But it could also be a regional issue - some machines may not have the issue, produced somewhere else.

Not always though, the themes seem to make it happen just more often. Especially the kimbie dark theme.

@kferrone thats absolutely correct. Those were also the findings in the link posted above...

zDEFz avatar Feb 19 '23 06:02 zDEFz

Happened to me on my M1 macbook pro after I switched from HDMI to USB-C/Displayport. After I switched away from "Solarized Dark" theme to "Dark+ V2 (Experimental)" the flickering went away.

jagibson avatar Mar 10 '23 22:03 jagibson

I doubt it has to do with the theme. Can you let me know if you don't have any flickering for the next couple days?

aneelang avatar Mar 12 '23 13:03 aneelang

I have now switched back to HDMI from the MacBook.

Now the flickering is gone. Seems like it doesn't have anything with VS Code Theme. It seems to be a USB-C problem with a BenQ 4K monitor.

dmo-code avatar Mar 12 '23 14:03 dmo-code

@aneelang After looking at the video I think my issue is different. My flickering is much quicker than the reporter's. It almost looks like it's doing interlacing like an old TV, except it's vertical and not horizontal. Also it makes the whole monitor flicker even if code is only using half of the screen. It does not stop flickering until I change the theme or I remove "black" dialogs hovering over the main editor window.

I agree that it's not likely the theme but maybe it could be the rendering/contrast? I could get it to happen pretty consistently by doing the following:

  • Set my theme to "Solarized Dark" or "Solarized Dark+"
  • Open up the command dialog (Shift+Cmd+p)

Having the almost-black background of the dialog hover over the slightly lighter background of Solarized Dark seems to be the trigger. I tried a few other themes but couldn't re-create it as noticeably.

After I restarted Code today I could not reproduce the issue. I've had it open for several days including suspend/resumes.

Other notes

  • I have code in remote edit mode to a Linux host over SSH. I'm not sure if it's ever happened when just editing files locally.
  • I'm using a Dell S3221QS (4k) connected with a Plugable USB-TDP adapter.
  • I'm running Ventura 13.2.1

jagibson avatar Mar 21 '23 20:03 jagibson

@jagibson I absolutely have no evidence about what I'm about to say: This is a issue with M Series devices which is triggered by certain colors/schemes which apple is unable to fix. As pointed above, in the countless sub-links in the link I've posted: Changing the EDID sometimes had helped. But the real fix would be related to hardware, rather than software.

zDEFz avatar Mar 22 '23 11:03 zDEFz

I have LG Ultrafine external, Macbook Pro connected via Thunderbolt, and as soon as I disconnect from the external display, it will first go complete dark, then it will come back, and the flickering starts, and more than half of the screen will go dark. Even after I kill vscode, the problem is still there, but seems less frequent than when Vscode is on. I've tried many things include reset System Management Controller, and now I am on this thread here. I really don't know what it is.

samuelan avatar Mar 25 '23 05:03 samuelan