Bug 1214448

Summary: crash in kernel for i915 drm Xorg server
Product: [openSUSE] openSUSE Distribution Reporter: Bat Pul <batpul>
Component: X.OrgAssignee: Gfx Bugs <gfx-bugs>
Status: RESOLVED FIXED QA Contact: Gfx Bugs <gfx-bugs>
Severity: Major    
Priority: P3 - Medium CC: batpul, mrmazda, vliaskovitis
Version: Leap 15.5   
Target Milestone: ---   
Hardware: x86-64   
OS: openSUSE Leap 15.5   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: journalctl output when crashing
the Xorg.0.log file of the crash
list of relevant rpms on the system

Description Bat Pul 2023-08-21 18:33:31 UTC
Created attachment 868921 [details]
journalctl output when crashing

while in chrome a kernel crash occurred in i950 drm for the Xorg server. see attachments. I could log the data, but after a 'sync' the system hang.
Comment 1 Bat Pul 2023-08-21 18:34:39 UTC
Created attachment 868922 [details]
the Xorg.0.log file of the crash
Comment 2 Bat Pul 2023-08-21 18:35:18 UTC
Created attachment 868923 [details]
list of relevant rpms on the system
Comment 3 Vasilis Liaskovitis 2023-08-22 13:59:57 UTC
Can you upload the full xorg core file?

You can enable coredump collection with:

zypper in systemd-coredump

when the crash happens you should be able to see the name of the core file in the list provided by:
coredumpctl list


The core file should be in:
/var/lib/systemd/coredump/

