From c6631077d7ee7f2a631cdfcf71a5b60214a9fb56 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= Date: Fri, 19 May 2023 16:06:15 +0200 Subject: [PATCH] backend/native: Ignore not found errors when adding drm device in headless When testing mutter using `META_DBUS_RUNNER_WRAPPER=rr` we may get a not found-device error, given that it's not a case we support, we can ignore it as we do with permission denied one, limiting this to the RR case. Part-of: --- src/backends/native/meta-backend-native.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/backends/native/meta-backend-native.c b/src/backends/native/meta-backend-native.c index 8e8c2d3bb..40ba19ac5 100644 --- a/src/backends/native/meta-backend-native.c +++ b/src/backends/native/meta-backend-native.c @@ -647,8 +647,11 @@ init_gpus (MetaBackendNative *native, if (!add_drm_device (native, device, &device_error)) { if (meta_backend_is_headless (backend) && - g_error_matches (device_error, G_IO_ERROR, - G_IO_ERROR_PERMISSION_DENIED)) + (g_error_matches (device_error, G_IO_ERROR, + G_IO_ERROR_PERMISSION_DENIED) || + (g_strcmp0 (g_getenv ("RUNNING_UNDER_RR"), "1") == 0 && + g_error_matches (device_error, G_IO_ERROR, + G_IO_ERROR_NOT_FOUND)))) { meta_topic (META_DEBUG_BACKEND, "Ignoring unavailable gpu '%s': %s'",