diff options
-rw-r--r-- | backend/wayland/backend.c | 7 | ||||
-rw-r--r-- | render/egl.c | 7 |
2 files changed, 12 insertions, 2 deletions
diff --git a/backend/wayland/backend.c b/backend/wayland/backend.c index 1b702adf..825a5ad7 100644 --- a/backend/wayland/backend.c +++ b/backend/wayland/backend.c @@ -143,7 +143,12 @@ static char *get_render_name(const char *name) { if (match == NULL) { wlr_log(WLR_ERROR, "Cannot find DRM device %s", name); } else if (!(match->available_nodes & (1 << DRM_NODE_RENDER))) { - wlr_log(WLR_ERROR, "DRM device %s has no render node", name); + // Likely a split display/render setup. Pick the primary node and hope + // Mesa will open the right render node under-the-hood. + wlr_log(WLR_DEBUG, "DRM device %s has no render node, " + "falling back to primary node", name); + assert(match->available_nodes & (1 << DRM_NODE_PRIMARY)); + render_name = strdup(match->nodes[DRM_NODE_PRIMARY]); } else { render_name = strdup(match->nodes[DRM_NODE_RENDER]); } diff --git a/render/egl.c b/render/egl.c index e42529e9..0a20a696 100644 --- a/render/egl.c +++ b/render/egl.c @@ -766,7 +766,12 @@ static char *get_render_name(const char *name) { if (match == NULL) { wlr_log(WLR_ERROR, "Cannot find DRM device %s", name); } else if (!(match->available_nodes & (1 << DRM_NODE_RENDER))) { - wlr_log(WLR_ERROR, "DRM device %s has no render node", name); + // Likely a split display/render setup. Pick the primary node and hope + // Mesa will open the right render node under-the-hood. + wlr_log(WLR_DEBUG, "DRM device %s has no render node, " + "falling back to primary node", name); + assert(match->available_nodes & (1 << DRM_NODE_PRIMARY)); + render_name = strdup(match->nodes[DRM_NODE_PRIMARY]); } else { render_name = strdup(match->nodes[DRM_NODE_RENDER]); } |