Vscode: macOS Sierra: background artifacts

Created on 22 Sep 2016  ·  54Comments  ·  Source: microsoft/vscode

  • VSCode Version: Code 1.5.2 (66f37fd2a99eb9d628dd374d81d78835b410c39b, 2016-09-12T13:05:12.065Z)
  • OS Version: Darwin x64 16.0.0

Steps to Reproduce:

  1. just launch Visual studio on macOS Sierra
bug electron upstream verified

Most helpful comment

screen shot 2016-12-23 at 9 48 07 am

This fixed the issue for me. I just had the wrong color profile on my monitors I guess.

All 54 comments

screen shot 2016-09-22 at 20 13 57

@maxence-charriere can you try if this reproduces with our insider build too?
You can give our preview releases a try from: http://code.visualstudio.com/Download#insiders

screen shot 2016-09-22 at 20 14 58

ok this one on Version 1.6.0-insider (1.6.0-insider):
screen shot 2016-09-22 at 20 21 26

I'm seeing this as well.

Not sure if this helps, but I'm also seeing a similar problem in Chrome, which I submitted to them also. Screenshot below is Daring Fireball in Safari vs. Chrome:

safari-vs-chrome

Thanks for linking the related issues here. The related chrome bug is: https://bugs.chromium.org/p/chromium/issues/detail?id=633805

@maxence-charriere @jaysylvester that issue talks about a possible fix using --force-gpu-rasterization, did you try that? maybe pass it to the starting of code?

@bpasero Just tried --force-gpu-rasterization with VS Code and that fixes it.

@jaysylvester great to hear that 👍

how to use it? I tried code --force-gpu-rasterization on the console but nothing changed.

yeah, from the command line when launching an instance.

/Applications/Visual\ Studio\ Code.app/Contents/MacOS/Electron --force-gpu-rasterization

Since 1.6.0, I'm seeing some artifacts even with --force-gpu-rasterization.
Also, when setting "window.zoomLevel" to any value other than 0 the artifacts disappear, regardless of --force-gpu-rasterization.

@FabianLauer Thanks, that did the trick for me!

@FabianLauer that definitely reduces it, but I'm still seeing the artifacts flicker on / off quite often.

I still get some flickering, even with the workarounds, but it definitely helps.

I changed the "windows.zoomLevel" to 0.001 and did the /Applications/Visual\ Studio\ Code.app/Contents/MacOS/Electron --force-gpu-rasterization to launch VS Code via terminal.

Here are the warnings I received:
[warn] kq_init: detected broken kqueue; not using.: Undefined error: 0
[warn] kq_init: detected broken kqueue; not using.: Undefined error: 0
[warn] kq_init: detected broken kqueue; not using.: Undefined error: 0
[warn] kq_init: detected broken kqueue; not using.: Undefined error: 0
/Library/Caches/com.apple.xbs/Sources/AppleGVA/AppleGVA-10.0.41/Sources/Slices/Driver/AVD_loader.cpp: failed to get a service for display 3
/Library/Caches/com.apple.xbs/Sources/AppleGVA/AppleGVA-10.0.41/Sources/Slices/Driver/AVD_loader.cpp: failed to get a service for display 4
/Library/Caches/com.apple.xbs/Sources/AppleGVA/AppleGVA-10.0.41/Sources/Slices/Driver/AVD_loader.cpp: failed to get a service for display 5

And this warning fires up everynow and them:
[988:1120/131749:ERROR:gles2_cmd_decoder.cc(8013)] [.RenderWorker-0x7f8db0068400.GpuRasterization]GL ERROR :GL_INVALID_OPERATION : glUseProgram: program not linked

This didn't solve the problem for me.
Only --diable-gpu works.
I've raised a detailed bug description: #15681
I'm actually using calibrated displays with a custom made .icc profiles that are generated by x-rite and the i1DisplayPro calibrator.

If I ignore the custom made profiles, the issue is resolved, but then the colours are not accurate. This is important for graphic works.

how can I run Vs code with the argument --disable-gpu just by typing > code in terminal or when I click on the icon app, while still maintaining it's ability to open up a file or a folder when I issue > code fileName.txt or code . ?

Using alias, breaks the functionality of opening a specific file / folder when issuing the command via terminal.

(using macSierra).

I could solve it with code --force-gpu-rasterization but I only have that trouble when I connect to a external monitor. I have a MBP Retina 2015.

