sway fails to start on rockchip devices with mesa 24.2.0-rc2
Tried mesa 24.2.0 for the first time today but unfortunately sway no longer starts:
00:00:00.048 [ERROR] [wlr] [EGL] command: eglInitialize, error: EGL_NOT_INITIALIZED (0x3001), message: "DRI2: failed to load driver"
libEGL warning: MESA-LOADER: egl: failed to open rockchip: driver not built!
00:00:00.052 [ERROR] [wlr] [EGL] command: eglInitialize, error: EGL_NOT_INITIALIZED (0x3001), message: "DRI2: failed to load driver"
00:00:00.055 [ERROR] [wlr] [EGL] command: eglInitialize, error: EGL_NOT_INITIALIZED (0x3001), message: "DRI2: failed to load driver"
00:00:00.055 [ERROR] [wlr] [EGL] command: eglInitialize, error: EGL_NOT_INITIALIZED (0x3001), message: "eglInitialize"
00:00:00.055 [ERROR] [wlr] [render/egl.c:269] Failed to initialize EGL
00:00:00.055 [ERROR] [wlr] [render/egl.c:572] Failed to initialize EGL context
00:00:00.055 [ERROR] [wlr] [render/gles2/renderer.c:804] Could not initialize EGL
00:00:00.055 [ERROR] [wlr] [render/wlr_renderer.c:423] Could not initialize renderer
00:00:00.055 [ERROR] [sway/server.c:143] Failed to create renderer
The culprit seems to be that HAVE_KMSRO
is never defined in:
https://gitlab.freedesktop.org/mesa/mesa/-/blob/23b0798551bc32f2885ac5016b7ba8584c8c6a2e/src/gallium/targets/dri/dri_target.c#L252
Usual set of gallium drivers that do define HAVE_<driver>
does not include kmsro
:
https://gitlab.freedesktop.org/mesa/mesa/-/blob/23b0798551bc32f2885ac5016b7ba8584c8c6a2e/meson.build#L161-L164
Not really sure but perhaps it should rely on GALLIUM_KMSRO
define instead, the only one available with kmsro:
https://gitlab.freedesktop.org/mesa/mesa/-/blob/23b0798551bc32f2885ac5016b7ba8584c8c6a2e/src/gallium/winsys/kmsro/drm/meson.build#L18