Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 949726 - media-libs/mesa-24.3.4-r1: only llvmpipe available, segfaults in `libgallium-24.3.4.so`
Summary: media-libs/mesa-24.3.4-r1: only llvmpipe available, segfaults in `libgallium-...
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo X packagers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-02-14 06:05 UTC by Matt Jolly
Modified: 2025-02-17 11:27 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge --info (file_949726.txt,7.41 KB, text/plain)
2025-02-14 06:32 UTC, Matt Jolly
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Matt Jolly gentoo-dev 2025-02-14 06:05:03 UTC
Hi Team,

I performed a world update today and seem to have lost all OpenGL support for my wayland-based system (Plasma 6.3.0, kver: 6.13.2-gentoo-dist).

`dmesg` shows both the i915 and nvidia modules loading successfully, however attempts to use `eglinfo` to debug result in the following:

```
[  202.738421] eglinfo[4727]: segfault at 8 ip 00007fc477e2780d sp 00007ffdc2ba7040 error 4 in libgallium-24.3.4.so[2780d,7fc477e0f000+d8e000] likely on CPU 1 (core 1, socket 0)
```

dmesg snippet for nvidia:

```
[   12.410642] NVRM: loading NVIDIA UNIX x86_64 Kernel Module  570.86.16  Fri Jan 24 21:25:51 UTC 2025
[   12.457430] nvidia-modeset: Loading NVIDIA Kernel Mode Setting Driver for UNIX platforms  570.86.16  Fri Jan 24 20:44:10 UTC 2025
[   12.462587] [drm] [nvidia-drm] [GPU ID 0x00000100] Loading driver
[   13.522336] [drm] Initialized nvidia-drm 0.0.0 for 0000:01:00.0 on minor 1
```

same for i915:

```
[   12.174345] i915 0000:00:02.0: [drm] Found coffeelake (device ID 3e98) display version 9.00 stepping N/A
[   12.175561] i915 0000:00:02.0: vgaarb: deactivate vga console
[   12.197198] i915 0000:00:02.0: vgaarb: VGA decodes changed: olddecodes=io+mem,decodes=none:owns=io+mem
[   12.197616] Loading firmware: i915/kbl_dmc_ver1_04.bin
[   12.198514] i915 0000:00:02.0: [drm] Finished loading DMC firmware i915/kbl_dmc_ver1_04.bin (v1.4)
[   13.040019] i915 0000:00:02.0: [drm] [ENCODER:98:DDI A/PHY A] failed to retrieve link info, disabling eDP
[   13.044637] mei_hdcp 0000:00:16.0-b638ab7e-94e2-4ea2-a552-d1c54b627f04: bound 0000:00:02.0 (ops i9xx_always_on_power_well_ops [i915])
[   13.135584] [drm] Initialized i915 1.6.0 for 0000:00:02.0 on minor 0
[   13.196477] fbcon: i915drmfb (fb0) is primary device
[   13.266668] i915 0000:00:02.0: [drm] fb0: i915drmfb frame buffer device
[   13.306131] snd_hda_intel 0000:00:1f.3: bound 0000:00:02.0 (ops i915_fence_ops [i915])
```

Happy to provide additional troubleshooting info, only have access (directly) to this workstation a few days a week, can SSH most days.
Comment 1 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2025-02-14 06:17:47 UTC
Can you try to get a backtrace via e.g. coredumpctl debug? Also, emerge --info
Comment 2 Matt Jolly gentoo-dev 2025-02-14 06:31:59 UTC
Downgraded mesa to `media-libs/mesa-24.2.8` - still only llvmpipe but eglinfo stopped segfaulting? Will upload core dump if I still have it, or repro. `emerge --info` to follow.
Comment 3 Matt Jolly gentoo-dev 2025-02-14 06:32:47 UTC
Created attachment 918903 [details]
emerge --info
Comment 4 Matt Jolly gentoo-dev 2025-02-14 06:52:13 UTC
backtrace (had to rebuild with debug symbols):

```
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x00007efc8ba2780d in drisw_init_screen (screen=0x5623f0292100, driver_name_is_inferred=false)
    at ../mesa-24.3.4/src/gallium/frontends/dri/drisw.c:623
