Bug 1194180

Summary: iris_dri.so from Mesa-dri segfault with several applications
Product: [openSUSE] openSUSE Distribution Reporter: Alexander Krupp <obs>
Component: X11 3rd Party DriverAssignee: Gfx Bugs <gfx-bugs>
Status: RESOLVED FIXED QA Contact: Stefan Dirsch <sndirsch>
Severity: Normal    
Priority: P3 - Medium CC: obs
Version: Leap 15.4   
Target Milestone: ---   
Hardware: x86-64   
OS: openSUSE Leap 15.4   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: Xorg.0.log.gz

Description Alexander Krupp 2021-12-30 14:05:12 UTC
The segfault for sddm-greeter occurs every time on a freshly installed system. I had to switch to lightdm, which works, most of the time.

Dec 30 14:44:08 think14 kernel: qsyncthingtray[19285]: segfault at 24 ip 00007fffb1c8a020 error 6 in iris_dri.so[7fc0877d1000+136b000]

2021-12-30T14:02:45.997672+01:00 think14 kernel: [138087.736134] opensuse-welcom[31843]: segfault at 24 ip 00007f5d133650e5 sp 00007ffe8274c250 error 6 in iris_dri.so[7f5d1270d000+136b000]

2021-12-29T10:20:45.690768+01:00 think14 kernel: [38369.060592] kscreenlocker_g[1945]: segfault at 24 ip 00007f870e3280e5 sp 00007ffe4a9fe4e0 error 6 in iris_dri.so[7f870d6d0000+136b000]

2021-12-28T22:09:37.605330+01:00 think14 kernel: [ 7788.556324] sddm-greeter[12168]: segfault at 24 ip 00007fd189a480e5 sp 00007fff6732a780 error 6 in iris_dri.so[7fd188df0000+136b000]


Hardware is a 

System Information
        Manufacturer: LENOVO
        Product Name: 20W000ATGE
        Version: ThinkPad T14 Gen 2i

Base Board Information
        Manufacturer: LENOVO
        Product Name: 20W000ATGE
        Version: SDK0J40697 WIN

Processor Information
        Socket Designation: U3E1
        Type: Central Processor
        Family: Core i7
        Manufacturer: Intel(R) Corporation
        Signature: Type 0, Family 6, Model 140, Stepping 1
Comment 1 Alexander Krupp 2021-12-30 14:14:31 UTC
Created attachment 854877 [details]
Xorg.0.log.gz
Comment 2 Stefan Dirsch 2022-01-17 19:30:36 UTC
Possibly - as workaround - you can switch to older "i965" driver by moving 

/usr/lib64/dri/iris_dri.so

to a different location.
Comment 3 Alexander Krupp 2022-01-29 09:22:30 UTC
Meanwhile I have switched to 15.4 alpha due to multiple issues with power saving states on 15.3. The issue with the iris driver is present there, too. (sddm shows black screen)

I had first disabled acceleration, which made the desktop appear and which enabled working with it. 

--- /etc/X11/xorg.conf.d/50-intel-nodri.conf ---
Section "Device"
   Identifier "Intel Graphics"
 
   Driver "intel"
   Option "AccelMethod" "false"
EndSection
---

I have then tried your suggestion (removing also the mentioned .conf) and the display comes up, too. However, acceleration seems to be broken, too:

---
glxinfo -B
name of display: :0
libGL error: MESA-LOADER: failed to open iris: /usr/lib64/dri/iris_dri.so: cannot open shared object file: No such file or directory (search paths /usr/lib64/dri, suffix _dri)
libGL error: failed to load driver: iris
libGL error: MESA-LOADER: failed to open iris: /usr/lib64/dri/iris_dri.so: cannot open shared object file: No such file or directory (search paths /usr/lib64/dri, suffix _dri)
libGL error: failed to load driver: iris
display: :0  screen: 0
direct rendering: Yes
Extended renderer info (GLX_MESA_query_renderer):
    Vendor: Mesa/X.org (0xffffffff)
    Device: llvmpipe (LLVM 11.0.1, 256 bits) (0xffffffff)
    Version: 21.2.4
    Accelerated: no
    Video memory: 15712MB
    Unified memory: no
    Preferred profile: core (0x1)
    Max core profile version: 4.5
    Max compat profile version: 3.1
    Max GLES1 profile version: 1.1
    Max GLES[23] profile version: 3.2
---


