Bug 269291 - graphics/mesa-dri: sna AccelMethod try to load non-existent i965_dri.so
Summary: graphics/mesa-dri: sna AccelMethod try to load non-existent i965_dri.so
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-x11 (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-02-02 15:43 UTC by nogueira
Modified: 2023-02-05 06:39 UTC (History)
1 user (show)

See Also:
manu: maintainer-feedback+
jbeich: merge-quarterly+


Attachments
Xorg.0.log (16.63 KB, text/plain)
2023-02-02 15:43 UTC, nogueira
no flags Details
use crocus (2.23 KB, patch)
2023-02-03 04:24 UTC, Jan Beich
no flags Details | Diff
Xorg.0.log crocus (24.04 KB, text/plain)
2023-02-03 18:56 UTC, nogueira
no flags Details
Xorg.0.log SNA crocus (16.51 KB, text/plain)
2023-02-04 01:54 UTC, nogueira
no flags Details
Xorg.0.log SNA crocus drm-54-kmod (15.85 KB, text/plain)
2023-02-04 22:31 UTC, nogueira
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description nogueira 2023-02-02 15:43:08 UTC
Created attachment 239864 [details]
Xorg.0.log

With a slow intel CPU N2830, by default the graphics work but no video acceleration, I try to change the AccelMethod to sna but there's a non-existent file:
(EE) AIGLX error: dlopen of /usr/local/lib/dri/i965_dri.so failed (Cannot open "/usr/local/lib/dri/i965_dri.so")
Comment 1 Jan Beich freebsd_committer freebsd_triage 2023-02-03 04:24:22 UTC
Created attachment 239869 [details]
use crocus

Does this help? mesa-dri 21.3.8 -> 22.3.2 replaced i965 with crocus on old Intel iGPUs
Comment 3 Emmanuel Vadot freebsd_committer freebsd_triage 2023-02-03 07:11:13 UTC
I'm ok with the patch if that fixes the issue.
Comment 4 nogueira 2023-02-03 18:56:00 UTC
Created attachment 239889 [details]
Xorg.0.log crocus
Comment 5 nogueira 2023-02-03 18:57:54 UTC
I try AccelMethod crocus and iris and xorg will run but without acceleration, DRI2 fail.
Comment 6 Jan Beich freebsd_committer freebsd_triage 2023-02-03 20:50:37 UTC
(In reply to nogueira from comment #5)
crocus is a DRI2 driver, not AccelMethod. Apply the patch but keep using Option "AccelMethod" "SNA"
Comment 7 nogueira 2023-02-04 01:53:16 UTC
(In reply to Jan Beich from comment #6)

That patch is good, DRI2 will load fine and sddm will run without problem, but at login kwin_x11 and ksplashqml will crash.
Comment 8 nogueira 2023-02-04 01:54:20 UTC
Created attachment 239894 [details]
Xorg.0.log SNA crocus
Comment 9 Jan Beich freebsd_committer freebsd_triage 2023-02-04 19:44:42 UTC
Comment on attachment 239894 [details]
Xorg.0.log SNA crocus

kwin_x11 and ksplashqml crashes are likely caused by the following:

> [    12.361] (WW) intel(0): Detected unsupported/dysfunctional hardware, disabling acceleration.
...
> [    12.377] (WW) intel(0): loading DRI2 whilst acceleration is disabled.

Looking at the code

	if (!is_hw_supported(kgem, dev)) {
		xf86DrvMsg(kgem_get_screen_index(kgem), X_WARNING,
			   "Detected unsupported/dysfunctional hardware, disabling acceleration.\n");
		__kgem_set_wedged(kgem);

8086:0f31 is Valleyview, so it should be well-supported.

Does acceleration fail with drm-54-kmod as well? Revert ports a707d16a2d1e locally (for testing) as it compiles fine on FreeBSD 13.1 (unlike -CURRENT).
Comment 10 nogueira 2023-02-04 22:28:55 UTC
(In reply to Jan Beich from comment #9)
Thank you, it worked with drm-54-kmod
Comment 11 nogueira 2023-02-04 22:31:21 UTC
Created attachment 239912 [details]
Xorg.0.log SNA crocus drm-54-kmod
Comment 12 nogueira 2023-02-04 23:07:08 UTC
I notice that it has lots of artifacts on meld.
Firefox, chromium and libreoffice no problem.
Comment 13 commit-hook freebsd_committer freebsd_triage 2023-02-05 06:14:48 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=5c430b858589919a9074afc86ef818a030ec1f81

commit 5c430b858589919a9074afc86ef818a030ec1f81
Author:     Jan Beich <jbeich@FreeBSD.org>
AuthorDate: 2023-02-03 04:18:40 +0000
Commit:     Jan Beich <jbeich@FreeBSD.org>
CommitDate: 2023-02-05 06:13:52 +0000

    x11-drivers/xf86-video-intel: switch to crocus DRI after 23e4dce35c4a

    PR:             269291
    Tested by:      nogueira@tuta.io
    Approved by:    manu

 x11-drivers/xf86-video-intel/Makefile                |  2 +-
 x11-drivers/xf86-video-intel/files/patch-prefer-iris | 17 +++++++++--------
 2 files changed, 10 insertions(+), 9 deletions(-)
Comment 14 commit-hook freebsd_committer freebsd_triage 2023-02-05 06:15:49 UTC
A commit in branch 2023Q1 references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=0067155b45c4cce26acccf954dabdf1d7857a367

commit 0067155b45c4cce26acccf954dabdf1d7857a367
Author:     Jan Beich <jbeich@FreeBSD.org>
AuthorDate: 2023-02-03 04:18:40 +0000
Commit:     Jan Beich <jbeich@FreeBSD.org>
CommitDate: 2023-02-05 06:14:33 +0000

    x11-drivers/xf86-video-intel: switch to crocus DRI after 23e4dce35c4a

    PR:             269291
    Tested by:      nogueira@tuta.io
    Approved by:    manu

    (cherry picked from commit 5c430b858589919a9074afc86ef818a030ec1f81)

 x11-drivers/xf86-video-intel/Makefile                |  2 +-
 x11-drivers/xf86-video-intel/files/patch-prefer-iris | 17 +++++++++--------
 2 files changed, 10 insertions(+), 9 deletions(-)
Comment 15 Jan Beich freebsd_committer freebsd_triage 2023-02-05 06:34:40 UTC
(In reply to nogueira from comment #12)
I've never used textproc/meld, haven't used Xorg for years and cannot reproduce with SNA on Skylake with drm-510-kmod and don't remember seeing SNA artifacts on drm-54-kmod.

Maybe try
- install graphics/mesa-devel for newer "crocus" (don't remove mesa-dri)
- enable DRI3 via Option "DRI" "3" in xorg.conf(5)
- switch to X11 compositor: x11-wm/picom + Option "TearFree" "false" in xorg.conf(5)
Comment 16 Jan Beich freebsd_committer freebsd_triage 2023-02-05 06:39:48 UTC
Or maybe try newer xf86-video-intel via bug 269296.