623        if (loader->base.version >= 4) {
(gdb) bt
#0  0x00007efc8ba2780d in drisw_init_screen (screen=0x5623f0292100, driver_name_is_inferred=false)
    at ../mesa-24.3.4/src/gallium/frontends/dri/drisw.c:623
#1  0x00007efc8ba22d75 in driCreateNewScreen3 (scrn=scrn@entry=0, fd=<optimized out>, 
    loader_extensions=0x7efc8d4631c0 <image_loader_extensions>, type=type@entry=DRI_SCREEN_SWRAST, 
    driver_configs=driver_configs@entry=0x5623f0355780, 
    driver_name_is_inferred=driver_name_is_inferred@entry=false, has_multibuffer=true, data=0x5623f1a59e00)
    at ../mesa-24.3.4/src/gallium/frontends/dri/dri_util.c:144
#2  0x00007efc8d42b79f in dri2_create_screen (disp=disp@entry=0x5623f1a59e00)
    at ../mesa-24.3.4/src/egl/drivers/dri2/egl_dri2.c:825
#3  0x00007efc8d42ce5b in dri2_initialize_device (disp=disp@entry=0x5623f1a59e00)
    at ../mesa-24.3.4/src/egl/drivers/dri2/platform_device.c:362
#4  0x00007efc8d42bfd8 in dri2_initialize (disp=0x5623f1a59e00)
    at ../mesa-24.3.4/src/egl/drivers/dri2/egl_dri2.c:912
#5  0x00007efc8d41abe4 in eglInitialize (dpy=<optimized out>, major=0x7ffde248cc2c, minor=0x7ffde248cc30)
    at ../mesa-24.3.4/src/egl/main/eglapi.c:719
#6  0x00005623c2be5c5c in ?? ()
#7  0x00005623c2be4a7d in ?? ()
#8  0x00007efc93a871ee in ?? () from /usr/lib64/libc.so.6
#9  0x00007efc93a872a9 in __libc_start_main () from /usr/lib64/libc.so.6
#10 0x00005623c2be4b05 in ?? ()

```
Comment 5 Matt Jolly gentoo-dev 2025-02-14 07:05:19 UTC
Have tried kernels as far back as 6.12.8 (which I was running for most of this month) - no change.
Comment 6 Matt Jolly gentoo-dev 2025-02-14 07:16:47 UTC
At ionen's suggestion, purged the .ko files for nvidia drivers and rebooted.

Aside from not being able to initialise screens plugged into my nvidia GPU this appears to have gotten i915 recognised again:

```
$ glxinfo -B
. . .
Extended renderer info (GLX_MESA_query_renderer):
    Vendor: Intel (0x8086)
    Device: Mesa Intel(R) UHD Graphics 630 (CFL GT2) (0x3e98)
. . .
```
Comment 7 Paul Zander 2025-02-14 21:36:43 UTC
The eglinfo output should end with:
> Device platform:
> Device #0:
> [...] # normal nvidia output
> Device #1:
> 
> Platform Device platform:
> nouveau: driver missing
> libEGL warning: egl: failed to create dri2 screen
> nouveau: driver missing
> libEGL warning: egl: failed to create dri2 screen
> [1]    25260 segmentation fault (core dumped)  eglinfo -B

The attempt to use nouveau ( which isn't even build with my mesa ) can be disabled using:
> __EGL_VENDOR_LIBRARY_FILENAMES=/usr/share/glvnd/egl_vendor.d/10_nvidia.json eglinfo -B
or by enforcing zink (if enabled) via
> MESA_LOADER_DRIVER_OVERRIDE=zink eglinfo -B

The referenced bug has some additional details. The zink part is missing.
Comment 8 Matt Jolly gentoo-dev 2025-02-14 23:22:21 UTC
That's exactly what I'm seeing.
Comment 9 Thibaud CANALE 2025-02-17 10:53:37 UTC
It’s related to bug 949411, and in upstream bug 12462
https://gitlab.freedesktop.org/mesa/mesa/-/issues/12462.
Comment 10 Thibaud CANALE 2025-02-17 11:27:42 UTC
Also, based on `strings /usr/lib64/libEGL_mesa.so.0.0.0 | grep -Fie 'failed to create dri2 screen' -`, the message `egl: failed to create dri2 screen` comes from libEGL_mesa instead of libgallium.

For notice, I tried commit from upstream in merged MR https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33123, it did not improve this issue.