vscode flickering on mac (macbook air M1 ) while using with external display.
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:
- Connect your laptop with an external display.
- Use your vscode on fullscreen. (On any display)
- Start using your vscode, after sometime it will start happening. (No pattern here, Unable to reproduce consistently)
- 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
I have the same problem with my MBA M1.
The same on mbp 14 m1pro
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
Same issues. MacBook Pro 16 and external Benq 4k display
same issue
M1 Max MacBook Pro 16 and external Benq 4k display.
Yeah, same exact issue. M1 chip MacBook Pro 14 inch.
Me too. Following.
Me too, MBAM2 external Samsung monitor.
Please try our exploration build based on newer runtime and confirm if the issue still persists. Thanks!
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
Having the same issue lately
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.
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...
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.
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?
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.
@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 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.
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.