Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Horrible lag when text boxes are in view on a webpage, only with QtWebEngine backend. #7210

Open
ghost opened this issue May 29, 2022 · 6 comments
Labels
status: can't reproduce Issues which can't be reproduced. status: needs triage Issues/PRs which need some deeper investigation.

Comments

@ghost
Copy link

ghost commented May 29, 2022

Version info:
qutebrowser v2.5.1
Git commit:
Backend: QtWebEngine 5.15.2, based on Chromium 87.0.4280.144
Qt: 5.15.2

Does the bug happen if you start with --temp-basedir?:
Yes. No change in behavior.

Description
Text boxes in any HTML webpage cause massive lag and one CPU core pegged when using the QtWebEngine backend. That includes this text box on github which makes writing this kinda painful.

How to reproduce
Go to any website with a text box, either displaying text or allowing input of text, and do any action like scrolling or inputting text. The browser will lag badly.

System Info(from Neofetch)
OS: Void Linux x86_64
Host: Latitude D620
Kernel: 5.15.41_1
Uptime: 1 hour, 12 mins
Packages: 868 (xbps-query)
Shell: bash 5.1.16
Resolution: 1440x900
WM: i3
Theme: Breeze [GTK2/3]
Icons: oxygen [GTK2/3]
Terminal: xterm
CPU: Intel Core 2 T7200 (2) @ 2.000GHz
GPU: Intel Mobile 945GM/GMS, 943/940GML Express
Memory: 604MiB / 3231MiB

Other info
This lag with text boxes did not happen on the old installation of Debian 11 on this same hardware. That was using whatever Qutebrowser version comes from the Debian 11 repos.

Please let me know what other details I need to share and I'll share them.

Video demonstration
http://lloydlynx.ddns.net/share/QtWebEngine.webm
http://lloydlynx.ddns.net/share/QtWebKit.webm
Page used: https://qutebrowser.org/FAQ.html

@The-Compiler
Copy link
Member

Can you try with another browser using Qt 5 and QtWebEngine, such as KDE Falkon?

@The-Compiler The-Compiler added status: can't reproduce Issues which can't be reproduced. status: needs triage Issues/PRs which need some deeper investigation. labels May 29, 2022
@ghost
Copy link
Author

ghost commented May 29, 2022

I went to https://qutebrowser.org/FAQ.html with Falkon and didn't get any abnormal lag. I noticed though that very large amounts of text in text boxes does lag the browser, such as some pages on stackoverflow. So the issues exists on Falkon, but not as badly.

Falkon version 22.04.1
QtWebEngine version 5.15.2

@The-Compiler
Copy link
Member

Which process is it that pegs the CPU - the main qutebrowser process (python3) or a QtWebEngineProcess?

I'm confused - you talk about text boxes, but then use the FAQ page to demonstrate? I'm guessing the issue happens on both then?

What does chrome://gpu say? Could you perhaps also give the qt6-v2 branch a try? See #7202.

@ghost
Copy link
Author

ghost commented Jun 1, 2022

Which process is it that pegs the CPU - the main qutebrowser process (python3) or a QtWebEngineProcess?

In htop, "/usr/bin/python3 /usr/bin/qutebrowser" is what's pinning the CPU.

I'm confused - you talk about text boxes, but then use the FAQ page to demonstrate? I'm guessing the issue happens on both then?

Yea, I don't know what to call them. It happens to both text input boxes (like replying on github) and text displaying boxes (like on the FAQ page).

What does chrome://gpu say?

Graphics Feature Status

  • Canvas: Hardware accelerated
  • Compositing: Hardware accelerated
  • Multiple Raster Threads: Disabled
  • Out-of-process Rasterization: Disabled
  • OpenGL: Enabled
  • Hardware Protected Video Decode: Unavailable
  • Rasterization: Software only. Hardware acceleration disabled
  • Skia Renderer: Disabled
  • Video Decode: Software only. Hardware acceleration disabled
  • Vulkan: Disabled
  • WebGL: Hardware accelerated
  • WebGL2: Hardware accelerated

