Can't enable external monitors with AMD multi-GPU
On wlroots 0.16 (and kwin 5.25), I can't enable any of my external monitors. wlroots 0.15 and kwin 5.24 work fine. I am on an amdgpu (RX6700M) laptop where external displays connect to the dgpu and the integrated display goes through the igpu.
I have tried updating every relevant wlroots dependency to latest git and messing with all of the wlroots enviroment variables to no avail.
This looks like the same issue as #3368 but wlroots 0.15 works fine for me, so it is probably something slightly different.
00:00:01.132 [DEBUG] [wlr] [types/output/render.c:217] Attaching empty buffer to output for modeset
00:00:01.132 [DEBUG] [wlr] [types/output/render.c:73] Choosing primary buffer format 0x34325258 for output 'DP-1'
00:00:01.132 [DEBUG] [wlr] [render/swapchain.c:105] Allocating new swapchain buffer
00:00:01.132 [DEBUG] [wlr] [render/allocator/gbm.c:141] Allocated 1920x1080 GBM buffer (format 0x34325258, modifier 0x200000000000901)
00:00:01.132 [DEBUG] [wlr] [render/gles2/renderer.c:142] Created GL FBO for buffer 1920x1080
00:00:01.133 [DEBUG] [wlr] [GLES2] Shader Stats: SGPRS: 8 VGPRS: 8 Code Size: 24 LDS: 0 Scratch: 0 Max Waves: 10 Spilled SGPRs: 0 Spilled VGPRs: 0 PrivMem VGPRs: 0 DivergentLoop: 0, InlineUniforms: 0, ParamExports: 0, (PS, W64)
00:00:01.133 [DEBUG] [wlr] [GLES2] Shader Stats: SGPRS: 16 VGPRS: 8 Code Size: 84 LDS: 0 Scratch: 0 Max Waves: 10 Spilled SGPRs: 0 Spilled VGPRs: 0 PrivMem VGPRs: 0 DivergentLoop: 0, InlineUniforms: 0, ParamExports: 1, (VS, W64)
00:00:01.133 [ERROR] [wlr] [EGL] command: eglCreateImageKHR, error: EGL_BAD_ALLOC (0x3003), message: "dri2_create_image_khr_texture"
00:00:01.133 [ERROR] [wlr] [render/egl.c:735] eglCreateImageKHR failed
00:00:01.133 [ERROR] [wlr] [render/gles2/texture.c:270] Failed to create EGL image from DMA-BUF
00:00:01.133 [ERROR] [sway/config/output.c:506] Failed to commit output DP-1```