--- dmesg | grep i915
[    5.323920] i915 0000:00:02.0: enabling device (0006 -> 0007)
[    5.324504] i915 0000:00:02.0: [drm] VT-d active for gfx access
[    5.324509] fb0: switching to i915 from EFI VGA
[    5.324625] i915 0000:00:02.0: vgaarb: deactivate vga console
[    5.325031] i915 0000:00:02.0: vgaarb: changed VGA decodes: olddecodes=io+mem,decodes=io+mem:owns=mem
[    5.326085] i915 0000:00:02.0: [drm] Finished loading DMC firmware i915/tgl_dmc_ver2_12.bin (v2.12)
[    5.454829] [drm] Initialized i915 1.6.0 20201103 for 0000:00:02.0 on minor 0
[    5.458703] fbcon: i915 (fb0) is primary device
[    5.495047] i915 0000:00:02.0: [drm] fb0: i915 frame buffer device
[    8.474386] sof-audio-pci-intel-tgl 0000:00:1f.3: bound 0000:00:02.0 (ops i915_audio_component_bind_ops [i915])
[    8.786380] mei_hdcp 0000:00:16.0-b638ab7e-94e2-4ea2-a552-d1c54b627f04: bound 0000:00:02.0 (ops i915_hdcp_component_ops [i915])
---

--- Xorg.0.log
[    18.882] (II) LoadModule: "intel"
[    18.882] (II) Loading /usr/lib64/xorg/modules/drivers/intel_drv.so
[    18.883] (II) Module intel: vendor="X.Org Foundation"
[    18.883]    compiled for 1.20.3, module version = 2.99.917
[    18.883]    Module class: X.Org Video Driver
[    18.883]    ABI class: X.Org Video Driver, version 24.0
[    18.883] (II) intel: Driver for Intel(R) Integrated Graphics Chipsets:
        i810, i810-dc100, i810e, i815, i830M, 845G, 854, 852GM/855GM, 865G,
        915G, E7221 (i915), 915GM, 945G, 945GM, 945GME, Pineview GM,
        Pineview G, 965G, G35, 965Q, 946GZ, 965GM, 965GME/GLE, G33, Q35, Q33,
        GM45, 4 Series, G45/G43, Q45/Q43, G41, B43
[    18.884] (II) intel: Driver for Intel(R) HD Graphics
[    18.884] (II) intel: Driver for Intel(R) Iris(TM) Graphics
[    18.884] (II) intel: Driver for Intel(R) Iris(TM) Pro Graphics
[    18.903] (II) intel(0): Using Kernel Mode Setting driver: i915, version 1.6.0 20201103
[    18.904] (WW) intel(0): Unknown chipset
...
[    18.906] (II) intel(0): SNA initialized with disabled backend
[    18.906] (==) intel(0): Backing store enabled
[    18.906] (==) intel(0): Silken mouse enabled
[    18.906] (II) intel(0): HW Cursor enabled
[    18.907] (==) intel(0): DPMS enabled
[    18.907] (==) intel(0): Display hotplug detection enabled
[    18.907] (II) intel(0): Textured video not supported on this hardware or backend
[    18.907] (WW) intel(0): loading DRI2 whilst acceleration is disabled.
[    18.907] (II) intel(0): [DRI2] Setup complete
[    18.907] (II) intel(0): [DRI2]   DRI driver: i965
[    18.907] (II) intel(0): [DRI2]   VDPAU driver: va_gl
[    18.907] (II) intel(0): direct rendering: DRI2 DRI3 enabled
[    18.907] (II) intel(0): hardware support for Present enabled
---

Overriding Mesa with i965 does not help.
---
MESA_LOADER_DRIVER_OVERRIDE=i965 glxinfo -B
name of display: :0
gfx12 and newer are not supported on i965
libGL error: failed to create dri screen
libGL error: failed to load driver: i965
gfx12 and newer are not supported on i965
libGL error: failed to create dri screen
libGL error: failed to load driver: i965
display: :0  screen: 0
direct rendering: Yes
Extended renderer info (GLX_MESA_query_renderer):
    Vendor: Mesa/X.org (0xffffffff)
    Device: llvmpipe (LLVM 11.0.1, 256 bits) (0xffffffff)
    Version: 21.2.4
    Accelerated: no
---


Overriding Mesa driver with i915 seems somewhat better.
---
MESA_LOADER_DRIVER_OVERRIDE=i915 glxinfo -B
name of display: :0
display: :0  screen: 0
direct rendering: Yes
Extended renderer info (GLX_MESA_query_renderer):
    Vendor: Intel Open Source Technology Center (0x8086)
    Device: Mesa DRI Unknown Intel Chipset  (0x9a49)
    Version: 21.2.4
    Accelerated: yes
    Video memory: 3072MB
    Unified memory: yes
    Preferred profile: compat (0x2)
    Max core profile version: 0.0
    Max compat profile version: 1.3
    Max GLES1 profile version: 1.1
    Max GLES[23] profile version: 0.0
