Vscode: VS Code flickers when running on a high DPI external monitor

Created on 4 May 2017  Â·  84Comments  Â·  Source: microsoft/vscode

  • VSCode Version: 1.12.0
  • OS Version: OSX Sierra 10.12.4
  • Retina MBP, 15-inch, Mid 2015
  • Graphics: AMD Radeon R9 M370X 2048 MB Intel Iris Pro 1536 MB

Steps to Reproduce:

  1. VS Code maximized (not full screen)
  2. Click in Javascript or HTML file

Extensions installed:

  • dzannotti.vscode-babel-coloring
  • waderyan.babelrc
  • ceps.theme-darcula
  • gerane.theme-dark-dracula
  • HvyIndustries.crane
  • donjayamanne.python

Etc:

  • Occurs when all plugins are disabled
  • Does not occur when window is not in focus
  • Problem did not occur until most recent VS Code update.
  • Occurs on external 4k display at 3360x1890 but not on built-in MBP display at 1920x1200

Happy to provide more info if needed. Thanks so much for all of your great work, I love VS Code!

html_flicker
file_tree_flicker

bug electron electron-2-update important upstream verified

Most helpful comment

@jlphelps does it reproduce if you configure this in settings:

"editor.disableTranslate3d": true

All 84 comments

I see this effect when I start code with the --disable-gpu parameter

same issue here. entire chunks of text in the editor become invisible as well.

FYI, setting "editor.cursorBlinking": "solid" seems to have helped

@jrnail23 do you start up with --disable-gpu?

I see a lot of flickering when scrolling as well. I am not starting with --disable-gpu.

If I reduce my display resolution to 3008x1692 (from 3360x1890) and maximize VS code the problem goes away.

@jlphelps can you try some more things and answer to some more questions:

  • does it reproduce when you disable either of the GPUs (I assume your Mac has discrete and integrated GPU, so maybe it is related to one of them?)
  • does it flicker only in specific views (e.g. the explorer) or also in all other views (search, scm)?
  • which parts specifically flicker, can you maybe record a video?
  • does it flicker when you zoom in (from the View menu)?

@jrnail23 can you share a video of how this looks for you when this happens, maybe what you see is unrelated to the flickering? And are you saying the issue is totally gone after changing the blinking cursor?

@yangwen2 can you clarify what you are seeing and when it happens?

@bpasero

  • Disabling/enabling automatic graphics switching does not seem to have an impact.
  • All views, even terminal
  • Video: https://www.youtube.com/watch?v=mgFGqzZbrCY
  • It does not occur when zoomed in. After zooming in and zooming out the problem goes away until I restart the app.

Additionally, the problem only seems to occur when I have the editor split 3 ways. 0 or 1 splits seems fine.

@jlphelps can you share your settings file?

@bpasero These are the only overrides, everything else is default:

// Place your settings in this file to overwrite the default settings
{
    "window.zoomLevel": 0,
    "workbench.colorTheme": "Darcula",
    "editor.minimap.enabled": false
}

@jlphelps does it reproduce if you configure this in settings:

"editor.disableTranslate3d": true

@bpasero The problem goes away with that setting, but only after I restart the app. If I remove the setting and restart the app the problem comes back.

@jlphelps to be clear, when you define this setting and restart, the issue is resolved across all UI elements for you including editor and tree?

@bpasero Looking at it again this setting resolves the issue when in tree, search, and debug views, but not in source control and extensions.

@joaomoreno we removed all uses of translate3d in the list, didn't we?

@jlphelps does this issue only show when you scroll the editor or also by just waiting or clicking?

@bpasero without the editor.disableTranslate3d setting it occurs by waiting or clicking in addition to scrolling the editor. The flicker seems to coincide with the cursor blinking.

The behavior is the same with editor.disableTranslate3d enabled and in Source view, but sometimes entire sections of the code disappear rather than blinking.