Please also post a full list of installed rpms (not just the ones in comment#2).

and output of "inxi -aG"
Comment 4 Bat Pul 2023-08-22 14:14:38 UTC
There is a 25 MB core, but I'm concerned that uploading threatens my privacy.

If you give a list of relevant rpms I'll provide them.

Here is inxi -aG:

Graphics:
  Device-1: Intel HD Graphics 530 vendor: Gigabyte driver: i915 v: kernel
    arch: Gen-9 process: Intel 14n built: 2015-16 ports: active: HDMI-A-3
    empty: DP-1,HDMI-A-1,HDMI-A-2 bus-ID: 00:02.0 chip-ID: 8086:1912
    class-ID: 0300
  Display: x11 server: X.org v: 1.21.1.4 with: Xwayland v: 22.1.5
    compositor: Picom v: 9.1 driver: X: loaded: intel
    unloaded: fbdev,modesetting,vesa dri: i965 gpu: i915 display-ID: :0
    screens: 1
  Screen-1: 0 s-res: 1920x1200 s-size: <missing: xdpyinfo>
  Monitor-1: HDMI-A-3 mapped: HDMI3 model: 
    res: 1920x1200 hz: 60 dpi: 94 gamma: 1.2
    ratio: 16:10 modes:
    max: 1920x1200 min: 720x400
  API: OpenGL v: 4.6 Mesa 22.3.5 renderer: Mesa Intel HD Graphics 530 (SKL
    GT2) direct render: Yes
Comment 5 Felix Miata 2023-08-26 02:56:29 UTC
Reporter may consider to uninstall xorg-x11-driver-video and xf86-video-intel as a possible workaround pending bug fix:

>  inxi -GSz
System:
  Kernel: 5.14.21-150500.55.19-default arch: x86_64 bits: 64 Desktop: KDE
    v: 3.5.10 Distro: openSUSE Leap 15.5
Graphics:
  Device-1: Intel HD Graphics 630 driver: i915 v: kernel
  Display: x11 server: X.Org v: 1.21.1.4 driver: X: loaded: modesetting
    unloaded: fbdev,vesa dri: iris gpu: i915 resolution: 1920x1200~60Hz
  API: OpenGL v: 4.6 Mesa 22.3.5 renderer: Mesa Intel HD Graphics 630 (KBL
    GT2

> grep DRI /var/log/Xorg.0.log
[     9.334] (II) modeset(0): [DRI2] Setup complete
[     9.334] (II) modeset(0): [DRI2]   DRI driver: iris
[     9.334] (II) modeset(0): [DRI2]   VDPAU driver: va_gl
[     9.336] (II) Initializing extension DRI3
[     9.343] (II) GLX: Initialized DRI2 GL provider for screen 0
[     9.343] (II) Initializing extension XFree86-DRI
[     9.343] (II) Initializing extension DRI2

# rpm -qa | grep video
xf86-video-fbdev-0.5.0-150500.15.1.x86_64
xf86-video-vesa-2.6.0-150500.1.1.x86_64
Comment 6 Stefan Dirsch 2023-08-26 12:58:08 UTC
Yes, please uninstall xf86-video-intel package and try again.
Comment 7 Stefan Dirsch 2023-08-27 08:43:58 UTC
> Date: Sat, 26 Aug 2023 23:36:51 -0400
> From: Felix Miata <mrmazda@earthlink.net>
> To: Stefan Dirsch <sndirsch@suse.com>
> Subject: Re: [Bug 1214448] crash in kernel for i915 drm Xorg server
> 
> bugzilla_noreply@suse.com composed on 2023-08-26 12:58 (UTC):
> > --- Comment #6 from  Stefan Dirsch <sndirsch@suse.com>
> https://bugzilla.opensuse.org/show_bug.cgi?id=1214448
> 
> I'm puzzled why OP's DRI is i965. Shouldn't Gen8 and above Intel graphics in
> Leap prefer iris by default? Or, is that just for modesetting DIX users?

Yes, selection of DRI driver for modesetting is done via tables in Xserver sources (modesetting meanwhile part of Xserver sources). Due to Mesa update there is no longer any i965_dri driver. It has been replaced by Mesa's crocus_dri driver. Things may work again by adjusting intel X driver.

Anyway, let's try by switching to modesetting X driver first.
Comment 8 Stefan Dirsch 2023-08-27 08:45:11 UTC
Note to myself:

xf86-video-intel-2.99.917/src/sna/sna_dri2.c
[...]
static const char *dri_driver_name(struct sna *sna)
{
        const char *s = options_get_dri(sna);

        if (is_level(&s)) {
                if (sna->kgem.gen < 030)
                        return has_i830_dri() ? "i830" : "i915";
                else if (sna->kgem.gen < 040)
                        return "i915";
                else
                        return "i965";
        }

        return s;
}
Comment 9 Stefan Dirsch 2023-08-27 08:46:11 UTC
(In reply to Stefan Dirsch from comment #8)
> Note to myself:
> 
> xf86-video-intel-2.99.917/src/sna/sna_dri2.c
> [...]
> static const char *dri_driver_name(struct sna *sna)
> {
>         const char *s = options_get_dri(sna);
> 
>         if (is_level(&s)) {
>                 if (sna->kgem.gen < 030)
>                         return has_i830_dri() ? "i830" : "i915";
>                 else if (sna->kgem.gen < 040)
>                         return "i915";
>                 else
>                         return "i965";
>         }
> 
>         return s;
> }

==> i965 --> crocus ?
Comment 10 Stefan Dirsch 2023-11-26 16:09:20 UTC
Meanwhile fixed in Tumbleweed and Leap 15.5/sle15-sp5.

xf86-video-intel:
-------------------------------------------------------------------
Wed Oct 18 13:07:14 UTC 2023 - Stefan Dirsch <sndirsch@suse.com>

- renamed n_Mesa-i965-crocus.patch to n_Mesa-i965-crocus-iris.patch
- n_Mesa-i965-crocus-iris.patch
  * use "iris" instead of "crocus" for anything newer than Haswell 

-------------------------------------------------------------------
Wed Oct 18 12:37:29 UTC 2023 - Stefan Dirsch <sndirsch@suse.com>

- n_Mesa-i965-crocus.patch
  * Mesa's DRI driver is now called "crocus" (previously "i965");
    fixes hardware OpenGL support when still using "intel" X
    driver instead of "modesetting" one ...

--> Closing as fixed.
Comment 12 Maintenance Automation 2023-12-21 16:30:05 UTC
SUSE-RU-2023:4954-1: An update that has one fix can now be installed.

Category: recommended (moderate)
Bug References: 1214448
Sources used:
openSUSE Leap 15.5 (src): xf86-video-intel-2.99.917.916_g31486f40-150500.3.6.1
Basesystem Module 15-SP5 (src): xf86-video-intel-2.99.917.916_g31486f40-150500.3.6.1

NOTE: This line indicates an update has been released for the listed product(s). At times this might be only a partial fix. If you have questions please reach out to maintenance coordination.