---

However, running some applications, e.g. on wine produces the following:

---
Jan 29 10:11:08 think14 kernel: i915 0000:00:02.0: [drm] Resetting rcs0 for CS error
Jan 29 10:11:08 think14 kernel: i915 0000:00:02.0: [drm] X[1946] context reset due to GPU hang
Jan 29 10:11:08 think14 kernel: i915 0000:00:02.0: [drm] GPU HANG: ecode 12:1:abeffffb, in X [1946]
Jan 29 10:11:08 think14 kernel: i915 0000:00:02.0: [drm] Resetting rcs0 for CS error
Jan 29 10:11:08 think14 kernel: i915 0000:00:02.0: [drm] X[1946] context reset due to GPU hang
Jan 29 10:11:08 think14 kernel: i915 0000:00:02.0: [drm] GPU HANG: ecode 12:1:abeffffb, in X [1946]
Jan 29 10:11:08 think14 kernel: i915 0000:00:02.0: [drm] Resetting rcs0 for CS error
Jan 29 10:11:08 think14 kernel: i915 0000:00:02.0: [drm] X[1946] context reset due to GPU hang
Jan 29 10:11:08 think14 kernel: i915 0000:00:02.0: [drm] GPU HANG: ecode 12:1:abeffffb, in X [1946]
Comment 4 Stefan Dirsch 2022-01-29 16:01:35 UTC
I think you're right. It needs to be i915, not i965 DRI driver. Maybe things are working better with modesetting X driver. For testing this you can uninstall xf86-video-intel package and restart X (session).
Comment 5 Alexander Krupp 2022-01-30 21:56:52 UTC
--- /etc/X11/xorg.conf.d/50-intel-nodri.conf ---
Section "Device"
   Identifier "Intel Graphics"
   Driver "modesetting"
EndSection
---

provides for

---  glxinfo -B
name of display: :0
display: :0  screen: 0
direct rendering: Yes
Extended renderer info (GLX_MESA_query_renderer):
    Vendor: Intel (0x8086)
    Device: Mesa Intel(R) Xe Graphics (TGL GT2) (0x9a49)
    Version: 21.2.4
    Accelerated: yes
    Video memory: 3072MB
    Unified memory: yes
    Preferred profile: core (0x1)
    Max core profile version: 4.6
    Max compat profile version: 4.6
    Max GLES1 profile version: 1.1
    Max GLES[23] profile version: 3.2
OpenGL vendor string: Intel
OpenGL renderer string: Mesa Intel(R) Xe Graphics (TGL GT2)
OpenGL core profile version string: 4.6 (Core Profile) Mesa 21.2.4
OpenGL core profile shading language version string: 4.60
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile

OpenGL version string: 4.6 (Compatibility Profile) Mesa 21.2.4
OpenGL shading language version string: 4.60
OpenGL context flags: (none)
OpenGL profile mask: compatibility profile

OpenGL ES profile version string: OpenGL ES 3.2 Mesa 21.2.4
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20
---

which performs "snappier" than before (and without nasty artifacts when scrolling backwards).

Alas, I could do without such hassle on a new laptop.

I did not expect the modesetting driver to perform that well, so I did not try it. Thank you for pointing me in the right direction. 

Any chance the xf86-video-intel will be fixed by release time?
Comment 6 Stefan Dirsch 2022-01-31 03:02:10 UTC
xf86-video-intel is no longer under development since long time (neither feature nor bugfix wise). It's not recommended to be used except on very old Intel graphics hardware. Also we no longer install this package by default since years.

What are the remaining issues when using modesetting X driver, our default?
Comment 7 Alexander Krupp 2022-01-31 10:20:34 UTC
I am currently not aware of issues running under the modesetting driver as this is a completely fresh install. On older machines I had issues _without_ the intel driver, and I did not encounter clear communication on the web that development on the intel driver had ceased, hence my attempt at running the intel driver to get rid of several issues. 

I will follow your suggestion to remove the intel driver instead of adding configuration to Xorg and report back.
Comment 8 Stefan Dirsch 2022-01-31 10:33:47 UTC
Ok. A few more details. We only select xf86-video-intel package for installation on 

 Intel Gen <= 3 (i810/i1815, i830, 845, 855, 865, 915, 945, G33)

This is Intel graphics hardware from 2007 or even older. Maybe it's just time to remove this package and remove support for these GPUs that way. In some cases  the driver  still works on newer GPUs and it some it doesn't and in others it's just unstable.

There's no difference in specifying "modeseting" driver or just killing this config und uninstalling the xf86-video-intel package. modesetting is the default driver for this GPU. Closing as fixed.