Same issue here.
Only occurs when window is maximized on my external monitor (and not on my primary monitor).
I can also report that adding "editor.disableTranslate3d": true fixes the issue in some views but not others (doesn't fix in source, plugins, settings, ...)
It does occur when disabling all extensions.
It does occur when disabling all disabling gpu.
It does occur when waiting and clicking.
It also causes scrolling to be staggered.

@willium do you have similar hardware as @jlphelps? is that a high DPI monitor external?

Can you guys try to reproduce this using normal Chrome on this page that hosts our editor: https://microsoft.github.io/monaco-editor/

Same problem for me too, but "editor.disableTranslate3d": true definitely helped

@camstuart even no more flickering in the tree views (try explorer and scm)?

Weirdly, it only seems to happen at the second-highest DPI my monitor offers: 3360x1890, and the third-highest: 3008x1692. At 3840x2160, it preforms well. It's happening on my Dell P2715Q. Here are my HW specs
screen shot 2017-05-06 at 1 48 10 pm

The hosted editor on normal Chrome performs well too, which i think is expected. VS Code only stutters when the editor is filling or mostly-filling the monitor (which is how I like it of course) on the second highest resolution DPI available

@willium so you are saying as soon as you make the window smaller (and thus the editor smaller), flickering stops?

Yep. Or larger, oddly enough.

@jlphelps @willium @camstuart @jrnail23 I produced a build of our current release with the previous Chrome version we were using. Can you give it a try to see if the issue reproduces, this would make sure the issue really comes from our Electron update: https://az764295.vo.msecnd.net/insider/3440ce8c42676f299d7f7d12eb361b590de4684c/VSCode-darwin-insider-unsigned.zip

Another thing I would be interested in is to see the output of chrome://gpu which gives more details about the GPU state. To get to this:

  • git clone https://github.com/bpasero/electron-gpu.git
  • npm install
  • npm start

=> you should see a window like this one:

image

Can you copy the result into here if possible.

The build you provided does seem to address the issue.

As requested, results from electron gpu:

Graphics Feature Status
Canvas: Hardware accelerated
Flash: Hardware accelerated
Flash Stage3D: Hardware accelerated
Flash Stage3D Baseline profile: Hardware accelerated
Compositing: Hardware accelerated
Multiple Raster Threads: Enabled
Native GpuMemoryBuffers: Hardware accelerated
Rasterization: Hardware accelerated
Video Decode: Hardware accelerated
Video Encode: Hardware accelerated
VPx Video Decode: Hardware accelerated
WebGL: Hardware accelerated
WebGL2: Hardware accelerated
Driver Bug Workarounds
adjust_src_dst_region_for_blitframebuffer
decode_encode_srgb_for_generatemipmap
disable_framebuffer_cmaa
disable_multimonitor_multisampling
get_frag_data_info_bug
pack_parameters_workaround_with_pack_buffer
regenerate_struct_names
remove_invariant_and_centroid_for_essl3
reset_base_mipmap_level_before_texstorage
scalarize_vec_and_mat_constructor_args
set_zero_level_before_generating_mipmap
unfold_short_circuit_as_ternary_operation
unpack_alignment_workaround_with_unpack_buffer
use_intermediary_for_copy_texture_image
use_shadowed_tex_level_params
use_unused_standard_shared_blocks
Problems Detected
Multisampling is buggy on OSX when multiple monitors are connected: 237931
Applied Workarounds: disable_multimonitor_multisampling
Unfold short circuit on Mac OS X: 307751
Applied Workarounds: unfold_short_circuit_as_ternary_operation
Always rewrite vec/mat constructors to be consistent: 398694
Applied Workarounds: scalarize_vec_and_mat_constructor_args
Mac drivers handle struct scopes incorrectly: 403957
Applied Workarounds: regenerate_struct_names
glGenerateMipmap fails if the zero texture level is not set on some Mac drivers: 560499
Applied Workarounds: set_zero_level_before_generating_mipmap
Pack parameters work incorrectly with pack buffer bound: 563714
Applied Workarounds: pack_parameters_workaround_with_pack_buffer
Alignment works incorrectly with unpack buffer bound: 563714
Applied Workarounds: unpack_alignment_workaround_with_unpack_buffer
copyTexImage2D fails when reading from IOSurface on multiple GPU types.: 581777
Applied Workarounds: use_intermediary_for_copy_texture_image
Mac Drivers store texture level parameters on int16_t that overflow: 610153
Applied Workarounds: use_shadowed_tex_level_params
Limited enabling of Chromium GL_INTEL_framebuffer_CMAA: 535198
Applied Workarounds: disable_framebuffer_cmaa
glGetFragData{Location|Index} works incorrectly on Max: 638340
Applied Workarounds: get_frag_data_info_bug
glTexStorage* are buggy when base mipmap level is not 0: 640506
Applied Workarounds: reset_base_mipmap_level_before_texstorage
Decode and encode before generateMipmap for srgb format textures on macosx: 634519
Applied Workarounds: decode_encode_srgb_for_generatemipmap
Insert statements to reference all members in unused std140/shared blocks on Mac: 618464
Applied Workarounds: use_unused_standard_shared_blocks
adjust src/dst region if blitting pixels outside read framebuffer on Mac: 644740
Applied Workarounds: adjust_src_dst_region_for_blitframebuffer
Mac driver GL 4.1 requires invariant and centroid to match between shaders: 639760, 641129
Applied Workarounds: remove_invariant_and_centroid_for_essl3
Version Information
Data exported   5/7/2017, 10:30:57 PM
Chrome version  Chrome/56.0.2924.87
Operating system    Mac OS X 10.12.4
Software rendering list version 12.06
Driver bug list version 9.24
ANGLE commit id unknown hash
2D graphics backend Skia/56 bf2d9e02d58ea01f1c239f7e2fc024cba140ccb1
Command Line Args   --no-sandbox --allow-file-access-from-files --enable-avfoundation .
Driver Information
Initialization time 86
In-process GPU  false
Sandboxed   false
GPU0    VENDOR = 0x1002, DEVICE= 0x67ef *ACTIVE*
GPU1    VENDOR = 0x8086, DEVICE= 0x191b
Optimus false
AMD switchable  true
Driver vendor   
Driver version  1.50.38
Driver date 
Pixel shader version    4.10
Vertex shader version   4.10
Max. MSAA samples   8
Machine model name  MacBookPro
Machine model version   13.3
GL_VENDOR   ATI Technologies Inc.
GL_RENDERER AMD Radeon Pro 455 OpenGL Engine
GL_VERSION  4.1 ATI-1.50.38
GL_EXTENSIONS   GL_ARB_blend_func_extended GL_ARB_draw_buffers_blend GL_ARB_draw_indirect GL_ARB_ES2_compatibility GL_ARB_explicit_attrib_location GL_ARB_gpu_shader_fp64 GL_ARB_gpu_shader5 GL_ARB_instanced_arrays GL_ARB_internalformat_query GL_ARB_occlusion_query2 GL_ARB_sample_shading GL_ARB_sampler_objects GL_ARB_separate_shader_objects GL_ARB_shader_bit_encoding GL_ARB_shader_subroutine GL_ARB_shading_language_include GL_ARB_tessellation_shader GL_ARB_texture_buffer_object_rgb32 GL_ARB_texture_cube_map_array GL_ARB_texture_gather GL_ARB_texture_query_lod GL_ARB_texture_rgb10_a2ui GL_ARB_texture_storage GL_ARB_texture_swizzle GL_ARB_timer_query GL_ARB_transform_feedback2 GL_ARB_transform_feedback3 GL_ARB_vertex_attrib_64bit GL_ARB_vertex_type_2_10_10_10_rev GL_ARB_viewport_array GL_EXT_debug_label GL_EXT_debug_marker GL_EXT_depth_bounds_test GL_EXT_texture_compression_s3tc GL_EXT_texture_filter_anisotropic GL_EXT_texture_mirror_clamp GL_EXT_texture_sRGB_decode GL_APPLE_client_storage GL_APPLE_container_object_shareable GL_APPLE_flush_render GL_APPLE_object_purgeable GL_APPLE_rgb_422 GL_APPLE_row_bytes GL_APPLE_texture_range GL_ATI_texture_mirror_once GL_NV_texture_barrier
Disabled Extensions 
Window system binding vendor    
Window system binding version   
Window system binding extensions    
Direct rendering    Yes
Reset notification strategy 0x0000
GPU process crash count 0
Compositor Information
Tile Update Mode    Zero-copy
Partial Raster  Enabled
GpuMemoryBuffers Status
ATC Software only
ATCIA   Software only
DXT1    Software only
DXT5    Software only
ETC1    Software only
R_8 GPU_READ_CPU_READ_WRITE, GPU_READ_CPU_READ_WRITE_PERSISTENT
RG_88   Software only
BGR_565 Software only
RGBA_4444   Software only
RGBX_8888   Software only
RGBA_8888   GPU_READ, SCANOUT
BGRX_8888   GPU_READ, SCANOUT
BGRA_8888   GPU_READ, SCANOUT, GPU_READ_CPU_READ_WRITE, GPU_READ_CPU_READ_WRITE_PERSISTENT
YVU_420 Software only
YUV_420_BIPLANAR    GPU_READ_CPU_READ_WRITE, GPU_READ_CPU_READ_WRITE_PERSISTENT
UYVY_422    GPU_READ_CPU_READ_WRITE, GPU_READ_CPU_READ_WRITE_PERSISTENT

@willium thanks, to confirm you ran the experiment that produces the output you posted on the external monitor and with the resolution that shows the flickering right? Could you maybe run the same thing on a resolution that does not show the issue for you just to see if that gives different output?

resolution that works:

Graphics Feature Status
Canvas: Hardware accelerated
Flash: Hardware accelerated
Flash Stage3D: Hardware accelerated
Flash Stage3D Baseline profile: Hardware accelerated
Compositing: Hardware accelerated
Multiple Raster Threads: Enabled
Native GpuMemoryBuffers: Hardware accelerated
Rasterization: Hardware accelerated
Video Decode: Hardware accelerated
Video Encode: Hardware accelerated
VPx Video Decode: Hardware accelerated
WebGL: Hardware accelerated
WebGL2: Hardware accelerated
Driver Bug Workarounds
adjust_src_dst_region_for_blitframebuffer
decode_encode_srgb_for_generatemipmap
disable_framebuffer_cmaa
disable_multimonitor_multisampling
get_frag_data_info_bug
pack_parameters_workaround_with_pack_buffer
regenerate_struct_names
remove_invariant_and_centroid_for_essl3
reset_base_mipmap_level_before_texstorage
scalarize_vec_and_mat_constructor_args
set_zero_level_before_generating_mipmap
unfold_short_circuit_as_ternary_operation
unpack_alignment_workaround_with_unpack_buffer
use_intermediary_for_copy_texture_image
use_shadowed_tex_level_params
use_unused_standard_shared_blocks
Problems Detected
Multisampling is buggy on OSX when multiple monitors are connected: 237931
Applied Workarounds: disable_multimonitor_multisampling
Unfold short circuit on Mac OS X: 307751
Applied Workarounds: unfold_short_circuit_as_ternary_operation
Always rewrite vec/mat constructors to be consistent: 398694
Applied Workarounds: scalarize_vec_and_mat_constructor_args
Mac drivers handle struct scopes incorrectly: 403957
Applied Workarounds: regenerate_struct_names
glGenerateMipmap fails if the zero texture level is not set on some Mac drivers: 560499
Applied Workarounds: set_zero_level_before_generating_mipmap
Pack parameters work incorrectly with pack buffer bound: 563714
Applied Workarounds: pack_parameters_workaround_with_pack_buffer
Alignment works incorrectly with unpack buffer bound: 563714
Applied Workarounds: unpack_alignment_workaround_with_unpack_buffer
copyTexImage2D fails when reading from IOSurface on multiple GPU types.: 581777
Applied Workarounds: use_intermediary_for_copy_texture_image
Mac Drivers store texture level parameters on int16_t that overflow: 610153
Applied Workarounds: use_shadowed_tex_level_params
Limited enabling of Chromium GL_INTEL_framebuffer_CMAA: 535198
Applied Workarounds: disable_framebuffer_cmaa
glGetFragData{Location|Index} works incorrectly on Max: 638340
Applied Workarounds: get_frag_data_info_bug
glTexStorage* are buggy when base mipmap level is not 0: 640506
Applied Workarounds: reset_base_mipmap_level_before_texstorage
Decode and encode before generateMipmap for srgb format textures on macosx: 634519
Applied Workarounds: decode_encode_srgb_for_generatemipmap
Insert statements to reference all members in unused std140/shared blocks on Mac: 618464
Applied Workarounds: use_unused_standard_shared_blocks
adjust src/dst region if blitting pixels outside read framebuffer on Mac: 644740
Applied Workarounds: adjust_src_dst_region_for_blitframebuffer
Mac driver GL 4.1 requires invariant and centroid to match between shaders: 639760, 641129
Applied Workarounds: remove_invariant_and_centroid_for_essl3
Version Information
Data exported   5/8/2017, 12:15:22 AM
Chrome version  Chrome/56.0.2924.87
Operating system    Mac OS X 10.12.4
Software rendering list version 12.06
Driver bug list version 9.24
ANGLE commit id unknown hash
2D graphics backend Skia/56 bf2d9e02d58ea01f1c239f7e2fc024cba140ccb1
Command Line Args   --no-sandbox --allow-file-access-from-files --enable-avfoundation .
Driver Information
Initialization time 103
In-process GPU  false
Sandboxed   false
GPU0    VENDOR = 0x1002, DEVICE= 0x67ef *ACTIVE*
GPU1    VENDOR = 0x8086, DEVICE= 0x191b
Optimus false
AMD switchable  true
Driver vendor   
Driver version  1.50.38
Driver date 
Pixel shader version    4.10
Vertex shader version   4.10
Max. MSAA samples   8
Machine model name  MacBookPro
Machine model version   13.3
GL_VENDOR   ATI Technologies Inc.
GL_RENDERER AMD Radeon Pro 455 OpenGL Engine
GL_VERSION  4.1 ATI-1.50.38
GL_EXTENSIONS   GL_ARB_blend_func_extended GL_ARB_draw_buffers_blend GL_ARB_draw_indirect GL_ARB_ES2_compatibility GL_ARB_explicit_attrib_location GL_ARB_gpu_shader_fp64 GL_ARB_gpu_shader5 GL_ARB_instanced_arrays GL_ARB_internalformat_query GL_ARB_occlusion_query2 GL_ARB_sample_shading GL_ARB_sampler_objects GL_ARB_separate_shader_objects GL_ARB_shader_bit_encoding GL_ARB_shader_subroutine GL_ARB_shading_language_include GL_ARB_tessellation_shader GL_ARB_texture_buffer_object_rgb32 GL_ARB_texture_cube_map_array GL_ARB_texture_gather GL_ARB_texture_query_lod GL_ARB_texture_rgb10_a2ui GL_ARB_texture_storage GL_ARB_texture_swizzle GL_ARB_timer_query GL_ARB_transform_feedback2 GL_ARB_transform_feedback3 GL_ARB_vertex_attrib_64bit GL_ARB_vertex_type_2_10_10_10_rev GL_ARB_viewport_array GL_EXT_debug_label GL_EXT_debug_marker GL_EXT_depth_bounds_test GL_EXT_texture_compression_s3tc GL_EXT_texture_filter_anisotropic GL_EXT_texture_mirror_clamp GL_EXT_texture_sRGB_decode GL_APPLE_client_storage GL_APPLE_container_object_shareable GL_APPLE_flush_render GL_APPLE_object_purgeable GL_APPLE_rgb_422 GL_APPLE_row_bytes GL_APPLE_texture_range GL_ATI_texture_mirror_once GL_NV_texture_barrier
Disabled Extensions 
Window system binding vendor    
Window system binding version   
Window system binding extensions    
Direct rendering    Yes
Reset notification strategy 0x0000
GPU process crash count 0
Compositor Information
Tile Update Mode    Zero-copy
Partial Raster  Enabled
GpuMemoryBuffers Status
ATC Software only
ATCIA   Software only
DXT1    Software only
DXT5    Software only
ETC1    Software only
R_8 GPU_READ_CPU_READ_WRITE, GPU_READ_CPU_READ_WRITE_PERSISTENT
RG_88   Software only
BGR_565 Software only
RGBA_4444   Software only
RGBX_8888   Software only
RGBA_8888   GPU_READ, SCANOUT
BGRX_8888   GPU_READ, SCANOUT
BGRA_8888   GPU_READ, SCANOUT, GPU_READ_CPU_READ_WRITE, GPU_READ_CPU_READ_WRITE_PERSISTENT
YVU_420 Software only
YUV_420_BIPLANAR    GPU_READ_CPU_READ_WRITE, GPU_READ_CPU_READ_WRITE_PERSISTENT
UYVY_422    GPU_READ_CPU_READ_WRITE, GPU_READ_CPU_READ_WRITE_PERSISTENT

Resolution that doesn't:

Graphics Feature Status
Canvas: Hardware accelerated
Flash: Hardware accelerated
Flash Stage3D: Hardware accelerated
Flash Stage3D Baseline profile: Hardware accelerated
Compositing: Hardware accelerated
Multiple Raster Threads: Enabled
Native GpuMemoryBuffers: Hardware accelerated
Rasterization: Hardware accelerated
Video Decode: Hardware accelerated
Video Encode: Hardware accelerated
VPx Video Decode: Hardware accelerated
WebGL: Hardware accelerated
WebGL2: Hardware accelerated
Driver Bug Workarounds
adjust_src_dst_region_for_blitframebuffer
decode_encode_srgb_for_generatemipmap
disable_framebuffer_cmaa
disable_multimonitor_multisampling
get_frag_data_info_bug
pack_parameters_workaround_with_pack_buffer
regenerate_struct_names
remove_invariant_and_centroid_for_essl3
reset_base_mipmap_level_before_texstorage
scalarize_vec_and_mat_constructor_args
set_zero_level_before_generating_mipmap
unfold_short_circuit_as_ternary_operation
unpack_alignment_workaround_with_unpack_buffer
use_intermediary_for_copy_texture_image
use_shadowed_tex_level_params
use_unused_standard_shared_blocks
Problems Detected
Multisampling is buggy on OSX when multiple monitors are connected: 237931
Applied Workarounds: disable_multimonitor_multisampling
Unfold short circuit on Mac OS X: 307751
Applied Workarounds: unfold_short_circuit_as_ternary_operation
Always rewrite vec/mat constructors to be consistent: 398694
Applied Workarounds: scalarize_vec_and_mat_constructor_args
Mac drivers handle struct scopes incorrectly: 403957
Applied Workarounds: regenerate_struct_names
glGenerateMipmap fails if the zero texture level is not set on some Mac drivers: 560499
Applied Workarounds: set_zero_level_before_generating_mipmap
Pack parameters work incorrectly with pack buffer bound: 563714
Applied Workarounds: pack_parameters_workaround_with_pack_buffer
Alignment works incorrectly with unpack buffer bound: 563714
Applied Workarounds: unpack_alignment_workaround_with_unpack_buffer
copyTexImage2D fails when reading from IOSurface on multiple GPU types.: 581777
Applied Workarounds: use_intermediary_for_copy_texture_image
Mac Drivers store texture level parameters on int16_t that overflow: 610153
Applied Workarounds: use_shadowed_tex_level_params
Limited enabling of Chromium GL_INTEL_framebuffer_CMAA: 535198
Applied Workarounds: disable_framebuffer_cmaa
glGetFragData{Location|Index} works incorrectly on Max: 638340
Applied Workarounds: get_frag_data_info_bug
glTexStorage* are buggy when base mipmap level is not 0: 640506
Applied Workarounds: reset_base_mipmap_level_before_texstorage
Decode and encode before generateMipmap for srgb format textures on macosx: 634519
Applied Workarounds: decode_encode_srgb_for_generatemipmap
Insert statements to reference all members in unused std140/shared blocks on Mac: 618464
Applied Workarounds: use_unused_standard_shared_blocks
adjust src/dst region if blitting pixels outside read framebuffer on Mac: 644740
Applied Workarounds: adjust_src_dst_region_for_blitframebuffer
Mac driver GL 4.1 requires invariant and centroid to match between shaders: 639760, 641129
Applied Workarounds: remove_invariant_and_centroid_for_essl3
Version Information
Data exported   5/8/2017, 12:16:12 AM
Chrome version  Chrome/56.0.2924.87
Operating system    Mac OS X 10.12.4
Software rendering list version 12.06
Driver bug list version 9.24
ANGLE commit id unknown hash
2D graphics backend Skia/56 bf2d9e02d58ea01f1c239f7e2fc024cba140ccb1
Command Line Args   --no-sandbox --allow-file-access-from-files --enable-avfoundation .
Driver Information
Initialization time 103
In-process GPU  false
Sandboxed   false
GPU0    VENDOR = 0x1002, DEVICE= 0x67ef *ACTIVE*
GPU1    VENDOR = 0x8086, DEVICE= 0x191b
Optimus false
AMD switchable  true
Driver vendor   
Driver version  1.50.38
Driver date 
Pixel shader version    4.10
Vertex shader version   4.10
Max. MSAA samples   8
Machine model name  MacBookPro
Machine model version   13.3
GL_VENDOR   ATI Technologies Inc.
GL_RENDERER AMD Radeon Pro 455 OpenGL Engine
GL_VERSION  4.1 ATI-1.50.38
GL_EXTENSIONS   GL_ARB_blend_func_extended GL_ARB_draw_buffers_blend GL_ARB_draw_indirect GL_ARB_ES2_compatibility GL_ARB_explicit_attrib_location GL_ARB_gpu_shader_fp64 GL_ARB_gpu_shader5 GL_ARB_instanced_arrays GL_ARB_internalformat_query GL_ARB_occlusion_query2 GL_ARB_sample_shading GL_ARB_sampler_objects GL_ARB_separate_shader_objects GL_ARB_shader_bit_encoding GL_ARB_shader_subroutine GL_ARB_shading_language_include GL_ARB_tessellation_shader GL_ARB_texture_buffer_object_rgb32 GL_ARB_texture_cube_map_array GL_ARB_texture_gather GL_ARB_texture_query_lod GL_ARB_texture_rgb10_a2ui GL_ARB_texture_storage GL_ARB_texture_swizzle GL_ARB_timer_query GL_ARB_transform_feedback2 GL_ARB_transform_feedback3 GL_ARB_vertex_attrib_64bit GL_ARB_vertex_type_2_10_10_10_rev GL_ARB_viewport_array GL_EXT_debug_label GL_EXT_debug_marker GL_EXT_depth_bounds_test GL_EXT_texture_compression_s3tc GL_EXT_texture_filter_anisotropic GL_EXT_texture_mirror_clamp GL_EXT_texture_sRGB_decode GL_APPLE_client_storage GL_APPLE_container_object_shareable GL_APPLE_flush_render GL_APPLE_object_purgeable GL_APPLE_rgb_422 GL_APPLE_row_bytes GL_APPLE_texture_range GL_ATI_texture_mirror_once GL_NV_texture_barrier
Disabled Extensions 
Window system binding vendor    
Window system binding version   
Window system binding extensions    
Direct rendering    Yes
Reset notification strategy 0x0000
GPU process crash count 0
Compositor Information
Tile Update Mode    Zero-copy
Partial Raster  Enabled
GpuMemoryBuffers Status
ATC Software only
ATCIA   Software only
DXT1    Software only
DXT5    Software only
ETC1    Software only
R_8 GPU_READ_CPU_READ_WRITE, GPU_READ_CPU_READ_WRITE_PERSISTENT
RG_88   Software only
BGR_565 Software only
RGBA_4444   Software only
RGBX_8888   Software only
RGBA_8888   GPU_READ, SCANOUT
BGRX_8888   GPU_READ, SCANOUT
BGRA_8888   GPU_READ, SCANOUT, GPU_READ_CPU_READ_WRITE, GPU_READ_CPU_READ_WRITE_PERSISTENT
YVU_420 Software only
YUV_420_BIPLANAR    GPU_READ_CPU_READ_WRITE, GPU_READ_CPU_READ_WRITE_PERSISTENT
UYVY_422    GPU_READ_CPU_READ_WRITE, GPU_READ_CPU_READ_WRITE_PERSISTENT

I'm not sure the data is different when on my external monitor vs not...

I could reproduce on MBP 2016 with AMD Radeon Pro 460 (4GB) and 5k LG display.

It only occurs with editors split 3 ways, not 2!

I will refer to the 5 scaled resolutions 1 to 5 (from left to right):

2017-05-08_10-53-25

  • no screen issues in 1-3
  • flicker in 4
  • flicker and drop-outs (black areas) in 5

Since it get's more severe with higher resolution, I suspect that it is (graphics) memory related.

The problem disappears with "editor.disableTranslate3d": true

@weinand thanks!

Since we are now able to reproduce, here are a couple of facts around this issue we found so far:

  • introduced with the Electron update
  • more likely to happen on high-DPI, large window scenarios with many pixels drawn
  • less likely to happen with "editor.disableTranslate3d": true
  • more likely to happen in low memory situations on the OS

We think this is an issue with memory allocation of the GPU process, but have not yet found a related Chrome bug around it. We will dig deeper...

Here is a screencast showing how really bad this is:

https://www.dropbox.com/s/4q1x602ojmg2cl4/2017-05-08_12-33-43.mp4?dl=0

@bpasero I also can confirm that the issue does not occur with this build. I'm happy to provide the output of chrome://gpu if the additional data would be helpful, just let me know.

We reported this to Electron (here: https://github.com/electron/electron/issues/9413) and Chrome (here: https://bugs.chromium.org/p/chromium/issues/detail?id=719938).

The workaround for people hitting this is to set: "editor.disableTranslate3d": true in settings. Unfortunately we do not see a fix from our end, it even reproduces with Chrome 58.

Thank you for keeping us updated! For now, what is the best work around? The build you provided? The last version of VSCode?

The workaround for people hitting this is to set: "editor.disableTranslate3d": true in settings. Unfortunately we do not see a fix from our end, it even reproduces with Chrome 58.

I'm having the issue as well on my MacBook Pro (Retina, 13-inch, Late 2012).

screen shot 2017-05-11 at 11 53 53

I just tried to set "editor.disableTranslate3d": true, it seems to do the trick.

Experiencing the same flickering issue on my Surface Book. Most times that I scroll, it causes the screen to flicker and reload. Just did the same thing with editor.disableTranslate3d, and it seemed to work. Just adding this to show it is not a pure mac issue.

arrghh. I did not have this issue for over a week with the new version. Literally 10hrs ago I did not have this issue. My Macbook crashed and after a hard restart this morning I started to experience the flicker.

Just to show you there are likely a lot of variables in play here...

I'm having the same issue on an Acer Chromebook 15 with Intel HD Graphics 5500 and Ubuntu iinstalled. The issue occurs on Google Chrome as well. Is there a way to download older versions of VS Code from official MS repositories? Does anybody know what the last version of VS Code was that didn't have this bug?

I am having a similar issue with 2016 Macbook Pro:
2.6 GHz Intel Core i7
16 GB 2133 MHz LPDDR3
Radeon Pro 450 2048 MB
Intel HD Graphics 530 1536 MB
on a 27-inch (3840 x 2160) monitor with scaling set to (3008 x 1692)

issue with flickering, more frequently with split editor.
The issue is very noticeable when moving the cursor with arrow keys.

Issue is worse with "editor.renderWhitespace": "all"

Currently I am using this config:
{
"workbench.iconTheme": "material-icon-theme",
"workbench.editor.enablePreview": true,
"editor.tabSize": 2,
"editor.insertSpaces": true,
"editor.minimap.enabled": false,
"editor.renderIndentGuides": true,
"workbench.colorTheme": "One Dark Pro",
"editor.renderWhitespace": "none",
"editor.rulers": [
80, 120
],
"git.enabled": true,
"editor.scrollBeyondLastLine": true,
"workbench.welcome.enabled": false,
"window.zoomLevel": 1,
"editor.cursorBlinking": "solid",
"editor.disableTranslate3d": true
}

and have disable automatic graphics switching.

Is there anything else I can do to improve performance?

Unfortunately, setting "editor.disableTranslate3d": true does not get rid of the flickering for me either on the 2016 13" Macbook Pro.

@calvn make sure to really restart VS Code after changing the value of editor.disableTranslate3d. This solved the problem for me on my late 2016 MBP.

@bpasero @weinand I can confirm that "editor.disableTranslate3d": true is not a sufficient fix for me. I don't understand why VSCode can't rollback to a previous version of chrome until this fixed upstream... the app is fairly unusable for me now.

https://cloudup.com/cXKYAbYMF5s

@willium setting editor.disableTranslate3d reduces the chances of hitting it but it can still happen. Another workaround is to set a window.zoomLevel > 0.

As far as I see, Chrome is in the process of fixing this for either version 59 (which would be the next stable release) or 60.

We see a number of improvements in the Chrome version that we are using now that we think justifies to stay on that version. You can always use an older VS Code version until this issue is fixed. E.g. 1.11 can be downloaded from here.

How do I link up a previous version (insiders) to the code CLI tool? I downloaded a previous version using homebrew, but it auto updates to 1.12.1 even after adding "update.channel": "none"
! It's maddening. Shipping broken software sucks.

The zoomLevel fix also does not work. Nor does shifting down in browser resolution. The only thing that works is going to full 4k, and then instead of flickering it lags.

_PLEASE_ revert the chrome version. Perhaps its just me and a complete fluke that none of the fixes work--but I doubt it. What improvements from Chrome possibly justify braking the software completely for common users?

editor.disableTranslate3d doesn't work

everyone on high res displays - Just go back to version 1.11 linked in @bpasero reply above.

I gave up 1.11.2 It's simply not usable. Tried to start using Atom, which is speedy. However didn't feel like searching for all the extensions I need. I may try i again in the near future with more downtime.

This issue occurred after disconnecting external monitors (not retina), on my MBP Retina, 13-inch, Early 2015 with Intel Iris Graphics 6100 1536MB

editor.disableTranslate3d fixed the issue for me.

editor.disableTranslate3d = true also fixed it for me. I had to restart vscode, so remember to do that before panicking :)

@yangwen2 I actually went from Atom to VSCode because of speed issues when handling large files..

Reporting that "editor.disableTranslate3d": true appears to have resolved the flickering issue for me.

Just to add to the potential solutions, disableTranslate3d = true improved it slightly, setting window.zoomLevel to 0.001 has all but got rid of the issue for now.

Also experiencing this in VSCode 1.13.1 on a late-2015 5k iMac (macOS 10.12.5) on all panes, while maximized. Seems to disappear entirely if I disable the minimap, but resumes if (with the minimap disabled) I split the editor pane, or open terminal. Also stops occurring if I shrink the window size a little.

What @joshvickerson said, but on Fedora 25.
Turning off minimap, has minimised flicker to the state that Code is now usable, but interestingly, setting window.zoomLevel to any value other than 0 makes the problem much worse when the minimap is on.
Tested on both Wayland and X.Org with Radeon 7800.

Quitting and reopening usually helps here ¯\_(ツ)_/¯

The "editor.disableTranslate3d": true and "window.zoomLevel": 0 workaround works for me, until I open a file in *diff/changes mode, which triggers the flickering and forces me to restart. Minimap setting does not seem to have any impact on this behavior. You might have some luck by avoiding the diff mode.

*MBP 2016 15" (macOS 10.12.5), with VS Code 1.14.0 maximized on external 5K monitor set to virtual resolution 3200x1800

Workaround: because the issue is related to retina+scaling it seems to be avoidable by avoiding scaling = running the display in either full or half resolution. For a 4k display that means using HD retina mode and using smaller font sizes.

Fix is coming in Chrome 61: https://bugs.chromium.org/p/chromium/issues/detail?id=695427
There is hope that it will happen sooner in Electron: https://github.com/electron/electron/issues/9413

Having this issue on the internal display of my 15inch MBP 2017.
Update: Having the problem only when I have two different types of files open (e.g. PHP left and JS right). With two PHP Documents I do not have this problem.

I also have this issue on external LG 5K with 2013 Mac Pro (both using default scaling and "more space," which I prefer. Plenty of RAM/GPU power/RAM, so I don't think having too little memory is in play, at least for me. However, I can confirm the behavior that (usually) resizing Code to a smaller window size helped. Until today. I recently updated to 10.12.6, so not sure if that somehow impacted it. Anyways, it was bad enough for me to come looking. :)

So far, after setting disableTranslate3d to true and restarting, it seems good. I can even use my full screen again. Yay. Thanks. Looking forward to the fix in any case.

"editor.disableTranslate3d": true was insufficient in my case. On my MBP (Mid 2015, 15-inch retina, 4k external display) I needed to set the external display scaling to "Looks like 3008 x 1692" (3/5) and the internal display scaling to "Looks like 1680 x 1050" (4/5). Each was previously set one level higher (i.e. internal display at 1920 x 1200).

No restart of VS Code was necessary; flickering stopped immediately after changing these settings.

Since the resolution was this high primarily to see lots of code, I'm simply adjusting the zoom level in VS Code to compensate for now.

I tried the provided setting on a 13" MBP, but that didn't stop flickering on the inboard and external displays. I'm running Sierra 10.12.5

I just created a test build of VS Code Insiders with a newer Electron version (1.7.7) which includes a fix from Chrome for the flickering on high DPI monitors. Can people still seeing this issue give this build a try to see if that makes the situation better?

Thanks!

Thanks for the build, @bpasero! I took it for a quick spin and the flicker seems to be gone. It does feel slightly less performant, though -- there's a bit of a lag to scrolling that isn't present in 1.15.1.

Thanks, @bpasero! Opened up a couple large files in split pane, opened the integrated terminal - a situation that causes a lot of flickering for me in 1.15.1. Been poking around for only 5 minutes and there hasn't been any flickering so far, but given the flickering starts right away in the current build, I'm comfortable saying it's gone for me.

I'll also note I'm not experiencing the scroll lag @jlphelps is having.

I was having this issue too, but the insiders build fixes it for me.

For me it's gone with version 1.16.0.

I've updated to 1.16.0 and the issue is still present but does seem to have improved a bit.

According to the bug reported in the chrome project, the issue is scheduled to be released with chrome 61 (which was released a few days ago). VS Code is a few releases behind chrome:
"In this release, we updated from Electron 1.6.6 to 1.7.3. This brings a Chrome update from version 56 to 58 and Node.js from 7.4 to 7.9."

Ok, I just tested Chrome 61 and the issue is still present, so don't expect a fix too soon.

1.16.0 → still have issue
@bpasero 's insider version → fixed issue

on OS X Sierra

The issue is not fixed with 1.16.1 for me @bpasero, but your insider's version does fix it.

Same here, 1.16.1 is not fixed. OSX

I initially reported this as fixed with the disableTranslate3d setting, but that seems hit and miss. So far the only mostly reliable solution is to shrink the window until it stops doing that. Would like to use this full screen, though!

in 1.17 insider, issue occurred again

~Still happening for me on linux as well.~

VSCode: v1.17.0
OS: Linux 4.13.3-1-ARCH x86_64 GNU/Linux

EDIT: Nevermind, I think we might be good. I had an instance of Atom open as well when I closed out and restarted VSCode. I think they might have shared the old Electron process or something. Closed both and reopened VSCode and it went away (as far as I can tell)

Still happening to me on OSX 10.12.6 using VSC 1.17.0.

I tried "editor.disableTranslate3d": true but VSC says it's an unknown setting so I'm doubtful it's being honored.

Seeing terrible flickering with the latest version after opening the terminal. Completely unusable in fullscreen at this point.

@chrisnicola Same for me, a recurring problem.

@oodavid turns out my issue was a corrupt VSCode, which it eventually reported to me. Deleting and re-installing was the solution.

Wouldn't it be related to electron?
I noticed this same problem in both VSCode and Rambox, both made with electron.
Also, I feel like the problem is much stronger when they both are opened at the same time.
By the way, adding editor.disableTranslate3d is marked as "unknown option" for me, but still looks like the problem is solved!

EDIT: Just realized it had already been closed exactly because it was connected to another issue, in electron! :)

Just thought I'd add my 2 cents. I have been using VS Code for over a year on this monitor and this is a new issue for me. "editor.disableTranslate3d": true seems to have fixed it for me, so thank you for that!

Version 1.18.0 (1.18.0)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

omidgolparvar picture omidgolparvar  Â·  3Comments

VitorLuizC picture VitorLuizC  Â·  3Comments

DovydasNavickas picture DovydasNavickas  Â·  3Comments

curtw picture curtw  Â·  3Comments

biij5698 picture biij5698  Â·  3Comments