I still see jank on MacBook Pro (Retina, 13-inch, Mid 2014) even with --force-gpu-rasterization :(

You can try hovering near the sidebar to reproduce it.

/Applications/Visual\ Studio\ Code.app/Contents/MacOS/Electron --disable-gpu &

screen shot 2016-12-23 at 9 48 07 am

This fixed the issue for me. I just had the wrong color profile on my monitors I guess.

@michaeljcalkins Works for me too, awesome, thanks!

@michaeljcalkins thanks a lot for the workaround!

@michaeljcalkins it works, but I'd rather have correct colors on my monitors :)

The workaround is nice, yet people who use custom made .icc profiles are still faced with this issue.
Colour accuracy workflow is required for some.

Still have this issue with customized color profile. Using "--force-gpu-rasterization" didn't work, but "window.zoomLevel: 0.001" and "--disable-gpu" works. Mac Air 2014, Sierra 10.12.3.
Hope this issue could be fixed sooner or latter.

Yeah this is a really problematic bug which makes some themes unusable.

Might be a tough one to fix though, as it's been active for so long.

@michaeljcalkins Works for me too, awesome, thanks!

Please fix this bug soon. Switching to Atom until this gets sorted out, it's too distracting to use on a daily basis :(

@tedmcdo Atom has the same issue. Have a look at: https://github.com/atom/atom/issues/12634. And for the actual cause: https://bugs.chromium.org/p/chromium/issues/detail?id=633805

I guess I'm lucky then, as the issue does not occur in Atom for me. Hopefully the fix comes quickly though.

Thanks @FabianLauer! I changed the settings file to have a zoomlevel of 0.1 (something not noticeable), and now I can run it without any visual artifacts! Perhaps you guys can give it a shot

confirming that setting "window.zoomLevel": 0.1 is a nice workaround for the GPU Artefacts issue

@Gil80 keep in mind that if you change your zoom-levels in the editor and back, it will reset the zoomlevel in your setting to 0.0 and the artifacts will come back again.

This is a common issue I've seen been before when using 3d transforms in CSS like VSCode does (especially in combination with :hover styles) - a couple of well placed backface-visibility: hidden; usually resolve this - tried it myself and managed to reduce those artifacts bit by bit.

This issue I have it in some Electron Apps (Visual Studio Code and Hyper) but I fix it with @michaeljcalkins solution https://github.com/Microsoft/vscode/issues/12473#issuecomment-269024219
screen shot 2017-03-07 at 3 56 56 pm
screen shot 2017-03-07 at 3 57 02 pm

I can confirm that using "window.zoomLevel": 0.001 on macOS Sierra 10.12.4 fixes the problem. Now i am able to use my calibrated profile.

Todays VS Code insider build comes with Electron 1.6.x, would be interesting to hear if this update solves this issue for anyone: http://code.visualstudio.com/Download#insiders

Thanks for the heads up!

Insider build fixed it for me without any workarounds. 👍

(Using a calibrated i1 color profile)

It does. The colors are substantially different than before. Side by side with the same theme, the insider version colors are way more saturated.

Awesome 👍

didn't work. Had to set"window.zoomLevel": 0.001 and I still see screen flickers.

@am6377 are you on our insiders build?

I was on insider build and then I switched to normal build to see if there
was any difference and for me there isn't.

On Monday, April 17, 2017, Benjamin Pasero notifications@github.com wrote:

@am6377 https://github.com/am6377 are you on our insiders build?


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/Microsoft/vscode/issues/12473#issuecomment-294513681,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AKWiGfQBdnWqhCv_Jj-64gYoYNTTiNqdks5rw4pagaJpZM4KEMxM
.

So it looks like the Electron update is only resolving it for some people.

@bpasero The Insiders update fixed the issue for me. No need for the zoomLevel hack now.

@bpasero I tried #insider build but I can't use custom or other built-in display profile except for the standard color LCD which actually doesn't look really nice IRL. The only way it works for me is setting "window.zoomLevel": 0.001 and even with that I get lots of random screen flickers.

screen shot 2017-04-17 at 4 39 48 pm
screen shot 2017-04-17 at 4 40 02 pm

With the current insiders build, using that specific profile (ITU-R BT.709-6), and the default dark theme, I'm not seeing the behavior, either on the built in display (5k iMac) or external display. With the current non-insiders build, I initially thought the window.zoomLevel hack worked, but after using it for awhile, it was clear that it helped some, but didn't eliminate the issue.

The issue is resolved for me, I just verified that. No clue why some people are still seeing it though when trying our insiders build.

It fixed all 3 machines I use which have custom profiles. Purely a guess, but maybe some people are downloading the normal version from the link posted (https://code.visualstudio.com/Download#insiders), not realizing the Insiders build is a text link at the bottom.

Yeah, sounds like it.

I would like to apologize to @bpasero and I would like to thank @Codelica because I realized I didn't download the insiders build. I thought the link with #insiders took to me to the insiders built. I didn't scroll down. The direct link to insiders is
(https://code.visualstudio.com/insiders) WITHOUT the #
My fault :)

Came across this issue when scratching my head that the background colour I was setting in my theme was showing differently on the screen (i.e. when checking it with the Digital Color Meter). I did download the Insiders build and I can confirm it's fixed there for me. Can I ask when this fix will roll out? Theming is feeling rather futile while my colours don't match :-(

Was this page helpful?
0 / 5 - 0 ratings