Driver Bug Workarounds

  • clear_uniforms_before_first_program_use
  • count_all_in_varyings_packing
  • decode_encode_srgb_for_generatemipmap
  • disable_post_sub_buffers_for_onscreen_surfaces
  • exit_on_context_lost
  • rely_on_implicit_sync_for_swap_buffers
  • scalarize_vec_and_mat_constructor_args
  • disabled_extension_GL_KHR_blend_equation_advanced
  • disabled_extension_GL_KHR_blend_equation_advanced_coherent
  • disabled_extension_GL_MESA_framebuffer_flip_y

Problems Detected

  • Protected video decoding with swap chain is for certain Intel and AMD GPUs on Windows: 1093625
    Disabled Features: protected_video_decode
  • Clear uniforms before first program use on all platforms: 124764, 349137
    Applied Workarounds: clear_uniforms_before_first_program_use
  • Mesa drivers in Linux handle varyings without static use incorrectly: 333885
    Applied Workarounds: count_all_in_varyings_packing
  • Disable partial swaps on Mesa drivers (detected with GL_RENDERER): 339493
    Applied Workarounds: disable_post_sub_buffers_for_onscreen_surfaces
  • Always rewrite vec/mat constructors to be consistent: 398694
    Applied Workarounds: scalarize_vec_and_mat_constructor_args
  • Disable partial swaps on Mesa drivers (detected with GL_VERSION): 339493
    Applied Workarounds: disable_post_sub_buffers_for_onscreen_surfaces
  • Decode and encode before generateMipmap for srgb format textures on os except macosx: 634519
    Applied Workarounds: decode_encode_srgb_for_generatemipmap
  • Disable KHR_blend_equation_advanced until cc shaders are updated: 661715
    Applied Workarounds: disable(GL_KHR_blend_equation_advanced), disable(GL_KHR_blend_equation_advanced_coherent)
  • Some drivers can't recover after OUT_OF_MEM and context lost: 893177
    Applied Workarounds: exit_on_context_lost
  • Avoid waiting on a egl fence before swapping buffers and rely on implicit sync on Intel GPUs: 938286
    Applied Workarounds: rely_on_implicit_sync_for_swap_buffers
  • Disable GL_MESA_framebuffer_flip_y for desktop GL: 964010
    Applied Workarounds: disable(GL_MESA_framebuffer_flip_y)
  • Accelerated video decode has been disabled, either via blocklist, about:flags or the command line.
    Disabled Features: video_decode
  • Raster is using a single thread.
    Disabled Features: multiple_raster_threads

Version Information

