#1058750 libgtk-4-1: GTK hang and crash on Intel i915

Package:
libgtk-4-1
Source:
libgtk-4-1
Description:
GTK graphical user interface library
Submitter:
behzad
Date:
2023-12-21 12:48:02 UTC
Severity:
normal
#1058750#5
Date:
2023-12-15 14:43:36 UTC
From:
To:
Dear Maintainer,

I updated my debian unstable and GNOME desktop and GTK4 applications
(not GTK3) are hanging and crashing and unusable. I get these in dmesg:

```
[    4.979276] i915 0000:00:02.0: vgaarb: deactivate vga console
[    4.982573] i915 0000:00:02.0: vgaarb: changed VGA decodes: olddecodes=io+mem,decodes=io+mem:owns=io+mem
[    5.036888] i915 0000:00:02.0: [drm] Skipping intel_backlight registration
[    5.037230] [drm] Initialized i915 1.6.0 20201103 for 0000:00:02.0 on minor 0
[    5.057543] fbcon: i915drmfb (fb0) is primary device
[    5.876043] i915 0000:00:02.0: [drm] fb0: i915drmfb frame buffer device
[   24.523339] snd_hda_intel 0000:00:1b.0: bound 0000:00:02.0 (ops i915_audio_component_bind_ops [i915])
[  120.904757] i915 0000:00:02.0: [drm] GPU HANG: ecode 5:1:790a817b, in gnome-shell [1254]
[  120.905118] i915 0000:00:02.0: [drm] Resetting chip for stopped heartbeat on rcs0
[  121.007279] i915 0000:00:02.0: [drm] gnome-shell[1254] context reset due to GPU hang
```

I don't know what is the problem but I'm using Phosh temporarily and can
run GTK4 apps from terminal with `LIBGL_ALWAYS_SOFTWARE=1` variable.

#1058750#20
Date:
2023-12-21 06:29:14 UTC
From:
To:
I think the problem is not exactly from GTK4 or I915, but it's from crocus_dri driver from libgl1-mesa-dri package. I temporarily fixed this in my system with editing /etc/environment and adding `MESA_LOADER_DRIVER_OVERRIDE=i915` to the file.
#1058750#25
Date:
2023-12-21 06:27:53 UTC
From:
To:
I think the problem is not exactly from GTK4 or I915, but it's from crocus_dri driver from libgl1-mesa-dri package. I temporarily fixed this in my system with editing /etc/environment and adding `MESA_LOADER_DRIVER_OVERRIDE=i915` to the file.
#1058750#30
Date:
2023-12-21 12:45:20 UTC
From:
To:
Now I have some problem again. I can run GNOME Desktop with the variable but animations are not working even if enabled. Also Phosh desktop failing to run with all drivers, except with crocus:

```
libEGL warning: egl: failed to create dri2 screen

(phoc:6696): phoc-wlroots-CRITICAL **: 16:12:51.787: [EGL] command: eglInitialize, error: EGL_NOT_INITIALIZED (0x3001), message: "DRI2: failed to create screen"
libEGL warning: egl: failed to create dri2 screen

(phoc:6696): phoc-wlroots-CRITICAL **: 16:12:51.797: [EGL] command: eglInitialize, error: EGL_NOT_INITIALIZED (0x3001), message: "DRI2: failed to create screen"

(phoc:6696): phoc-wlroots-CRITICAL **: 16:12:51.797: [EGL] command: eglInitialize, error: EGL_NOT_INITIALIZED (0x3001), message: "eglInitialize"

(phoc:6696): phoc-wlroots-CRITICAL **: 16:12:51.797: [render/egl.c:264] Failed to initialize EGL

(phoc:6696): phoc-wlroots-CRITICAL **: 16:12:51.797: [render/egl.c:554] Failed to initialize EGL context

(phoc:6696): phoc-wlroots-CRITICAL **: 16:12:51.797: [render/gles2/renderer.c:679] Could not initialize EGL

(phoc:6696): phoc-wlroots-CRITICAL **: 16:12:51.797: [render/wlr_renderer.c:333] Could not initialize renderer

(phoc:6696): phoc-server-CRITICAL **: 16:12:51.852: Failed to create server: Could not create renderer
```