Invisible background windows not throttled like background tabs
Reported by
twotwo...@gmail.com,
Mar 21 2017
|
||||||
Issue descriptionUserAgent: Mozilla/5.0 (X11; CrOS aarch64 9000.91.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.110 Safari/537.36 Platform: 9000.91.0 (Official Build) stable-channel kevin Example URL: http://giphy.com/ Steps to reproduce the problem: 1. Open giphy.com 2. Open a maximized window so Giphy isn't visible What is the expected behavior? Pages in invisible background windows consume little CPU, like pages in minimized windows or background tabs. What went wrong? The background window kept using 100% CPU. Did this work before? N/A Is it a problem with Flash or HTML5? HTML5 Does this work in other browsers? N/A Chrome version: 56.0.2924.110 Channel: n/a OS Version: 9000.91.0 Flash Version: Shockwave Flash 24.0 r0 Contents of chrome://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: Disabled Native GpuMemoryBuffers: Software only. Hardware acceleration disabled Panel Fitting: Unavailable Rasterization: Software only. Hardware acceleration disabled Video Decode: Hardware accelerated Video Encode: Hardware accelerated VPx Video Decode: Hardware accelerated WebGL: Hardware accelerated WebGL2: Hardware accelerated Driver Bug Workarounds clear_uniforms_before_first_program_use disable_discard_framebuffer disable_framebuffer_cmaa disable_post_sub_buffers_for_onscreen_surfaces scalarize_vec_and_mat_constructor_args use_virtualized_gl_contexts Problems Detected Chrome OS panel fitting is only supported for Intel IVB and SNB Graphics Controllers Disabled Features: panel_fitting The Mali-Txxx driver does not guarantee flush ordering: 154715, 10068, 269829, 294779, 285292 Applied Workarounds: use_virtualized_gl_contexts Framebuffer discarding causes jumpy scrolling on Mali drivers: 301988 Applied Workarounds: disable_discard_framebuffer Clear uniforms before first program use on all platforms: 124764, 349137 Applied Workarounds: clear_uniforms_before_first_program_use Always rewrite vec/mat constructors to be consistent: 398694 Applied Workarounds: scalarize_vec_and_mat_constructor_args The Mali-Txxx driver hangs when reading from currently displayed buffer: 457511 Applied Workarounds: disable_post_sub_buffers_for_onscreen_surfaces Limited enabling of Chromium GL_INTEL_framebuffer_CMAA: 535198 Applied Workarounds: disable_framebuffer_cmaa Accelerated rasterization has been disabled, either via blacklist, about:flags or the command line. Disabled Features: rasterization Raster is using a single thread. Disabled Features: multiple_raster_threads Native GpuMemoryBuffers have been disabled, either via about:flags or command line. Disabled Features: native_gpu_memory_buffers Version Information Data exported 20/3/2017 16:47:34 Chrome version Chrome/56.0.2924.110 Operating system Linux 4.4.21-06459-ge91c124 Software rendering list version 12.06 Driver bug list version 9.24 ANGLE commit id a4aaa2de57dc 2D graphics backend Skia/56 0 Command Line Args --ppapi-flash-path=/opt/google/chrome/pepper/libpepflashplayer.so --ppapi-flash-version=24.0.0.221 --ui-prioritize-in-gpu-process --use-gl=egl --gpu-sandbox-failures-fatal=yes --gpu-sandbox-start-early --arc-available --enable-arc --enable-features=PointerEvent,QuickUnlockPin --passive-listeners-default=true --enable-logging --log-level=1 --use-cras --enable-wayland-server --user-data-dir=/home/chronos --max-unused-resource-memory-usage-percentage=5 --system-developer-mode --ash-enable-palette --num-raster-threads=1 --enable-hardware-overlays=single-fullscreen --login-profile=user --has-chromeos-keyboard --enable-touchview --ash-enable-power-button-quick-lock --enable-centered-app-list --default-wallpaper-large=/usr/share/chromeos-assets/wallpaper/oem_large.jpg --default-wallpaper-small=/usr/share/chromeos-assets/wallpaper/oem_small.jpg --default-wallpaper-is-oem --guest-wallpaper-large=/usr/share/chromeos-assets/wallpaper/guest_large.jpg --guest-wallpaper-small=/usr/share/chromeos-assets/wallpaper/guest_small.jpg --enable-prefixed-encrypted-media --enable-consumer-kiosk --enterprise-enrollment-initial-modulus=15 --enterprise-enrollment-modulus-limit=19 --vmodule=screen_locker=2,webui_screen_locker=2,lock_state_controller=2,webui_login_view=2,power_button_observer=2,*ui/display/chromeos*=1,*ash/display*=1,*ui/ozone*=1,*zygote*=1,*plugin*=2,auto_enrollment_controller=1,*chromeos/login/*=1,*arc/*=1 --login-manager --policy-switches-begin --enable-features=AsmJsToWebAssembly,WebAssembly --policy-switches-end --first-exec-after-boot Driver Information Initialization time 57 In-process GPU false Sandboxed true GPU0 VENDOR = 0x0000, DEVICE= 0x0000 Optimus false AMD switchable false Driver vendor ES Driver version 3.1 Driver date Pixel shader version 3.10 Vertex shader version 3.10 Max. MSAA samples 4 Machine model name Machine model version GL_VENDOR ARM GL_RENDERER Mali-T860 GL_VERSION OpenGL ES 3.1 v1.r8p0-03dev0.b446ab6e29b3b8363132b321c0864899 GL_EXTENSIONS GL_ARM_rgba8 GL_ARM_mali_shader_binary GL_OES_depth24 GL_OES_depth_texture GL_OES_depth_texture_cube_map GL_OES_packed_depth_stencil GL_OES_rgb8_rgba8 GL_EXT_read_format_bgra GL_OES_compressed_paletted_texture GL_OES_compressed_ETC1_RGB8_texture GL_OES_standard_derivatives GL_OES_EGL_image GL_OES_EGL_image_external GL_OES_EGL_sync GL_OES_texture_npot GL_OES_vertex_half_float GL_OES_required_internalformat GL_OES_vertex_array_object GL_OES_mapbuffer GL_EXT_texture_format_BGRA8888 GL_EXT_texture_rg GL_EXT_texture_type_2_10_10_10_REV GL_OES_fbo_render_mipmap GL_OES_element_index_uint GL_EXT_shadow_samplers GL_OES_texture_compression_astc GL_KHR_texture_compression_astc_ldr GL_KHR_texture_compression_astc_hdr GL_KHR_debug GL_EXT_occlusion_query_boolean GL_EXT_disjoint_timer_query GL_EXT_blend_minmax GL_EXT_discard_framebuffer GL_OES_get_program_binary GL_OES_texture_3D GL_EXT_texture_storage GL_EXT_multisampled_render_to_texture GL_OES_surfaceless_context GL_OES_texture_stencil8 GL_EXT_shader_pixel_local_storage GL_ARM_shader_framebuffer_fetch GL_ARM_shader_framebuffer_fetch_depth_stencil GL_ARM_mali_program_binary GL_EXT_sRGB GL_EXT_sRGB_write_control GL_EXT_texture_sRGB_decode GL_KHR_blend_equation_advanced GL_KHR_blend_equation_advanced_coherent GL_OES_texture_storage_multisample_2d_array GL_OES_shader_image_atomic GL_EXT_robustness GL_EXT_draw_buffers_indexed GL_OES_draw_buffers_indexed GL_EXT_texture_border_clamp GL_OES_texture_border_clamp GL_EXT_texture_cube_map_array GL_OES_texture_cube_map_array GL_OES_sample_variables GL_OES_sample_shading GL_OES_shader_multisample_interpolation GL_EXT_shader_io_blocks GL_OES_shader_io_blocks GL_EXT_tessellation_shader GL_OES_tessellation_shader GL_EXT_primitive_bounding_box GL_OES_primitive_bounding_box GL_EXT_geometry_shader GL_OES_geometry_shader GL_ANDROID_extension_pack_es31a GL_EXT_gpu_shader5 GL_OES_gpu_shader5 GL_EXT_texture_buffer GL_OES_texture_buffer GL_EXT_copy_image GL_OES_copy_image GL_EXT_color_buffer_half_float GL_EXT_color_buffer_float Disabled Extensions Window system binding vendor ARM Window system binding version 1.4 Midgard-"r8p0-03dev0" Window system binding extensions EGL_KHR_partial_update EGL_EXT_swap_buffers_with_damage EGL_KHR_swap_buffers_with_damage EGL_EXT_image_dma_buf_import EGL_EXT_image_dma_buf_import_modifiers EGL_KHR_image_pixmap EGL_KHR_config_attribs EGL_KHR_image EGL_KHR_image_base EGL_KHR_fence_sync EGL_KHR_wait_sync EGL_KHR_gl_colorspace EGL_KHR_get_all_proc_addresses EGL_IMG_context_priority EGL_ARM_pixmap_multisample_discard EGL_ARM_implicit_external_sync EGL_KHR_gl_texture_2D_image EGL_KHR_gl_renderbuffer_image EGL_KHR_create_context EGL_KHR_surfaceless_context EGL_KHR_gl_texture_cubemap_image EGL_EXT_create_context_robustness Direct rendering Yes Reset notification strategy 0x8252 GPU process crash count 0 Compositor Information Tile Update Mode One-copy Partial Raster Enabled GpuMemoryBuffers Status ATC Software only ATCIA Software only DXT1 Software only DXT5 Software only ETC1 Software only R_8 Software only RG_88 Software only BGR_565 GPU_READ RGBA_4444 Software only RGBX_8888 GPU_READ, SCANOUT RGBA_8888 GPU_READ BGRX_8888 GPU_READ, SCANOUT BGRA_8888 GPU_READ YVU_420 GPU_READ YUV_420_BIPLANAR Software only UYVY_422 Software only Log Messages [1740:1779:0317/001316.888485:VERBOSE1:drm_device_manager.cc(54)] : Could not initialize DRM device for /sys/devices/platform/vgem/drm/card0 [1740:1779:0317/001317.386565:VERBOSE1:drm_util.cc(357)] : Failed to get EDID blob for connector 32 [snip--monorail complains comment too long otherwise] I noticed my Chromebook was losing battery quickly then charging slowly, checked Task Manager and saw two pages in invisible background windows (nytimes and Slack with a GIF showing) using high CPU. Seemed to charge faster once I dealt with them. Maybe some window systems won't tell Chrome what it needs to know to throttle these tabs, but ChromeOS's own system could at least in theory.
,
Apr 10 2017
The bug I'm trying to report isn't anything about the CPU use of showing gifs per se, but rather that the CPU/battery impact of a background window that's completely obscured and not playing audio can be much higher than that of a background tab or a minimized window. I'm guessing this is because the throttling code isn't "told" that those windows are, from the user's perspective, more or less like background tabs, inactive and invisible. Since throttling is something the Chrome binary (not the kernel) does I suspect this is not OS > Kernel > Video. It might be more more like bug 639852 , the main bug on throttling, so the category might be Blink > Scheduling. (If Chrome OS's window system does not give the scheduling code any way to know whether a background window is visible or not, any fix might also involve the windowing system, but I don't know anything about that.)
,
Apr 11 2017
,
Aug 7 2017
Can't repro this on OS X/Linux, will grab a chromebook and try again.
,
Aug 7 2017
Still seeing >100% CPU for a background window showing the Giphy homepage on a Kevin running Chrome 59, for what it's worth.
,
Aug 17 2017
I see this on Caroline too
,
Sep 25 2017
Sorry for the delay — I wasn't able to reproduce this with chromebooks available to me. Is this problem still reproducible?
,
Sep 25 2017
Hmm, yes. I happened to powerwash this Chromebook yesterday, so this occurs on a fresh machine in the stable channel. In case I described it badly, Giphy is the focused tab in the background window here, but that *window* is covered up by another. I could imagine showing the GIFs just not requiring 100% CPU on faster Chromebooks, for whatever that's worth.
,
Sep 25 2017
fdoray is working on this I believe.
,
Oct 14 2017
I see this behavior on other sites as well, such as Amazon. If the Chrome tab is the visible tab, but the window itself is not visible, the tab can still consume lots of CPU. To save battery, it might be good if the tab was throttled, as it would be if the tab was not the active tab.
,
Oct 27 2017
,
Oct 27 2017
Clicking 738837 I see "You do not have permission to view the requested page." The largest category of issues I expect to be non-public are security issues, and this doesn't look like one. (Maybe it could be if you think of it in terms of a background window being able to DoS the browser?) Just to confirm, is it both correct that this is part of 738837, and correct that (for whatever reason, security or otherwise) 738837 isn't currently public?
,
Jan 11 2018
Is this bug going to be fixed? I see it was merged into another bug that I have no visibility to.
,
Feb 13 2018
While looking into a different issue (this time an instance where my code was unexpectedly throttled!) I realized this looks a lot like bug 668690, "Throttle occluded tabs the same way as background tabs.", which fdoray, who marked this a dupe, is actively working on. So the answer to "Is this bug going to be fixed?" appears to be yes, and it seems likely the issue is just that this was dupe-merged into the wrong issue ID.
,
Feb 13 2018
#14, thanks for the update. A workaround for this issue is to minimize (Alt-Minus is the keyboard shortcut) windows that you want to throttle.
,
Feb 14 2018
I'm actively working on handling occluded tabs exactly the same way as non-active tabs. The work is being tracked in bug 668690. |
||||||
►
Sign in to add a comment |
||||||
Comment 1 by yini...@chromium.org
, Apr 7 2017