FS#69557 - [linux/drm] Rendering problem after update from 5.10.12 to 5.10.13

Attached to Project: Arch Linux
Opened by Ali Molaei (ali_molaei) - Saturday, 06 February 2021, 10:25 GMT
Last edited by Jan Alexander Steffens (heftig) - Sunday, 23 May 2021, 19:37 GMT
Task Type Bug Report
Category Kernel
Status Closed
Assigned To Jan Alexander Steffens (heftig)
Architecture x86_64
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 7
Private No

Details

Description:
I don't know if I should wait for a graphics driver update (I have only Intel graphics with i915 driver) or it is a kernel problem (Maybe compile options changed?) But when I downgrade to 5.10.12 Problems will be resolved for me

I'm glad to provide more info if you ask, I don't know what info should I provide, I'll attach screenshots from the rendering problem.

A side-note: If I switch to wayland, I don't have problems in firefox, but In Minecraft still seeing the problems, Maybe it's xorg related? I don't know.

Additional info:
* package version(s)
linux 5.10.13.arch1-1
xf86-video-intel 1:2.99.917+916+g31486f40-1
gnome-desktop 1:3.38.3-1
mutter 3.38.3-1
xorg-server 1.20.10-3
wayland 1.19.0-1
xorg-xwayland 1.20.0.r844.g1e72c3ce8-1

Steps to reproduce:
Upgrade to linux 5.10.13?
This task depends upon

Closed by  Jan Alexander Steffens (heftig)
Sunday, 23 May 2021, 19:37 GMT
Reason for closing:  Fixed
Additional comments about closing:  linux 5.12.6.arch1-1
Comment by Nesser (Decepteiskon) - Saturday, 06 February 2021, 15:28 GMT Comment by loqs (loqs) - Saturday, 06 February 2021, 15:45 GMT
The following assumes the base-devel group and git are installed and I recommend enabling https://wiki.archlinux.org/index.php/Makepkg#Parallel_compilation to reduce build times.

$ git clone git://git.archlinux.org/svntogit/packages.git --single-branch --branch "packages/linux"
$ cd packages/trunk
$ makepkg -odd
$ cd src/archlinux-linux/
$ git checkout 05f6d2aa7e2f2cdd137ee600785704139e6dd3b7 #checkout v5.10.12, the tag is not available so using commit instead
$ cd ../..
$ makepkg -rsi # build 5.10.12 check that does not have the issue

$ cd packages/trunk/src/archlinux-linux/
$ git checkout 0c245c5fe93f0e9769de4a8b31f129b2759bf802 #checkout v5.10.13, again by commit
cd ../..
$ makepkg -rsif # build 5.10.13 check that does have the issue

$ cd packages/trunk/src/archlinux-linux/
$ git bisect start
$ git bisect bad
$ git bisect good 05f6d2aa7e2f2cdd137ee600785704139e6dd3b7
$ cd ../..
$ makepkg -rsif # build the commit git bisect need to check

$ cd packages/trunk/src/archlinux-linux/
$ git bisect $result #replace $result with good or bad
$ cd ../..
$ makepkg -rsif # repeat last four commands until git bisect finds the causal commit
Comment by Ali Molaei (ali_molaei) - Saturday, 06 February 2021, 16:23 GMT
@Nesser That's definitely the same problem, I searched for Linux bugs so didn't see your issue open
Comment by Ali Molaei (ali_molaei) - Saturday, 06 February 2021, 16:24 GMT
@loqs I don't understand how building and packaging the kernel myself (?) will solve the issue? Can you explain more?
Comment by loqs (loqs) - Saturday, 06 February 2021, 16:47 GMT
@ali_molaei to identify which commit in [1] introduced the issue, so you know who to contact and can provide upstream with the exact cause of the issue, it also rules out the issue being caused by a change in in the kernel config or build system. See [2] for more information on bisection and [3] for reporting kernel bugs and [4] for i915 bugs in particular. You could also try linux-mainline available from [5] to see if the issue has already been fixed upstream.

[1] https://cdn.kernel.org/pub/linux/kernel/v5.x/ChangeLog-5.10.13
[2] https://wiki.archlinux.org/index.php/Bisecting_bugs_with_Git
[3] https://www.kernel.org/doc/html/latest/admin-guide/reporting-issues.html
[4] https://gitlab.freedesktop.org/drm/intel/-/wikis/How-to-file-i915-bugs
[5] https://wiki.archlinux.org/index.php/Unofficial_user_repositories#miffe
Comment by Nesser (Decepteiskon) - Saturday, 06 February 2021, 21:22 GMT
No glitches in Firefox after update to Linux 5.10.13-arch1-2. Glitches remains in Minetest, nothing of value from running MT from console.
Comment by Nesser (Decepteiskon) - Saturday, 06 February 2021, 21:38 GMT
Well, even glxgears show corrupted frames
Comment by Nesser (Decepteiskon) - Monday, 08 February 2021, 21:47 GMT
Linux 5.10.14-arch1-1: still having the issue.
Comment by loqs (loqs) - Monday, 08 February 2021, 21:49 GMT
There is nothing actionable in the bug report.
Comment by Ali Molaei (ali_molaei) - Monday, 08 February 2021, 21:59 GMT
I was busy, sorry, I will try the commands you said to see if I can identify the problem
Comment by loqs (loqs) - Monday, 08 February 2021, 22:03 GMT
Something quicker to test would be linux-mainline from [1]. See if the issue is already fixed in the release candidate of the next release.

[1] https://wiki.archlinux.org/index.php/Unofficial_user_repositories#miffe
Comment by Ali Molaei (ali_molaei) - Monday, 08 February 2021, 22:32 GMT
Tried with `linux-mainline 5.11rc7-1` (Linux b590 5.11.0-rc7-1-mainline #1 SMP PREEMPT Sun, 07 Feb 2021 22:39:24 +0000 x86_64 GNU/Linux)

The problem is not solved. I will try the steps you mentioned before, btw, here is 2 AM right now, I put the commands to clone the kernel (to be downloaded) and let you know about any progress
Comment by Nesser (Decepteiskon) - Tuesday, 09 February 2021, 16:14 GMT
--double comment--
Comment by Ali Molaei (ali_molaei) - Wednesday, 10 February 2021, 12:40 GMT
After about 10 times kernel compilation with my not strong machine (each compile took about 2 hours), Finally, I found the commit that causes the problem.

```
520d05a77b2866eb4cb9e548e1d8c8abcfe60ec5 is the first bad commit
commit 520d05a77b2866eb4cb9e548e1d8c8abcfe60ec5
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date: Sun Jan 17 09:30:15 2021 +0000

drm/i915/gt: Clear CACHE_MODE prior to clearing residuals

commit ef99a60ffd9b918354e038bc5e61f007ff7e901d upstream.

Since we do a bare context switch with no restore, the clear residual
kernel runs on dirty state, and we must be careful to avoid executing
with bad state from context registers inherited from a malicious client.

Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/2955
Fixes: 09aa9e45863e ("drm/i915/gt: Restore clear-residual mitigations for Ivybridge, Baytrail")
Testcase: igt/gem_ctx_isolation # ivb,vlv
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Cc: Akeem G Abodunrin <akeem.g.abodunrin@intel.com>
Reviewed-by: Akeem G Abodunrin <akeem.g.abodunrin@intel.com>
Link:20210117093015.29143-1-chris@chris-wilson.co.uk"> https://patchwork.freedesktop.org/patch/msgid/20210117093015.29143-1-chris@chris-wilson.co.uk
(cherry picked from commit ace44e13e577c2ae59980e9a6ff5ca253b1cf831)
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

drivers/gpu/drm/i915/gt/gen7_renderclear.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
```

I don't know if I should report it upstream or not doe.
Comment by Ali Molaei (ali_molaei) - Wednesday, 10 February 2021, 12:53 GMT
This issue: https://gitlab.freedesktop.org/drm/intel/-/issues/3071 was on i915 bug tracker so I commented a link to this issue there too.
Comment by Luca Ruggeri (lcruggeri) - Wednesday, 10 February 2021, 13:30 GMT
I think is useless now, but you may want to use ccache for speeding the compiling of the same package

https://wiki.archlinux.org/index.php/Ccache
Comment by loqs (loqs) - Wednesday, 10 February 2021, 17:47 GMT
@ali_molaei thank you for the bisect and upstream report.
Does the proposed fix [1] work?

[1] https://patchwork.freedesktop.org/patch/420436/?series=86947&rev=1
Comment by Ali Molaei (ali_molaei) - Thursday, 11 February 2021, 05:14 GMT Comment by Luca Ruggeri (lcruggeri) - Thursday, 11 February 2021, 05:15 GMT
Just updated Linux to version 5.10.15-arch1-1, glxgears and Firefox still shows artifacts. Maybe the patch will be in a future kernel release.
Comment by Ali Molaei (ali_molaei) - Thursday, 11 February 2021, 05:16 GMT Comment by Luca Ruggeri (lcruggeri) - Sunday, 14 February 2021, 19:13 GMT
Linux 5.10.16-arch1-1
Artifacts in Firefox and glxgears.
Comment by loqs (loqs) - Friday, 19 February 2021, 05:01 GMT
Please try building the attached source archive it contains an additional two patches from  FS#69406 
Comment by Ali Molaei (ali_molaei) - Wednesday, 24 February 2021, 06:17 GMT
Hey @loqs sorry for being late, I compiled with these patches too, I still have the problems
Comment by Luca Ruggeri (lcruggeri) - Wednesday, 24 February 2021, 15:48 GMT
Linux: 5.11.1-arch1-1

Effects: Firefox, Minetest and glxgears still shows artifacts.
Comment by Jason Antman (jantman) - Monday, 15 March 2021, 11:24 GMT
I was experiencing an issue that I believe is the same as this one. It was resolved for me since upgrading from linux-5.11.2-arch1-1 to linux 5.11.4-arch1-1 (yeah, I skipped 5.11.3).
Comment by Mark Blakeney (bulletmark) - Monday, 15 March 2021, 12:19 GMT
I also believe I am seeing this same i915 related issue but it is quite infrequent so difficult to say what kernel version it started and I have don't know what initiates it. I guess I first saw graphics glitches about kernel 5.10.16 and have seen glitches on most versions since (although not yet on 5.11.6 over last 2 days). Once they start they will remain until I reboot. Sometimes I get colored "snow" lines the appear on animations, sometimes I get rectangular/triangular artifacts and/or flashing. Here is a small video of an odd one I had on 5.11.5 although I have not seen another one like this before: https://vimeo.com/522537489.

Comment by Ali Molaei (ali_molaei) - Monday, 15 March 2021, 14:47 GMT
@jantman I still have the problem even in 5.11.6 and 5.12.rc1

@bulletmark I watched your video, it seems to be another problem though, The best way I found to detect this issue is by running the command: glxgears
Comment by Konstantinos Charitakis (Alopex) - Sunday, 28 March 2021, 09:39 GMT
I think the problem occurs from all 5.11.x to 5.12, but I'm not so sure about 5.12. The only reason I know about the bug's existence on 5.12 is because of the comments. :) I'm on 5.11.8 and 3D rendering is not the greatest it's ever been.
Comment by Reinhard Kunschke (modnoob) - Tuesday, 20 April 2021, 09:38 GMT
For me the problem is present in 5.12.rc8 too. I am using drm in a intel hd 2500 gpu.
For me it just looks like bits of the geometry is missing.
Comment by Ali Molaei (ali_molaei) - Tuesday, 27 April 2021, 04:33 GMT Comment by Luca Ruggeri (lcruggeri) - Wednesday, 05 May 2021, 20:24 GMT
Kernel: linux 5.12.1-arch1-1
glxgears: still artifacts
Comment by Ali Molaei (ali_molaei) - Saturday, 22 May 2021, 12:39 GMT Comment by Ali Molaei (ali_molaei) - Saturday, 22 May 2021, 12:39 GMT
BTW, maybe a patch can solve the issue for now on arch?
Comment by Jan Alexander Steffens (heftig) - Sunday, 23 May 2021, 02:38 GMT
Should be fixed in linux 5.12.6.arch1-1
Comment by Ali Molaei (ali_molaei) - Sunday, 23 May 2021, 19:35 GMT
It's fixed in 5.12.6.arch1-1, I think this issue can be closed. Thank you to all the people who helped with this :D

Loading...