[ivb] Frequent screen tearing and occasional GPU hang (logs attached) in i915 driver
I've had quite frequent and large issues with screen tearing lately. I don't know at what kernel the issue was introduced but I has to be after January first of 2021.
I haven't found a reliable way to reproduce it yet, but it's been triggered by chromium or an electron app (such as vs code, spotify) - usually when there are some instances running simultaneously. I think it's usually a tool-tip but can't tell for sure. The tearing continues for a while but might subside. Once in a while the entire display freezes for a couple of seconds and then the dmesg logs says GPU hang (and report to here).
I'm on arch linux with the latest kernel:
$ uname -a
Linux asuslaptop 5.10.16-arch1-1 #1 SMP PREEMPT Sat, 13 Feb 2021 20:50:18 +0000 x86_64 GNU/Linux
and running swayvm (wayland-vm using mesa). Chromium and electron apps still use X so it's rendered via Xwayland but I've tried running chromium with wayland as a backend (same result), I've tried firefox (same thing happens) and I've even dropped down to i3-vm (X-based tiling wm) - but the same thing happens. Terrible screen tearing, lingering artifacts and then often a GPU hang.
Attached the output of lshw -C Display, 2 dmesg logs when the GPU hang has happened and 2 /sys/class/drm/card0/error of when the GPU hang has happened.
The tearing seems to be the same as in this issue: #3068 (closed), I'll update this with a photo of the screen if I can capture it.