Bug 260890 - graphics/drm-fbsd13-kmod: display artifacts in xorg (Intel HD Graphics 3000)
Summary: graphics/drm-fbsd13-kmod: display artifacts in xorg (Intel HD Graphics 3000)
Status: Open
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: amd64 Any
: --- Affects Only Me
Assignee: freebsd-x11 (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-01-02 20:28 UTC by Benjamin Stoker
Modified: 2024-06-08 17:34 UTC (History)
4 users (show)

See Also:
bugzilla: maintainer-feedback? (x11)


Attachments
screenshot (21.33 KB, image/png)
2022-01-02 20:28 UTC, Benjamin Stoker
no flags Details
devinfo -vr (13.54 KB, text/plain)
2022-01-02 20:30 UTC, Benjamin Stoker
no flags Details
dmesg (10.58 KB, text/plain)
2022-01-02 20:30 UTC, Benjamin Stoker
no flags Details
pciconf -lvbce (10.53 KB, text/plain)
2022-01-02 20:31 UTC, Benjamin Stoker
no flags Details
pkg info (80.86 KB, text/plain)
2022-01-02 20:32 UTC, Benjamin Stoker
no flags Details
xorg.conf (1.68 KB, text/plain)
2022-01-02 20:33 UTC, Benjamin Stoker
no flags Details
xorg.log (16.40 KB, text/plain)
2022-01-02 20:33 UTC, Benjamin Stoker
no flags Details
disable rc6p for sandybridge (365 bytes, patch)
2024-05-20 17:01 UTC, mew14930xvi
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Benjamin Stoker 2022-01-02 20:28:34 UTC
Created attachment 230636 [details]
screenshot

I am seeing rectangular screen artifcats when browsing the web, reading pdfs, or
basically doing anything.  If I scroll up and down, they also move up and down
as if they belonged to the document.

I can use either intel or modesetting, with or without graphics/xf86-video-intel
installed, and it makes no difference.  I will attach xorg conf+log for
completeness, but again, it makes no difference whether any of these settings
are present.

Also, I run i3 with compton, and I have tested it three ways.

1. Without compton, artifacts appear occasionally and are an annoyance.
2. Using compton with the xrender backend, artifacts are so severe as to make
the system nearly unusable.
3. Using compton with the glx backend, artifacts appear rarely, then disappear
immediately, as if compton were correcting them.  It is still however an
annoyance, especially during video playback.

I have tested a Linux USB drive to confirm that it is not a hardware issue.
I have not tested FreeBSD current.

sysctl hw.model: Intel(R) Core(TM) i5-2520M CPU @ 2.50GHz

uname -v: FreeBSD 13.0-RELEASE-p4 #0: Tue Aug 24 07:33:27 UTC 2021     root@amd64-builder.daemonology.net:/usr/obj/usr/src/amd64.amd64/sys/GENERIC

A screenshot and other command outputs will be attached.
Comment 1 Benjamin Stoker 2022-01-02 20:30:04 UTC
Created attachment 230637 [details]
devinfo -vr
Comment 2 Benjamin Stoker 2022-01-02 20:30:43 UTC
Created attachment 230638 [details]
dmesg
Comment 3 Benjamin Stoker 2022-01-02 20:31:23 UTC
Created attachment 230639 [details]
pciconf -lvbce
Comment 4 Benjamin Stoker 2022-01-02 20:32:33 UTC
Created attachment 230640 [details]
pkg info
Comment 5 Benjamin Stoker 2022-01-02 20:33:29 UTC
Created attachment 230641 [details]
xorg.conf
Comment 6 Benjamin Stoker 2022-01-02 20:33:58 UTC
Created attachment 230642 [details]
xorg.log
Comment 7 Emmanuel Vadot freebsd_committer freebsd_triage 2022-01-03 08:55:06 UTC
Could you try FreeBSD-CURRENT by any chances ?
I have a SandyBridge system here and it's working correctly.
I'll try to find a way to quickly test 13.0 in the meantime.

Also just to be clear, running i3 and opening firefox is enough for you to reproduce ?

Cheers,
Comment 8 Benjamin Stoker 2022-01-03 23:09:18 UTC
(In reply to Emmanuel Vadot from comment #7)
I will test current in the coming days, time permitting.

i3+qutebrowser is sufficient to trigger it.  But it can be frustratingly
intermittent.  I don't THINK it is a Qt bug, having seen it in mupdf and mpv,
for example, without any Qt applications running.  But qutebrowser is quite
prone to the issue.  I will report back if I gather anything about firefox.
Comment 9 Benjamin Stoker 2022-01-14 02:13:02 UTC
Ok, fresh install of 14.0-CURRENT running xorg, modesetting, i3-gaps, mpv, and qutebrowser, and I can report that:

1. drm-current-kmod (5.4.144) does NOT work.  Not only are there frequent artifacts as described above, the GPU hangs every few minutes, giving messages such as:

kernel: drmn0: GPU HANG: ecode 6:1:0xc3c3c3c2, in python3.8 [100291], hang on rcs0
kernel: drmn0: Resetting chip for hang on rcs0
syslogd: last message repeated 12 times
syslogd: last message repeated 15 times
kernel: drmn0: GPU recovery timed out, cancelling all in-flight rendering.
kernel: drmn0: Resetting chip for hang on rcs0

2. drm-devel-kmod (5.5.19) works VERY well.  Performance is great, there are no hangs, and after several days of testing I am unable to trigger the bug.

If you want further information let me know.  Otherwise, I will be going back to my 13.0-RELEASE partition, so consider this a request to make the newer drivers available in the next release.
Comment 10 Emmanuel Vadot freebsd_committer freebsd_triage 2022-01-14 10:12:55 UTC
I have now a 13.0-RELEASE installed on my sandy bridge machine and I do not see any artifacts but I'll leave the machine up and check from time to time if something appears.
It's at least good news that 5.5 is working for you and yes > 5.4 will be available for 13.1
Comment 11 Graham Perrin freebsd_committer freebsd_triage 2022-05-28 20:02:49 UTC
> graphics/drm-fbsd13-kmod: display artifacts in xorg (Intel HD Graphics 3000)

<https://www.freshports.org/graphics/drm-fbsd13-kmod/#history> 
currently at 5.4.144.g20220223_1

<https://www.freshports.org/graphics/drm-54-kmod/#history> 
currently at 5.4.191 (and packaged in latest for tier 1)


Are there artifacts with graphics/drm-54-kmod on FreeBSD 13.1-RELEASE?
Comment 12 Benjamin Stoker 2022-06-04 01:08:12 UTC
(In reply to Graham Perrin from comment #11)
Yes, unfortunately, the issue is still present with both drm-54-kmod and drm-510-kmod on 13.1-RELEASE.
Comment 13 NV 2024-05-20 14:38:15 UTC
Same issue. Same gpu. FreeBSD 14.0-RELEASE.

I can provide further information upon request.
Comment 14 mew14930xvi 2024-05-20 15:10:21 UTC
I had the same problem.
There is a bug in sandybridge.
A one-line patch solves the problem.
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=276995
Comment 15 NV 2024-05-20 16:35:06 UTC
Does this online patch imply FreeBSD kernel reconfiguration?
Comment 16 mew14930xvi 2024-05-20 17:01:20 UTC
Created attachment 250835 [details]
disable rc6p for sandybridge

No.
Put patch-drivers_gpu_drm_drm_i915_i915__pci.c in graphics/drm-510-kmod/files and rebuild.
Comment 17 NV 2024-05-22 00:42:49 UTC
My system doesn't have drm-510-kmod. It has drm-515-kmod and in the following link, you mentioned it's fixed in drm-515-kmod.

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=276995
Comment 18 NV 2024-06-08 17:34:25 UTC
Anyway, anyone possibly working on this issue who might need any detail, screen grab, log etc, please let me know.