Closed Bug 1549630 Opened 5 years ago Closed 5 years ago

Intel Webrender usage causes video tearing and bad responsiveness

Categories

(Core :: Graphics: WebRender, defect, P3)

x86_64
Linux
defect

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: mshal, Unassigned)

References

(Blocks 1 open bug, Regression)

Details

(Keywords: regression)

Attachments

(1 file)

Attached file about:support

From https://bugzilla.mozilla.org/show_bug.cgi?id=1547702#c3:

In the latest nightlies I've been having some odd video tearing artifacts and slow browser response (scrolling already loaded pages, and typing in the url bar in particular). I bisected this down to this commit, and verified that if I build the latest mozilla-central the issue is still present, and if I backout this commit the issue goes away. It's not always evident, but it seems easily triggered by opening multiple windows. A simple test case seems to be:

  1. Open a scrolling photo test: https://www.testufo.com/photo
  2. Open a new private window, and load a page (eg: wikipedia.org) - observe that typing the url is unresponsive
  3. Switch back to the scrolling photo window, and observe lots of lag while the page in 2) loads

I'm on Ubuntu with these graphics:

00:02.0 VGA compatible controller: Intel Corporation HD Graphics 620 (rev 02) (prog-if 00 [VGA controller])
Subsystem: Lenovo HD Graphics 620
Flags: bus master, fast devsel, latency 0, IRQ 129
Memory at e0000000 (64-bit, non-prefetchable) [size=16M]
Memory at d0000000 (64-bit, prefetchable) [size=256M]
I/O ports at e000 [size=64]
[virtual] Expansion ROM at 000c0000 [disabled] [size=128K]
Capabilities: <access denied>
Kernel driver in use: i915
Kernel modules: i915


aosmond additionally asked for about:support which is attached, and if I'm using X11 or Wayland - I'm using X11. Happy to run any other tests or gather more system info!

Attachment #9063116 - Attachment mime type: application/octet-stream → text/plain
Blocks: wr-linux
OS: Unspecified → Linux
Hardware: Unspecified → x86_64

More questions :). I haven't had much luck reproducing on my sandybridge era hardware thus far. Since your graphics card can be paired with a range of CPUs, what is the model number? Also, what is your screen resolution? Thanks!

Flags: needinfo?(mshal)

$ xrandr
Screen 0: minimum 320 x 200, current 1920 x 1080, maximum 8192 x 8192
eDP-1 connected primary 1920x1080+0+0 (normal left inverted right x axis y axis) 276mm x 155mm
1920x1080 60.00*+ 59.97 59.96 59.93

$ cat /proc/cpuinfo
processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 142
model name : Intel(R) Core(TM) i7-7600U CPU @ 2.80GHz
stepping : 9
microcode : 0x8e
cpu MHz : 900.121
cache size : 4096 KB
physical id : 0
siblings : 4
core id : 0
cpu cores : 2
apicid : 0
initial apicid : 0
fpu : yes
fpu_exception : yes
cpuid level : 22
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf tsc_known_freq pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb invpcid_single pti ssbd ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm mpx rdseed adx smap clflushopt intel_pt xsaveopt xsavec xgetbv1 xsaves dtherm ida arat pln pts hwp hwp_notify hwp_act_window hwp_epp flush_l1d
bugs : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf
bogomips : 5808.00
clflush size : 64
cache_alignment : 64
address sizes : 39 bits physical, 48 bits virtual
power management:
...

Also, I'm running dwm as the window manager - I did some more testing, and it seems the slow browser response I described (scrolling pages & typing in the URL bar) shows up primarily when I run the second browser window on a different tag (like a separate virtual desktop?). This causes the ufo test page to display "Browser pause detected, resynchronizing..." intermittently while the second page is loading. I don't see that if I run the windows side-by-side on the same tag. Note that the slowdown is not specific to the ufo test page, I just picked that because it's easy to see when the image stops scrolling.

The video tearing shows up even in just a single window, though, so I don't think that's related to the window manager. I'll try to find a short video to reproduce it and get some screen recordings so you can see what I mean.

Digging into the video tearing led me to try this xorg.conf snippet:

$ cat /etc/X11/xorg.conf.d/20-intel.conf
Section "Device"
Identifier "Intel Graphics"
Driver "intel"
Option "TearFree" "true"
EndSection

That fixes both the video tearing and the multi-window slow browser response with bug 1547702 in the tree - hooray!

However, with TearFree=true, now I see that switching away from Firefox to an empty dwm tag leaves an image of the browser behind. Without bug 1547702 (and still with TearFree=true), I don't have the same ghost-browser behavior.

For your test, did you have a similar TearFree=true option set somewhere?

Should I be trying out different window managers and/or compositors?

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

It looks like I hadn't updated dwm in a while, and using a later revision fixes my issues here. I bisected dwm, and the relevant commit that makes the ghost-browser window issue go away is: https://git.suckless.org/dwm/commit/14343e69cc596b847f71f1e825d3019ab1a29aa8.html

Just wanted to leave a note here in case there are similar webrender display issues that others find - maybe something in that commit will help provide clues :)

Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → WORKSFORME
Keywords: regression

The "Regressed By" field is set, so either this is a regression and the 'regression' keyword is needed, or this is not a regression and the "Regressed By" field should be empty.

Flags: needinfo?(jan)
Flags: needinfo?(jan)
Keywords: regression
Has Regression Range: --- → yes
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: