Closed Bug 1545927 Opened 4 years ago Closed 3 years ago

[wayland] scrolling is janky

Categories

(Core :: Graphics, defect, P3)

defect

Tracking

()

RESOLVED DUPLICATE of bug 1542808

People

(Reporter: oigevald+mozilla, Unassigned)

References

(Blocks 1 open bug, Regression)

Details

(Keywords: regression)

User Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/73.0.3683.86 Chrome/73.0.3683.86 Safari/537.36

Steps to reproduce:

Open about:support then press and hold the 'down' button in order to scroll the page.

Firefox nightly build was downloaded and extracted to ~/Downloads/firefox
Firefox was started by opening a terminal then typing

GDK_BACKEND=wayland ~/Downloads/firefox/firefox & disown

I confirmed that Firefox is indeed running under Wayland rather than XWayland.

Firefox Build ID 20190420095532
Ubuntu 18.04 Gnome Shell Wayland Session
GPU Mesa DRI Intel(R) HD Graphics 530 (Skylake GT2)
Monitor resolution 1920x1080

OpenGL compositing is force-enabled by using layers.acceleration.force_enable = true
WebRender is Off. No other settings have been modified, no extensions are enabled.

Actual results:

Page scrolling stutters every now and then.

Expected results:

Scrolling should have been smooth.

When running the exact same firefox build under 'XWayland', i.e. without the 'GDK_BACKEND=wayland' prefix, scrolling is almost perfectly smooth.

If I remember correctly the issue started appearing about a week ago.

When I wrote "press and hold the 'down' button" I meant the 'down' key on the keyboard.

Blocks: wayland

Could be Mutter performance issue or Mesa 18.3 issue. Can you check with Mutter 3.32 and Mesa 19.0? (Both is available in Ubutu 29..)

Correction: Both is available in Ubuntu 19.04.

For me on Ubuntu 19.04 with this test case, the smoothest combination by far is Wayland + WebRender. Other compositors (Basic, OpenGL) are quite janky but Wayland is still smoother than XWayland across the board.

The thing is that scrolling used to be much smoother on Ubuntu 18.04 until about a couple of weeks ago. I'll check on 19.04 once I have some time to install that version of Ubuntu natively.

