Blame SOURCES/0001-data-only-disable-wayland-on-passthrough-virt-setups.patch

4dd5a8
From ab9510df0b5f7bc29662804991729c6d6ee38b70 Mon Sep 17 00:00:00 2001
4dd5a8
From: Ray Strode <rstrode@redhat.com>
4dd5a8
Date: Thu, 12 Dec 2019 16:56:16 -0500
4dd5a8
Subject: [PATCH] data: only disable wayland on passthrough virt setups
4dd5a8
4dd5a8
at the moment we disable wayland on all hybrid graphics setups,
4dd5a8
but most hybrid graphics setups work fine.
4dd5a8
4dd5a8
The case we really care about is passthrough virt. in that case,
4dd5a8
wayland is a bad idea because:
4dd5a8
1) kernel crashes
4dd5a8
2) mutter provides no way to disable one of the cards, and will
4dd5a8
always use one as a secondary gpu
4dd5a8
4dd5a8
This commit forces xorg in passthrough setups so the user can use
4dd5a8
an xorg.conf to turn one of the cards off.
4dd5a8
---
4dd5a8
 data/61-gdm.rules.in | 9 +++++++--
4dd5a8
 1 file changed, 7 insertions(+), 2 deletions(-)
4dd5a8
4dd5a8
diff --git a/data/61-gdm.rules.in b/data/61-gdm.rules.in
4dd5a8
index fc2e3315c..f971224cf 100644
4dd5a8
--- a/data/61-gdm.rules.in
4dd5a8
+++ b/data/61-gdm.rules.in
4dd5a8
@@ -1,20 +1,25 @@
4dd5a8
 # disable Wayland on Matrox chipsets
4dd5a8
 ATTR{vendor}=="0x102b", ATTR{device}=="0x0522", RUN+="@libexecdir@/gdm-disable-wayland"
4dd5a8
 ATTR{vendor}=="0x102b", ATTR{device}=="0x0524", RUN+="@libexecdir@/gdm-disable-wayland"
4dd5a8
 ATTR{vendor}=="0x102b", ATTR{device}=="0x0530", RUN+="@libexecdir@/gdm-disable-wayland"
4dd5a8
 ATTR{vendor}=="0x102b", ATTR{device}=="0x0532", RUN+="@libexecdir@/gdm-disable-wayland"
4dd5a8
 ATTR{vendor}=="0x102b", ATTR{device}=="0x0533", RUN+="@libexecdir@/gdm-disable-wayland"
4dd5a8
 ATTR{vendor}=="0x102b", ATTR{device}=="0x0534", RUN+="@libexecdir@/gdm-disable-wayland"
4dd5a8
 ATTR{vendor}=="0x102b", ATTR{device}=="0x0536", RUN+="@libexecdir@/gdm-disable-wayland"
4dd5a8
 ATTR{vendor}=="0x102b", ATTR{device}=="0x0538", RUN+="@libexecdir@/gdm-disable-wayland"
4dd5a8
 
4dd5a8
 # disable Wayland on aspeed chipsets
4dd5a8
 ATTR{vendor}=="0x1a03", ATTR{device}=="0x2010", RUN+="@libexecdir@/gdm-disable-wayland"
4dd5a8
 ATTR{vendor}=="0x1a03", ATTR{device}=="0x2000", RUN+="@libexecdir@/gdm-disable-wayland"
4dd5a8
 
4dd5a8
 # disable Wayland when using the proprietary nvidia driver
4dd5a8
 DRIVER=="nvidia", RUN+="@libexecdir@/gdm-disable-wayland"
4dd5a8
 
4dd5a8
-# disable Wayland on hybrid graphics setups for now
4dd5a8
-SUBSYSTEM=="drm", KERNEL=="card[1-9]*", RUN+="@libexecdir@/gdm-disable-wayland"
4dd5a8
+# disable Wayland on passthrough graphics setups for now (assumes passthrough if
4dd5a8
+# there is more than one card, and one of the cards is virt: cirrus, bochs, qxl)
4dd5a8
+ATTR{vendor}=="0x1013", ATTR{device}=="0x00b8", ATTR{subsystem_vendor}=="0x1af4", ATTR{subsystem_device}=="0x1100", ENV{GDM_HAS_VIRTUAL_GPU}="1"
4dd5a8
+ATTR{vendor}=="0x1b36", ATTR{device}=="0x0100", ENV{GDM_HAS_VIRTUAL_GPU}="1"
4dd5a8
+ATTR{vendor}=="0x1234", ATTR{device}=="0x1111", ENV{GDM_HAS_VIRTUAL_GPU}="1"
4dd5a8
+
4dd5a8
+SUBSYSTEM=="drm", KERNEL=="card[1-9]*", ENV{GDM_HAS_VIRTUAL_GPU}=="1", RUN+="@libexecdir@/gdm-disable-wayland"
4dd5a8
 
4dd5a8
-- 
4dd5a8
2.21.0
4dd5a8