Data exported 2022-06-01T21:06:47.097Z
Chrome version qutebrowser/2.5.1
Operating system Linux 5.15.41_1
Software rendering list URL https://chromium.googlesource.com/chromium/src/+/38a74c624ca48a6acb2a6f427998be599b504eed/gpu/config/software_rendering_list.json
Driver bug list URL https://chromium.googlesource.com/chromium/src/+/38a74c624ca48a6acb2a6f427998be599b504eed/gpu/config/gpu_driver_bug_list.json
ANGLE commit id unknown hash
2D graphics backend Skia/87 73c703c2bdbde9a7602bc017f08376bfb4c79f33
Command Line /usr/bin/qutebrowser --enable-features=WebRTCPipeWireCapturer,ReducedReferrerGranularity --disable-features=InstalledApp --browser-subprocess-path=/usr/lib/qt5/libexec/QtWebEngineProcess --application-name=qutebrowser --disable-setuid-sandbox --enable-threaded-compositing --disable-speech-api --enable-features=AllowContentInitiatedDataUrlNavigations,NetworkServiceInProcess,TracingServiceInProcess,WebRTCPipeWireCapturer,ReducedReferrerGranularity --disable-features=MojoVideoCapture,FontSrcLocalMatching,UseSkiaRenderer,DnsOverHttpsUpgrade,ConsolidatedMovementXY,InstalledApp,BackgroundFetch,SmsReceiver,WebPayments,WebUSB,PictureInPicture,InstalledApp --use-gl=desktop --in-process-gpu --gpu-preferences=OAAAAAAAAAAoAAAQAAAAAAAAAAAAAAAAAABgAAAAAAAYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAAAAAAAA== --use-gl=desktop
Graphics Feature Status Canvas: Hardware accelerated Compositing: Hardware accelerated Multiple Raster Threads: Disabled Out-of-process Rasterization: Disabled OpenGL: Enabled Hardware Protected Video Decode: Unavailable Rasterization: Software only. Hardware acceleration disabled Skia Renderer: Disabled Video Decode: Software only. Hardware acceleration disabled Vulkan: Disabled WebGL: Hardware accelerated WebGL2: Hardware accelerated Driver Bug Workarounds clear_uniforms_before_first_program_use count_all_in_varyings_packing decode_encode_srgb_for_generatemipmap disable_post_sub_buffers_for_onscreen_surfaces exit_on_context_lost rely_on_implicit_sync_for_swap_buffers scalarize_vec_and_mat_constructor_args disabled_extension_GL_KHR_blend_equation_advanced disabled_extension_GL_KHR_blend_equation_advanced_coherent disabled_extension_GL_MESA_framebuffer_flip_y Problems Detected Protected video decoding with swap chain is for certain Intel and AMD GPUs on Windows: [1093625](http://crbug.com/1093625) Disabled Features: protected_video_decode Clear uniforms before first program use on all platforms: [124764](http://crbug.com/124764), [349137](http://crbug.com/349137) Applied Workarounds: clear_uniforms_before_first_program_use Mesa drivers in Linux handle varyings without static use incorrectly: [333885](http://crbug.com/333885) Applied Workarounds: count_all_in_varyings_packing Disable partial swaps on Mesa drivers (detected with GL_RENDERER): [339493](http://crbug.com/339493) Applied Workarounds: disable_post_sub_buffers_for_onscreen_surfaces Always rewrite vec/mat constructors to be consistent: [398694](http://crbug.com/398694) Applied Workarounds: scalarize_vec_and_mat_constructor_args Disable partial swaps on Mesa drivers (detected with GL_VERSION): [339493](http://crbug.com/339493) Applied Workarounds: disable_post_sub_buffers_for_onscreen_surfaces Decode and encode before generateMipmap for srgb format textures on os except macosx: [634519](http://crbug.com/634519) Applied Workarounds: decode_encode_srgb_for_generatemipmap Disable KHR_blend_equation_advanced until cc shaders are updated: [661715](http://crbug.com/661715) Applied Workarounds: disable(GL_KHR_blend_equation_advanced), disable(GL_KHR_blend_equation_advanced_coherent) Some drivers can't recover after OUT_OF_MEM and context lost: [893177](http://crbug.com/893177) Applied Workarounds: exit_on_context_lost Avoid waiting on a egl fence before swapping buffers and rely on implicit sync on Intel GPUs: [938286](http://crbug.com/938286) Applied Workarounds: rely_on_implicit_sync_for_swap_buffers Disable GL_MESA_framebuffer_flip_y for desktop GL: [964010](http://crbug.com/964010) Applied Workarounds: disable(GL_MESA_framebuffer_flip_y) Accelerated video decode has been disabled, either via blocklist, about:flags or the command line. Disabled Features: video_decode Raster is using a single thread. Disabled Features: multiple_raster_threads Version Information Data exported 2022-06-01T21:06:47.097Z Chrome version qutebrowser/2.5.1 Operating system Linux 5.15.41_1 Software rendering list URL https://chromium.googlesource.com/chromium/src/+/38a74c624ca48a6acb2a6f427998be599b504eed/gpu/config/software_rendering_list.json Driver bug list URL https://chromium.googlesource.com/chromium/src/+/38a74c624ca48a6acb2a6f427998be599b504eed/gpu/config/gpu_driver_bug_list.json ANGLE commit id unknown hash 2D graphics backend Skia/87 73c703c2bdbde9a7602bc017f08376bfb4c79f33 Command Line /usr/bin/qutebrowser --enable-features=WebRTCPipeWireCapturer,ReducedReferrerGranularity --disable-features=InstalledApp --browser-subprocess-path=/usr/lib/qt5/libexec/QtWebEngineProcess --application-name=qutebrowser --disable-setuid-sandbox --enable-threaded-compositing --disable-speech-api --enable-features=AllowContentInitiatedDataUrlNavigations,NetworkServiceInProcess,TracingServiceInProcess,WebRTCPipeWireCapturer,ReducedReferrerGranularity --disable-features=MojoVideoCapture,FontSrcLocalMatching,UseSkiaRenderer,DnsOverHttpsUpgrade,ConsolidatedMovementXY,InstalledApp,BackgroundFetch,SmsReceiver,WebPayments,WebUSB,PictureInPicture,InstalledApp --use-gl=desktop --in-process-gpu --gpu-preferences=OAAAAAAAAAAoAAAQAAAAAAAAAAAAAAAAAABgAAAAAAAYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAAAAAAAA== --use-gl=desktop Driver Information Initialization time 0 In-process GPU true Passthrough Command Decoder false Sandboxed false GPU0 VENDOR= 0x0000 [Intel Open Source Technology Center], DEVICE=0x0000 [Mesa DRI Intel(R) 945GM ] *ACTIVE* Optimus false AMD switchable false Driver vendor Mesa Driver version 21.3.7 GPU CUDA compute capability major version 0 Pixel shader version 1.20 Vertex shader version 1.20 Max. MSAA samples 0 Machine model name Machine model version GL_VENDOR Intel Open Source Technology Center GL_RENDERER Mesa DRI Intel(R) 945GM GL_VERSION 2.1 Mesa 21.3.7 GL_EXTENSIONS GL_ARB_multisample GL_EXT_abgr GL_EXT_bgra GL_EXT_blend_color GL_EXT_blend_minmax GL_EXT_blend_subtract GL_EXT_copy_texture GL_EXT_subtexture GL_EXT_texture_object GL_EXT_vertex_array GL_EXT_compiled_vertex_array GL_EXT_texture GL_EXT_texture3D GL_IBM_rasterpos_clip GL_ARB_point_parameters GL_EXT_draw_range_elements GL_EXT_packed_pixels GL_EXT_point_parameters GL_EXT_rescale_normal GL_EXT_separate_specular_color GL_EXT_texture_edge_clamp GL_SGIS_generate_mipmap GL_SGIS_texture_border_clamp GL_SGIS_texture_edge_clamp GL_SGIS_texture_lod GL_ARB_multitexture GL_IBM_multimode_draw_arrays GL_IBM_texture_mirrored_repeat GL_3DFX_texture_compression_FXT1 GL_ARB_texture_cube_map GL_ARB_texture_env_add GL_ARB_transpose_matrix GL_EXT_blend_func_separate GL_EXT_fog_coord GL_EXT_multi_draw_arrays GL_EXT_secondary_color GL_EXT_texture_env_add GL_EXT_texture_filter_anisotropic GL_EXT_texture_lod_bias GL_INGR_blend_func_separate GL_NV_blend_square GL_NV_light_max_exponent GL_NV_texgen_reflection GL_NV_texture_env_combine4 GL_S3_s3tc GL_SUN_multi_draw_arrays GL_ARB_texture_border_clamp GL_ARB_texture_compression GL_EXT_framebuffer_object GL_EXT_texture_compression_s3tc GL_EXT_texture_env_combine GL_EXT_texture_env_dot3 GL_MESA_window_pos GL_NV_packed_depth_stencil GL_NV_texture_rectangle GL_ARB_depth_texture GL_ARB_occlusion_query GL_ARB_shadow GL_ARB_texture_env_combine GL_ARB_texture_env_crossbar GL_ARB_texture_env_dot3 GL_ARB_texture_mirrored_repeat GL_ARB_window_pos GL_EXT_stencil_two_side GL_EXT_texture_cube_map GL_APPLE_packed_pixels GL_ARB_draw_buffers GL_ARB_fragment_program GL_ARB_fragment_shader GL_ARB_shader_objects GL_ARB_vertex_program GL_ARB_vertex_shader GL_ATI_draw_buffers GL_ATI_texture_env_combine3 GL_EXT_shadow_funcs GL_EXT_stencil_wrap GL_MESA_pack_invert GL_MESA_ycbcr_texture GL_ARB_half_float_pixel GL_ARB_point_sprite GL_ARB_shading_language_100 GL_ARB_sync GL_ARB_texture_non_power_of_two GL_ARB_vertex_buffer_object GL_ATI_blend_equation_separate GL_EXT_blend_equation_separate GL_OES_read_format GL_ARB_pixel_buffer_object GL_ARB_texture_rectangle GL_EXT_pixel_buffer_object GL_EXT_texture_compression_dxt1 GL_EXT_texture_rectangle GL_EXT_texture_sRGB GL_ARB_framebuffer_object GL_EXT_framebuffer_blit GL_EXT_packed_depth_stencil GL_APPLE_object_purgeable GL_ARB_vertex_array_object GL_ATI_separate_stencil GL_EXT_gpu_program_parameters GL_EXT_texture_sRGB_decode GL_OES_EGL_image GL_ARB_copy_buffer GL_ARB_map_buffer_range GL_ARB_ES2_compatibility GL_ARB_debug_output GL_ARB_draw_elements_base_vertex GL_ARB_explicit_attrib_location GL_ARB_provoking_vertex GL_ARB_sampler_objects GL_EXT_provoking_vertex GL_ARB_get_program_binary GL_ARB_robustness GL_ARB_separate_shader_objects GL_EXT_direct_state_access GL_ANGLE_texture_compression_dxt3 GL_ANGLE_texture_compression_dxt5 GL_ARB_compressed_texture_pixel_storage GL_ARB_internalformat_query GL_ARB_map_buffer_alignment GL_ARB_texture_storage GL_AMD_shader_trinary_minmax GL_ARB_clear_buffer_object GL_ARB_explicit_uniform_location GL_ARB_invalidate_subdata GL_ARB_program_interface_query GL_ARB_vertex_attrib_binding GL_KHR_debug GL_ARB_multi_bind GL_ARB_shading_language_include GL_ARB_get_texture_sub_image GL_KHR_context_flush_control GL_ARB_parallel_shader_compile GL_KHR_no_error GL_KHR_parallel_shader_compile GL_EXT_EGL_sync Disabled Extensions GL_KHR_blend_equation_advanced GL_KHR_blend_equation_advanced_coherent GL_MESA_framebuffer_flip_y Disabled WebGL Extensions Window system binding vendor SGI Window system binding version 1.4 Window system binding extensions GLX_ARB_create_context GLX_ARB_create_context_no_error GLX_ARB_create_context_profile GLX_ARB_fbconfig_float GLX_ARB_framebuffer_sRGB GLX_ARB_get_proc_address GLX_ARB_multisample GLX_EXT_create_context_es2_profile GLX_EXT_create_context_es_profile GLX_EXT_fbconfig_packed_float GLX_EXT_framebuffer_sRGB GLX_EXT_no_config_context GLX_EXT_swap_control GLX_EXT_texture_from_pixmap GLX_EXT_visual_info GLX_EXT_visual_rating GLX_INTEL_swap_event GLX_MESA_copy_sub_buffer GLX_MESA_query_renderer GLX_MESA_swap_control GLX_OML_swap_method GLX_OML_sync_control GLX_SGIS_multisample GLX_SGIX_fbconfig GLX_SGIX_pbuffer GLX_SGIX_visual_select_group GLX_SGI_make_current_read GLX_SGI_swap_control GLX_SGI_video_sync Direct rendering version DRI3 Reset notification strategy 0x8261 GPU process crash count 0 gfx::BufferFormats supported for allocation and texturing R_8: not supported, R_16: not supported, RG_88: not supported, BGR_565: not supported, RGBA_4444: not supported, RGBX_8888: not supported, RGBA_8888: not supported, BGRX_8888: not supported, BGRA_1010102: not supported, RGBA_1010102: not supported, BGRA_8888: not supported, RGBA_F16: not supported, YVU_420: not supported, YUV_420_BIPLANAR: not supported, P010: not supported Compositor Information Tile Update Mode One-copy Partial Raster Enabled GpuMemoryBuffers Status R_8 Software only R_16 Software only RG_88 Software only BGR_565 Software only RGBA_4444 Software only RGBX_8888 Software only RGBA_8888 Software only BGRX_8888 Software only BGRA_1010102 Software only RGBA_1010102 Software only BGRA_8888 Software only RGBA_F16 Software only YVU_420 Software only YUV_420_BIPLANAR Software only P010 Software only Display(s) Information Info Display[0] bounds=[0,0 1440x900], workarea=[0,0 1440x900], scale=1, rotation=0, panel_rotation=0 external. Color space (all) {primaries:BT709, transfer:IEC61966_2_1, matrix:RGB, range:FULL} Buffer format (all) RGBA_8888 SDR white level in nits 100 Bits per color component 8 Bits per pixel 24 Refresh Rate in Hz 61 Video Acceleration Information Vulkan Information Device Performance Information

Could you perhaps also give the qt6-v2 branch a try?

The text display boxes on the FAQ page and text input boxes on github no longer lag qutebrowser with qt6-v2 being used. But now the github homepage runs at seconds per frame(basically unusable).

I have a bit of explaining to do
I initially made this report because I thought it was totally bizarre that text boxes would make the browser lag so badly. Other things also make it lag badly, but I thought it was just my crappy hardware chugging on video decoding and JS. I'm starting to think these issues may be related, so I'm reporting it now:

Linustechtips.com freezes for ~3 seconds after loading a page, then returns to normal. Text input boxes don't lag there. "comment extention" windows in the Status Updates section lag the browser to be unusable.

On normal reddit.com, some pages lag the browser really bad. My workaround is to use old.reddit.com.

Some HTML5 videos lag the browser, as well as some imbedded content like reddit and twitter imbeds. I've not discovered what qualities of a video make the browser lag. Videos don't play when using qt6-v2. It is worth trying to fix (probably codecs) to test if it causes lag or not?

@ghost
Copy link
Author

ghost commented Jun 5, 2022

I've made a discovery of a workaround. Setting qt.force_software_rendering to chromium has vastly improved the lag issue. Lag still happens, but it's almost always usable now, feeling like stuttering between 5-10 fps. I know that still sounds horrible, but at least affected web content is well usable now.

The only pain point where the browser hits seconds per frame is on reddit when you click on a post and don't have it set to open in a new tab. That's not a big deal because you can just open the post in a new tab or use old.reddit.com.

I will comment on this issue if I find anymore websites that make the browser unusabley laggy.

qt-quick and software-opengl seem to help reduce lag too, with software-opengl having a noticable performance hit across the board regardless of how heavy the web content is. Setting it to chromium is perferable in my opinion because I think qt-quick and software-opengl would affect other backends(not tested because I'm just happy I got it working).

@Malex
Copy link

Malex commented Jun 29, 2022

I've made a discovery of a workaround. Setting qt.force_software_rendering to chromium has vastly improved the lag issue. Lag still happens, but it's almost always usable now, feeling like stuttering between 5-10 fps. I know that still sounds horrible, but at least affected web content is well usable now.

The only pain point where the browser hits seconds per frame is on reddit when you click on a post and don't have it set to open in a new tab. That's not a big deal because you can just open the post in a new tab or use old.reddit.com.

I will comment on this issue if I find anymore websites that make the browser unusabley laggy.

qt-quick and software-opengl seem to help reduce lag too, with software-opengl having a noticable performance hit across the board regardless of how heavy the web content is. Setting it to chromium is perferable in my opinion because I think qt-quick and software-opengl would affect other backends(not tested because I'm just happy I got it working).

This helped me quite a lot too.
My issue might also be that using a VM I dont have hardware accelleration support. Thank you
Still typing in any box is very laggy, but at least pages load in a decent time and they dont freeze when I scroll

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: can't reproduce Issues which can't be reproduced. status: needs triage Issues/PRs which need some deeper investigation.
Projects
None yet
Development

No branches or pull requests

2 participants