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

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