From c0758c63b5ef17ffe140774974bd6a63f597fca3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20=C3=85dahl?= Date: Mon, 17 May 2021 10:32:19 +0200 Subject: [PATCH] native: Properly ignore devices on init too There is an udev rule marking whether a device should be ignored by mutter or not, but it was only respected on hotplug events not on init, partly defeating its purpose. Fix this. Part-of: --- src/backends/native/meta-backend-native.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/backends/native/meta-backend-native.c b/src/backends/native/meta-backend-native.c index dbf39d7e0..9524d91f3 100644 --- a/src/backends/native/meta-backend-native.c +++ b/src/backends/native/meta-backend-native.c @@ -516,6 +516,13 @@ init_gpus (MetaBackendNative *native, MetaGpuKms *gpu_kms; GError *local_error = NULL; + if (meta_is_udev_device_ignore (device)) + { + g_message ("Ignoring DRM device '%s' (from udev rule)", + g_udev_device_get_device_file (device)); + continue; + } + gpu_kms = create_gpu_from_udev_device (native, device, &local_error); if (!gpu_kms)