Bug 250011 - graphics/libdrm: "MESA-LOADER: failed to retrieve device information" since 2.4.102
Summary: graphics/libdrm: "MESA-LOADER: failed to retrieve device information" since 2...
Status: New
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: amd64 Any
: --- Affects Some People
Assignee: freebsd-x11 (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-09-30 19:15 UTC by Lars Herschke
Modified: 2020-10-01 17:19 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Lars Herschke 2020-09-30 19:15:40 UTC
Since the update of libdrm to 2.4.102 my graphics device is no longer recognized by mesa.
The mesa-libs then fall back on the i915-dri-driver on my system. But there is an Intel i965GM in my system. If an OpenGL application is started now, I get a black screen and can only reset the laptop to get a display again. The following error is logged in messages.
error: [drm:pid12:i915_hangcheck_hung] *ERROR* Hangcheck timer elapsed... GPU hung
This is of course due to the wrong driver.
If I force the correct driver using the environment variable MESA_LOADER_DRIVER_OVERRIDE=i965, the OpenGL applications work again.
Comment 1 Niclas Zeising freebsd_committer 2020-10-01 06:11:20 UTC
Can you check that it actually is getting to use any driver when you try to force a driver, and doesn't just fall back to software rendering?

From a kernel perspective, there is just the i915kms.ko driver, which provides support for all Intel GPUs.  mesa has both i915_dri.so and i965_dri.so.

Are there any error messages from libdrm, or any hints at all on what has changed?
libdrm does not in itself pick a driver iirc, it is mesa which decides on i915 or i965 (or any other).
Comment 2 Lars Herschke 2020-10-01 06:58:48 UTC
If I set the environment variable or use the old libdrm again, mesa uses the i965_dri.so.
With the new libdrm and without the environment variable set, mesa uses the i915_dri.so, which then leads to the error.
In my opinion, libdrm is used to recognize the dri device and that doesn't work for me with the new version.
But with the new libdrm I cannot find any error messages directly from libdrm anywhere.
Comment 3 Lars Herschke 2020-10-01 07:05:41 UTC
Oh, I still have one more important hint. I loaded the kernel module from the drm-legacy-kmod package because the module from the drm-fbsd12.0-kmod package cannot be loaded on my laptop.
Comment 4 Emmanuel Vadot freebsd_committer 2020-10-01 07:12:47 UTC
Can you give your pci id please ? (pciconf -vl vgapci0)

Thanks.
Comment 5 Lars Herschke 2020-10-01 07:15:01 UTC
There has been almost the same problem before.

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=217585

Here then libdrm was patched (patch-xf86drm.c).
This patch has been removed with the version change to 2.4.102.
Comment 6 Lars Herschke 2020-10-01 07:16:11 UTC
(In reply to Emmanuel Vadot from comment #4)
Unfortunately I can't do that until tonight.
Comment 7 Lars Herschke 2020-10-01 17:19:22 UTC
Here the output of pciconf:

vgapci0@pci0:0:2:0:     class=0x030000 card=0x011f1025 chip=0x2a028086 rev=0x03 hdr=0x00
    vendor     = 'Intel Corporation'
    device     = 'Mobile GM965/GL960 Integrated Graphics Controller (primary)'
    class      = display
    subclass   = VGA