(In reply to ame from comment #5)

scrolling used to be much smoother on Ubuntu 18.04 until about a couple of weeks ago.

Try running a Nightly build from a few weeks ago and see if it is still smooth. If so, you can find which bug caused it between then and now by running mozregression.

Can you try wayland with layers.acceleration.force_enable set to false? Thanks.

Flags: needinfo?(amehaye)

Hi Martin, already did, it's much worse when hw acceleration is disabled. However I used the 'mozregression' tool as suggested by Kestrel and I think that it identified the problem.

The command that I used is:

GDK_BACKEND=wayland $HOME/.local/bin/mozregression -p ~/.mozilla/firefox/8ofeq7f8.SmoothScrollRegression --repo=mozilla-central '--good=2019-03-15 13:51:05' --bad=2019-04-25

The profile used here ('8ofeq7f8.SmoothScrollRegression') is a new profile that I created using the latest 'Firefox Nightly' downloaded from Mozilla. The only thing I changed in that profile is setting layers.acceleration.force_enable to true.

Here are the results:

14:06.06 INFO: Running autoland build built on 2019-04-09 13:42:10.257000, revision 468689f3
14:17.88 INFO: Launching /tmp/tmpWtGUHB/firefox/firefox
14:17.88 INFO: Application command: /tmp/tmpWtGUHB/firefox/firefox --allow-downgrade -profile /tmp/tmpVX17Gx
14:17.89 INFO: application_buildid: 20190409121523
14:17.89 INFO: application_changeset: 468689f35a67bf324c486999775bb58f7c78ea1f
14:17.89 INFO: application_name: Firefox
14:17.89 INFO: application_repository: https://hg.mozilla.org/integration/autoland
14:17.89 INFO: application_version: 68.0a1
Was this inbound build good, bad, or broken? (type 'good', 'bad', 'skip', 'retry', 'back' or 'exit' and press Enter): good
14:53.35 INFO: Narrowed inbound regression window from [87ac760f, 7a2b3a8f] (3 builds) to [468689f3, 7a2b3a8f] (2 builds) (~1 steps left)
14:53.35 INFO: No more inbound revisions, bisection finished.
14:53.35 INFO: Last good revision: 468689f35a67bf324c486999775bb58f7c78ea1f
14:53.35 INFO: First bad revision: 7a2b3a8fab9c308673dc571ff97717424647d0f9
14:53.35 INFO: Pushlog:
https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=468689f35a67bf324c486999775bb58f7c78ea1f&tochange=7a2b3a8fab9c308673dc571ff97717424647d0f9

Flags: needinfo?(amehaye)

(In reply to ame from comment #8)

Hi Martin, already did, it's much worse when hw acceleration is disabled.

Interesting. Can you post content of about:support page? Thanks.

Priority: -- → P3

Application Basics

Name: Firefox
Version: 68.0a1
Build ID: 20190425094625
Update Channel: nightly
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Firefox/68.0
OS: Linux 4.15.0-48-generic
Multiprocess Windows: 1/1 Enabled by default
Remote Processes: 3
Enterprise Policies: Inactive
Google Location Service Key: Found
Google Safebrowsing Key: Found
Mozilla Location Service Key: Found
Safe Mode: false

Crash Reports for the Last 3 Days

Nightly Features

Name: Firefox Monitor
Version: 3.0
ID: fxmonitor@mozilla.org

Name: Firefox Screenshots
Version: 37.1.0
ID: screenshots@mozilla.org

Name: Form Autofill
Version: 1.0
ID: formautofill@mozilla.org

Name: Web Compat
Version: 4.2.0
ID: webcompat@mozilla.org

Name: WebCompat Reporter
Version: 1.1.0
ID: webcompat-reporter@mozilla.org

Remote Processes

Type: Web Content
Count: 1 / 8

Type: Privileged Content
Count: 1

Type: Extension
Count: 1

Extensions

Name: Amazon.com
Version: 1.0
Enabled: true
ID: amazondotcom@search.mozilla.org

Name: Bing
Version: 1.0
Enabled: true
ID: bing@search.mozilla.org

Name: DuckDuckGo
Version: 1.0
Enabled: true
ID: ddg@search.mozilla.org

Name: eBay
Version: 1.0
Enabled: true
ID: ebay@search.mozilla.org

Name: Google
Version: 1.0
Enabled: true
ID: google@search.mozilla.org

Name: Twitter
Version: 1.0
Enabled: true
ID: twitter@search.mozilla.org

Name: Wikipedia (en)
Version: 1.0
Enabled: true
ID: wikipedia@search.mozilla.org

Graphics

Features
Compositing: OpenGL
Asynchronous Pan/Zoom: wheel input enabled; scrollbar drag enabled; keyboard enabled; autoscroll enabled
WebGL 1 Driver WSI Info: EGL_VENDOR: Mesa Project EGL_VERSION: 1.4 (DRI2) EGL_EXTENSIONS: EGL_ANDROID_blob_cache EGL_ANDROID_native_fence_sync EGL_EXT_buffer_age EGL_EXT_create_context_robustness EGL_EXT_image_dma_buf_import EGL_EXT_image_dma_buf_import_modifiers EGL_EXT_swap_buffers_with_damage EGL_IMG_context_priority EGL_KHR_config_attribs EGL_KHR_create_context EGL_KHR_create_context_no_error EGL_KHR_fence_sync EGL_KHR_get_all_proc_addresses EGL_KHR_gl_colorspace EGL_KHR_gl_renderbuffer_image EGL_KHR_gl_texture_2D_image EGL_KHR_gl_texture_3D_image EGL_KHR_gl_texture_cubemap_image EGL_KHR_image_base EGL_KHR_no_config_context EGL_KHR_reusable_sync EGL_KHR_surfaceless_context EGL_KHR_swap_buffers_with_damage EGL_EXT_pixel_format_float EGL_KHR_wait_sync EGL_MESA_configless_context EGL_MESA_drm_image EGL_MESA_image_dma_buf_export EGL_WL_bind_wayland_display EGL_WL_create_wayland_buffer_from_image EGL_EXTENSIONS(nullptr): EGL_EXT_platform_base EGL_KHR_client_get_all_proc_addresses EGL_EXT_client_extensions EGL_KHR_debug EGL_EXT_platform_wayland EGL_EXT_platform_x11 EGL_MESA_platform_gbm EGL_MESA_platform_surfaceless
WebGL 1 Driver Renderer: Intel Open Source Technology Center -- Mesa DRI Intel(R) HD Graphics 530 (Skylake GT2)
WebGL 1 Driver Version: OpenGL ES 3.2 Mesa 18.2.8
WebGL 1 Driver Extensions: GL_EXT_blend_minmax GL_EXT_multi_draw_arrays GL_EXT_texture_filter_anisotropic GL_EXT_occlusion_query_boolean GL_EXT_texture_compression_dxt1 GL_EXT_texture_format_BGRA8888 GL_OES_compressed_ETC1_RGB8_texture GL_OES_depth24 GL_OES_element_index_uint GL_OES_fbo_render_mipmap GL_OES_mapbuffer GL_OES_rgb8_rgba8 GL_OES_standard_derivatives GL_OES_stencil8 GL_OES_texture_3D GL_OES_texture_float GL_OES_texture_float_linear GL_OES_texture_half_float GL_OES_texture_half_float_linear GL_OES_texture_npot GL_OES_vertex_half_float GL_EXT_texture_sRGB_decode GL_OES_EGL_image GL_OES_depth_texture GL_OES_packed_depth_stencil GL_EXT_texture_type_2_10_10_10_REV GL_OES_get_program_binary GL_APPLE_texture_max_level GL_EXT_discard_framebuffer GL_EXT_read_format_bgra GL_EXT_frag_depth GL_NV_fbo_color_attachments GL_OES_EGL_image_external GL_OES_EGL_sync GL_OES_vertex_array_object GL_OES_viewport_array GL_ANGLE_texture_compression_dxt3 GL_ANGLE_texture_compression_dxt5 GL_EXT_robustness GL_EXT_texture_rg GL_EXT_unpack_subimage GL_NV_draw_buffers GL_NV_read_buffer GL_NV_read_depth GL_NV_read_depth_stencil GL_NV_read_stencil GL_EXT_draw_buffers GL_EXT_map_buffer_range GL_KHR_debug GL_KHR_robustness GL_KHR_texture_compression_astc_ldr GL_OES_depth_texture_cube_map GL_OES_required_internalformat GL_OES_surfaceless_context GL_EXT_color_buffer_float GL_EXT_separate_shader_objects GL_EXT_shader_framebuffer_fetch GL_EXT_shader_integer_mix GL_EXT_tessellation_point_size GL_EXT_tessellation_shader GL_INTEL_conservative_rasterization GL_INTEL_performance_query GL_ANDROID_extension_pack_es31a GL_EXT_base_instance GL_EXT_compressed_ETC1_RGB8_sub_texture GL_EXT_copy_image GL_EXT_draw_buffers_indexed GL_EXT_draw_elements_base_vertex GL_EXT_gpu_shader5 GL_EXT_polygon_offset_clamp GL_EXT_primitive_bounding_box GL_EXT_shader_io_blocks GL_EXT_texture_border_clamp GL_EXT_texture_buffer GL_EXT_texture_cube_map_array GL_EXT_texture_norm16 GL_KHR_blend_equation_advanced GL_KHR_blend_equation_advanced_coherent GL_KHR_context_flush_control GL_KHR_robust_buffer_access_behavior GL_NV_image_formats GL_OES_copy_image GL_OES_draw_buffers_indexed GL_OES_draw_elements_base_vertex GL_OES_gpu_shader5 GL_OES_primitive_bounding_box GL_OES_sample_shading GL_OES_sample_variables GL_OES_shader_io_blocks GL_OES_shader_multisample_interpolation GL_OES_tessellation_point_size GL_OES_tessellation_shader GL_OES_texture_border_clamp GL_OES_texture_buffer GL_OES_texture_cube_map_array GL_OES_texture_stencil8 GL_OES_texture_storage_multisample_2d_array GL_OES_texture_view GL_EXT_blend_func_extended GL_EXT_buffer_storage GL_EXT_geometry_point_size GL_EXT_geometry_shader GL_EXT_shader_samples_identical GL_KHR_no_error GL_KHR_texture_compression_astc_sliced_3d GL_OES_EGL_image_external_essl3 GL_OES_geometry_point_size GL_OES_geometry_shader GL_OES_shader_image_atomic GL_EXT_clip_cull_distance GL_EXT_disjoint_timer_query GL_MESA_shader_integer_functions GL_EXT_shader_framebuffer_fetch_non_coherent GL_MESA_framebuffer_flip_y
WebGL 1 Extensions: ANGLE_instanced_arrays EXT_blend_minmax EXT_color_buffer_half_float EXT_disjoint_timer_query EXT_sRGB EXT_texture_filter_anisotropic OES_element_index_uint OES_standard_derivatives OES_texture_float OES_texture_float_linear OES_texture_half_float OES_texture_half_float_linear OES_vertex_array_object WEBGL_color_buffer_float WEBGL_compressed_texture_astc WEBGL_compressed_texture_etc WEBGL_compressed_texture_etc1 WEBGL_compressed_texture_s3tc WEBGL_debug_renderer_info WEBGL_debug_shaders WEBGL_depth_texture WEBGL_lose_context
WebGL 2 Driver WSI Info: EGL_VENDOR: Mesa Project EGL_VERSION: 1.4 (DRI2) EGL_EXTENSIONS: EGL_ANDROID_blob_cache EGL_ANDROID_native_fence_sync EGL_EXT_buffer_age EGL_EXT_create_context_robustness EGL_EXT_image_dma_buf_import EGL_EXT_image_dma_buf_import_modifiers EGL_EXT_swap_buffers_with_damage EGL_IMG_context_priority EGL_KHR_config_attribs EGL_KHR_create_context EGL_KHR_create_context_no_error EGL_KHR_fence_sync EGL_KHR_get_all_proc_addresses EGL_KHR_gl_colorspace EGL_KHR_gl_renderbuffer_image EGL_KHR_gl_texture_2D_image EGL_KHR_gl_texture_3D_image EGL_KHR_gl_texture_cubemap_image EGL_KHR_image_base EGL_KHR_no_config_context EGL_KHR_reusable_sync EGL_KHR_surfaceless_context EGL_KHR_swap_buffers_with_damage EGL_EXT_pixel_format_float EGL_KHR_wait_sync EGL_MESA_configless_context EGL_MESA_drm_image EGL_MESA_image_dma_buf_export EGL_WL_bind_wayland_display EGL_WL_create_wayland_buffer_from_image EGL_EXTENSIONS(nullptr): EGL_EXT_platform_base EGL_KHR_client_get_all_proc_addresses EGL_EXT_client_extensions EGL_KHR_debug EGL_EXT_platform_wayland EGL_EXT_platform_x11 EGL_MESA_platform_gbm EGL_MESA_platform_surfaceless
WebGL 2 Driver Renderer: Intel Open Source Technology Center -- Mesa DRI Intel(R) HD Graphics 530 (Skylake GT2)
WebGL 2 Driver Version: OpenGL ES 3.2 Mesa 18.2.8
WebGL 2 Driver Extensions: GL_EXT_blend_minmax GL_EXT_multi_draw_arrays GL_EXT_texture_filter_anisotropic GL_EXT_occlusion_query_boolean GL_EXT_texture_compression_dxt1 GL_EXT_texture_format_BGRA8888 GL_OES_compressed_ETC1_RGB8_texture GL_OES_depth24 GL_OES_element_index_uint GL_OES_fbo_render_mipmap GL_OES_mapbuffer GL_OES_rgb8_rgba8 GL_OES_standard_derivatives GL_OES_stencil8 GL_OES_texture_3D GL_OES_texture_float GL_OES_texture_float_linear GL_OES_texture_half_float GL_OES_texture_half_float_linear GL_OES_texture_npot GL_OES_vertex_half_float GL_EXT_texture_sRGB_decode GL_OES_EGL_image GL_OES_depth_texture GL_OES_packed_depth_stencil GL_EXT_texture_type_2_10_10_10_REV GL_OES_get_program_binary GL_APPLE_texture_max_level GL_EXT_discard_framebuffer GL_EXT_read_format_bgra GL_EXT_frag_depth GL_NV_fbo_color_attachments GL_OES_EGL_image_external GL_OES_EGL_sync GL_OES_vertex_array_object GL_OES_viewport_array GL_ANGLE_texture_compression_dxt3 GL_ANGLE_texture_compression_dxt5 GL_EXT_robustness GL_EXT_texture_rg GL_EXT_unpack_subimage GL_NV_draw_buffers GL_NV_read_buffer GL_NV_read_depth GL_NV_read_depth_stencil GL_NV_read_stencil GL_EXT_draw_buffers GL_EXT_map_buffer_range GL_KHR_debug GL_KHR_robustness GL_KHR_texture_compression_astc_ldr GL_OES_depth_texture_cube_map GL_OES_required_internalformat GL_OES_surfaceless_context GL_EXT_color_buffer_float GL_EXT_separate_shader_objects GL_EXT_shader_framebuffer_fetch GL_EXT_shader_integer_mix GL_EXT_tessellation_point_size GL_EXT_tessellation_shader GL_INTEL_conservative_rasterization GL_INTEL_performance_query GL_ANDROID_extension_pack_es31a GL_EXT_base_instance GL_EXT_compressed_ETC1_RGB8_sub_texture GL_EXT_copy_image GL_EXT_draw_buffers_indexed GL_EXT_draw_elements_base_vertex GL_EXT_gpu_shader5 GL_EXT_polygon_offset_clamp GL_EXT_primitive_bounding_box GL_EXT_shader_io_blocks GL_EXT_texture_border_clamp GL_EXT_texture_buffer GL_EXT_texture_cube_map_array GL_EXT_texture_norm16 GL_KHR_blend_equation_advanced GL_KHR_blend_equation_advanced_coherent GL_KHR_context_flush_control GL_KHR_robust_buffer_access_behavior GL_NV_image_formats GL_OES_copy_image GL_OES_draw_buffers_indexed GL_OES_draw_elements_base_vertex GL_OES_gpu_shader5 GL_OES_primitive_bounding_box GL_OES_sample_shading GL_OES_sample_variables GL_OES_shader_io_blocks GL_OES_shader_multisample_interpolation GL_OES_tessellation_point_size GL_OES_tessellation_shader GL_OES_texture_border_clamp GL_OES_texture_buffer GL_OES_texture_cube_map_array GL_OES_texture_stencil8 GL_OES_texture_storage_multisample_2d_array GL_OES_texture_view GL_EXT_blend_func_extended GL_EXT_buffer_storage GL_EXT_geometry_point_size GL_EXT_geometry_shader GL_EXT_shader_samples_identical GL_KHR_no_error GL_KHR_texture_compression_astc_sliced_3d GL_OES_EGL_image_external_essl3 GL_OES_geometry_point_size GL_OES_geometry_shader GL_OES_shader_image_atomic GL_EXT_clip_cull_distance GL_EXT_disjoint_timer_query GL_MESA_shader_integer_functions GL_EXT_shader_framebuffer_fetch_non_coherent GL_MESA_framebuffer_flip_y
WebGL 2 Extensions: EXT_color_buffer_float EXT_disjoint_timer_query EXT_texture_filter_anisotropic OES_texture_float_linear WEBGL_compressed_texture_astc WEBGL_compressed_texture_etc WEBGL_compressed_texture_etc1 WEBGL_compressed_texture_s3tc WEBGL_debug_renderer_info WEBGL_debug_shaders WEBGL_lose_context
Off Main Thread Painting Enabled: true
Off Main Thread Painting Worker Count: 4
Target Frame Rate: 60
GPU #1
Active: Yes
Description: Mesa DRI Intel(R) HD Graphics 530 (Skylake GT2)
Vendor ID: mesa/unknown
Device ID: 0x1912
Driver Version: 18.2.8.0
RAM: 3072MB

Diagnostics
AzureCanvasBackend: skia
AzureContentBackend: skia
AzureFallbackCanvasBackend: none
CairoUseXRender: 0
Device Reset: Trigger Device Reset
Decision Log
HW_COMPOSITING:
force_enabled by user: Force-enabled by pref
blocked by env: Acceleration blocked by platform
OPENGL_COMPOSITING:
force_enabled by user: Force-enabled by pref
WEBRENDER:
opt-in by default: WebRender is an opt-in feature
WEBRENDER_QUALIFIED:
blocked by env: Unsupported vendor

Media

Audio Backend: remote
Max Channels: 2
Preferred Sample Rate: 48000
Output Devices
Name: Group
Built-in Audio Analog Stereo: /devices/pci0000:00/0000:00:1f.3/sound/card0
Input Devices
Name: Group
Monitor of Built-in Audio Analog Stereo: /devices/pci0000:00/0000:00:1f.3/sound/card0
Built-in Audio Analog Stereo: /devices/pci0000:00/0000:00:1f.3/sound/card0

Important Modified Preferences

browser.cache.disk.capacity: 1048576
browser.cache.disk.filesystem_reported: 1
browser.sessionstore.upgradeBackup.latestBuildID: 20190425094625
browser.startup.homepage_override.buildID: 20190425094625
browser.startup.homepage_override.mstone: 68.0a1
browser.urlbar.placeholderName: Google
browser.urlbar.timesBeforeHidingSuggestionsHint: 0
dom.forms.autocomplete.formautofill: true
dom.push.userAgentID: 650d462f91e84cdaa6ff9e8c89996eb2
extensions.lastAppVersion: 68.0a1
layers.acceleration.force-enabled: true
media.gmp-gmpopenh264.abi: x86_64-gcc3
media.gmp-gmpopenh264.lastUpdate: 1556194556
media.gmp-gmpopenh264.version: 1.8.1
media.gmp-manager.buildID: 20190425094625
media.gmp-manager.lastCheck: 1556201367
media.gmp.storage.version.observed: 1
network.predictor.cleaned-up: true
places.history.expiration.transient_current_max_pages: 112348
plugin.disable_full_page_plugin_for_types: application/pdf
privacy.sanitize.pending: [{"id":"newtab-container","itemsToClear":[],"options":{}}]
security.remote_settings.intermediates.checked: 1556201764
security.sandbox.content.tempDirSuffix: f31072bf-52c1-4eaf-a46d-b60ed57c7889
security.sandbox.plugin.tempDirSuffix: e5bb0714-869b-4971-a463-a9d63c40b74d
services.sync.engine.addresses.available: true
signon.importedFromSqlite: true

Important Locked Preferences

Places Database

JavaScript

Incremental GC: true

Accessibility

Activated: false
Prevent Accessibility: 0

Library Versions

NSPR
Expected minimum version: 4.21
Version in use: 4.21

NSS
Expected minimum version: 3.44 Beta
Version in use: 3.44 Beta

NSSSMIME
Expected minimum version: 3.44 Beta
Version in use: 3.44 Beta

NSSSSL
Expected minimum version: 3.44 Beta
Version in use: 3.44 Beta

NSSUTIL
Expected minimum version: 3.44 Beta
Version in use: 3.44 Beta

Sandbox

Seccomp-BPF (System Call Filtering): true
Seccomp Thread Synchronization: true
User Namespaces: true
Content Process Sandboxing: true
Media Plugin Sandboxing: true
Content Process Sandbox Level: 4
Effective Content Process Sandbox Level: 4

Rejected System Calls

Internationalization & Localization

Application Settings
Requested Locales: ["en-US"]
Available Locales: ["en-US"]
App Locales: ["en-US"]
Regional Preferences: ["en-IL"]
Default Locale: "en-US"
Operating System
System Locales: ["en-US"]
Regional Preferences: ["en-IL"]

With WebRender enabled the issue is almost gone.

When scrolling with a '2-finger' gesture* it still feels a bit smoother and more responsive on an old build (e.g. 20190315135105) compared to the latest build (20190425220817), both having WebRender enabled. However the difference is very nuanced and might just be my imagination.

  • I'm using a first generation Apple external 'magic' trackpad.

I tested the build before the regression with the following command on Ubuntu 19.04 and scrolling is definitely less janky than the next build.

env GDK_BACKEND=wayland mozregression --pref layers.acceleration.force-enabled:true --repo autoland --launch 468689f35a67bf324c486999775bb58f7c78ea1f
Status: UNCONFIRMED → NEW
Has Regression Range: --- → yes
Has STR: --- → yes
Component: Untriaged → Graphics
Ever confirmed: true
Product: Firefox → Core

Hmm, not my imagination. I tested again, and even with WebRender enabled on both versions, the older versions is smoother and less janky. However with WebRender the difference is much more subtle.

Yes, I understand you.

I wonder if the SW rendering is equally janky when you scroll a page full of text (a BZ page for instance) and page full of pictures? (like https://www.google.com/search?q=cats&source=lnms&tbm=isch&sa=X&ved=0ahUKEwjZ1pyiuu7hAhUFqXEKHdo2C2IQ_AUIDigB&biw=1920&bih=946)

Flags: needinfo?(amehaye)

(In reply to Martin Stránský [:stransky] from comment #14)

Yes, I understand you.

I wonder if the SW rendering is equally janky when you scroll a page full of text (a BZ page for instance) and page full of pictures? (like https://www.google.com/search?q=cats&source=lnms&tbm=isch&sa=X&ved=0ahUKEwjZ1pyiuu7hAhUFqXEKHdo2C2IQ_AUIDigB&biw=1920&bih=946)

Yay cats!

I guess that when you say 'SW rendering' you simply mean with WebRender disabled. Well it's equally janky, the contents don't appear to matter. I do enable HW compositing with layers.acceleration.force-enabled set to 'true' otherwise it's even worse.

I did the initial test on the 'about:support' page since it's basically a wall of text. Since then I tested various web sites (news, blogs etc) and they all seem to be equally janky in the newer Firefox builds and more-or-less smooth in the old build. The same goes for the cat images page.

I also tested on a newer version of Mesa (19.0.1-3~b~padoka0, from the 'Padoka' ppa for Ubuntu) and the symptoms are the same. I should be able to have access to an AMD GPU, I'll try to see if it behaves differently - so far I did all these tests on an Intel GPU.

Flags: needinfo?(amehaye)

I tested the issue on an AMD GPU, both on an 1080p and on 4k displays.
The symptoms are exactly the same all across the board.

I tested with all (sensible) combinations of WebRender enabled/disabled and layers.acceleration.force-enabled true/false for both Firefox Builds. The behavior of each specific settings is exactly the same as the behavior of the same settings under an Intel GPU.

Here are what I think are the relevant parts from the 'about:support' page, when WebRender was disabled but HW compositing was enabled:

Compositing	OpenGL
Asynchronous Pan/Zoom	wheel input enabled; scrollbar drag enabled; keyboard enabled; autoscroll enabled

EGL_VENDOR: Mesa Project
EGL_VERSION: 1.5 (DRI2)

WebGL 1 Driver Renderer	X.Org -- Radeon RX 560 Series (POLARIS11, DRM 3.23.0, 4.15.0-47-generic, LLVM 7.0.0)
WebGL 1 Driver Version	OpenGL ES 3.2 Mesa 18.2.8

Off Main Thread Painting Enabled true
Target Frame Rate 60

GPU #1
Active	Yes
Description	Radeon RX 560 Series (POLARIS11, DRM 3.23.0, 4.15.0-47-generic, LLVM 7.0.0)
Vendor ID	mesa/unknown
Device ID	0x67ff
Driver Version	18.2.8.0
RAM	2048MB

HW_COMPOSITING force_enabled by user: Force-enabled by pref
OPENGL_COMPOSITING force_enabled by user: Force-enabled by pref

Important Modified Preferences
layers.acceleration.force-enabled true

Maybe bug 1542808 is relevant here.

It implements a proper "vsync" source for wayland (although only for the parent process for now). Before the change that caused this regression, we'd refresh/composite on a psuedo-vsync, with buffer swap implicitly waiting for next "vsync" (frame callback). The change removed the implicit wait (it blocked code not meant to be blocked), while bug 1542808 implements an explicit wait.

Could you try testing the patch from there and see if makes a difference? I can't reproduce scroll jank on about:support myself.

(In reply to Kenny Levinsen :kennylevinsen from comment #17)

Maybe bug 1542808 is relevant here.

It implements a proper "vsync" source for wayland (although only for the parent process for now). Before the change that caused this regression, we'd refresh/composite on a psuedo-vsync, with buffer swap implicitly waiting for next "vsync" (frame callback). The change removed the implicit wait (it blocked code not meant to be blocked), while bug 1542808 implements an explicit wait.

Could you try testing the patch from there and see if makes a difference? I can't reproduce scroll jank on about:support myself.

Do you happen to have a pre-built binary? Rumor is that Firefox is relatively hard to build from source. I won't have time to setup a build environment before the weekend at the earliest.

Also, I'm not acquainted with patch-tracking on Bugzilla. The latest patch that you posted is marked as 'obsolete', so which patch do you mean?

(In reply to Kenny Levinsen :kennylevinsen from comment #17)

Could you try testing the patch from there and see if makes a difference?

Ask for a try run of your patch and it will produce build artifacts which others can test.

The product::component has been changed since the priority was decided, so we're resetting it.
For more information, please visit auto_nag documentation.

Priority: P3 → --

The latest patch that you posted is marked as 'obsolete', so which patch do you mean?

It's the phabricator review link, not the directly attached (and now obsolete) patch. Direct link.

Ask for a try run of your patch and it will produce build artifacts which others can test.

For those that wish to try, Linux x64 shippable pgo build.

There is also a now accepted wayland dispatch change (Bug 1467127) which should improve event dispatch timing for compositor/render threads.

(to clarify, Bug 1467127 is not part of the linked build.)

(In reply to Kenny Levinsen :kennylevinsen from comment #21)

For those that wish to try, Linux x64 shippable pgo build.

Unfortunately this build turned the small janks into multiple-seconds-long unresponsive waits for me on Ubuntu 19.04 with Wayland backend and AMD.

Hmm. It's based on whatever was in central when the patch was written. Maybe there were some regressions in there.

I'll make a version later that is just the regressing patch + wayland vsync, just to ensure that we're dealing with this specific change alone. Maybe also the wayland dispatch, for extra wayland goodness.

Quick question: What's the screen refresh rates for those perceiving this issue? 60Hz, 144Hz, ...?

(In reply to Kenny Levinsen :kennylevinsen from comment #24)

Hmm. It's based on whatever was in central when the patch was written. Maybe there were some regressions in there.

I'll make a version later that is just the regressing patch + wayland vsync, just to ensure that we're dealing with this specific change alone. Maybe also the wayland dispatch, for extra wayland goodness.

Quick question: What's the screen refresh rates for those perceiving this issue? 60Hz, 144Hz, ...?

On the machines that I checked it was always about 60Hz.

(In reply to Kenny Levinsen :kennylevinsen from comment #24)

Hmm. It's based on whatever was in central when the patch was written. Maybe there were some regressions in there.

I'll make a version later that is just the regressing patch + wayland vsync, just to ensure that we're dealing with this specific change alone. Maybe also the wayland dispatch, for extra wayland goodness.

Quick question: What's the screen refresh rates for those perceiving this issue? 60Hz, 144Hz, ...?

Ok I ran the build and it actually seems to have solved the problem on my Intel machine.

(In reply to Kestrel from comment #23)

(In reply to Kenny Levinsen :kennylevinsen from comment #21)

For those that wish to try, Linux x64 shippable pgo build.

Unfortunately this build turned the small janks into multiple-seconds-long unresponsive waits for me on Ubuntu 19.04 with Wayland backend and AMD.

Did you disable automatic updates? When I test old builds I disable the network before running the old build for the first time, then disable automatic updates before re-enabling the network connection. Otherwise Firefox will automatically update to the latest nightly. I guess that a simpler way to achieve that would be to simply set app.update.auto to false on the command line.

Please check the Build ID in about:support - it should be 20190315135105 in the custom build.

(In reply to Yariv from comment #26)

Please check the Build ID in about:support - it should be 20190315135105 in the custom build.

That build is from March, the test build is 20190430095023. It uses nightly-try update channel so it should not update.

I encountered a similar problem with the next central build which has gone away in the latest build so it seems unrelated.

60Hz here.

(In reply to Kestrel from comment #27)

(In reply to Yariv from comment #26)

Please check the Build ID in about:support - it should be 20190315135105 in the custom build.

That build is from March, the test build is 20190430095023. It uses nightly-try update channel so it should not update.

I encountered a similar problem with the next central build which has gone away in the latest build so it seems unrelated.

60Hz here.

You are right, my bad. I ran the old build by mistake.

However running the correct build (20190430095023) the results are still the same.
Scrolling is smooth and relatively jank-free on all compositing types ('Basic', 'OpenGL' and 'WebRender'). The 'OpenGL' compositing (layers.acceleration.force_enable = true, gfx.webrender.all = false) appears to be the smoothest.

This is on an Intel GPU, Ubuntu 18.04 Gnome Shell Wayland session, using the 'padoka stable ppa' so Mesa is at version 19.0.1.
My screen resolution is 1920x1080@60Hz

Intel Open Source Technology Center -- Mesa DRI Intel(R) HD Graphics 530 (Skylake GT2)
OpenGL ES 3.2 Mesa 19.0.1 - padoka PPA

I did notice that the test build (20190430095023) sometimes causes a lot of disk activity, and then it is relatively unresponsive and causes a lot of jank.

It also has a weird artifact on startup where the window is transparent until redrawn by switching to it or going to the Gnome Shell overview. However the 'official' nightly has a similar artifact on startup only instead of being transparent it's just rendered with transparent window decorations and at an offset, until redrawn.

It's not directly related but can you try SW compositor and set layers.use-image-offscreen-surfaces to true? It disables double buffering on Wayland which is actually correct as we do double buffering internally in Wayland compositor widget. Thanks.

Flags: needinfo?(amehaye)

(In reply to Martin Stránský [:stransky] from comment #30)

try SW compositor and set layers.use-image-offscreen-surfaces to true

No noticeable difference for me.

(In reply to Martin Stránský [:stransky] from comment #30)

It's not directly related but can you try SW compositor and set layers.use-image-offscreen-surfaces to true? It disables double buffering on Wayland which is actually correct as we do double buffering internally in Wayland compositor widget. Thanks.

(In reply to Kestrel from comment #31)

(In reply to Martin Stránský [:stransky] from comment #30)

try SW compositor and set layers.use-image-offscreen-surfaces to true

No noticeable difference for me.

Same here (no noticeable difference).

Flags: needinfo?(amehaye)

(In reply to Yariv from comment #28)

(In reply to Kestrel from comment #27)

(In reply to Yariv from comment #26)

Please check the Build ID in about:support - it should be 20190315135105 in the custom build.

That build is from March, the test build is 20190430095023. It uses nightly-try update channel so it should not update.

I encountered a similar problem with the next central build which has gone away in the latest build so it seems unrelated.

60Hz here.

You are right, my bad. I ran the old build by mistake.

However running the correct build (20190430095023) the results are still the same.
Scrolling is smooth and relatively jank-free on all compositing types ('Basic', 'OpenGL' and 'WebRender'). The 'OpenGL' compositing (layers.acceleration.force_enable = true, gfx.webrender.all = false) appears to be the smoothest.

This is on an Intel GPU, Ubuntu 18.04 Gnome Shell Wayland session, using the 'padoka stable ppa' so Mesa is at version 19.0.1.
My screen resolution is 1920x1080@60Hz

Intel Open Source Technology Center -- Mesa DRI Intel(R) HD Graphics 530 (Skylake GT2)
OpenGL ES 3.2 Mesa 19.0.1 - padoka PPA

Just to clarify, when I said that the results are still the same I meant that it's the same as the old build. In other words, the problem actually seems to be resolved in the custom build.

On the latest nightly (20190502095227) 'Basic' compositing is very janky, 'OpenGL' compositing is somewhat janky and 'WebRender' compositing is relatively smooth.
On the custom build (20190430095023) all compositing types are smooth on my machine.

The priority flag is not set for this bug.
:jbonisteel, could you have a look please?

For more information, please visit auto_nag documentation.

Flags: needinfo?(jbonisteel)
Flags: needinfo?(jbonisteel)
Priority: -- → P3

I can confirm scrolling on webrender and wayland is smoother in FF67 than on FF69 nightly.

I stumbled upon a similar problem on fresh Debian 10 install (so Firefox ESR with fresh profile with Nouveau drivers). When I use a page with a lot of text like this one on default smaller window it can be scrolled quite smoothly (but I think it's still inferior to Windows' performance) yet when I maximise the window the difference can be spotted immediately as scrolling becomes woefully uncomfortable.

This issue is as prevalent only when I use GNOME3 on Wayland which I compared to the one using X and KDE.

I can confirm that this problem exists on Firefox 67.0.4 with the same setup.

Now that bug 1542808 has landed, this issue is mostly gone. There is still the occasional jank, but this is probably due to other reasons. For example, the number of jank frames is much higher on the current version of GNOME Shell (3.34.1) than on Sway - when using Sway there are almost no jank frame.

Closing the issue now since it's resolved.

Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.